[英]Ruby Backup gem failing when uploading to S3. connection reset after 37 min
The backups are 250MB. 备份为250MB。 I don't think that's very big, but it appears the problem is increasing with the size.
我认为这不是很大,但是问题似乎随着尺寸的增加而增加。
Log from the Backup gem below. 从下面的备份gem登录。
Note the time span; 注意时间跨度; about 37 min into the uploading I get connection reset.
大约上传37分钟后,我将重置连接。
[2015/10/30 09:20:40][message] Storage::S3 started transferring '2015.10.30.09.20.01.myapp_postgres.tar' to bucket 'myapp-backups'.
[2015/10/30 09:57:06][error] ModelError: Backup for Back up PostgreSQL (myapp_postgres) Failed!
[2015/10/30 09:57:06][error] An Error occured which has caused this Backup to abort before completion.
[2015/10/30 09:57:06][error] Reason: Excon::Errors::SocketError
[2015/10/30 09:57:06][error] Connection reset by peer
Did you try the error handing options, which retransmit the file's portions that have failed : 您是否尝试过错误处理选项,这些选项会重新传输失败的文件部分:
store_with S3 do |s3|
s3.max_retries = 10
s3.retry_waitsec = 30
end
Keep also the chunk size small: 还要使块大小较小:
store_with S3 do |s3|
s3.chunk_size = 5 # MiB
end
You may also want to use the Splitter options . 您可能还需要使用Splitter选项 。
I wuold say for now to use ruby-xz to compress in a smaller file in order to send it more compressed and temprary patch it, then try to see 我会说,暂时使用ruby-xz压缩到一个较小的文件中,以便向其发送更多压缩和临时补丁,然后尝试查看
Excon.defaults[:write_timeout] = 500
or more would do the trick 或更多会成功
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.