Control PHP Max Idle Time

PHP external app has two configuration options: Max Idle Time and keep-Alive Timeout.

PHP Max Idle Time specifies the maximum idle time before an external application is stopped by the server. It is especially useful in the mass hosting environment. In order to prevent files owned by one virtual host from being accessed by the external application scripts of another virtual host, mass hosting often requires many different applications running at the same time in SetUID mode. Set this Max Idle Time low to prevent these external applications from idling unnecessarily.

Connection Keep-Alive Timeout specifies the maximum time to keep an idle persistent connection open.

If the PHP process group has been set, for example:

<IfModule LiteSpeed>
LSPHP_ProcessGroup on
LSPHP_Workers 15

How to control process group max idle time?

Try LSAPI_PGRP_MAX_IDLE=3600 to the lsphp external environment however it doesn't appear to have made any difference.

Actually the life time of Worker processes is controlled by “Keep Alive Timeout” , while the life time of process group is controlled by “Max Idle Time”.

LSAPI_PGRP_MAX_IDLE not required in the environment setting. Max Idle Time and Keep-Alive Timeout should be set, for example:

Max Idle Time: 3600
Connection Keep-Alive Timeout: 10

Of course, the numbers can be adjusted to your need.

  • Admin
  • Last modified: 2018/09/14 16:10
  • by Michael Alegre