mod_fcgid:读取数据超时 45 秒和脚本标头过早结束:index.php

web*_*per 2 timeout mod-fcgid plesk

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

[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 
Run Code Online (Sandbox Code Playgroud)

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

我使用的是 Plesk 12.0.18、CentOS 5.11

Elv*_*sky 6

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

  • 最有可能的是,其中存在错误index.php,导致它根本无法操作。在这种情况下,您应该在Plesk > 域 > example.com > PHP 设置中提高 PHP 错误报告级别并检查脚本本身。

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

1.在Plesk > 域 > example.com > PHP 设置max_execution_time中设置。120

2.通过在Plesk > 域 > example.com > Apache & Nginx 设置 > 其他 Apache 指令FastCGI timeout中添加以下 Apache 指令来增加:

<IfModule mod_fcgid.c> 
FcgidIOTimeout 120 
</IfModule>
Run Code Online (Sandbox Code Playgroud)