[php-src] Issue #13533: Add PHP_FCGI_MAX_IDLE_TIMEOUT envairoment variabile option for php-cgi
| From: | ducktype | Date: | Tue, 27 Feb 2024 11:35:45 +0000 |
| Subject: | [php-src] Issue #13533: Add PHP_FCGI_MAX_IDLE_TIMEOUT envairoment variabile option for php-cgi | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246479@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13533
Author: ducktype
### Description
I'm writing an "external" multiplatform php fastcgi process manager in golang for the
caddy webserver, something like php-fpm but using the php-cgi executable in fastcgi mode;
while implementing it using socket passing to be faster simpler and zero-copy between processes
i've found that i wanted to add an option in my process manager analogous to php-fpm
pm.process_idle_timeout to free memory when the server load is low and to avoid eventual Memory
leaks
I've thinked about how to implement this feature for a while but without finding a solution
keeping zero-copy socket passing that does bot require modifing php-cgi itself.
The proposal is to add an envairoment variabile option that instruct php-cgi processes to self
terminate after a certain amount of time without receiving requests something like the already
existing PHP_FCGI_MAX_REQUESTS that already aligns with php-fpm pm.max_requests.
Eventually having millisecond granularity unlike second granularity only like in
pm.process_idle_timeout will be a plus.
That Is... i'm not missing something obviuos and that the proposal make sense.