php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch only-terminate-workers-that-are-actually-running-code for FPM related Bug #78405

Patch version 2022-02-25 14:53 UTC

Return to Bug #78405 | Download this patch
Patch Revisions:

Developer: sjon@php.net

--- src/php-8.1.3/sapi/fpm/fpm/fpm_request.c	2022-02-25 13:43:06.126480599 +0100
+++ /tmp/fpm_request.c	2022-02-25 15:48:42.388145240 +0100
@@ -270,7 +267,7 @@
 		}
 		else
 #endif
-		if (terminate_timeout && tv.tv_sec >= terminate_timeout) {
+		if (terminate_timeout && tv.tv_sec >= terminate_timeout && proc.request_stage == FPM_REQUEST_EXECUTING) {
 			str_purify_filename(purified_script_filename, proc.script_filename, sizeof(proc.script_filename));
 			fpm_pctl_kill(child->pid, FPM_PCTL_TERM);
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 22:01:31 2024 UTC