PHP_FCGI_MAX_IDLE_TIMEOUT environment variabile option for php-cgi
Nessuno ha ancora preso questa issue.
- Lingua principale
- C
- Stelle
- 40.4k
- Fork
- 8.2k
- Merge medio
- 2g 13h
- PR unite (30g)
- 96
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando il ciclo di vita del processo FastCGI di php-cgi e l'opzione esistente PHP_FCGI_MAX_REQUESTS, poiché non sono indicati file sorgente o test. Definisci come configurare e misurare un timeout di inattività, quindi aggiungi la copertura che dimostri che un processo inattivo termina mentre un processo che riceve richieste rimane attivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100