简体   繁体   English

Redis / SideKiq / Rails连接被同级重置-SSL_connect

[英]Redis/SideKiq/Rails Connection reset by peer - SSL_connect

I am using Sidekiq and Redis To Go on a production site hosted on Heroku. 我在Heroku上托管的生产站点上使用Sidekiq和Redis To Go。 I am spinning up multiple Sidekiq workers to do a job for me. 我正在分派多个Sidekiq工人为我工作。 Out of 600 workers, I got down to about 180 workers left before my workers got "stuck". 在600名工人中,在工人被“卡住”之前,我剩下约180名工人。 They attempt to do a job, and I get one of two errors back: 他们尝试去做一份工作,而我又收到了以下两个错误之一:

WARN: {"retry"=>true, "queue"=>"default", "class"=>"F9LoadRecordWorker", "args"=>[25126], "jid"=>"0426e1db817e27986da6b636", "enqueued_at"=>1395332988.09929, "error_message"=>"Connection reset by peer - SSL_connect", "error_class"=>"Errno::ECONNRESET", "failed_at"=>1395337905.5061884, "retry_count"=>0}

or 要么

WARN: {"retry"=>true, "queue"=>"default", "class"=>"F9LoadRecordWorker", "args"=>[25131], "jid"=>"79601ea488efc10f1fbcc433", "enqueued_at"=>1395332988.1172419, "error_message"=>"Connection refused - connect(2)", "error_class"=>"Errno::ECONNREFUSED", "failed_at"=>1395338127.4794347, "retry_count"=>1, "retried_at"=>1395338202.905867}

So the actual errors are either Connection reset by peer - SSL_connent or Connection refused - connect(2). 因此,实际错误是对等方重置连接-SSL_connent或拒绝连接-connect(2)。

What is causing this? 是什么原因造成的? Why would 400~ workers succeed and then the last 200~ get stuck in this loop of retrying and getting continuous errors? 为什么400个工人会成功,然后最后200个工人陷入重试和不断出现错误的循环中?

RedisToGo is a shared hosting redis as a service provider. RedisToGo是作为服务提供商的共享托管Redis。 Unfortunately, it's easy to overwhelm your shared redis instance with too many client connections, causing timeouts. 不幸的是,太多的客户端连接很容易使您的共享redis实例不堪重负,从而导致超时。

You are essentially DOSing your redis host and the infrastructure of RedisToGo. 您实际上是在使用Redis主机和RedisToGo的基础结构。

You may have to upgrade to a bigger plan or more robust hosting to support the number of connections you want. 您可能必须升级到更大的计划或更强大的托管,以支持所需的连接数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM