Extremely slow responses #2991
-
Steps to Reproduce
Expected behaviourFast as used to be Actual behaviourTakes a lot of time for most /commnads to return a response Operating Systemlinux Version of Python, python-telegram-bot & dependenciespython-telegram-bot 13.11
Bot API 5.7
certifi 2020.06.20
Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] Relevant log outputno relevant log info Additional ContextIt was extremely fast in the past , a couple of days after upgrading the slow downs started |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 3 replies
-
Hello, This problem is most likely happening because of your internet connection. To test this, you can set the logger to DEBUG mode and check when the bot is receiving an update. |
Beta Was this translation helpful? Give feedback.
-
To elaborate harshils answer: There can be multiple reasons for updates being processed slowly. As long as the updates are in fact processed, I highly doubt that a long processing time is due to a bug in PTB. Some pointers on figuring out where the delay comes from:
|
Beta Was this translation helpful? Give feedback.
-
Wrong label sorry . Was meant to be a question .
start_polling
Doubt it , I got a pretty strong a stable one
no
around 12 handlers and not using groups . Very simple functions with little process happening, no time.sleep
Not much , since I only gave access to it to myself and just trigger usually 1 command at the time , hence the surprise . Thanks for the note on DEBUG , Im having a look now at the output. |
Beta Was this translation helpful? Give feedback.
-
Its as if after a time of no activity , the bot went to a sleep state . Then the first command response comes to it , the next commands usually are faster responding .And this behavior continues every now and then |
Beta Was this translation helpful? Give feedback.
-
If you're hosting the bot at some provider please check with the provider. For example such behavior is well known for Heroku, IIRC. |
Beta Was this translation helpful? Give feedback.
-
Its running on a raspberry pi with a 64bit OS on the same network as the devices I use to send messages to it , thats why its weird |
Beta Was this translation helpful? Give feedback.
-
Still couldn't find what the issue could be🤔 |
Beta Was this translation helpful? Give feedback.
-
Ok I switched from raspberry OS to Arch and it seems to be solved so it might have been an OS related issue. |
Beta Was this translation helpful? Give feedback.
Ok I switched from raspberry OS to Arch and it seems to be solved so it might have been an OS related issue.
Response times are light fast as before