-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Transfer Manager Issues #1288
Comments
I am using the VPC endpoint FWIW. |
It would also be nice if you cleaned up all the temporary part files. :) |
Hi @rdifalco Unfortunately, tweaking retries at the client level would not help in this case as the
Are you seeing this issue every time you attempt to download the object? |
I'm not sure why, but yeah, it happens every time I do this download on EC2. When I use my local dev machine I can make it work (although it almost always gets the one retry). FWIW, if I simply Stream the file to disk it works every time even on EC2. And if I use a giant direct buffer with file channel it's almost as fast as the multi-part download. And no socket resets. So I dunno, maybe I have too many threads and parts and that is causing the SDK connection pool to get exhausted in some way that creates the connection reset? That's my best guess at the moment. How long before the S3 server times out a client connection and causes a connection reset on the client side? |
Hmm, it seems strange that this works on your dev machine. Have you perhaps tried this on an EC2 instance not in a VPC to see if that changes anything? According to #373, this page used to say that S3 would accept a maximum of 100 requests on a connection be resetting the connection but it no longer says that so it may have changed. Can you give me more details on your environment? SDK version, configuration, OS, etc? |
It could be that the S3 client connection pool on my local test was less contended than the one on my EC2 server. I haven't tried putting a simple case onto S3 yet. I assumed that the S3 servers would kill a connection (causing a client reset) if a connection was open for some period of time without any activity. Hence my concern about TransferManager getting into kind of deadlock issue due to it needing to lease another connection from the connection pool but the connection pool being exhausted. This cases other threads in TransferManager to wait for too long because maybe it's a control thread that requires that connection to mark some monitor that will let the blocked thread proceed. So, IOW, running out of client connections creates the deadlock (or long pause) not the usual use of a Bounded Thread Pool with TransferManager. I'll try to add more data later, but for now I have this working by avoiding TransferManager and writing the file myself. |
Okay, glad to see you at least have a workaround going. FWIW, it's probably not due to connection pool contention/stale connections since the connection reset from the provided stacktrace is happening once S3 has already responded to the request. |
Going to close this for now. Please feel free to reopen where there's more data. |
Hi guys, |
I'm using the latest SDK as of this issue creation.
I'm trying to download a 7GB file and I keep getting this exception. I have an 8 minute socket timeout, 5 minute read timeout. And I have many retries configured. My code is simple:
Halp!
The text was updated successfully, but these errors were encountered: