自学内容网 自学内容网

无法加载响应数据: No data found for resourcewith given identifier

背景

学习黑马2022Redis教程,在开发P78达人探店功能,重新在前端登录的时候发现,所有的请求都需要发两遍才能成功。
失败的请求报错:
无法加载响应数据: No data found for resourcewith given identifier
在这里插入图片描述

排查

因为用到nginx,所以查看nginx配置文件

   server{
      # 此处省略若干配置
       location /api {  
            default_type  application/json;
            #internal;  
            keepalive_timeout   30s;  
            keepalive_requests  1000;  
            #支持keep-alive  
            proxy_http_version 1.1;  
            rewrite /api(/.*) $1 break;  
            proxy_pass_request_headers on;
            #more_clear_input_headers Accept-Encoding;  
            proxy_next_upstream error timeout;  
            #proxy_pass http://127.0.0.1:8081;
            proxy_pass http://backend;
        }
    }

    upstream backend {
        server 127.0.0.1:8081 max_fails=5 fail_timeout=10s weight=1;
        server 127.0.0.1:8082 max_fails=5 fail_timeout=10s weight=1;
    }  

幡然醒悟,之前测试集群环境下的并发问题开过两个实例。测试完后,后续其它开发只启动一个实例,配置文件没有改回去……


原文地址:https://blog.csdn.net/qq_43726119/article/details/142734440

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!