HTTPError.net

The fastest way to diagnose, understand, and fix any HTTP status code

408 Request Timeout

Fault: Client
TL;DR

Client took too long to send the complete request.

The server timed out waiting for the request.

What HTTP 408 Request Timeout Means

The server timed out waiting for the request.

Client took too long to send the complete request.

Common Causes

How to Fix It (For Visitors)

How to Fix It (For Developers/Admins)

Returning a 408 Request Timeout (Code Examples)

If you build APIs or web apps, here is how to send an HTTP 408 response and how to test for it:

Node.js (Express)

app.get('/resource', (req, res) => {
  res.status(408).json({ error: 'Request Timeout' });
});

Python (Flask)

@app.route('/resource')
def resource():
    return jsonify(error='Request Timeout'), 408

PHP

<?php
http_response_code(408);
header('Content-Type: application/json');
echo json_encode(['error' => 'Request Timeout']);

Check the status with curl

curl -I https://example.com/resource
# Look for: HTTP/1.1 408 Request Timeout

Frequently Asked Questions

What does HTTP 408 Request Timeout mean?

Client took too long to send the complete request. In short: The server timed out waiting for the request.

Is 408 Request Timeout a client or server error?

408 is a 4xx client-error code, so the request itself needs to change. The server is running normally and is rejecting the request as it was sent by the browser, app, or API client.

How do I fix a 408 Request Timeout error?

Increase timeout settings. Implement chunked upload. Add retry logic.

Official Specification

The 408 Request Timeout status code is defined in RFC 7231 Section 6.5.7.

View the IANA HTTP Status Code Registry →