Contents
A browser opens a connection and then sends the request: the first line, the headers, and a body if there is one (an uploaded file, for example). The server gives all of that a fixed time to arrive. If sending stalls or crawls, the server closes the connection and returns 408 Request Timeout. So the problem is usually the path between the visitor and the server, not the site’s code.
What causes a 408 error
- A weak or unstable internet connection, especially on mobile data or public Wi-Fi.
- Uploading a large file through a browser form on a slow link, so sending takes longer than the timeout.
- A VPN, proxy or security software that inspects traffic and delays it.
- An app or script sending a wrong
Content-Length: it announces more bytes than it sends, so the server keeps waiting for the rest until it gives up. - Unused browser preconnections, which show up in the log as empty 408 requests with no effect on visitors.
Fixing it as a visitor
- Reload the page; the error is usually temporary.
- Check your connection, or switch from Wi-Fi to mobile data or the other way round.
- Turn off your VPN or proxy for a moment and try again.
- If you’re uploading a file, make it smaller (compress images or zip it) or wait for a faster connection.
Fixing it as the site owner
- Check the log first: in cPanel open Metrics → Raw Access and download the access log. If the 408 lines have an empty request
"-", they’re preconnections and you can ignore them. If they hit real URLs such as an upload page, keep going. - Move big uploads out of the browser: upload large files over FTP or SFTP, or through Files → File Manager, instead of a site form, or use an upload plugin that sends files in chunks.
- Shrink files before upload: compress images, convert them to WebP, and split large backup archives.
- Fix API clients: let your HTTP library compute
Content-Length, and set a clear client timeout with retries. To test an upload withcurl:
curl -i -X POST https://example.com/upload \
-F "[email protected]" --max-time 120
- Don’t tune PHP for a 408:
max_execution_timeandmax_input_timeapply after the request arrives. If the script itself is slow, you’re more likely looking at a 504 error. - If every visitor sees it, from different countries, the problem may be network or server side. Contact support with log examples and times.
Prevention
- Compress images and files before uploading, and set a sensible maximum size on upload forms.
- Use chunked uploads for large files in your app.
- Reduce latency by keeping pages light and using caching.
If the browser shows ERR_CONNECTION_TIMED_OUT instead of a 408, the connection never completed; see that error.
On ArabyHost
Sites run on LiteSpeed, and connection timeouts are set at the server level, not per account. cPanel opens with one click from the Araby Panel and gives you the access log, File Manager and FTP accounts for large uploads. The Araby AI assistant can read your logs and explain what’s happening. If many visitors get 408 at the same time, tell support so they can check the server side.
FAQ
What's the difference between 408 and 504?
With 408, the server is waiting on the browser because the request didn't arrive in time. With 504, the browser sent its request but a gateway or proxy waited on another server that never answered.
Will raising PHP max_execution_time fix a 408?
No. That setting limits how long a script runs after the request arrives; a 408 happens before the full request ever reaches PHP.
Why are there 408 lines in my access log when the site works fine?
Modern browsers open connections in advance to speed things up and don't always use them. The server closes them after the timeout and logs a 408 with an empty request. Those lines are harmless.