nginx php-fpm child exited with code 0

First, this is the expected behavior. The messages are marked as NOTICE, the default in php-fpm.conf:

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice

Processes are exiting and respawning when pm.max_requests option is defined in your php-fpm configuration file.

For example:

; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
pm.max_requests = 500

If it is defined as 500 in this example, php-fpm recycles the process after it has processed 500 requests. Actually, you can ignore these messages because they are harmless and just informational.

If you don't want those messages to be logged, just change your log level to something above notice, like warning.


it is php-fpm bug when using exec functions inside a code. good practice is to block them so the won't make such problem.

https://bugs.php.net/bug.php?id=73342

bug is open for last 4 years.