App suddenly goes offline and need to Redeploy each 5hours
I am running a bot that I deployed in the FREE PLAN of Railway.
But every 6 hours the server is down and stops to work. So I need to login, and manually ''redeploy''. After the redeploy starts to be listening and active again. But when I do not have activity for more than 5 or 6 hours seems to go offline and stop working.
Project-id: f462ad09-2515-479a-ab61-de5333ad9388
Service-id: d261cbc1-bd45-42c9-9336-6aa6591c8295
22 Replies
Project ID:
f462ad09-2515-479a-ab61-de5333ad9388,d261cbc1-bd45-42c9-9336-6aa6591c8295
mind sharing your metrics for your bot?
What metrics?
We just had an incident today, I hope that isn't related but it might have been. It should be resolved now.
Also please play around with your restart settings for your service. It is possible we are stopping it after it errors out.
It does not throw errors when stops. And this has been happening from 2 weeks. Just now decided ask here
I was wondering if it is related to my Free Plan?
The resources your app uses
I suspect you might be, over time, approaching the limit
causing railway to shut your app down
could be an out of memory error
meaning you have to redeploy
It is like the server goes down because the lack of usage each 5 hours
When there is activity the server works fine and I do not need to manually redeploy
It has a timer off or something like that as default?
App sleeping is a thing on railway but it's unlikely that it would be effecting your app here
app sleeping puts your app in sleep mode after 10 minutes of no inbound requests
since you're hosting a discord bot, discord would keep pinging your app to ensure connectivity, meaning your app couldn't go into sleep mode
mind sharing your app's metrics?
you can get it by going to your project, then service, and then clicking on the
Metrics
tabJust app sleeping, but that' not on by default, you can find it in the service settings
Let me send screenshot Of the metrics of the app in GitHub
There is no other option than a screenshot
Are those the metrics you needed?
My guess was not correct 🤔
try going to settings and make sure
App Sleeping
is disabled
if it already is then I have no ideaYes that is disabled
restart always @Brody ?
I honestly don't know
Thomas would it be safe to say these issues are unrelated to today's incidents
Any other clue?
I like what fragly said, maybe you aren't replying to telegram's pings or keep alive messages? I have personally ran a telegram bot on railway for nearly a year straight without touching the deployment and have not had issues
Ok I will check and tell you here
unfortunately this would be a code issue and I'm sorry we couldn't have provided you with a solution