503 server error
I got a streak of 503 server errors. The requests right before and after this streak were normal 200 requests. Was there a hosting issue/downtime? This happened on May 21, 2023
Solution:Jump to solution
It's much more likely a code issue than a Railway issue. There are many reasons why your snake could've errored at the beginning of a match. Your code might not handle multiple games well, it might've been using all its processing on another game, or it could've just been hanging
24 Replies
Project ID:
7afe5be9-0302-4917-a5b9-22869e2f0c67
7afe5be9-0302-4917-a5b9-22869e2f0c67
Are you still having this issue?
Have not check recently (found this on battlesnake, lost a game because of it)
My site will be online tonight, and I will check again
Also, please ping on reply
Or I might miss this
Battlesnake’s 503 errors don’t tell you much. Just means your server didn’t respond in time. Very likely a code issue as Railway didn’t have any downtime for existing deployments on the 21st
next time before posting a help post, look at the logs of your snake. Those will likely tell you everything you need to know
you can look at the logs of your bots old deployments on the deployments tab. If you’re interested in what happened, find the logs at the timestamp of when your snake didn’t respond.
99.9% of the time the issue won’t be on Railway’s side. Railway is pretty stable
My snake is not the best designed, and does not log out timestamps. I remember checking the game tho and nothing went wrong server side
Railway logs timestamps
Just tick the show timestamps button
@not logged in
ok
but battlesnake does not
But you could check your logs on the 21st for any errors that may have happened
No logs found containing May 21
Each deployment has different logs
Try looking in a different deployment
ik, but does the search feature search timestamps?
no clue
ctrl f exists though
I will have to click "load more" so many times tho
(My battlesnake logs the game board every move)
Don't know what to tell you, if you want to see what happened on the 21st, that's what you'll have to do
Wait, can't I just search for traceback and see if any happened on the 21st?
either log search is broken or no error occured
Or you're in the wrong deployment, are you in the one that was active on the 21st?
i am on the one that was active from the 13th to now
You can try to replicate the cause of the error using the Battlesnake cli
But there's nothing I can do here. It's not a Railway issue
you sure? It might be a battlesnake issue, but my code for sure did not error.
Here is the game: https://play.battlesnake.com/game/1aead804-8a24-4aea-bc4f-b2412402d8a6
Created by Duels Leaderboard | Battlesnake
Watch Battlesnake bots compete to stay alive in Battlesnake, a multiplayer programming game where your code is your controller. Write a Battlesnake bot that avoids walls, searches for food, and traps its enemies to stay alive!
Solution
It's much more likely a code issue than a Railway issue. There are many reasons why your snake could've errored at the beginning of a match. Your code might not handle multiple games well, it might've been using all its processing on another game, or it could've just been hanging
All I can tell you is that Railway did not go down on the 21st. Given that the other snake responded fine it's not an issue with Battlesnake. The only variable left is your snake
The fact that it's a 503 error in under 500ms tells me it was probably a malformed response to the request.
I would start there
Well, it is a 1 time thing anyway, it should be fine