R
Railway2y ago
nlits

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:
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
Jump to solution
24 Replies
Percy
Percy2y ago
Project ID: 7afe5be9-0302-4917-a5b9-22869e2f0c67
nlits
nlitsOP2y ago
7afe5be9-0302-4917-a5b9-22869e2f0c67
Adam
Adam2y ago
Are you still having this issue?
nlits
nlitsOP2y ago
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
Adam
Adam2y ago
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
nlits
nlitsOP2y ago
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
Adam
Adam2y ago
Railway logs timestamps Just tick the show timestamps button @not logged in
nlits
nlitsOP2y ago
ok but battlesnake does not
Adam
Adam2y ago
Adam
Adam2y ago
But you could check your logs on the 21st for any errors that may have happened
nlits
nlitsOP2y ago
No logs found containing May 21
Adam
Adam2y ago
Each deployment has different logs Try looking in a different deployment
nlits
nlitsOP2y ago
ik, but does the search feature search timestamps?
Adam
Adam2y ago
no clue ctrl f exists though
nlits
nlitsOP2y ago
I will have to click "load more" so many times tho (My battlesnake logs the game board every move)
Adam
Adam2y ago
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
nlits
nlitsOP2y ago
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
Adam
Adam2y ago
Or you're in the wrong deployment, are you in the one that was active on the 21st?
nlits
nlitsOP2y ago
i am on the one that was active from the 13th to now
Adam
Adam2y ago
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
nlits
nlitsOP2y ago
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
Adam
Adam2y ago
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
Adam
Adam2y ago
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
nlits
nlitsOP2y ago
Well, it is a 1 time thing anyway, it should be fine
Want results from more Discord servers?
Add your server