Bug #73999 [Asn->Nab]: php-fpm worker always output uncaught exception to stderr

From: Date: Sun, 23 Sep 2018 13:34:24 +0000
Subject: Bug #73999 [Asn->Nab]: php-fpm worker always output uncaught exception to stderr
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217204@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73999&edit=1 ID: 73999 Updated by: bukka@php.net Reported by: chrisl at cnyes dot com Summary: php-fpm worker always output uncaught exception to stderr -Status: Assigned +Status: Not a bug Type: Bug Package: FPM related Operating System: Ubuntu 16.04 PHP Version: 7.0.15 Assigned To: bukka Block user comment: N Private report: N New Comment: I finally got time to look into this one - sorry for the late replay. This is actually not a bug as it's an intended behaviour. The catch_workers_output is meant to pipe the output of the worker (child process) to the master process and the master process will output it to either stderr (if running if foreground) or to error log file (if demonized). The fact that the error can be also seen in nginx error log is because error is also send to FCGI_STDERR. To disable it, fastcgi.logging can be set to off in php.ini. Previous Comments: ------------------------------------------------------------------------ [2017-01-26 04:16:15] chrisl at cnyes dot com Description: ------------ Looks like php7-fpm worker always output uncaught exception to stderr, event catch_workers_output = yes. so my nginx error log always has php exception logs. Test script: --------------- [www] listen = 127.0.0.1:4000 listen.backlog = 128 listen.owner = www-data listen.group = www-data listen.mode = 0660 listen.allowed_clients = 127.0.0.1 user = www-data group = www-data pm = dynamic pm.max_children = 5 pm.start_servers = 3 pm.min_spare_servers = 2 pm.max_spare_servers = 5 pm.max_requests = 100 pm.status_path = /status ping.path = /ping request_terminate_timeout = 40s catch_workers_output = yes chdir = / env[HOSTNAME] = $HOSTNAME env[TMP] = /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp Expected result: ---------------- when catch_workers_output = yes, it should only log error with the php-fpm error log file, and stderr should be empty. Actual result: -------------- php7-fpm worker always output uncaught exception to stderr, event catch_workers_output = yes. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73999&edit=1

« previous php.bugs (#217204) next »