-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Ton of ServerDisconnectedErrors against HTTPS AWS S3 REST API #631
Comments
What library are you using for s3 calls? or just simple presigned urls? |
simple presigned. So I think I may have a handle on the underlying issue. I noticed I was getting the same issue in my main thread, and I was erroneously using time.sleep instead of asyncio.sleep, so I think this is tied to keep-alive. I just need to ensure there's enough cycles to serve the keep alives. Sorry for the disruption. Perhaps though this would be good to document. |
doh, I've modified my other process, and even when there's low cpu usage I still get server disconnects. Re-opening |
Server may close keep-alive connection on own reasons (inactivity timeout, high resource consumption etc.) I've added an explicit test for described behavior 77bb567. |
i think we have right behavior. for this case, aws actually closes connection, so aiohttp raises right exception. i think it is should be aios3 concern how to handle this. at KeepSafe we have high load application that uses aws extensively, we do not have any problems. |
i noticed that was closes connection if you do not read/write any data to s3 connection. so question @thehesiod do you actually consume what you read from s3. aiohttp has flow control logic. |
as long as its not a 204 I consume the output. Feel free to close, I basically had to add retry logic when I catch these errors. I agree there's not enough information here to proceed. I'll open again if my retry logic starts failing as well. |
I've tried both master + the latest official release.
I have a script with 100 worker coroutines in one process which continuously do S3 operations against a shared aiohttp session (mostly copies). And the main process has about ~10 workers doing S3 operations (just listing).
Each process uses its own shared session created as so:
With this setup I'm getting errors like the following pretty consistently. If I retry the command it succeeds. Any ideas?
The text was updated successfully, but these errors were encountered: