php脚本运行40秒服务器就返回500 Internal Server Error

简单一点

做的后台长时间运行的脚本,设置了脚本运行时间还是40秒就返回500,用的apache2.4.39

问题比较着急?请联系QQ:760483
  • 老三
  • 老三    2020-09-15 14:16:506楼

    亲测有效,解决了困扰我好几天的问题,感谢大佬给出的办法

    +添加回复

  • 回复
  • 许家陵
  • 许家陵    2019-12-22 22:07:024楼

    找到处理办法了,把这个加到httpd.con里面,就可以解决了,但是以前的apache中从来没有加过这个啊

    <IfModule mod_fcgid.c>

     FcgidProcessLifeTime 8200

     FcgidIOTimeout 8200

     FcgidConnectTimeout 4000

     </IfModule>



    +添加回复

  • 回复

    大佬,我也遇到这个问题了,因为要做个东西需要长时间去发送请求,直到对面一有消息就反馈,需要运行非常久,,研究了好几天,你这个办法可行,专门注册了账号来给你点赞! 记住这段要放在末尾就行

    电脑用户920521 · 2020-03-25 01:34:59
    回复

    感谢大佬,成功解决卡了一下午的问题。

    A.别勉强 · 2020-06-26 21:49:57
    回复
  • 许家陵
  • 许家陵    2019-12-22 21:15:383楼

    请官方自己测试一下,我下载的最新版本8.1.0.0 64位

    QQ图片20191222211449.png


    +添加回复

  • 回复
  • 许家陵
  • 许家陵    2019-12-22 20:58:232楼

    我也是机样的问题,经过测试超过40秒 就会显示 

    500 Internal Server Error

    +添加回复

  • 回复
  • 尘の风
  • 尘の风    2019-08-21 09:47:311楼

    查下apache错误日志,里面记录了具体错误原因

    +添加回复

  • 回复

    没有错误吧,我用iis环境一直都能运行,同样的脚本,现在只能运行40秒

    简单一点  作者 · 2019-08-21 10:21:42
    回复

    不会提示错误的,我的错误日志就这么点,请官方修复下吧 [Sat Mar 14 14:49:22.069469 2020] [core:warn] [pid 17120:tid 180] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sat Mar 14 14:49:22.076469 2020] [mpm_winnt:notice] [pid 17120:tid 180] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations [Sat Mar 14 14:49:22.076469 2020] [mpm_winnt:notice] [pid 17120:tid 180] AH00456: Server built: Mar 27 2019 11:06:20 [Sat Mar 14 14:49:22.076469 2020] [core:notice] [pid 17120:tid 180] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39' [Sat Mar 14 14:49:22.090470 2020] [mpm_winnt:notice] [pid 17120:tid 180] AH00418: Parent: Created child process 7676 [Sat Mar 14 14:49:23.662560 2020] [mpm_winnt:notice] [pid 7676:tid 252] AH00354: Child: Starting 1024 worker threads. [Sat Mar 14 15:05:55.394284 2020] [core:warn] [pid 15448:tid 180] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sat Mar 14 15:05:55.399284 2020] [mpm_winnt:notice] [pid 15448:tid 180] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations [Sat Mar 14 15:05:55.399284 2020] [mpm_winnt:notice] [pid 15448:tid 180] AH00456: Server built: Mar 27 2019 11:06:20 [Sat Mar 14 15:05:55.399284 2020] [core:notice] [pid 15448:tid 180] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39' [Sat Mar 14 15:05:55.411285 2020] [mpm_winnt:notice] [pid 15448:tid 180] AH00418: Parent: Created child process 13516 [Sat Mar 14 15:05:57.002376 2020] [mpm_winnt:notice] [pid 13516:tid 248] AH00354: Child: Starting 1024 worker threads. [Sat Mar 14 15:31:58.259674 2020] [core:warn] [pid 19688:tid 180] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sat Mar 14 15:31:58.273675 2020] [mpm_winnt:notice] [pid 19688:tid 180] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations [Sat Mar 14 15:31:58.273675 2020] [mpm_winnt:notice] [pid 19688:tid 180] AH00456: Server built: Mar 27 2019 11:06:20 [Sat Mar 14 15:31:58.273675 2020] [core:notice] [pid 19688:tid 180] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39' [Sat Mar 14 15:31:58.289676 2020] [mpm_winnt:notice] [pid 19688:tid 180] AH00418: Parent: Created child process 7796 [Sat Mar 14 15:31:59.883767 2020] [mpm_winnt:notice] [pid 7796:tid 252] AH00354: Child: Starting 1024 worker threads.

    新的旅程 · 2020-03-14 15:38:42
    回复