Tickd.ai
Status & outages

How to Fix Claude 504 Gateway Timeout Error

Updated 9/1/2026

An HTTP 504 Gateway Timeout error occurs when one server on the internet does not receive a timely response from another server upstream. In the context of Claude, this means the frontend proxy servers (which accept your incoming requests) timed out waiting for the core backend AI generation models to process and return your response.

This can happen during extreme platform congestion, when submitting incredibly long and complex prompts, or due to a routing issue between your local Internet Service Provider (ISP) and Anthropic’s cloud delivery network.

1. Split Complex Prompts and Massive File Uploads

Claude has a strict response window. If a prompt takes too long to generate (often exceeding 60 seconds of processing time on the backend), the gateway proxy will sever the connection and throw a 504 error.

  1. If you are uploading large files (such as a 100-page PDF or a massive code repository), divide them into smaller sub-documents and upload them across multiple messages.
  2. Ask Claude to perform complex tasks in steps. Instead of asking it to write a complete multi-file application in one prompt, ask it to draft the architectural plan first, followed by individual files in separate prompts.
  3. Start a new chat thread to clear out old historical context that the model has to re-read and process with every single new turn.

2. Flush Your Local DNS Cache

Outdated or corrupted DNS records on your local machine can point your browser to a degraded or offline CDN gateway node, resulting in repeated 504 timeouts.

  1. On Windows:
  2. Press the Windows Key, search for cmd, and open the Command Prompt.
  3. Type ipconfig /flushdns and press Enter.
  4. On macOS:
  5. Open the Terminal app.
  6. Type sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder and press Enter (you will need to enter your system password).
  7. Restart your browser and try reloading Claude.

3. Disable or Reconfigure Your VPN and Proxy Settings

Active VPNs and custom proxy servers introduce additional routing steps. If the VPN's server is struggling, it can delay packets long enough to trigger a 504 Gateway Timeout.

  1. Temporarily turn off your VPN or proxy software entirely.
  2. Attempt to reload claude.ai and send your message.
  3. If you must use a VPN for security, try changing the server location to a different city or country to force your traffic through a different gateway route to Anthropic's servers.

4. Adjust Client-Side API Timeout Settings (For Developers)

If you are using the Anthropic API via Python or Node.js and hitting 504 errors on long-form generations, you need to increase your HTTP client’s default timeout value.

1. If using the Python SDK, explicitly set the HTTP client timeout when initializing the Claude client: `python from anthropic import Anthropic client = Anthropic( timeout=120.0 # Increase timeout to 120 seconds ) ` 2. If using raw httpx or custom HTTP libraries, ensure your read and connect timeouts are set to at least 120 seconds to allow the backend model enough time to process heavy context windows before the local socket drops.

When to Escalate

If you receive a 504 Gateway Timeout on small, simple prompts with no file attachments, and the error persists across different devices (such as your desktop computer and your mobile phone using cellular data), the issue is on Anthropic's hosting infrastructure. Check the official status channel (status.anthropic.com) for active platform-wide incidents, as their engineering team is likely already working to deploy additional server capacity.

Quick fixes

  • Claude is down or not loading
  • Claude Pro billing or payment problem
  • Can't sign in to Claude

While you're here

Tickd is more than troubleshooting — these three are free and take seconds.

Agent BuilderDesign your own AI agent and export it to ChatGPT, Claude, Gemini or Grok.Build one free