Apache has a default timeout of 60 seconds, you can increase default timeout by creating a custom template in CentOS Web Panel.

Follow these basic steps to increase the PHP timeout when using PHP-FPM :

Copy the default templates and save/create it as timeout tpl and stpl:

cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/
cp default.stpl timeout.stpl
cp default.tpl timeout.tpl

Then you have to edit both the templates, "timeout.tpl" and "timeout.stpl" and apply the below line.

ProxyTimeout 110

Under the below-mentioned line and save that.


<IfModule proxy_fcgi_module>

** ProxyTimeout 110 is the limit that permits the script to run for 110 seconds before it becomes hit with the timeout threshold.
You can increase the default timeout depending on your requirements, and please mind that don't use too high numbers to avoid server overloads.

We give an example below:

<IfModule proxy_fcgi_module>
ProxyTimeout 110
<FilesMatch \.php$>
SetHandler "proxy:%backend_fcgi%|fcgi://localhost"
</FilesMatch>
</IfModule>

Now all you need is to form a custom configuration on webserver domain config and select the template or choose this template as a default in the webserver domain config.

 

Hjälpte svaret dig? 0 användare blev hjälpta av detta svar (0 Antal röster)