Confusion about setting php max_execution_time in an multi-php fcgi setup

1 post / 0 new
#1 Mon, 07/17/2017 - 19:35
h2ojunkie

Confusion about setting php max_execution_time in an multi-php fcgi setup

I've read a few topics on this, and have been experimenting with the settings all day long, and I just can't seem to connect the dots as to how these things all work together. There are so many places to adjust timeouts for apache, php, fcgi, etc that my head is spinning trying to understand where and how this all plays together.

First up: Server Template > Apache website I can see here, that by default it's just using whatever the default php.ini config file for each version of php (or you can pick your own). These defaults seem to map back to whatever php.ini configs are set up in Webmin > Others > PHP Configutaion. (so far, making sense)

Below that, is a section call "PHP confiruation variables for scripts"...However, I'm not exactly sure what this does. I don't seem to find anything I set here over-riding the values that came from the default php.ini files mentioned above (or possibly I'm just not using this right). Not a big deal, but just adds to my confusion a bit.

Now, here's where it starts getting really confusion to me.

Virtualmin Configuration > PHP options: max fcgid exec time: from php config" is the default. From reading, i see that with this enabled, it takes whatever the php max execution time is, ads 1 second to it, then adds IPCCommTimeout to httpd.conf. If it's on "Don't set" - it seems to sometimes set nothing at all for IPCCommTimeout, and other times it sets IPCCommTimeout 9999

In addition, even if that setting is "don't set" in the virtualmin config, if I edit a virtual server > server configuration > website options > maximum PHP script run time...whatever I enter there get's updated on that virtual servers php.ini files (makes sense) but also the IPCCommTimeout get's set (even though I have the virtualmin configuration on "don't set".

In short, I seem caught in an endless loop trying to understand what virtualmin is doing with max_execution_time and IPCCommTimeout depending on the combination of settings, and where/how you adjust a setting.

If I'm running multi-php via fcgi...what should I actually be using to set the php timeouts without over-writing. It seems that if I try to adjust a virtual server by using the "website options" - that updates all php.ini files AND sets the IPCCommTimeout, even if I have it on "don't set" in virtualmin configuration. I'm not sure if this is a bug, or just a weird behavior. When running multi-php versions, should I just stay away from the virtual server "website options" and instead only adjust timeouts via the individual services > php X configuraiton?

In once case, while testing I ended up with a 40 second php max execution time showing up in virtual server website options > max php script run time..that seems tobe what is filled in there when the IPCCommTimeout is removed from httpd.conf for the vhost. But I'm not even sure where that default 40 sec value comes from. Or how I end up with IPCCommTimout not set at all for some vhosts (until I go edit that virtual server's website options and change the 40 sec default value).

Anyway- while i understand how to manually adjust each setting. I'm very confused by how they play together in virtualmin. If anyone can shed some light on it, and which setting adjustments done in virtualmin (either the virtual server directly, or even the virtualmin config). Just trying to understand how the different server templates, server settings, php.ini defaults play together.

Thanks!