Now Hiring: Are you a driven and motivated 1st Line IT Support Engineer?

Blog

Apache+PHP FastCGI数据超时导致500错误问题

Apache+PHP FastCGI数据超时导致500错误问题

Apache + PHP FastCGI数据超时导致500错误问题

最近发现有台带维护的客户服务器 日志记录出现
[warn] .. mod_fcgid: read data timeout in 60 seconds, …
[error] .. Premature end of script headers: index.php …
比较多的这种错误

访问会出现 500 Internal Server Error
以为是权限导致的问题 结果发现并不是这个原因

更改

FcgidProcessLifeTime 8200
FcgidIOTimeout 8200
FcgidConnectTimeout 600
FcgidMaxRequestLen 1000000000

把其中FcgidConnectTimeout 60改为 600
重新启动后未发现问题

执行时间一般建议是60-120
除非你的应用需求 否则不建议设置太长
会产生定量的假死进程
引起apache服务无法访问

建议使用脚本进行监控
1. 进程达到一定数量的时候 kill掉
2. 进程超过xxx时间后kill掉
3. 系统负载到一定的数量 比如10的时候 reload进程
也可以回收实现

相关:

  • fastcgi 500

Leave your thought here

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare