🚀 Fix “Request Timeout” & “Service Unavailable” (aaPanel + Apache + PHP 8.x)
💡 Summary
You must adjust three areas to fix timeouts permanently:
① Increase upload limits in PHP
② Raise timeout limits in Apache
③ Extend process / execution time in PHP-FPM
✅ Step 1 – Configure PHP
Path:aaPanel → App Store → PHP 8.x → Setting → Configuration
Set these values:
Then Save → Restart PHP 8.x
💡 These parameters control how large and how long PHP accepts uploads and requests.
✅ Step 2 – Configure Apache
Path:/www/server/panel/vhost/apache/post.domain.com.conf
(Replace post.domain.com with your actual domain.)
Add the following before </VirtualHost>:
Then Save → Restart Apache
💡 If you receive “Invalid command ‘RequestReadTimeout’”,
comment out the module line inhttpd.conf:and remove the
RequestReadTimeoutdirective — this disables Apache’s strict request timer completely.
✅ Step 3 – Configure PHP-FPM
Path:/www/server/php/8x/etc/php-fpm.conf
(or /www/server/php/8x/etc/php-fpm.d/www.conf)
Update / confirm the following inside the [www] section:
Then Save → Restart PHP 8.x
💡 These settings let PHP-FPM handle longer executions (up to 10 minutes).
✅ Step 4 – Verify & Test
-
Create a file at
/www/wwwroot/post.domain.com/info.php: -
Visit
https://post.domain.com/info.php-
Confirm PHP-FPM is active.
-
Check that
upload_max_filesize,post_max_size, andmax_execution_timeshow your new values.
-
-
Upload an image / video or perform a long request.
✅ You should no longer see:
-
“Request Timeout – Server timeout waiting for the HTTP request from the client.”
-
“503 Service Unavailable.”
🧰 Optional (Recommended for stability)
Add to the bottom of /www/server/apache/conf/httpd.conf:
Then restart Apache:
✅ Final Result
Your aaPanel + Apache + PHP 8.x server will now:
-
Accept uploads up to 1 GB or more
-
Handle long-running PHP scripts (up to 10 minutes)
-
Avoid 408 / 503 timeouts permanently