[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.
29 Comments
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.
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.
Plus one. Claude is unusable right now
I think this is impacting even mundane things like conversation compaction:
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.
Here we go...
Generally for anyone who wants their claude working right now. When you work do the following:
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.
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
<img width="1326" height="575" alt="Image" src="https://github.com/user-attachments/assets/d39619ec-d021-4451-9b46-595ab8a9e876" />
gemini cli is actually good :) and it has a free tier
gemini-2.5-pro has about 1m tokens context so must be enough to fit whatever is the task about
growing pains, it normally works great.
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.
<img width="879" height="247" alt="Image" src="https://github.com/user-attachments/assets/a66b1d49-40ca-4ffb-8b83-e56ce13e822a" />
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.
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)
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..
After about 30 minutes of dysfunction, it started working normally again.
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...
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.
same 🫤
Any updates?
I got same problem
Same problem for me. Great timing as I just updated to the max plan today lol.
was running into the problem earlier and it's just cleared up for me - i didn't do anything
seems to be working fine again – we're back
working again for me as well
Now everything is OK
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.