Ability to disable pm.max_children warning
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
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
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
sapi/fpm/fpm/fpm_process_ctl.c の参照されているセクションから始め、php-fpm.conf の設定がどのように解析されるかを追跡します。pm.max_children の警告箇所を両方比較し、抑制設定を適用すべき場所を判断します。設定によってこれらの警告を意図的に無効化しつつ、現在のデフォルト動作を維持できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, php
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 58/100