php / php/php-src

ping stops responding when size of env chars exceeds specific amount

Offen
#16,042 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

Description

i can reproduce this with the official docker images (tried php:8.3.10-fpm-alpine3.19 and php:8.4.0beta5-fpm-alpine3.20) doing this:

docker run --rm --name phptest php:8.3.10-fpm-alpine3.19 sh -c "apk add --no-cache fcgi && \
  sed -i '/ping\.path/d' /usr/local/etc/php-fpm.d/www.conf && \
  sed -i '/ping\.response/d' /usr/local/etc/php-fpm.d/www.conf && \
  echo 'ping.path = /ping' >> /usr/local/etc/php-fpm.d/www.conf && \
  echo 'ping.response = pong' >> /usr/local/etc/php-fpm.d/www.conf && \
  php-fpm"

when i enter the container and trigger the ping it looks like this:

# SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000
X-Powered-By: PHP/8.3.10
Content-type: text/plain;charset=UTF-8
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate, max-age=0

pong

when i now create a bunch of envs, ping stops working:

i=1; while [ $i -le 494 ]; do export TEST_ENV_$i=f; i=$((i + 1)); done && SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000

maybe this is not a bug, but i could not find any information regarding a size/limit that can be configured. it looks that my php application still works, even if ping does not respond anymore.

thx for any information or hints 🙏

PHP Version

tested with php:8.3.10-fpm-alpine3.19 and php:8.4.0beta5-fpm-alpine3.20

Operating System

docker alpine 3.19 and 3.20

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

Reproduziere das Verhalten mit den PHP-8.3.10- und 8.4.0beta5-Docker-Images unter Verwendung der PHP-FPM-Konfiguration in /usr/local/etc/php-fpm.d/www.conf und des gezeigten cgi-fcgi-Befehls. Vergleiche die /ping-Antwort vor und nach dem Exportieren von 494 Umgebungsvariablen und ermittle anschließend, ob das relevante Größenlimit dokumentiert oder konfigurierbar ist und welches PHP-FPM-Verhalten als abgeschlossen betrachtet werden sollte.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, php, shell
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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