You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在MAMP Pro中延长FastCGI空闲超时时间?

解决MAMP CGI模式下FastCGI超时问题

当MAMP以CGI模式运行,页面加载超30秒出现FastCGI: comm with server "/Applications/MAMP/fcgi-bin/php7.4.12.fcgi" aborted: idle timeout (30 sec)错误时,可按以下步骤延长超时时间:

1. 修改Apache的FastCGI超时配置

  • 打开MAMP,点击顶部菜单栏的MAMP → Preferences → Apache,点击Open Conf File打开httpd.conf配置文件。
  • 在文件中找到对应PHP版本的FastCgiServer配置行,在末尾添加-idle-timeout [自定义秒数],比如设置为60秒:
    FastCgiServer "/Applications/MAMP/fcgi-bin/php7.4.12.fcgi" -idle-timeout 60
    
  • 若未找到FastCgiServer行,确保FastCGI模块已启用后手动添加上述配置。

2. 调整PHP执行超时(可选但建议)

  • 点击MAMP → Preferences → PHP,选择对应PHP版本后点击Open php.ini。
  • 修改max_execution_time参数为匹配的超时秒数:
    max_execution_time = 60
    

3. 重启MAMP服务

  • 返回MAMP主界面,先点击Stop Servers,再点击Start Servers使配置生效。

内容的提问来源于stack exchange,提问作者Steve Moretz

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.08 18:15:26