• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Long running php script throw 503 error and show wrong error_log?

Azurel

Silver Pleskian
Server operating system version
AlmaLinux 8.6
Plesk version and microupdate number
46
Can anyone say anything about the following problem?
I have three long running scripts (PHP 8.1) and each need ~1000 seconds to complete. So I have set a time-limit with
set_time_limit(3600);
After each complete, per page-reload (JavaScript call page again) its start a new running. All three scripts make the same, but for other areas... so its start and stop differently. Its running fine... but rare from time to time all three scripts stopping with a error
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
see php error.log; all three stopping in the same second:
[04-Sep-2022 17:03:23] WARNING: [pool example.com] child 1819906 exited on signal 15 (SIGTERM) after 14754.601386 seconds from start
[04-Sep-2022 17:03:23] WARNING: [pool example.com] child 1690056 exited on signal 15 (SIGTERM) after 48792.001156 seconds from start
[04-Sep-2022 17:03:23] WARNING: [pool example.com] child 1945324 exited on signal 15 (SIGTERM) after 2775.364849 seconds from start
None of the scripts ran longer than 30min.

1. Why do all three stop at the same second?
2. Why are there such absurd time values in the log file? 48792 seconds = 13 hours.

Does anyone have a helpful tip?
 
This will not be related to the current script execution but to orphans of a PHP-FPM instance. The number of max instances or children is reached, so PHP-FPM won't accept new ones and instead will recycle the process. This causes a service interruption of ongoing processes. Solution: Try to find the cause why some of your scripts do not terminate properly and fix that issue.
 
Back
Top