php / php/php-src

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

Offen
#14,548 11 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Feature SAPI: fpm
Vorherrschende Sprache
C
Sterne
40.4k
Forks
8.1k
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
96

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der Untersuchung der Verarbeitung des PHP-FPM-Backlogs und ihrer Wechselwirkung mit NGINX-Timeouts, wie im Issue beschrieben. Bestimme, ob das angeforderte Konfigurationsverhalten umsetzbar ist, und lege fest, wie Anfragen behandelt werden sollen, die das Client-Timeout bereits überschritten haben. Als abgeschlossen gilt die Aufgabe, wenn ein abgestimmtes Konfigurationsdesign mit einem validierten Timeout-Szenario vorliegt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
nginx, php
Bereich
backend, performance
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.