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

Status Fixed / completed
Maintainer reply None cached
Activity 29 comments · opened Aug 28, 2025 · 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 · 1 year 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 · 1 year 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 · 1 year 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 · 1 year ago

Plus one. Claude is unusable right now

setharnold · 1 year 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 · 1 year ago

Here we go...

brew install gemini-cli
AnotherFullstackDev · 1 year 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 · 1 year 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 · 1 year 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 · 1 year 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 · 1 year ago

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

ty13r · 1 year 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 · 1 year 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 · 1 year ago

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

TonySimonovsky · 1 year 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 · 1 year 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 · 1 year 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 · 1 year ago

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

mindreframer · 1 year 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 · 1 year 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 · 1 year ago

same 🫤

river-li · 1 year ago

Any updates?

1034378361 · 1 year ago

I got same problem

Chavezrene · 1 year ago

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

jspwrd · 1 year ago

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

noahkuntner · 1 year ago

seems to be working fine again – we're back

TonySimonovsky · 1 year ago

working again for me as well

1034378361 · 1 year ago

Now everything is OK

github-actions[bot] · 11 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.