Bug #74093 [Com]: Maximum execution time of n+2 seconds exceed not written in error_log

From: Date: Thu, 05 Apr 2018 12:58:51 +0000
Subject: Bug #74093 [Com]: Maximum execution time of n+2 seconds exceed not written in error_log
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214615@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74093&edit=1 ID: 74093 Comment by: arekm at maven dot pl Reported by: rainer-phpbugs at 7val dot com Summary: Maximum execution time of n+2 seconds exceed not written in error_log Status: Closed Type: Bug Package: FPM related Operating System: Linux PHP Version: 7.1.1 Assigned To: laruence Block user comment: N Private report: N New Comment: But I guess new bug report is needed since this is about FPM only and mine is apache related. Previous Comments: ------------------------------------------------------------------------ [2018-04-05 12:57:33] arekm at maven dot pl There is a problem though. Error is written to error log now but it lacks virtual host name in apache if error log uses it (%v) like: ErrorLogFormat "%v [%t] [%l] [pid %P] [client %a] %M %m" Normal timeouts have %v (vhost name) logged properly. Hard timeouts have no host name logged in error_log. ------------------------------------------------------------------------ [2017-02-15 04:34:45] laruence@php.net right, I change the exit code from 1 to 124, 124 is also used by linux timeout https://github.com/php/php-src/commit/1242f53ddb018cdba93a9ffe4f56554a6471901f ------------------------------------------------------------------------ [2017-02-15 04:33:31] laruence@php.net Automatic comment on behalf of laruence@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=1242f53ddb018cdba93a9ffe4f56554a6471901f Log: Workaround to fix bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log) ------------------------------------------------------------------------ [2017-02-14 10:28:39] rainer-phpbugs at 7val dot com That is unfortunate. Is _php_error_log_ex() or php_log_err_with_severity() really considered unsafe in this context? If so, is there any chance this could be changed? If that is not possible, can unique exit codes be used to signify the reason the php-fpm child was killed? Chainging the default value of catch_workers_output to "yes" may work for me, but I suspect that it may not be a good solution for everybody. ------------------------------------------------------------------------ [2017-02-14 08:06:24] laruence@php.net this is an expected behavior, since 7.1 we have new safe timeout handling system, and you example must trigger hard_timeout, in that case, no php function can be called for safety, so we only can call fprintf(stderr instead.. thanks ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=74093 -- Edit this bug report at https://bugs.php.net/bug.php?id=74093&edit=1

« previous php.bugs (#214615) next »