Intensive PHP script failing w/ “The timeout specified has expired” error / ap_content_length_filter

后端 未结 10 1176
南方客
南方客 2020-12-30 10:50

Running a MySQL intensive PHP script that is failing. Apache log reports this:

[Wed Jan 13 00:20:10 2010] [error] [client xxx.xx.xxx.xxxx] (70007)
The timeou         


        
10条回答
  •  梦毁少年i
    2020-12-30 11:42

    I hit a very similar wall as well with Apache 2.4.6 and PHP 5.4.23 FPM/FastCGI.

    Symptom:

    No matter what I set in PHP or Apache, my script would timeout in 30 seconds and I would see the following in my Apache Error log:

    [timestamp] [proxy_fcgi:error] [pid...] (70007)The timeout specified has expired: [client ...] AH01075: Error dispatching request to :

    My VirtualHost:

    TimeOut  300
    KeepAliveTimeout 300
    
    
      RequestReadTimeout header=120-240,minrate=500
      RequestReadTimeout body=120,minrate=500
    
    
    
      ProxyTimeout 300
    
    
    
      FcgidConnectTimeout 300
    
    

    The pesky php script:

    ini_set( 'max_execution_time', '120' );
    ...
    ini_restore( 'max_execution_time' );
    

    The Fix: it's a hard coded value in Apache mod_proxy_fcgi

    Take a look at the bug report here

    • A patch is available (link above)
    • The fix doesn't appear to be slated for general release yet (Mar 2014)

提交回复
热议问题