简体   繁体   中英

Docker with a Rails App-Workers not running

So I have a Rails Application that has multiple types of workers. I decided to try and run the rails app with Docker, with a separate image for each type of worker (Resque, DelayedJob, a scheduler, different configurations). The problem is that the workers with queues (DelayedJob + Resque) are not picking up jobs (using both to rule out the queuing system itself). I can see the jobs enqueued, they're there, but the workers never pick up anything off the queue. If I run a worker off the console, it works just fine.

The images are based on Cedarish- https://github.com/progrium/cedarish

The web workers that are sitting behind NGINX seem to be doing fine, though I have noticed some issues with them sometimes becoming non-responsive after a while but not sure if that's related.

Any idea as to what could cause a worker, run under Docker and successfully connecting to Redis + MySQL, to just ignore the job queue and not pick anything up?

Guessing this has something to do with my Docker configuration...

Turns out this was an operating system problem-Docker was running up to 100% CPU usage and just generally misbehaving.

This was on a GCE instance with Debian 7 with backports.

The following fixed the problem:

sudo aptitude install bridge-utils libvirt-bin debootstrap

vi /etc/default/grub

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

sudo reboot

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