[BUG] max 1 minute timeout for Anthropic API causes ERRORs for payloads larger than 224KB

Resolved 💬 29 comments Opened Aug 28, 2025 by mindreframer Closed Sep 4, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API

Bug Description

CURRENTLY there is a 1 minute timeout configured for the Anthropic API through Cloudflare:

<img width="1400" height="345" alt="Image" src="https://github.com/user-attachments/assets/9e20d39c-2447-48b4-ab96-41a9a566bded" />

Response:

HTTP/1.1 504 Gateway Timeout
Date: Thu, 28 Aug 2025 23:36:47 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 6357
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
Referrer-Policy: same-origin
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Jan 1970 00:00:01 GMT
X-Robots-Tag: none
Server: cloudflare
CF-RAY: 9767a0862f6f9a97-VIE

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>


<title>api.anthropic.com | 504: Gateway time-out</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/main.css" />

This makes proper work impossible.

View original on GitHub ↗

29 Comments

Buuntu · 10 months ago

Surprised this doesn't have more attention, seems like Claude is unusable for anyone getting this? Maybe it's only in certain locations, have you found a workaround in the meantime?

mindreframer · 10 months ago
Surprised this doesn't have more attention, seems like Claude is unusable for anyone getting this? Maybe it's only in certain locations, have you found a workaround in the meantime?

Nope, just requests timing out. I guess I it's back to old-school coding for now.
Thats a shame. Hope they fix it soon. Going to bed for now.

khimaros · 10 months ago

running into this too when using the api directly

this is for ~4k input tokens and ~5k output tokens. it times out after 60 seconds.

the dashboard claims that it is my client, but i can clearly see a 504 returned by anthropic's servers.

AnotherFullstackDev · 10 months ago

Plus one. Claude is unusable right now

setharnold · 10 months ago

I think this is impacting even mundane things like conversation compaction:

  ⎿  API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 4 seconds… (attempt 4/10)
  ⎿  API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 10 seconds… (attempt 5/10)
  ⎿  API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 19 seconds… (attempt 6/10)
  ⎿  API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 37 seconds… (attempt 7/10)
  ⎿  API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 33 seconds… (attempt 8/10)

> /compact 

✽ Compacting conversation… (esc to interrupt)

Edited to add that at the moment the status page at https://status.anthropic.com/ shows nothing amiss, but Claude Code is unusable right now. This might be worth exploring for the status widget. Thanks.

AnotherFullstackDev · 10 months ago

Here we go...

brew install gemini-cli
AnotherFullstackDev · 10 months ago

Generally for anyone who wants their claude working right now. When you work do the following:

  1. Create a plan and ask claude to save it to a file so it tracks progress;
  2. Ask it to work according to the plan and track the progress there;

It will work until it reaches the context limit and them you can restart it and ask to continue to work according to the predefined plan.

chuckwilliams10 · 10 months ago

Wow ...I am getting the same 504 Gateway errors...today is my first time trying out Claude Code after hearing so much good stuff about it...I hope they get this fixed and update their status page

ty13r · 10 months ago
Generally for anyone who wants their claude working right now. When you work do the following: 1. Create a plan and ask claude to save it to a file so it tracks progress; 2. Ask it to work according to the plan and track the progress there; It will work until it reaches the context limit and them you can restart it and ask to continue to work according to the predefined plan.

<img width="1326" height="575" alt="Image" src="https://github.com/user-attachments/assets/d39619ec-d021-4451-9b46-595ab8a9e876" />

AnotherFullstackDev · 10 months ago
> Generally for anyone who wants their claude working right now. When you work do the following: > > 1. Create a plan and ask claude to save it to a file so it tracks progress; > 2. Ask it to work according to the plan and track the progress there; > > It will work until it reaches the context limit and them you can restart it and ask to continue to work according to the predefined plan. <img alt="Image" width="1326" height="575" src="https://private-user-images.githubusercontent.com/507224/483407998-d39619ec-d021-4451-9b46-595ab8a9e876.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTY0MzA2NjYsIm5iZiI6MTc1NjQzMDM2NiwicGF0aCI6Ii81MDcyMjQvNDgzNDA3OTk4LWQzOTYxOWVjLWQwMjEtNDQ1MS05YjQ2LTU5NWFiOGE5ZTg3Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgyOVQwMTE5MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZjQ3ZTQ5NDY0MmZkYWRhYmM1OTZkYjk4OTM2NzM1YjQ2MGRjYmQ2ZTVlOWIxOTU4YWRiN2M5YjA5NTgwNzYwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.FtpLSBR90vUJmLJLQypRaXYZ8jCdeuQnLCx-xXUPrg4">

gemini cli is actually good :) and it has a free tier

AnotherFullstackDev · 10 months ago

gemini-2.5-pro has about 1m tokens context so must be enough to fit whatever is the task about

ty13r · 10 months ago
Wow ...I am getting the same 504 Gateway errors...today is my first time trying out Claude Code after hearing so much good stuff about it...I hope they get this fixed and update their status page

growing pains, it normally works great.

BaranBayden · 10 months ago

I'm getting the same error with the Claude Max plan; it was working 6 hours ago, but now all my requests are getting a 504.

ty13r · 10 months ago

<img width="879" height="247" alt="Image" src="https://github.com/user-attachments/assets/a66b1d49-40ca-4ffb-8b83-e56ce13e822a" />

TonySimonovsky · 10 months ago

Weird as I've been using Claude for 2-3 weeks now and never experienced this. Today looks like the introduced some new bug/feature that is somehow related to the context window.

weellio · 10 months ago

I've come to join the party..

⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 1 seconds… (attempt 1/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 1 seconds… (attempt 2/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 2 seconds… (attempt 3/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 5 seconds… (attempt 4/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 8 seconds… (attempt 5/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 17 seconds… (attempt 6/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 38 seconds… (attempt 7/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 33 seconds… (attempt 8/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 34 seconds… (attempt 9/10)
⎿ API Error (api.anthropic.com | 504: Gateway time-out) · Retrying in 40 seconds… (attempt 10/10)

khimaros · 10 months ago

i'm even seeing this using the batches API.

the 504 errors seem to be coming from cloudflare, though likely the cause is from anthropic's servers not responding quickly enough..

watarutmnh · 10 months ago

After about 30 minutes of dysfunction, it started working normally again.

mindreframer · 10 months ago

It seems to be a misconfiguration in Cloudflare proxy, MAX 1 minute timeout. Anthropic's servers are probably fine and have no idea, that there is an issue. BUT the proxy is rejecting all requests that are longer...

noahkuntner · 10 months ago

Same it's also down for me. I had two parallel chats running, one did work for some time, now both of them stopped – quite annoying, but these things can happen, I guess.

Dimension33 · 10 months ago

same 🫤

river-li · 10 months ago

Any updates?

1034378361 · 10 months ago

I got same problem

Chavezrene · 10 months ago

Same problem for me. Great timing as I just updated to the max plan today lol.

jspwrd · 10 months ago

was running into the problem earlier and it's just cleared up for me - i didn't do anything

noahkuntner · 10 months ago

seems to be working fine again – we're back

TonySimonovsky · 10 months ago

working again for me as well

1034378361 · 10 months ago

Now everything is OK

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.