apache 如何在MAMP中停止30s超时?

a64a0gku  于 2023-06-24  发布在  Apache
关注(0)|答案(1)|浏览(189)

我正在运行WordPress代码(导入25篇文章),30秒后出现500服务器错误(通过 AJAX 报告),但该过程在后台服务器上继续。
无论如何,我都找不到任何30秒的证据...
php7.4.33.ini...

  1. max_execution_time = 1300
  2. max_input_time = 3000
  3. memory_limit = 512M

apache_error.log正在显示这些对...

  1. [Sat Apr 22 14:41:31.336668 2023] [fastcgi:error] [pid 10888] [client ::1:59639] FastCGI: comm with server "/Applications/MAMP/fcgi-bin/php7.4.33.fcgi" aborted: idle timeout (30 sec)
  2. [Sat Apr 22 14:41:31.391265 2023] [fastcgi:error] [pid 10888] [client ::1:59639] FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php7.4.33.fcgi"

虽然我不确定是否严格限于500个事件。
这是在Apache的httpd.conf中。

  1. <IfModule mod_fastcgi.c>
  2. # URIs that begin with /fcgi-bin/, are found in /var/www/fcgi-bin/
  3. Alias /fcgi-bin/ "/Applications/MAMP/fcgi-bin/"
  4. # Anything in here is handled as a "dynamic" server if not defined as "static" or "external"
  5. <Directory "/Applications/MAMP/fcgi-bin/">
  6. SetHandler fastcgi-script
  7. Options +ExecCGI
  8. </Directory>
  9. # Anything with one of these extensions is handled as a "dynamic" server if not defined as
  10. # "static" or "external". Note: "dynamic" servers require ExecCGI to be on in their directory.
  11. AddHandler fastcgi-script .fcgi .fpl
  12. MAMP_ActionPhpCgi_MAMP
  13. FastCgiIpcDir /Applications/MAMP/Library/logs/fastcgi
  14. MAMP_FastCgiServer_MAMP
  15. <IfModule mod_setenvif.c>
  16. SetEnvIf Authorization "(.+)" HTTP_AUTHORIZATION=$1
  17. </IfModule>
  18. </IfModule>

max_execution_timemax_input_time不在.htaccess中
我加了...

  1. <IfModule mod_php5.c>
  2. php_value max_execution_time 300
  3. php_value max_input_time 300
  4. </IfModule>

...但它没有改变(虽然我不能确认我是否有php5模块)。
加上这个…

  1. <IfModule mod_fcgid.c>
  2. FcgidIdleTimeout 600
  3. FcgidProcessLifeTime 600
  4. </IfModule>

而这个

  1. <IfModule mod_fcgid.c>
  2. FcgidIdleTimeout 300
  3. FcgidProcessLifeTime 3600
  4. FcgidMaxProcesses 128
  5. FcgidMaxProcessesPerClass 8
  6. FcgidMinProcessesPerClass 0
  7. FcgidConnectTimeout 300
  8. FcgidIOTimeout 300
  9. </IfModule>

也没有改变它

tv6aics1

tv6aics11#

我想我找到你问题的答案了。
只要修改行状态显示below和它应该为您工作。

  1. MAMP_FastCgiServer_MAMP -idle-timeout 3600

这真的很奇怪,MAMP没有为此设置。

相关问题