-
Notifications
You must be signed in to change notification settings - Fork 613
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
[Bug] Cannot upload file in local mode due to idleTimeout #224
Comments
The file will be sent anyway, just the answer will not be sent. But if a request needs more than 8 minutes to complete, then the bot is barely usable. And everything will be much worse, if the bot would be used by more than one user. So, increasing the limit makes no sense generally, but if you really need a bigger limit, you can change it in
|
Thanks for your reply. Actually I've changed that timeout to 0 to totally
disable it, and the bot works still fine as it's a local server.
But there're a few point I can't agree with you:
1. Bot can be not fully interactive. For example, bot can download & upload
files in the background, then send the files to users with file_id. My
software upgrade monitor works exactly this way
2. Changing source code is easy, but recompiling is not. telegram-bot-api
has some prebuilt docker containers, if I patch the source code, I would
have to rebuild it, which is a pretty time-consuming task considered that
tdlib is a pretty large library.
I believe that the idleTimeout should be
documented and configurable.
|
@levlam I'm running into the similar problem as well. When multiple clients request to download a file from Telegram, it takes more than 10 minutes to do so. Then requests are timed-out with EOF error. I believe an argument for setting the time-out when starting the server is essential. The solution I'm trying to use now is to constantly check for download folder to see if new files are added. But that's a terrible solution. |
You can view the my fork project, it support use http proxy and setup idle-timeout parameters. add http proxy parameters
add idle timeout parameters
|
I'm using telegram-bot-api in local mode so that I can directly let it uploading file from disk by passing file:// url to send_document.
However, when the bandwidth is limited, upload can take a long time like 30 minutes, and that means 30 minutes' idle time waiting for file upload on that connection.
But the idleTimeout is only 500 seconds. That makes the file upload request of big file are never responded, whereas file are still being uploaded.
The text was updated successfully, but these errors were encountered: