php / php/php-src

New config to adjust timeouts between NGINX and PHP-FPM (fix PHP zombie process)

Aperta
#14,548 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Feature SAPI: fpm
Lingua principale
C
Stelle
40.4k
Fork
8.1k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

Description

image

Hi,

I have a question that I haven't found the answer online. I made this graph to illustrate the situation. When there are many requests waiting in the backlog queue (because the workers are busy), a time desynchronization happens between NGINX and PHP-FPM.

The PHP-FPM continues getting the requests from the backlog queue even though NGINX has already answered the client with 504 response.

This is a waste of resources, as the PHP result will never reach NGINX, as NGINX has already responded to the request with 504 to the client

When this happens the new requests receives a timeout because they go to the end of the queue and are processed with delay

If there is a configuration that takes into account the time that the process spends in the backlog queue, these "zombie" processes do not even need to be processed if they have already reached the timeout limit

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia analizzando la gestione del backlog di PHP-FPM e la sua interazione con i timeout di NGINX, come descritto nell’issue. Determina se il comportamento di configurazione richiesto è realizzabile e definisci come gestire le richieste che hanno già superato il timeout del client. Il lavoro è completato quando è disponibile un design di configurazione concordato con uno scenario di timeout validato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
nginx, php
Ambito
backend, performance
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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.