-
Notifications
You must be signed in to change notification settings - Fork 7
Administering resque pool
To manage the number of resque workers available, edit the resque-pool.yml file in /opt/$HYDRA_NAME/config. This file defines the workers and their queues. The default settings are:
video: 2
"audio,audit,batch_update,characterize,event,ingest,templates,unzip,video": 5
This reserves two workers for the video queue and shares 2 workers among all queues. You may want to change these settings to reserve workers for other queues, depending on your system requirements.
To troubleshoot issues with resque-pool, check resque-pool.stderr.log and resque-pool.stdout.log, found in /opt/$PROJECT_NAME/log/.
We recommend using the pool_q script to stop and start resque-pool:
sudo service pool_q start
sudo service pool_q stop
sudo service pool_q status
To start resque-pool manually
cd /opt/$PROJECT_NAME
bundle exec resque-pool --daemon --environment production
To stop or restart resque-pool manually, find the PID of the resque-pool-master:
ps aux | grep resq
You'll see output like this:
ubuntu 8062 79.0 6.2 325112 105276 ? Sl 15:08 0:13 resque-pool-master[hydradam]: managing [8074, 8078, 8081, 8084]
The PID is the second element of the output. Use it to restart or stop the resque-pool.
Restart:
kill -HUP 8062
Stop:
kill -QUIT 8062
If resque-pool fails to launch, check file resque-pool.stderr.log.
Alternatively, you can start and stop resque workers manually in screen.