← All Status Codes
504

Gateway Timeout

🔴 Server Error Critical Risk

📖 What Is HTTP 504?

The server acting as a gateway did not receive a timely response from the upstream server. The backend is too slow or unresponsive.

🛡️ Security Implications

Slow backend responses can indicate resource exhaustion attacks. Implement query timeouts and circuit breakers.

🔍 Common Causes

Backend processing takes too long, slow database queries, external API timeout, PHP max_execution_time exceeded, large file processing.

🔧 How to Fix

Increase gateway timeout (proxy_read_timeout in Nginx). Optimize slow database queries. Add indexes. Increase PHP max_execution_time. Use async processing.

🖥️ How to Check

curl -I -o /dev/null -w "%{http_code}" https://example.com
Found this useful? Share it.
Make it count. Join free to earn XP for what you read and solve, keep a streak, and track your progress.
Join free