Frequently Asked Question
PHP Timeouts
When using php-fpm, which is now the default, PHP code is executed by a pool of processes, which is more efficient than spooling up php for every single request, but the configuration is a little more complex.
<FilesMatch \.php$> SetHandler proxy:unix:/run/php-fpm/16768817132418972.sock|fcgi://127.0.0.1 </FilesMatch>
This directive in the apache configuration file directs the handling of php files to a unix socket, and said socket is used to talk reliably to the php-fpm pool that's handling this host. Because virtualmin allows many hosts, all with different configurations, each site has its own pool.
The error:
(70007)The timeout specified has expired: [remote 1.2.3.4:52904] AH01075: Error dispatching request to : (polling)
Indicates the the php-fpm pool too longer than the timeout to return a response, and apache simply dumps the connection and returns this error.
Virtualmin provides an option to specify the php timeout, in Web Configuration/PHP Options, and in Web Configuration/PHP-FPM Options/Resource Limits, but neither of these have an effect at the time of writing.
To actually fix this you simply need to add a directive to the apache configuration, which you'll find in
Web Configuration / Configure SSL Website / Proxying
and a setting "Proxy request timeout in seconds".
Set this to something that fits your needs, 600, 900, etc and then SAVE and Apply configuration.
This should now have solved your timeout issues. To verify that it has actually made the change, you can use the "Show Directives' option and check for the presence of a
ProxyTimeout 3600
Directive, where 3600 is the number of seconds you specified.