-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for not found token : bot_token
#6
Comments
with some logging, I've found that in some requests that there is no response of the bot, the cls.bot_tokens is empty. |
I found the problem. In gunicorn the number of workers were set to 3. Just one of them could have bot_tokens and two of them didn't have the tokens. When I set the number of workers to 1, everything is ok. |
Can you try to comment this line https://github.com/JungDev/django-telegrambot/blob/master/django_telegrambot/apps.py#L126 , please? |
Yes, it solved the problem. What the line is for?! |
It's a flag to prevent re-running code which should be executed exactly one time. |
I have the same problem. The settings is:
I commented the apps.py 126th line and restarted server. But problem still exist. |
@JungDev @mrabedini Ok, that's what i found This error is mainly caused by TelegramError (Flood control), which is caused by rapid setWebhook queries. |
It seems that the problem still remains. When I use gunicorn with supervisor, I have the same issue. |
This error raise with uWSGI too. Looks like MR #10 fix this problem. |
Agree with @aliaksandrmelnik, most commonly encountered issue is |
@mrabedini Had the same problem with gunicorn. Setting |
First, I should thank you for your great app. In polling mode on my local machine the module works like charm. However when I use the web hook mode, sometimes I get the
error and no response is given by the bot. I didn't setup the cert file in my settings.py . I am using nginx with combination of gunicorn to serve my web app. The server os is ubuntu 16.04. Below is the settings I've used:
The thing that intrigues is the point that sometimes my bot works. Any advice to solve the issue is appreciated.
The text was updated successfully, but these errors were encountered: