{"id":22576,"date":"2026-11-29T08:00:00","date_gmt":"2026-11-29T07:00:00","guid":{"rendered":"https:\/\/webhosting.de\/?p=22576"},"modified":"2026-11-21T08:30:08","modified_gmt":"2026-11-21T07:30:08","slug":"php-maximum-execution-time-web-server-timeout","status":"publish","type":"post","link":"https:\/\/webhosting.de\/en\/php-max-execution-time-webserver-timeout\/","title":{"rendered":"PHP `max_execution_time` vs. Web Server Timeout: What Triggers the 504 Error?"},"content":{"rendered":"<div class=\"wh-article\" data-wh-layout=\"2.1.2\" style=\"width:100%;max-width:820px;margin:0 auto;color:#263b4b;font-family:inherit;font-size:18px;line-height:1.8;text-align:start;overflow-wrap:break-word;box-sizing:border-box\"><p class=\"wh-lead\" style=\"font-size:20px;line-height:1.7;color:#233746;margin:0 0 1.1em\">Your PHP import returns a 504 error after about a minute, even though you <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">max_execution_time<\/code> Have you set it higher? At first, the status simply indicates that a gateway did not receive the required response in time. <strong style=\"font-weight:700;color:inherit\">The import can still continue.<\/strong>   First, check which process generated the 504 error, and compare the time of the error with the PHP-FPM and application logs. This will help you determine whether the connection was simply closed or whether PHP or PHP-FPM terminated processing.  <\/p>\n<nav class=\"wh-toc\" aria-label=\"Contents of this article\" style=\"display:block;margin:28px 0 38px;padding:22px;border:1px solid #d9e4e8;border-radius:14px;background:#f4f8f8\"><p class=\"wh-toc-title\" style=\"font-size:13px;font-weight:700;letter-spacing:.08em;color:#49656b;margin:0 0 14px\">Go directly to the section<\/p><div class=\"wh-toc-grid\" style=\"display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:10px\"><div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#anfrageweg-und-status\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">What a 504 Actually Means<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#php-skripttimer\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">How much time PHP actually counts<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#fpm-worker-grenze\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">When PHP-FPM Terminates the Worker<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#timeout-vergleich\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">A Comparison of PHP and Web Server Timeouts<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#nginx-lesepause\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Why 20 seconds Is Not the Total Duration<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#export-und-upload\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Distinguishing Between CPU Export and a Sluggish Upload<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#logs-und-konfiguration\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Find the trigger in the logs<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#last-und-abhaengigkeiten\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Identifying Queues and Slow Dependencies<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#weiterlauf-und-jobs\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Will the import continue after the 504?<\/a><\/div>\n<\/div><\/nav><section class=\"wh-section\" aria-labelledby=\"anfrageweg-und-status\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"anfrageweg-und-status\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">What a 504 Actually Means<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Your PHP import doesn't return any visible response for about a minute. Then \u201e504 Gateway Timeout\u201c appears, even though you <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">max_execution_time<\/code> set higher. This isn't a contradiction: The status means that a <strong style=\"font-weight:700;color:inherit\">Gateway<\/strong> did not receive the required response from its upstream in time. The status alone does not indicate whether PHP is still running at this point, has already finished, or has been terminated. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">So start by drawing the actual <strong style=\"font-weight:700;color:inherit\">Inquiry Process<\/strong> For the import URL: The browser may first reach a CDN or a load balancer, then the web server, and finally the relevant FPM pool via the web server\u2019s PHP connection. The PHP code, in turn, may be waiting for a response from a database or an external API. These services are not directly in the browser\u2019s HTTP path, but they can cause delays in the web server receiving response data. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">With <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_pass<\/code> nginx forwards the request via FastCGI to, for example, PHP-FPM. With <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">proxy_pass<\/code> An Nginx server, on the other hand, forwards requests to its backend via HTTP or HTTPS. Apache HTTP Server 2.4 can handle requests via <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">ProxyPass<\/code> or pass it on to a proxy handler. Check the destination and protocol for each intermediate step. An HTTP proxy may be located in front of the web server, which in turn communicates with PHP-FPM via FastCGI. If the upstream proxy generates the 504 error, first investigate its connection to the web server, not the FastCGI connection behind it.    <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The duration of approximately one minute provides a search range for the diagnosis. It does not correspond to a specific nginx directive or a <strong style=\"font-weight:700;color:inherit\">PHP timeout<\/strong>. The key factor remains which connection and which phase the waiting period expired in.  <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"php-skripttimer\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"php-skripttimer\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">How much time PHP actually counts<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">max_execution_time<\/code> limits the <strong style=\"font-weight:700;color:inherit\">PHP Script Timer<\/strong> Recorded execution time. If PHP reaches this limit, normal script execution is terminated with a fatal error. If you find the message \u201eMaximum execution time \u2026 exceeded\u201c in the PHP log for the request in question, this is concrete evidence that the script timer has been triggered. Allowing the web server more time will not prevent this error.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A successful call to <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">set_time_limit(30)<\/code> resets the timer. If PHP has already tracked 20 seconds by that point, 30 tracked seconds will be available again starting from the call, rather than just the 10 seconds that would remain from an original 30-second limit. Without any further changes, the timer in this example could therefore trigger after a total of 50 recorded seconds. The function call does not reset a gateway\u2019s timeout. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">What constitutes a recorded second depends on the PHP environment. With standard CPU time measurement on non-Windows systems, wait times for streams or database queries may fall outside the recorded time. If an import waits a long time for a query, significantly more time may elapse for the browser than PHP counts toward its limit. On Windows, however, PHP counts the <strong style=\"font-weight:700;color:inherit\">elapsed time<\/strong>.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Is PHP compatible with <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">--enable-zend-max-execution-timers<\/code> Once compiled, the timer measures elapsed time, including I\/O wait time. For diagnostic purposes, what matters is whether the option is enabled in the actual build of the web environment being used. A CLI call may use a different PHP installation or configuration and does not reflect the actual value of the web request. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">When importing data into WordPress, it's worth taking a look at the process yourself. The post on <a href=\"https:\/\/webhosting.de\/en\/php-execution-time-wordpress-wp-timeout-issues-hosting-optimization\/\">Common WordPress issues, such as resource-intensive plugin imports and slow queries<\/a> is used here solely to identify the cause. The primary sources cited in this article and the current settings in your environment are decisive for the effect and calculation of the time limits.<\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"fpm-worker-grenze\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"fpm-worker-grenze\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">When PHP-FPM Terminates the Worker<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">PHP-FPM has <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">request_terminate_timeout<\/code> a separate limit on how long a worker can process a request. The documented default value is <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">0<\/code> the limit is disabled. If it is enabled and is exceeded, FPM terminates the <strong style=\"font-weight:700;color:inherit\">Worker Process<\/strong>. This does not necessarily result in a PHP fatal error due to the maximum script execution time: The script timer may still have time remaining, for example during a wait phase that it does not count toward the limit in this build.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A worker termination is not an orderly application shutdown. This can cause an import to end before it saves its completion status, even though previous write operations have already been completed. If you suspect this, search the FPM log for a message regarding the affected worker and compare it with the application log. When doing so, check the configuration of the pool that processed the request, not that of another pool on the same server. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">According to the PHP-FPM documentation, <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">request_terminate_timeout<\/code> to <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_finish_request()<\/code> and is not applied during an internal shutdown if <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">request_terminate_timeout_track_finished<\/code> is disabled. Its documented default is <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">no<\/code>. If it is enabled and <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">request_terminate_timeout<\/code> If set to \"positive,\" the existing processing time limit continues to apply during these phases; it does not restart upon completion of the response or shutdown. This description refers to the documented settings. Neither a worker termination nor the safe continuation of the import can be inferred from the browser response alone. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If you want to start by figuring out where a slow request is getting stuck, <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">request_slowlog_timeout<\/code> the appropriate FPM setting. Once this threshold is exceeded, FPM can generate a PHP backtrace in the <strong style=\"font-weight:700;color:inherit\">Slowlog<\/strong> record; this does not guarantee a usable trace in every case. The call stack may show that PHP was, for example, in the middle of a database call at the time of recording. It does not yet explain why that call was slow. The slowlog threshold itself does not terminate the worker. <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"timeout-vergleich\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"timeout-vergleich\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">A Comparison of PHP and Web Server Timeouts<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A PHP timeout and a web server timeout can both affect the same import, but they do not limit the same phase. The decisive factor is the <strong style=\"font-weight:700;color:inherit\">Sequence of events leading to the demolition<\/strong>: Does PHP terminate the script, does FPM terminate the worker, or does nginx close the connection? Only then can you determine which setting you should check and which change won't solve the problem.    <\/p>\n<div class=\"wh-table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Time limits set for PHP, PHP-FPM, and the associated web server connections\" style=\"width:100%;max-width:100%;overflow-x:auto;margin:28px 0;border:1px solid #dce5e9;border-radius:14px;background:#fff;box-shadow:0 10px 28px -16px rgba(24,47,60,.32);box-sizing:border-box\"><table style=\"width:100%;min-width:580px;border-collapse:separate;border-spacing:0;border:0;margin:0;font-size:15px;line-height:1.6;background:#fff\"><caption style=\"padding:20px;text-align:start;font-size:17px;line-height:1.5;font-weight:700;color:#173246;background:#fff\">Time limits set for PHP, PHP-FPM, and the associated web server connections<\/caption><thead><tr><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">shift<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">directive<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">What is being measured?<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">What is coming to an end?<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Where should you look first?<\/th><\/tr><\/thead><tbody><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">PHP<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">max_execution_time<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Script execution tracked by the PHP timer; measurement method depends on the platform and build<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Script Execution with a Fatal Error<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">PHP error log and the actual PHP value of the web request<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">PHP-FPM<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">request_terminate_timeout<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Processing time for a request in the worker; 0 disables the limit. Documented exception after the response is complete and during shutdown when `request_terminate_timeout_track_finished = no` (documented default for this option). Enabled: An existing positive timeout period remains in effect and does not restart from that point.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">FPM terminates the worker process<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">FPM Log and Configuration of the Relevant Pool<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">nginx \u2192 FastCGI<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">fastcgi_read_timeout<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Pause between read operations when receiving the FastCGI response<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">nginx closes the FastCGI connection<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">nginx error log and configuration of the affected route<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">nginx \u2192 HTTP upstream<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">proxy_read_timeout<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Pause between read operations when receiving the HTTP upstream response<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">nginx closes the upstream connection<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">nginx error log and proxy configuration for the affected route<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Apache 2.4 \u2192 Proxy Backend<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Worker timeout; otherwise, ProxyTimeout, and if neither is specified, TimeOut<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Socket wait time for data to or from the backend<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Data exchange may fail due to a socket timeout; this does not necessarily indicate a PHP error<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">The appropriate proxy worker and a valid Apache configuration<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Client \u2192 nginx<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">client_body_timeout<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Pause between read operations when receiving the request body<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">nginx returns a 408 status code for the request<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">nginx logs and configuration of the affected path<\/td><\/tr><\/tbody><\/table><\/div><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The FastCGI and HTTP lines refer to different nginx connections. For both, nginx documents a limit on read operations, not the total response time. In Apache, it describes <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">timeout<\/code> On the other hand, set the socket timeout on the relevant proxy worker. Its default value is <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">ProxyTimeout<\/code>; if that isn't set either, then <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">TimeOut<\/code>. Do not apply the nginx idle timeout rule to Apache without first verifying it. First, determine which worker is actually responsible and its effective setting.   <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Do not confuse waiting for a response to a current request with waiting for the next request over an already open client connection. The <a href=\"https:\/\/webhosting.de\/en\/optimizing-the-apache-keepalive-timeout-a-performance-focus\/\">Guide to Apache KeepAliveTimeout<\/a> explains the second case. For the 504 diagnosis, however, the decisive factor is which instance was waiting for a response from its upstream. <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"nginx-lesepause\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"nginx-lesepause\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Why 20 seconds Is Not the Total Duration<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Illustrative calculation example; not a measurement. Suppose nginx passes a request to PHP-FPM via FastCGI, and the following directive applies to the relevant nginx path. It limits the <strong style=\"font-weight:700;color:inherit\">Reading Break<\/strong> upon receiving the FastCGI response. The 20 seconds are only intended to illustrate the effect of this setting; they are not a recommended value for production. <\/p>\n<div class=\"wh-code-window\" data-wh-code style=\"margin:28px 0 34px;border:1px solid #2c4656;border-radius:12px;overflow:hidden;background:#132a3b;box-shadow:0 9px 25px -13px rgba(15,35,55,.2)\"><div class=\"wh-code-toolbar\" style=\"display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:11px 16px;background:#223e50;color:#edf5fa;font-size:13px;line-height:1.5;font-weight:600\"><span>Code<\/span><button type=\"button\" class=\"wh-code-copy\" data-wh-copy hidden style=\"padding:6px 11px;border:1px solid #7893a1;border-radius:6px;background:transparent;color:#fff;font-size:12px;line-height:1.5;font-weight:600;cursor:pointer\">Copy code<\/button><span class=\"wh-copy-status\" aria-live=\"polite\"><\/span><span data-wh-copy-success hidden>Copied<\/span><span data-wh-copy-fallback hidden>Code highlighted\u2014please copy<\/span><\/div><pre class=\"wh-code\" data-no-translation translate=\"no\" style=\"display:block;margin:0;padding:20px;max-width:100%;overflow-x:auto;color:#edf5fa;background:#132a3b;font:14px\/1.75 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre;direction:ltr;text-align:left\"><code class=\"language-nginx\" style=\"font:inherit;color:inherit;background:transparent;padding:0;border:0;white-space:inherit\">fastcgi_read_timeout 20s;<\/code><\/pre><\/div><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The request has already been passed to FastCGI. If PHP-FPM were to deliver the first response byte only after 25 seconds, the read timeout would have expired by then: nginx can close the FastCGI connection even though the PHP timer has not yet triggered. If, on the other hand, nginx receives complete response headers and then data at regular intervals of less than 20 seconds, the response can take significantly longer overall without violating this limit. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">echo<\/code> The PHP code does not track when Nginx has read the response data. Conversely, Nginx can buffer the FastCGI response, so data may already have arrived there even though nothing is yet visible in the browser. This limit is determined by when the data is received by Nginx, not by the first visible output in the browser. If nginx has already sent the final response status to its client, it can no longer replace it with a 504 in the event of a subsequent read timeout. The response may remain incomplete; therefore, do not search the access log exclusively for a 504 when investigating a body abortion.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Therefore, check the error log to see which phase nginx was waiting in. For the <strong style=\"font-weight:700;color:inherit\">Connection setup<\/strong> Regarding FastCGI: <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_connect_timeout<\/code>. The request is passed to FastCGI using <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_send_timeout<\/code> a separate limit between consecutive write operations. Only when the response is read is <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_read_timeout<\/code> Relevant. If the error occurs during the connection process, a longer read time does not provide any additional time for establishing the connection. <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"export-und-upload\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"export-und-upload\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Distinguishing Between CPU Export and a Sluggish Upload<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">An export calculates totals for thousands of records and formats them for a file. For this exact request, the PHP log of the <strong style=\"font-weight:700;color:inherit\">Fatal Error<\/strong> \u201eMaximum execution time \u2026 exceeded,\u201c the PHP script timer reported. Increasing the nginx timeout doesn't change anything: nginx might wait longer for a response, but that won't cause the terminated script to continue running.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">When exporting, first determine which processing step takes the most time. If, for example, the same totals are recalculated for each row, it\u2019s worth consolidating this work. If the volume cannot be reduced, divide it into manageable work packages. A targeted increase in the PHP limit is more appropriate for a known, manageable export than for a process whose duration varies greatly depending on the amount of data.<\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">When the upload is stalled, the direction is reversed: nginx is still waiting for data <strong style=\"font-weight:700;color:inherit\">from the client<\/strong>, not on a response from PHP. If no further data arrives for too long while reading the request body, then <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">client_body_timeout<\/code> trigger. nginx then terminates the request with an HTTP 408 error, possibly before any PHP application code even runs. A slow transfer with brief pauses in reading, on the other hand, may take longer overall than the set value.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">max_input_time<\/code> This relates to a different phase: The directive limits the amount of time PHP is allowed to spend parsing input data before executing the script. It does not specify how long Nginx waits for the next chunk of data during an upload. If the nginx log shows a timeout while reading the request body, you should therefore make a change to <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">max_input_time<\/code> in the wrong place. Neither of these limits is a general time limit for the entire upload duration.  <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"logs-und-konfiguration\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"logs-und-konfiguration\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Find the trigger in the logs<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">For a specific failed import, record the time (including the time zone), the route, the HTTP status, and, if available, the <strong style=\"font-weight:700;color:inherit\">Request ID<\/strong>. Search for the same event in the logs of the CDN, load balancer, and web server to identify which instance reported the issue first and determine the phase in which the error occurred. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If the answer is a <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">Proxy-Status<\/code>-If the header contains this information, it can provide a clue about the intermediate server involved and its error. If nginx triggered the timeout, search the error log for the <strong style=\"font-weight:700;color:inherit\">Error Phase<\/strong>: Did the connection to the upstream server fail, or did the request fail to send, or did the response fail to load? A timeout during connection establishment is not the same as a read timeout. During the read phase, nginx may first wait for the response header and later for additional data from the response body.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Cross-reference the time of the error with the FPM and application logs. A message about a terminated worker provides different information than a PHP fatal error or an application log that reports additional records processed after the 504 error. If there is no common ID, timestamps and the route can help with assignment. However, when multiple imports are running simultaneously on the same route, they are not always sufficient to uniquely identify a log entry. <\/p>\n<figure class=\"wp-block-image size-large wh-figure\" aria-describedby=\"wh-caption-detail1\" style=\"display:block;float:none;clear:both;width:100%;max-width:760px;margin:34px auto 40px;border:1px solid #dae5e9;border-radius:14px;overflow:hidden;background:#f5f8fa;box-shadow:0 10px 28px -17px rgba(24,47,60,.28);box-sizing:border-box\"><div class=\"wh-figure-media\" style=\"display:block;background:#eef3f5;line-height:0\"><img loading=\"lazy\" width=\"800\" height=\"534\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/request-id-logabgleich-d0b1f390-detail1-fcec9a8c84-1024x683.webp\" class=\"wp-image-22672\" alt=\"AI-generated stock image of three strips of paper with adhesive dots attached to a shared wooden edge\" decoding=\"async\" srcset=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/request-id-logabgleich-d0b1f390-detail1-fcec9a8c84-1024x683.webp 1024w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/request-id-logabgleich-d0b1f390-detail1-fcec9a8c84-300x200.webp 300w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/request-id-logabgleich-d0b1f390-detail1-fcec9a8c84-768x512.webp 768w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/request-id-logabgleich-d0b1f390-detail1-fcec9a8c84-18x12.webp 18w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/request-id-logabgleich-d0b1f390-detail1-fcec9a8c84.webp 1536w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" ><\/div><figcaption class=\"wh-caption\" id=\"wh-caption-detail1\" style=\"display:block;margin:0;padding:12px 18px 15px;border-top:1px solid #dce5e9;color:#506575;background:#f5f8fa;font-size:14px;line-height:1.55;text-align:start\">AI-generated illustrative image: A shared request ID helps identify the same import across the logs of different services.<\/figcaption><\/figure><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Are the following already in the nginx access log: <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">$upstream_connect_time<\/code> and <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">$upstream_response_time<\/code> If available, use these timestamps to correlate the same operation with the error, FPM, and application logs. Identify the error phase based on the error log message, rather than inferring it from a single timestamp. Upstream times alone do not indicate whether PHP is performing calculations, waiting for a database response, or has not even begun processing yet. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Only then should you check the applicable settings for the route in question. For nginx, use <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_pass<\/code> is for missing FastCGI response data <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_read_timeout<\/code> relevant; in the case of <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">proxy_pass<\/code> and an HTTP backend <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">proxy_read_timeout<\/code>. In the Apache proxy, check the <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">timeout<\/code> of the responsible worker as well as the guidelines <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">ProxyTimeout<\/code> and <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">TimeOut<\/code>. Compare the connection in question with the logged error phase. Do not change the FastCGI limit of a downstream server if an upstream proxy connection is affected.   <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If an FPM session times out, check the relevant pool. Determine the PHP value in the context of the web request, since the CLI may load a different configuration. A timeout after approximately 60 seconds is a clue, but not proof of a specific default value.  <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"last-und-abhaengigkeiten\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"last-und-abhaengigkeiten\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Identifying Queues and Slow Dependencies<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If the 504 errors occur primarily during parallel imports or during peak times, check the <strong style=\"font-weight:700;color:inherit\">FPM Queue<\/strong>. The FPM status page shows <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">listen queue<\/code>, how many requests are currently waiting for an available process. Compare this value with the number of active and available processes. A growing queue combined with a shortage of available workers suggests that some of the wait time occurs even before the application code is executed. <\/p>\n<figure class=\"wp-block-image size-large wh-figure\" aria-describedby=\"wh-caption-detail2\" style=\"display:block;float:none;clear:both;width:100%;max-width:760px;margin:34px auto 40px;border:1px solid #dae5e9;border-radius:14px;overflow:hidden;background:#f5f8fa;box-shadow:0 10px 28px -17px rgba(24,47,60,.28);box-sizing:border-box\"><div class=\"wh-figure-media\" style=\"display:block;background:#eef3f5;line-height:0\"><img loading=\"lazy\" width=\"800\" height=\"534\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/php-fpm-worker-warteschlange-d0b1f390-detail2-c51c2cb220-1024x683.webp\" class=\"wp-image-22674\" alt=\"AI-generated illustration of a row of wood chips in front of three bins that are already full\" decoding=\"async\" srcset=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/php-fpm-worker-warteschlange-d0b1f390-detail2-c51c2cb220-1024x683.webp 1024w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/php-fpm-worker-warteschlange-d0b1f390-detail2-c51c2cb220-300x200.webp 300w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/php-fpm-worker-warteschlange-d0b1f390-detail2-c51c2cb220-768x512.webp 768w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/php-fpm-worker-warteschlange-d0b1f390-detail2-c51c2cb220-18x12.webp 18w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/php-fpm-worker-warteschlange-d0b1f390-detail2-c51c2cb220.webp 1536w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" ><\/div><figcaption class=\"wh-caption\" id=\"wh-caption-detail2\" style=\"display:block;margin:0;padding:12px 18px 15px;border-top:1px solid #dce5e9;color:#506575;background:#f5f8fa;font-size:14px;line-height:1.55;text-align:start\">AI-generated illustration: If all FPM workers are busy, additional requests may be queued even before the PHP code starts running.<\/figcaption><\/figure><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Compare the status values with the error timestamps. Checking the pool after the peak load has ended may reveal an empty queue. Conversely, a value other than zero at <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">max children reached<\/code> It's just that the pool has already reached its process limit since it started\u2014not that this happened during the import being investigated. Restrict access to the status page to authorized internal users; it does not belong on the public network. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The queue indicates the bottleneck, but it does not yet explain why the workers are busy. The <strong style=\"font-weight:700;color:inherit\">FPM Slowlog<\/strong> You can use a backtrace to see exactly where PHP is in the process when a request is slow. If entries are piling up during a database or API call, check the duration of those calls in the application logs or with the respective service. A backtrace alone does not show how long an individual call has been waiting, nor why the remote server is responding slowly. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If a dependency is blocking the import, set a specific time limit there whenever possible\u2014for example, for establishing a connection to the API and for the entire transfer, or for executing a database query, provided the driver or database supports it. Allow enough time for the application to handle and report the error before the gateway times out. However, increasing the nginx read timeout does not free up workers; it may simply cause requests to wait longer in the same overloaded pool.  <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"weiterlauf-und-jobs\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"weiterlauf-und-jobs\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Will the import continue after the 504?<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">You can check whether the import is still in progress by looking at its <strong style=\"font-weight:700;color:inherit\">Technical Order Status<\/strong>. The HTTP status alone does not indicate which changes have already been saved or rolled back. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">In nginx, there are two possible scenarios: either the client terminates the connection before receiving a response, or nginx reaches its own <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_read_timeout<\/code>. <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_ignore_client_abort<\/code> applies only to the first case; nginx\u2019s client can also be an upstream proxy. The default value <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">off<\/code> If a client disconnect is detected, this may cause the FastCGI connection to close; this is not guaranteed for every configuration. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The setting <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">on<\/code> Ignore it. The directive does not prevent a FastCGI read timeout and does not keep the connection open when it expires. Separately, PHP's <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">ignore_user_abort<\/code> an error detected by PHP; PHP can only detect it when it actually attempts to output data. None of these settings guarantees that the process will continue: the PHP runtime limit, the FPM limit, and the application itself can still terminate the import.    <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Before resubmitting, check the business status, not just the HTTP status. If the application has assigned an import ID, look for it in the import log or in the status view. For an import that saves records in batches, some of the data may have already been processed. If the job is still running or its status is unclear, restarting it may cause the same data to be processed again.<\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">You can specifically limit short tasks with a predictable duration or break them down into smaller chunks with saved progress. For long or highly variable tasks, a <strong style=\"font-weight:700;color:inherit\">Background Job<\/strong> More appropriate: The web request submits the job and returns an ID that can be used to retrieve its status. Design the process for repeated requests so that the same job ID does not trigger a second import and so that a restart does not process already-saved packages twice.<\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">fastcgi_finish_request()<\/code> This does not replace the job queue. If successful, the function completes the response from PHP-FPM\u2019s perspective and allows the script to continue running afterward. The end of the response and the end of the script are thus separated. In the audited FPM code from PHP 8.4.1, the same worker remains occupied as long as the script continues to run. The code does not accept the next request until after the script has finished executing and the request has been shut down. Downstream buffering can affect when data reaches the browser; nginx can buffer FastCGI responses. Therefore, the import status is determined by the actual completion of the application, not solely by the HTTP response sent.   <\/p>\n<\/section><section class=\"wh-sources\" style=\"margin:40px 0 0;padding:24px 0 0;border-top:1px solid #dce5e9;color:#596b7b;font-size:14px;line-height:1.65\"><h2 style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Sources and Current State of Knowledge<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Status of the research: <time datetime=\"2026-11-20\">2026-11-20<\/time><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Status of research for this project: November 20, 2026. Time limits are considered separately for PHP\/PHP-FPM, nginx with FastCGI or HTTP upstream, and Apache HTTP Server 2.4 mod_proxy. The actual loaded configuration and the version in use are decisive. No measurements were performed on production systems.<\/p><div class=\"wh-source-urls\"><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.rfc-editor.org\/rfc\/rfc9110.pdf<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.php.net\/connection-handling<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.php.net\/manual\/en\/function.set-time-limit.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.php.net\/manual\/en\/install.fpm.configuration.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/nginx.org\/en\/docs\/http\/ngx_http_fastcgi_module.html<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/nginx.org\/en\/docs\/http\/ngx_http_proxy_module.html<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_proxy.html<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.php.net\/manual\/en\/info.configuration.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/nginx.org\/en\/docs\/http\/ngx_http_core_module.html<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.rfc-editor.org\/rfc\/rfc9209.html<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/blog.nginx.org\/blog\/using-nginx-logging-for-application-performance-monitoring<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.php.net\/manual\/en\/fpm.status.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/www.php.net\/manual\/en\/function.fastcgi-finish-request.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/raw.githubusercontent.com\/php\/php-src\/php-8.4.1\/sapi\/fpm\/fpm\/fpm_main.c<\/span><\/p><\/div><\/section><\/div>","protected":false},"excerpt":{"rendered":"<p>A 504 error after one minute isn't proof of a PHP error. Here's how to find out which limit was reached and whether your import is still running after the gateway timeout.<\/p>","protected":false},"author":1,"featured_media":22670,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[780],"tags":[],"class_list":["post-22576","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administration-anleitungen"],"acf":[],"_links":{"self":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts\/22576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/comments?post=22576"}],"version-history":[{"count":15,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts\/22576\/revisions"}],"predecessor-version":[{"id":22675,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts\/22576\/revisions\/22675"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/media\/22670"}],"wp:attachment":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/media?parent=22576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/categories?post=22576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/tags?post=22576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}