Nginx - php fpm max children error

0

How to fix error in nginx :

  • php fpm max children (server reached pm.max_children setting (5), consider raising it)

  • (111: Connection refused) while connecting to upstream, client: 172.31.16.34, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://172.17.0.4:8000",

asked 13 days ago195 views
2 Answers
2
Accepted Answer

There are some suggestions here https://community.webcore.cloud/tutorials/how_to_solve_php_fpm_server_reached_max_children/

Seems that you want to look in either /etc/php-fpm.conf or /etc/php-fpm.d/[domain.com].conf for the value assigned to pm.max_children and increase this.

profile picture
EXPERT
Steve_M
answered 13 days ago
profile picture
EXPERT
reviewed 12 days ago
profile picture
EXPERT
reviewed 13 days ago
1

Hello.

php fpm max children (server reached pm.max_children setting (5), consider raising it)

The value of "pm.max_children" in php-fpm seems to be small, so please try increasing the value.
I think it's a good idea to calculate this value based on the instance's memory size and the average memory usage of php-fpm.
https://www.php.net/manual/en/install.fpm.configuration.php

I often use the calculation method below.

pm.max_children = available memory of instance / average memory usage of php-fpm process

(111: Connection refused) while connecting to upstream, client: 172.31.16.34, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://172.17.0.4:8000",

You are trying to connect to "fastcgi://172.17.0.4:8000", but please check if this IP address is correct and if this IP address is listening on port 8000.

profile picture
EXPERT
answered 13 days ago
profile picture
EXPERT
reviewed 13 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions