简体   繁体   English

Rails Resque更改工人限制?

[英]Rails Resque change worker limit?

I have Rails app with some Resque workers. 我和一些Resque工作者有Rails应用程序。 It seems that I have a limit of 2 workers running simultaneously (app runs on EC2 with Apache in production). 似乎我有2个工人同时运行的限制(应用程序在生产中使用Apache在EC2上运行)。 Is there any way I can raise that limit? 有什么方法可以提高这个限制吗?

EDIT: 编辑:

I have maxclients 0 in redis.conf 我在redis.conf中有maxclients 0

I can start 10 workers through rake, but when they are actually getting queued, I get "ERR max number of clients reached" in browser.. 我可以通过rake启动10个工作人员,但是当他们实际排队时,我会在浏览器中获得“ERR最大客户端数”。

EDIT: updated mistake (it was correct in original file) 编辑:更新错误(在原始文件中是正确的)

EDIT: actually had config/initializers/Resque.rb pointing to redis-to-go (was rudiment from the early days of app), once I removed that, pointing to config/resque.yml (with localhost) everything went to normal and I can start as many workers as I please. 编辑:实际上有config / initializers / Resque.rb指向redis-to-go(从应用程序的早期开始的雏形),一旦我删除它,指向config / resque.yml(使用localhost)一切都恢复正常我可以随心所欲地开始工作。

maybe your question is more of a sysadmin one, but if not a system resource issue, then this may help. 也许你的问题更像是一个系统管理员,但如果不是系统资源问题,那么这可能有所帮助。 from http://railscasts.com/episodes/271-resque?view=asciicast 来自http://railscasts.com/episodes/271-resque?view=asciicast

Using the resque gem, just use this rake task 使用resque gem,只需使用此rake任务

#/lib/tasks/resque.rake 
require "resque/tasks"

task "resque:setup" => :environment

and start up as many resque workers as you need. 并根据需要启动尽可能多的resque工作人员。

$ rake resque:work QUEUE='*'

best use some service monitoring framework, svc, monit, god. 最好使用一些服务监控框架,svc,monit,god。 and use resque web. 并使用resque web。

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

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