Bot discord restarting and Uptime Rebot saying “UP”

I’m currently developing a Discord Bot using NodeJS and Glitch, and it keeps restarting . I would like to know what could cause this.
Note: Uptime Robot is connected to my project (saying “Up” )

Thanks in advance.

UptimeRobot only pings every 5 minutes as you can see (unless you get premium) and all projects you have automatically shuts down every 5 minutes, so it barely closes and then UptimeRobot pings it. If you want it to stay up all the time, either make your own Pinger for every 280 seconds or purchase premium for UptimeRobot.

Code for custom uptime thingy.

I am not so sure, but removing \ping endpoint from URL might stop from going project down.

Hey @yZesth, I’ve been watching the logs for your project and I don’t see any signs that the Glitch project itself has restarted in the time I’ve been watching. Can you tell us what’s making you believe the project is restarting?

my project keeps restarting once a day usually in the morning
I can observe that my project restarts because my ontime command that checks the time the bot is online restarts the count and also log restarts
Always in the morning 07:00 AM GMT-3
“Sorry my English is bad”

AH, I see. Glitch projects are all restarted 12 hours from their last start time, so your bot will restart at least that often. Your Uptime Robot config will start it within 5 minutes of when it was restarted.

We may offer paid plans in the future, and those may include projects that don’t restart twice a day, but we don’t have a timeline for any of that work right now.

Sorry for the bother!

1 Like

Is it possible to receive a warning before rebooting so bot can save some data?

Hey @yZesth you could take a look at End execution signal, which might help you out.