zoukankan      html  css  js  c++  java
  • 今天测试大商创,遇到了 upstream sent too big header while reading response header from upstream

    今天在测试大商创后台系统时,打开店铺结算,查看店铺对应的订单列表时,该列表自动跳转到502,查看线上和测试环境都能正常打开,唯独我的电脑上打开是502,

    查询nginx的error.log日志,记录了如下错误

    2019/11/26 10:38:55 [error] 328604#333604: *10 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: myshop.cn, request: "GET /admin/merchants_commission.php?act=commission_amount&seller=1,2,4,65,69,70,71,72,73,76,81,82,83,85,162&1574735928782782 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "myshop.cn", referrer: "http://myshop.cn/admin/merchants_commission.php?act=list"
    2019/11/26 10:38:59 [error] 328604#333604: *3 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: myshop.cn, request: "GET /admin/merchants_commission.php?act=commission_amount&type=all&cycle=-1&1574735928776776 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "myshop.cn", referrer: "http://myshop.cn/admin/merchants_commission.php?act=list"
    2019/11/26 10:39:00 [error] 328604#333604: *15 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: myshop.cn, request: "GET /admin/merchants_commission.php?act=order_list&id=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "myshop.cn", referrer: "http://myshop.cn/admin/merchants_commission.php?act=edit&id=1"
    2019/11/26 10:39:00 [error] 328604#333604: *15 CreateFile() "D:/phpstudy_pro/WWW/youhou/admin/error/502.html" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: myshop.cn, request: "GET /admin/error/502.html HTTP/1.1", host: "myshop.cn", referrer: "http://myshop.cn/admin/merchants_commission.php?act=edit&id=1"
    2019/11/26 10:39:00 [error] 328604#333604: *15 CreateFile() "D:/phpstudy_pro/WWW/youhou/error/404.html" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: myshop.cn, request: "GET /admin/error/502.html HTTP/1.1", host: "myshop.cn", referrer: "http://myshop.cn/admin/merchants_commission.php?act=edit&id=1"
    

    百度了一下,找到了解决方法,再此记录一下

    在 nginx.conf 的http段,加入下面的配置:

    proxy_buffer_size 128k;

    proxy_buffers  32 32k;

    proxy_busy_buffers_size 128k;

    重启后一般就可以解决, 如果还是报502,再在host配置的php段加入下面配置:

    fastcgi_buffer_size 128k;

    fastcgi_buffers 4 256k;

    fastcgi_busy_buffers_size 256k;

    重启nginx即可。

    参考:https://www.jianshu.com/p/389f45d0e7a2

      

  • 相关阅读:
    详解CSS中:nth-child的用法
    网站哀悼变灰代码集合 兼容所有浏览器的CSS变暗代码
    简单CSS3实现炫酷读者墙
    CSS常用浮出层的写法
    五种方法让CSS实现垂直居中
    网页前端开发:微博CSS3适用细节初探
    CSS代码实例:用CSS代码写出的各种形状图形
    10个CSS简写及优化技巧
    25个站长必备的SEO优化工具
    40个让你的网站屌到爆的jQuery插件
  • 原文地址:https://www.cnblogs.com/xmnote/p/11934006.html
Copyright © 2011-2022 走看看