Redis ReadOnly你不能写反对就绪的奴隶

时间:2022-03-06 21:03:38

I am using Redis and Sidekiq for delayed emails and an asynchronous process in a Rails 4 app. My prod environment has 2 severs. Server 1 runs Redis-master and sidekiq and Server 2 runs Redis-slave and sidekiq. I am getting an error "readonly you can't write against a read only slave". How do I configured sidekiq on server 2 to use the Redis-master on server 1? Thx.

我正在使用Redis和Sidekiq来延迟电子邮件和Rails 4应用程序中的异步过程。我的生产环境有2个服务器。服务器1运行Redis-master和sidekiq,服务器2运行Redis-slave和sidekiq。我收到一个错误“只读你不能写一个只读的奴隶”。如何在服务器2上配置sidekiq以在服务器1上使用Redis-master?谢谢。

1 个解决方案

#1


0  

See here from Sidekiq's documentation - edit config/initializers/sidekiq.rb and throw into it the url of the master, e.g. redis://redis.example.com:7372.

从Sidekiq的文档中看到这里 - 编辑config / initializers / sidekiq.rb并将主机的url输入其中,例如Redis的://redis.example.com:7372。

#1


0  

See here from Sidekiq's documentation - edit config/initializers/sidekiq.rb and throw into it the url of the master, e.g. redis://redis.example.com:7372.

从Sidekiq的文档中看到这里 - 编辑config / initializers / sidekiq.rb并将主机的url输入其中,例如Redis的://redis.example.com:7372。