|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81308 fpm does not starts pool when ENV is more 8000 bytes
Submitted: 2021-07-29 15:50 UTC Modified: 2021-07-30 07:44 UTC
From: igor0386 at gmail dot com Assigned:
Status: Closed Package: FPM related
PHP Version: 8.0.8 OS: debian,apline
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
43 - 5 = ?
Subscribe to this entry?

 [2021-07-29 15:50 UTC] igor0386 at gmail dot com
I run the docker container with 300 env variable, but php-fpm is always down.
When I research I found that fpm return 104 code if env weight more 8000 bytes.
I try on the dockerized 8.1.0beta1, 8, 7.4, 7.2 and 7.3 from deb on the debian os.
alpine work when `env | wc -c` less 7995
debian container work when `env | wc -c` less 8119
Simple reproduce by docker-compose from `Test script:` section and check by cgi-fcgi from `Expected result:` section.

Test script:
version: "3"
    image: php:8.1.0beta1-fpm-alpine3.14
#    image: php:8-fpm
#    image: php:7.4-fpm
#    image: php:7.2-fpm
    env_file: .env
      - ./www.conf:/usr/local/etc/php-fpm.d/www.conf

log_level = debug
error_log = /tmp/php-fpm.log

user = www-data
group = www-data
listen = 9000
pm = dynamic
pm.max_spare_servers = 1
pm.min_spare_servers = 1
pm.start_servers = 1
pm.max_children = 1
pm.max_requests = 1
pm.status_path = /fpm-status

.env with any contents, many short ENV=value or one BIG_ENV=8000_simbols

Expected result:
root@4624397c329e:/www# env | wc -c
root@4624397c329e:/www# SCRIPT_NAME=/fpm-status SCRIPT_FILENAME=/ REQUEST_METHOD=GET /usr/bin/cgi-fcgi -bind -connect localhost:9000 && echo $?

Actual result:
root@835b25c9bd0a:/www# env | wc -c
root@835b25c9bd0a:/www# SCRIPT_NAME=/fpm-status SCRIPT_FILENAME=/ REQUEST_METHOD=GET /usr/bin/cgi-fcgi -bind -connect localhost:9000; echo $?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-30 07:44 UTC] igor0386 at gmail dot com
-Status: Open +Status: Closed
 [2021-07-30 07:44 UTC] igor0386 at gmail dot com
I'm wrong. php-fpm works well, but cgi-fcgi doesn't. I used cgi-fcgi in healthcheck and the container was restarting all the time.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Dec 05 15:03:33 2021 UTC