-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
[Upload Error]: [upload part: send upload part 81 RPC: rpcDoRequest: retryUntilAck: engine forcibly closed: context canceled] #1021
Comments
Looks like client was closed during upload. |
I am using the bg.Connect It says that Background returns a non-nil, empty Context. It is never canceled, has no values, and has no deadline. It is typically used by the main function, initialization, and tests, and as the top-level Context for incoming requests. So, there's no way unless I forcibly close my app. |
Client can close itself on some critical failure. |
I'll check it out, BTW; that error only happens sometimes, like 2 out of 10. But still, I want it to be fixed. |
Let's fix it, I just need some debug logs just before this error happens to investigate. |
Here's the log. I found 3 errors while uploading some files. |
@ernado any news?. |
@ernado any news? I have the same problem |
Sorry, pretty busy right now, I'll try to find some time to investigate it soon. General workaround for this error is use client.Run() directly without bg helper. |
After inspecting logs, I've found out that telegram client observed connection timeout:
This led to rpc engine restart and re-connection, which drops all ongoing requests. While re-connection is in progress, no requests can be successfully done. Also I've found out that reconnect was successfull and invocations should work after that. So, there is no bug in client that we can fix. Probably we can add opt-in retry for uploading individual chunks in |
@ernado at you can see on my func, there's already a retry feature on it, but I'm still having the same issue, for now, I have a temporary fix by closing the client if the upload fails and create a new client and retry the upload. What's the main reason why the observed connection got a timeout? |
It got timeout while sending data via TCP connection, i.e. some network problems, that lead to ping loop to fail. Looks like re-creating client is better workaround. This can't be implemented in Anyway, client should work after reconnect. I'll try to reproduce this issue, but logs shows that connection was restarted. |
I've simulated connection loss and looks like client can't recover for some reason. So more general issue is #1030 |
What version of gotd are you using?
Can this issue be reproduced with the latest version?
Yes
What did you do?
What did you expect to see?
No error
What did you see instead?
upload part: send upload part 81 RPC: rpcDoRequest: retryUntilAck: engine forcibly closed: context canceled
upload part: send upload part 154 RPC: rpcDoRequest: engine forcibly closed: context canceled
What Go version and environment are you using?
go env
OutputThe text was updated successfully, but these errors were encountered: