Centos 7 Apache 2.4 php_fpm 30 second timeout

apache-2.4centosphp-fpmPROXYtimeout

I need to set execution timeout for Centos 7 Apache 2.4 php_fpm, but there seems to be a hard coded timeout somewhere in the Apache proxy. I see max_execution_time correctly set (to 300) in php_info().

I've tried the virtualhost fix proposed elsewhere for Apache 2.2 like so:

 ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9009/var/www/$1
 <Proxy fcgi://127.0.0.1:9009>
       ProxySet timeout=300
 </Proxy>

Trying reversing order on those to put the line first, which I saw in one example, led to an error on service httpd restart. I tried setting request_terminiate_timeout to 0 or to 300 or to 300s in the php-fpm config file, as well as same for request_slowlog_timeout. Still have a hard coded 30 second timeout somewhere.

Help!

Best Answer

Easier solution for me is to adjust Apache's ProxyTimeout directive https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxytimeout