解决MAMP的apache日志报错:FastCGI ... idle timeout (30s)

MAMP环境下的apache采用的环境变量配置,采用了MAMP自定义的配置。
比如:打开httpd.conf(打开界面的Edit----Edite Template----apache----httpd.conf)FastCGI相关的配置,搜索MAMP_FastCgiServer_MAMP,能看到apache采用了自定义的配置参数。

这些自定义的配置,带来了一些隐患:我在执行一个需要很长时间(约2分钟)的php脚本时,apache响应500错误,查看日志发现

[error] [client ::1] FastCGI: comm with server "/Applications/MAMP/fcgi-bin/php7.0.8.fcgi" aborted: idle timeout (30 sec)

需要设置idle timeout的最大时间,正确的配置方法是:

#MAMP_FastCgiServer_MAMP
FastCgiServer /Applications/MAMP/fcgi-bin/php7.0.8.fcgi -idle-timeout 3600

即先注释掉MAMP的自定义项,然后添加想修改的项
重启apache,运行脚本,问题解决。

你可能感兴趣的:(解决MAMP的apache日志报错:FastCGI ... idle timeout (30s))