简体   繁体   中英

Rails Resque change worker limit?

I have Rails app with some Resque workers. It seems that I have a limit of 2 workers running simultaneously (app runs on EC2 with Apache in production). Is there any way I can raise that limit?

EDIT:

I have maxclients 0 in redis.conf

I can start 10 workers through rake, but when they are actually getting queued, I get "ERR max number of clients reached" in browser..

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.

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

Using the resque gem, just use this rake task

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

task "resque:setup" => :environment

and start up as many resque workers as you need.

$ rake resque:work QUEUE='*'

best use some service monitoring framework, svc, monit, god. and use resque web.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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