当前位置:网站首页>服务器常见错误代码 总结
服务器常见错误代码 总结
2022-04-23 05:52:00 【幽幽靖】
一:500错误
1、500 Internal Server Error 内部服务错误:顾名思义500错误一般是服务器遇到意外情况,而无法完成请求。
2、500出错的可能性:
a、编程语言语法错误,web脚本错误
b、并发高时,因为系统资源限制,而不能打开过多的文件
3、一般解决思路:
a、查看nginx、php的错误日志文件,从而看出端倪
b、如果是too many open files,修改nginx的worker_rlimit_nofile参数,使用ulimit查看系统打开文件限制,修改/etc/security/limits.conf,还是出现too many open files,那就要考虑做负载均衡,把流量分散到不同服务器上去了
c、如果是脚本的问题,则需要修复脚本错误,优化代码
二:502、504错误
1、502 Bad Gateway错误、504 Bad Gateway timeout 网关超时
2、502、504出现的可能性
web服务器故障、程序进程不够
3、一般解决思路
a、使用nginx代理,而后端服务器发生故障;或者php-cgi进程数不够用;
php执行时间长,或者是php-cgi进程死掉;已经fastCGI使用情况等都会导致502、504错误。
b、502 是指请求的php-fpm已经执行,但是由于某种原因而没有执行完毕,最终导致php-fpm进程终止。
一般来说,与php-fpm.conf的设置有关,也与php的执行程序性能有关,网站的访问量大,而php-cgi的进程数偏少。
针对这种情况的502错误,只需增加 php-cgi的进程数。
具体就是修改/usr/local/php/etc/php-fpm.conf文件,将其中的max_children值适当增加。
这个数据要依据你的服务器的配置进行设置。
一般一个php-cgi进程占20M内存,你可以自己计算下,适量增多。
/usr/local/php/sbin/php-fpm reload 然后重启一下.
c、504 表示超时,也就是客户端所发出的请求没有到达网关,请求没有到可以执行的php-fpm。
与nginx.conf的配置也有关系。
501 服务器不具备完成请求的功能。例如,服务器无法识别请求方法时可能会返回此代码。
503 服务器目前无法使用(由于超载或停机维护)。通常,这只是暂时状态。(服务不可用)
505 服务器不支持请求中所用的 HTTP 协议版本。(HTTP 版本不受支持)
其他相关文章:
Web 服务器错误代码大全:https://blog.csdn.net/weixin_33778544/article/details/94172117
版权声明
本文为[幽幽靖]所创,转载请带上原文链接,感谢
https://blog.csdn.net/ws19900201/article/details/110389541
边栏推荐
- [UDS unified diagnosis service] i. diagnosis overview (1) - diagnosis overview
- 信息学一本通-小球
- [stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
- cv_bridge 与opencv 版本不匹配的解决
- 微信小程序之点击取消,返回上页,修改上页的参数值,let pages=getCurrentPages() let prevPage=pages[pages.length - 2] // 上一页的数据
- Makefile基础、常用函数及通用Makefile
- TP download folder, compress folder and download
- 【UDS统一诊断服务】一、诊断概述(2)— 主要诊断协议(K线和CAN)
- sqlite3加密版
- 浮点数双精度,单精度以及半精度知识总结
猜你喜欢
[UDS unified diagnostic service] II. Network layer protocol (2) - data transmission rules (single frame and multi frame)
CUDA环境安装
【UDS统一诊断服务】(补充)五、ECU bootloader开发要点详解 (2)
基于VGG卷积神经网络的图像识别代码实现
JS中 t, _ => 的解析
Opencv uses genericindex for KNN search
HDU-Tunnel Warfare
cuda工程更换环境(电脑)后遇到的一系列编译问题
逻辑回归原理及代码实现
深蓝学院激光slam理论与实践 -第二章(里程计标定)作业
随机推荐
Installation of GCC, G + +, GDB
C语言结构体指定初始化
[UDS unified diagnosis service] IV. typical diagnosis service (1) - diagnosis and communication management function unit
Initialization of classes and objects (constructors and destructors)
cuda工程更换环境(电脑)后遇到的一系列编译问题
C语言的浪漫
汇编 32位无符号加法计算器
TP download folder, compress folder and download
PN结、二极管原理详解与应用
基于VGG卷积神经网络的图像识别代码实现
Using printf in MFC
生成快捷方式
PHP junior programmers, take orders and earn extra money
Tabbar implementation of dynamic bottom navigation bar in uniapp, authority management
[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
【UDS统一诊断服务】五、诊断应用示例:Flash Bootloader
【UDS统一诊断服务】一、诊断概述(1)— 诊断概述
[UDS unified diagnosis service] i. diagnosis overview (1) - diagnosis overview
HDU-Tunnel Warfare
2020 Jiangsu Collegiate Programming Contest-A.Array