Managed PHP-CGI instances
When using PHP-CGI on Windows, Gruxi can manage the PHP-CGI instances for you. You just need to create a managed external system pointing to the PHP-CGI executable on the filesystem, and Gruxi will handle starting and stopping the PHP-CGI processes as needed.
In the PHP-CGI case, Gruxi wraps the Windows PHP-CGI process to manage its lifecycle and configuration. This means Gruxi monitors for process failures and restarts processes as needed, to keep the setup as reliable and simple as possible.
Once configured, one or more sites can point to this managed instance (by selecting PHP-CGI in the PHP processor), allowing multiple sites to use the same managed PHP-CGI process.
At the same time, you can create multiple managed PHP-CGI instances, each pointing to a different PHP version, so different sites can use different PHP versions as needed.
Configuring managed PHP-CGI
A managed PHP-CGI instance is created in the Managed External Systems section of the Gruxi admin portal (under Configuration).
A name can be provided to identify the managed PHP-CGI instance, making it easier to select it in a site's PHP processor configuration.
You need to provide the Executable Path to the php-cgi.exe executable on the filesystem. This is typically located in the root folder of your PHP installation.
Additionally, you can configure the Request Timeout (in seconds) that defines how long Gruxi will wait for a response from the PHP-CGI process before considering the request timed out. The default is 30 seconds, but you can adjust this based on your application's needs.
Concurrent threads defines how many concurrent requests the managed PHP-CGI instance can handle. Gruxi uses this value to decide how many php-cgi.exe processes to spawn and manage. The default is 0 (auto), which is based on the number of CPU cores available. Be mindful when increasing this value, as each PHP-CGI process consumes system resources. Adjust this based on your server's capacity and expected load.