php / php/php-src

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

Abierto
#14,548 11 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Feature SAPI: fpm
Lenguaje dominante
C
Estrellas
40.4k
Forks
8.1k
Merge medio
2 d 13 h
PR fusionados (30 d)
96

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza investigando el manejo de la cola de PHP-FPM y su interacción con los timeouts de NGINX, tal como se describe en el issue. Determina si el comportamiento de configuración solicitado es viable y define cómo debe gestionar las solicitudes que ya hayan superado el timeout del cliente. Se considera terminado cuando exista un diseño de configuración acordado con un escenario de timeout validado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
nginx, php
Área
backend, performance
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.