← JanitorAI guides

JanitorAI proxy errors 500, 502 and 503: what they mean

Updated

Errors in the 500s mean your proxy request reached the provider and something failed on their side: 500 is a crash on that request, 502 a bad answer from the model server behind it, 503 a model that is offline or overloaded, 504 a reply that took too long. Your key and URL are usually fine. Wait 20 to 30 seconds and send once; on UnsavedAI, check Models if it repeats.

Try it now, free, no account neededStart a story with TallowAn ex-demolition robot is the robot city's only detective. Its first murder came the night you landed.

A 5xx is not your settings

Error codes come in families. The 400s mean the provider did not like the request: a bad key (401), too many requests (429), a model name it does not know (404). The 500s mean the request was fine but the provider could not finish it. That distinction saves time, because it tells you not to start rewriting your proxy configuration.

If JanitorAI shows "Failed to fetch" instead of a number, no answer came back at all, which is a different problem covered in Failed to fetch in JanitorAI.

Code, meaning, what to do

CodeWhat it meansWhat to do
500 Internal Server ErrorThe provider hit an error while handling this requestSend again once; if one chat always fails, check for an unusual setting
502 Bad GatewayThe provider's front door got a broken answer from the model server behind itWait 20 to 30 seconds and send again
503 Service UnavailableThe model is offline, restarting or overloadedWait a minute or two; check the provider's status or model page
504 Gateway TimeoutThe reply took too long and the connection was given upLower Max new tokens or context size, then retry
520 to 524A network service in front of the provider lost contact with itTreat like a 502: wait, then send once

Retry without making it worse

The instinct is to hammer the swipe button. Don't: each swipe is a new request, and a pile of them turns a brief 503 into a 429 too many requests on top. One clean retry after a short pause is faster in practice.

  • Copy your last message before doing anything, so a long paragraph is not lost.
  • Wait 20 to 30 seconds for a 500 or 502, a minute or two for a 503.
  • Send once, or swipe once if the failed reply was the bot's.
  • Close any second tab with the same chat open; it may be retrying too.

When it keeps happening

A one-off 5xx is normal on any service. A pattern tells you more: - Every chat fails, with any message: the provider is down. Their status or model page usually confirms it, and waiting is the only fix. - Only one long chat fails, with 504 or 500: the request is very large. Lower context size in your generation settings, or start a new chat from a chat memory summary. - Only after you changed a setting: put it back. A sampler value far outside the normal range or a huge reply length can crash some providers' servers instead of returning a clean error. - Only at busy evening hours, with 503: the model is overloaded at peak times. Try again later or pick a provider or plan that queues you instead of refusing.

To check quickly, open a brand-new chat with any bot and send "hi". If that works, the problem is in the big chat, not the provider.

The 500-range messages from UnsavedAI

If your JanitorAI proxy is a UnsavedAI key, two messages cover almost every 5xx. "No healthy model worker is available." is a 503 that means the model is restarting; it is usually back within a minute or two, and Models shows when it is online. "The model request failed." is a 502 for a single request that went wrong; send it again.

Busy times on UnsavedAI queue your request instead of returning a 503, and a long wait comes back as a plain message rather than a timeout. If you see something you don't recognise, paste it into the "If a message fails" box on Setup and it shows the fix.

Questions people ask

Is a 500 error from my proxy my fault?

Rarely. It means the provider failed while handling the request. The exception is an extreme setting, so if one chat fails every time, check what you changed last.

Should I make a new API key when I see a 503?

No. A 503 is about the model being unavailable, not your key; a new key gets the same answer until the model is back.

Why do I get 504 only in long chats?

Long chats send much bigger requests, which take longer to read. Lowering context size or Max new tokens usually brings them under the time limit.

Characters for this story