yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.13k stars 1.49k forks source link

What process management tools are recommended to keep the bot running in the background of the server? #1129

Closed KirisakiAria closed 7 months ago

KirisakiAria commented 9 months ago

I used pm2 at first, but there would be ETELEGRAM: 409 Conflict. Then I switched to forever, but after a while the bot seems to disconnect or crash, it's unresponsive, and checking the logs there's no anomalies, and it comes back using forever restart. But I can't manually restart it every 20 minutes. What other process daemon tools work better for this bot?

Makc0809 commented 8 months ago

I use pm2 and have no problems whatsoever. Maybe you have a bug in your code... For example, you are trying to send a message to a chat room that doesn't exist already or something similar that telegram can't do.

yagop commented 8 months ago

I use systemd or just a Docker with --restart="unless-stopped"