Amazon S3 and fast connections

On a fast connection to S3, I consistently get socket errors (socket.error: (104, ‘Connection reset by peer’)) when I’m pushing in big files. (big being ~ 250mb or so). Totally reproducible with the same file uploaded. Turns out that people have been having this issue for a while, and the solution is to throttle the tcp parameters so that it doesn’t overrun a tcp window somewhere.

This has the solution. In etc/sysctl.conf:

# Workaround for TCP Window Scaling bugs in other ppl’s equipment:
net.ipv4.tcp_wmem = 4096 16384 512000
net.ipv4.tcp_rmem = 4096 87380 512000

No comments

No comments yet. Be the first.

Leave a reply

You must be logged in to post a comment.