Download | Plain Text | No Line Numbers


  1. --- a/sapi/fpm/fpm/fpm_children.h 2026-10-06 18:53:18.000000000 +0200
  2. +++ b/sapi/fpm/fpm/fpm_children.h 2026-10-15 11:26:49.767071901 +0200
  3. @@ -33,6 +33,7 @@
  4. pid_t pid;
  5. int scoreboard_i;
  6. struct zlog_stream *log_stream;
  7. + int sigterm_sent;
  8. };
  9.  
  10. #endif
  11. --- a/sapi/fpm/fpm/fpm_process_ctl.c 2026-10-06 18:53:18.000000000 +0200
  12. +++ b/sapi/fpm/fpm/fpm_process_ctl.c 2026-10-15 11:26:49.767424605 +0200
  13. @@ -52,6 +52,7 @@
  14.  
  15. static void fpm_pctl_action(struct fpm_event_s *ev, short which, void *arg) /* {{{ */
  16. {
  17. + ev->flags &= ~FPM_EV_PERSIST;
  18. fpm_pctl(FPM_PCTL_STATE_UNSPECIFIED, FPM_PCTL_ACTION_TIMEOUT);
  19. }
  20. /* }}} */
  21. @@ -60,6 +61,7 @@
  22. {
  23. fpm_event_set_timer(&pctl_event, 0, &fpm_pctl_action, NULL);
  24. fpm_event_add(&pctl_event, sec * 1000);
  25. + pctl_event.flags |= FPM_EV_PERSIST;
  26. return 0;
  27. }
  28. /* }}} */
  29. --- a/sapi/fpm/fpm/fpm_request.c 2026-10-06 18:53:18.000000000 +0200
  30. +++ b/sapi/fpm/fpm/fpm_request.c 2026-10-15 11:26:49.767701514 +0200
  31. @@ -271,7 +271,8 @@
  32. #endif
  33. if (terminate_timeout && tv.tv_sec >= terminate_timeout) {
  34. str_purify_filename(purified_script_filename, proc.script_filename, sizeof(proc.script_filename));
  35. - fpm_pctl_kill(child->pid, FPM_PCTL_TERM);
  36. + fpm_pctl_kill(child->pid, (child->sigterm_sent) ? FPM_PCTL_KILL : FPM_PCTL_TERM);
  37. + child->sigterm_sent = 1;
  38.  
  39. zlog(ZLOG_WARNING, "[pool %s] child %d, script '%s' (request: \"%s %s%s%s\") execution timed out (%d.%06d sec), terminating",
  40. child->wp->config->name, (int) child->pid, purified_script_filename, proc.request_method, proc.request_uri,
  41.