PHP_FCGI_MAX_IDLE_TIMEOUT environment variabile option for php-cgi
Personne n'a encore pris cette issue.
- Langage dominant
- C
- Étoiles
- 40.4k
- Forks
- 8.2k
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 96
Description
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 have 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 in a way that does not require modifying php-cgi itself, but without finding a solution that allowed to keeping zero-copy socket passing.
The proposal is to add an environment variabile option that instruct php-cgi processes to self terminate after a certain amount of time if no requests are received, 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... Hoping i'm not missing something obviuos and that the proposal make sense.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner le cycle de vie du processus FastCGI php-cgi et l’option existante PHP_FCGI_MAX_REQUESTS, puisqu’aucun fichier source ni test n’est indiqué. Définissez comment un délai d’inactivité doit être configuré et mesuré, puis ajoutez une couverture montrant qu’un processus inactif se termine tandis qu’un processus recevant des requêtes reste actif.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- c
- Domaine
- backend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100