Cron bots eventually stops pinging my bots, possibly because of 504 timeout

project: lava-sand
endpoint: /nonsense

project: u6-puchi-bot
endpoint: none (root)

When the endpoint was accessed, it gives a timeout. For cron bots, too many fails (including timeouts) will cause the cron to be disabled or it pings the endpoint less often, making the bot unable to stay up all time or update often. What should I do so that the cron bots get a valid response when pinging the endpoints?

edit: I realized that u6-puchi-bot is private. It’s a discord bot. If you need access to it please tell me.

In lava-sand, it doesn’t look like you’re sending a response back to the http request, so it eventually just sends a timeout. For the app.all route you’ve defined add res.sendStatus(200); at the end.

Since u6-puchi-bot is private I can’t tell the cause of the issue. Make sure it has a http server to respond to requests and sends a response like the above. If you can’t figure it out then DM me a join link so we can view the code. Thanks.

invite link sent.

(“Posts has to be at least 20 characters. Have you tried the [heart] button?” - hmmmm)

As suggested, your bot didn’t include a http server or route for your cron job to ping. I’ve added this to your project and it’s working now.

1 Like