php-src icon indicating copy to clipboard operation
php-src copied to clipboard

ALERT: oops, unknown child (145) exited with code 0

Open mr-copilot opened this issue 4 years ago • 2 comments

Description

Description

The following code:

<?php
....
child = fpm_child_find(pid);
...
if (child) {
			struct fpm_worker_pool_s *wp = child->wp;
			....
} else {
			zlog(ZLOG_ALERT, "oops, unknown child (%d) exited %s. Please open a bug report (https://bugs.php.net).", pid, buf);
		}

Resulted in this output:

we have below configuration in php-fpm.conf and pool fpm
process.max = 5

pm = ondemand
pm.max_children = 1000
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 2
pm.process_idle_timeout = 10s
pm.max_requests = 500

pm.child_memory = 256
pm.spare_memory = 320

But I expected this output instead:

child = fpm_child_find(pid);
child must be found as we have set configuration accordingly 

PHP Version

PHP 7.4.26

Operating System

Ubuntu 16.04.7 LTS (Xenial Xerus)

PHP Version

PHP 7.4.26

Operating System

Ubuntu 16.04.7 LTS

mr-copilot avatar Feb 15 '22 08:02 mr-copilot

let us know if any other details needed to replicate this at your side

mr-copilot avatar Feb 15 '22 08:02 mr-copilot

I have created an issue https://github.com/php/php-src/issues/10315 and PR https://github.com/php/php-src/pull/10319 that fixes it. This doesn't seem like it is running in container with pid 1 (e.g. Docker) by the report OS so it would be great to hear how FPM was executed in this case. It might be potentially a use case that I didn't count for.

bukka avatar Jan 14 '23 17:01 bukka