nginx日志常见报错解决

目录

一:报错

二:php查看后台内容有的栏目出现502?

三:413 Request Entity Too Large?

四:Request Header Or Cookie Too Large  400


一:报错

 upstream prematurely closed connection while reading response header from upstream, client: 114.95.224.97, server: old.dagongchang.com, request: "GET /dgc_adMin/order.php?act=info&order_id=255336 HTTP/1.1", upstream: "http://127.0.0.1:8000/dgc_adMin/order.php?act=info&order_id=255336", host: "old.dagongchang.com", referrer: "http://old.dagongchang.com/dgc_adMin/order.php?act=list

解决:

(1)可能是连接数据库超时,查看数据库日志;

排查:web和数据库一个地方,web和数据库两个地方判断;

常见错误日志:

(一):

 upstream prematurely closed connection while reading response header from upstream, client: 114.95.224.97, server: old.dagongchang.com, request: "GET /dgc_adMin/order.php?act=info&order_id=255336 HTTP/1.1", upstream: "http://127.0.0.1:8000/dgc_adMin/order.php?act=info&order_id=255336", host: "old.dagongchang.com", referrer: "http://old.dagongchang.com/dgc_adMin/order.php?act=list

解决:

(1)可能是连接数据库超时,查看数据库日志;

排查:web和数据库一个地方,web和数据库两个地方判断;

常见错误日志:


二:php查看后台内容有的栏目出现502?

(1)可能是php读取数据库时间太长或者计算量太大,加大php.ini里的内存;

   (2)得到相关的php语句查看打印执行时间;

   (3)去掉相关的sql语句试试.

三:413 Request Entity Too Large?

client_max_body_size 50m;  上传大小限制

四:Request Header Or Cookie Too Large  400

Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct () in Unknown on line 0

解决:发现泛解析错误

<VirtualHost *:808>

# ServerAdmin webmaster@dummy-host.example.com

  DocumentRoot "/www/wwwroot/wp"

  ServerName www.veipifa.com

  ServerAlias *.veipifa.com              这里写错了 写成dagongchang.com了

  LimitRequestBody 524288000

  ErrorLog "/www/weblogs/www.veipifa.com_httpd_error.log"

  CustomLog "/www/weblogs/www.veipifa.com_httpd_access.log" common

<Directory /www/wwwroot/wp >

# Options Indexes FollowSymLinks

 Options  FollowSymLinks

 AllowOverride All

 Require all granted

 ExpiresByType text/css A5

 ExpiresByType application/x-javascript A5

 ExpiresByType image/gif A5

# Require all denied

 </Directory>

</VirtualHost>

五:[error] 9706#0: *203994 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: HTTP_X_REAL_IP in /data/wwwroot/apigmtool.youjoy.tv/app/Controller/Api/Controller.php on line 13" while reading response header from upstream, client: 140.207.91.206, server: apigmtool.youjoy.tv, request

php5会出现这个问题 ,解决在变量前面加上@ ,nginx就不会提示这种警告了

  • 18
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

攻城狮的梦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值