Answer the question
In order to leave comments, you need to log in
The TelegramBotApi bot crashes every half an hour, what should I do?
Good afternoon, I'm writing bots on pytelegrambotapi I'm
already buying the third VDS server, I'm using a bot, and suddenly I see a crash in the console log
And so constantly, the bot is standing, half an hour or an hour passes, and CRASH!
Server configurations are outrageous for this kind of bot, Windows Server R2012
100 Mbps port, 2 cores and 2 GB of RAM
What should I do? Please tell me, I have been unable to submit the project for the third day because of this :(
Answer the question
In order to leave comments, you need to log in
Set the bot to infinite restart:
while True:
try:
bot.polling(none_stop=True)
except Exception as ex:
logger.error(ex)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question