Skip to content
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

400 Bad Request error for idle connection #8975

Closed
cyberduck opened this issue Aug 16, 2015 · 7 comments
Closed

400 Bad Request error for idle connection #8975

cyberduck opened this issue Aug 16, 2015 · 7 comments
Assignees
Labels
bug s3 AWS S3 Protocol Implementation worksforme
Milestone

Comments

@cyberduck
Copy link
Collaborator

aef1871 created the issue

Hi

I'm trying up upload a directory of photos to S3, I'm using CyberDuck for the first time to do this. It starts well, but after a few hours it has a problem, then starts again from the very first file. This means the upload never completes, eg a estimated 4 hour upload has been going for a few days.

I have a copy of the debug log file. The log drawer just shows successfully uploaded files.

I'm running Windows 10, but had same problem last week with Windows 8.

Thanks

Richard


Attachments

@cyberduck
Copy link
Collaborator Author

aef1871 commented

I had to change the URLs to avoid spam filter

@cyberduck
Copy link
Collaborator Author

@dkocher commented

PUT /iPhone/2014/IMG_0041.JPG HTTP/1.1
Date: Sun, 16 Aug 2015 02:07:48 GMT
Expect: 100-continue
Content-Type: image/jpeg
Authorization: AWS IVECHANGEDTHIS:u1IVqOz0mrA4Hm0Qonf7LSBKfqU=
Content-Length: 2295546
Host: mys3backup.s3.amazonaws.com:443
Connection: Keep-Alive
User-Agent: Cyberduck/4.7.2.18004 (Windows 8/6.2) (x86)
HTTP/1.1 100 Continue
HTTP/1.1 400 Bad Request
x-amz-request-id: 3D597225908074BA
x-amz-id-2: wr8D5gUMVpja0b8ffgMWhoVYAs80kHL8g1zg0RgRXJsJqHvTBCGnXm/sHmMxUXGzE868FoJJdtI=
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Sun, 16 Aug 2015 02:07:32 GMT
Connection: close
Server: AmazonS3

<?xml version="1.0" encoding="UTF-8"?><Error><Code>RequestTimeout</Code><Message>Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.</Message><RequestId>3D597225908074BA</RequestId><HostId>wr8D5gUMVpja0b8ffgMWhoVYAs80kHL8g1zg0RgRXJsJqHvTBCGnXm/sHmMxUXGzE868FoJJdtI=</HostId></Error>

@cyberduck
Copy link
Collaborator Author

@dkocher commented

From https://forums.aws.amazon.com/message.jspa?messageID=116727

Since you are reusing connections, you should also take note of the guidance provided in the Amazon S3 best practices article regarding the maximum number of requests Amazon S3 will allow over a single connection (you should close the connection after 80-90 requests).

@cyberduck
Copy link
Collaborator Author

@dkocher commented

From https://aws.amazon.com/items/1904?externalID=1904

Amazon S3 will accept up to 100 requests before it closes a connection (resulting in 'connection reset'). Rather than having this happen, use a connection for 80-90 requests before closing and re-opening a new connection.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

S3 responds with a Connection: Close response header after re-using the same connection 100 times. Therefore we handle this gracefully and this should not be an issue.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Possible fix in 18144 with fix HTTPCLIENT-1655 included.

Sends RST instead of proper FIN ACK sequence when using non-persistant connections

@cyberduck
Copy link
Collaborator Author

@dkocher commented

General performance fix in 18136 which could also affect this. Please update to the latest snapshot build available.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug s3 AWS S3 Protocol Implementation worksforme
Projects
None yet
Development

No branches or pull requests

2 participants