timeout - mod_fcgid : read data timeout in 45 seconds and Premature end of script headers: index. php

标签 timeout plesk mod-fcgid

我的一个网站客户在下订单时遇到了问题。 当我检查我的错误日志时,我可以看到这个:

[warn]  mod_fcgid: read data timeout in 45 seconds, referer: https://myDomain/cart
[error] Premature end of script headers: index.php, referer: https://myDomain/cart 

这个错误是什么意思?我应该怎么做才能消除这个错误? Plesk 控制面板中是否有任何设置需要更改?如果我将'Php settings'中的'max_execution_time'更改为3600是否可以解决?

我使用的是 Plesk 12.0.18、CentOS 5.11

最佳答案

该错误表示index.php 文件中的网站代码未能在为Apache FastCGI 模块和/或PHP 设置的时限内执行。

  • 很可能是 index.php 中存在错误,导致它根本无法运行。在这种情况下,您应该在 Plesk > Domains > example.com > PHP Settings 中增加 PHP 错误报告级别并检查脚本本身。

  • 该脚本不太可能需要很长时间才能执行。在这种情况下,您可以通过 Plesk 简单地增加超时。要设置 120 秒而不是默认的 45 秒,请执行以下操作:

1.在 Plesk > Domains > example.com > PHP settings 中将 max_execution_time 设置为 120

2。通过在 Plesk > Domains > example.com > Apache & Nginx settings > Additional Apache directives 中添加以下 Apache 指令来增加 FastCGI 超时:

<IfModule mod_fcgid.c> 
FcgidIOTimeout 120 
</IfModule>

关于timeout - mod_fcgid : read data timeout in 45 seconds and Premature end of script headers: index. php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52169954/

相关文章:

asp.net 2.0 session 超时

node.js - Plesk Windows 部署 Node.js

c++ - fastCGI应用代码结构

flash - 如何延长 Flash 应用程序中的默认超时时间?

google-app-engine - Google App Engine 超时 : The datastore operation timed out, 或数据暂时不可用

centos - 我的 Plesk 12.5 (centOS 6.6) 上的 proFTPD

c - Apache (ab) : mod_fcgid 4x slower than mod_cgi

php - 对端 : mod_fcgid: error reading data from FastCGI server 重置连接

c - 如何使用 poll() 检测超时的客户端?

php - mysqli::__construct(): (HY000/1045): 用户 'lfc_site' @'localhost' 的访问被拒绝(使用密码:YES)