Multi-threading with webhook
Please answer these questions before submitting your issue. Thanks!
- What version of pyTelegramBotAPI are you using? 4.15.4
- What OS are you using? linux
- What version of python are you using? 3.10
The problem:
There is an issue in multi-threading, when you use webhook with multi-threading, the message handler doesn't work
and the temporary solution for it is to disable multi-threading with this
bot = telebot.TeleBot(API_TOKEN, threaded=False)
What frontend are you using for webhooks?
flask
flask has parallel engine itself, it's better use flask threading then bot one.
Please provide more code, I can work fine with django
https://github.com/eternnoir/pyTelegramBotAPI/issues/2191
The same issue as here. "Threaded" works only with polling mode. For webhooks ithreaded should be "False" and threading / processes should be handled by frontend.