php / php/php-src

Ability to disable pm.max_children warning

Aperta
#22,475 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Description

When fpm reaches the pm.max_children value, it issues a warning in the logs of the format:

[pool %s] server reached pm.max_children setting (%d), consider raising it

(Source 1, source 2)

This message is clearly designed as a hint to server administrators to review the data to see whether this number needs increasing.

However, in multi-server environments such as ours, we use the fpm queue size as an indicator of backpressure, which we then use to automatically scale our servers horizontally. As such, this warning is unnecessary; in fact, it's basically intentional behaviour in our system design. This is at best annoying in the logs, but it also unnecessarily causes data to be written and pushed throughout error reporting systems.

Worse, this is a ZLOG_WARNING rather than ZLOG_DEBUG, so it's not suppressed through regular reporting.

Given this is designed as a way to suggest actions to the sysadmin, it would make sense to provide a way to say "please don't warn me" in the configuration.

I'd like to suggest adding a pm.warn_max_children = no flag into the php-fpm.conf as a way to intentionally suppress these useless messages.

Alternatively, lowering this to a ZLOG_NOTICE (or even ZLOG_DEBUG) would solve this issue for us, but I think would have further flow-on effects; in situations where you really are resource constrained on a single server, it would be easy to miss the notice.

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 con le sezioni referenziate di sapi/fpm/fpm/fpm_process_ctl.c e traccia il modo in cui vengono analizzate le impostazioni di php-fpm.conf. Confronta entrambi i punti in cui viene emesso l'avviso relativo a pm.max_children e determina dove si applicherebbe un'impostazione di soppressione. Il lavoro è completato quando la configurazione può disabilitare intenzionalmente questi avvisi preservando il comportamento predefinito attuale.

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

Valutazione

Stack tecnologico
c, php
Ambito
backend
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
58/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.