Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mikaeledstrom's avatar

PHP FPM exited with code 1

Hello!

I have received a few gateway errors with my Nginx and PHP-FPM setup. I believe it is related to this line in the PHP-FPM log:

[14-May-2025 10:11:08] WARNING: [pool www] child 4107514 exited with code 1 after 2637.359742 seconds from start

[14-May-2025 10:11:08] NOTICE: [pool www] child 4112338 started

What does code 1 mean? Is it something special or could it be that the child gets killed automatically after some time, e.g. to reduce impact of memory leaks?

This is the corresponding Nginx error log line:

2025/05/14 10:11:08 [error] 4086278#4086278: *46956 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: {IP}, server: {DOMAIN}, request: "POST {SLUG} HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php-fpm.sock:", host: "{HOST}", referrer: "{URL}"

0 likes
1 reply
Braunson's avatar

While there's lots of questions to be asked here, let's start with what's your current pm.max_requests setting in your PHP-FPM pool setup?

Exit code 1 in PHP-FPM typically means "general error", not a graceful shutdown. The timing in your logs suggests the child process ran for ~44 minutes before dying, which points more toward hitting a configured limit rather than a crash from a specific request. Check and adjust that setting and go from there.

Please or to participate in this conversation.