如何解决Plesk中的FastCGI超时问题?

问题描述 投票:9回答:5

PHP支持当前设置为:以Fast CGI运行。

我在服务器日志中不断收到这些错误:

mod_fcgid:45秒内读取数据超时

脚本头的过早结尾:index.php

我认为应该是快速解决方案,但是我找不到要编辑的文件。我可以从Plesk更改吗?

任何人都知道如何增加超时时间?

php centos fastcgi plesk connection-timeout
5个回答
6
投票

在Plesk 12.x和类似版本中,转到Web服务器设置并设置以下指令:

HTTP和HTTPS的其他指令

FcgidBusyTimeout 300
FcgidIOTimeout 250

以上各行将更改安静时间太长且执行时间太长的脚本的超时。

其他nginx指令

proxy_read_timeout 300;

以上各行将更改代理超时。

如果问题仍然存在,请增加值。

另请参见:Premature end of script headers: index.php, mod_fcgid: read data timeout


查看屏幕快照以获取指导:

Plesk 12.x - Web Server Settings - Additional Apache directives: Additional directives for HTTP & HTTPS - FcgidBusyTimeout & FcgidIOTimeout

Plesk 12.x - Web Server Settings - Additional nginx directives - proxy_read_timeout


5
投票

由Parallels员工在Plesk论坛中提供的解决方案

编辑文件:

/ etc / httpd / conf.d / fcgid.conf

具体来说,更改

FcgidIOTimeout 45

to

FcgidIOTimeout 3600

3600秒= 1小时。对于大多数来说应该足够长,但是要调整如果需要,向上。我看到一个例子,其中引用了7200秒。

最后,重新启动Apache以激活新设置。

apachectl优美

希望有帮助

R


1
投票

我对此的解决方案是根据屏幕截图更改plesk控制面板中的PHP设置。PHP Settings


0
投票

在新版本的Plesk中,fcgid.conf文件已移至:

/ etc / apache2 / mods-available / fcgid.conf

我在将xml文件导入wordpress时遇到了一些问题。它继续给出500内部错误。错误日志显示:

[[2017年7月26日星期三13:18:00.219226] [fcgid:warn] [pid 4751] [客户端145.97.205.8:60155] mod_fcgid:45秒内读取数据超时

[[2017年7月26日星期三13:18:00.219505] [fcgid:warn] [pid 4751](110)连接超时:[客户端145.97.205.8:60155] mod_fcgid:ap_pass_brigade在handle_request_ipc函数中失败]

遵循一些建议后-由于PHP.INI设置没有影响-我根据建议更改了一些设置:

原件:

FcgidIOTimeout 45

收件人:

FcgidIOTimeout 3600

还添加:

<IfModule mod_fcgid.c>
FcgidMaxRequestsPerProcess 500
<IfModule !mod_fastcgi.c>

像魅力一样工作。谢谢您的帮助。


0
投票

在/etc/php.ini中更改max_execution_time = 3600之后解决了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.