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就不会提示这种警告了

相关推荐

  1. QT 常见解决记录

    2023-12-30 15:48:02       20 阅读
  2. 解决常见的 `npm install`

    2023-12-30 15:48:02       13 阅读
  3. 解决 nginx 504 Gateway Time-out问题

    2023-12-30 15:48:02       42 阅读
  4. Nginx 504 Gateway Time-out 的解决方法

    2023-12-30 15:48:02       16 阅读
  5. mysql使用过程常见问题解决

    2023-12-30 15:48:02       39 阅读
  6. 解决Milo连接OPU UA的两个常见

    2023-12-30 15:48:02       37 阅读
  7. mysql日志查看

    2023-12-30 15:48:02       23 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-30 15:48:02       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-30 15:48:02       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-30 15:48:02       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-30 15:48:02       18 阅读

热门阅读

  1. 使用Go-Gin框架实现 OSS 前端直传功能

    2023-12-30 15:48:02       35 阅读
  2. MongoDB聚合:$out

    2023-12-30 15:48:02       40 阅读
  3. STL——遍历算法

    2023-12-30 15:48:02       39 阅读
  4. 第22课 类和对象

    2023-12-30 15:48:02       34 阅读
  5. 一个简易的SpringAOP实例

    2023-12-30 15:48:02       36 阅读
  6. C# json 转匿名对象及C#关键字的处理

    2023-12-30 15:48:02       42 阅读
  7. Docker 镜像命令总汇

    2023-12-30 15:48:02       32 阅读
  8. Mysql创建新用户并赋予权限

    2023-12-30 15:48:02       45 阅读
  9. 从C到C++1

    2023-12-30 15:48:02       36 阅读
  10. 每日一练:LeeCode-239. 滑动窗口最大值(难)

    2023-12-30 15:48:02       32 阅读
  11. Mysql子查询 , 内连接

    2023-12-30 15:48:02       29 阅读
  12. 【机器学习前置知识】二项分布

    2023-12-30 15:48:02       33 阅读
  13. ESP32常用库之<WiFi.h>库详解

    2023-12-30 15:48:02       31 阅读