defunkt/resque — Issue #470: Sometimes Resque “unloads” the Rails environment for no apparent reason
Author: marcgg
Created: 2011-12-06 16:38:28+00:00
State: open

Hi all,

This is a very weird issue and I have to clear way of repro. I'm putting a ticket here just in case someone had the same issue and could give me pointers.

I have a simple stack with Ruby on Rails and resque. I enqueue jobs in a normal way and I have a pool of workers performing. Nothing crazy.

My problem is that if I leave the workers running for long enough they will stop to have visibility on the app's models, and every call to such a method will result in an undefined_method.

This is very weird since it could be working perfectly for days and then suddenly it starts failing. Restarting the worker fixes the problem, but it usually come back after a while.

This might very well be a problem with the way I use Resque, but like I said I'm not doing anything crazy and it works 99% of the time.

Any help/pointers would be greatly appreciated.