php / php/php-src

Ability to disable pm.max_children warning

Offen
#22,475 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

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.

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

Beginnen Sie mit den referenzierten Abschnitten von sapi/fpm/fpm/fpm_process_ctl.c und verfolgen Sie, wie die Einstellungen in php-fpm.conf geparst werden. Vergleichen Sie beide Warnstellen für pm.max_children und bestimmen Sie, wo eine Unterdrückungseinstellung greifen würde. Die Aufgabe ist abgeschlossen, wenn die Konfiguration diese Warnungen gezielt deaktivieren kann und das aktuelle Standardverhalten beibehält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c, php
Bereich
backend
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

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