resque-pool icon indicating copy to clipboard operation
resque-pool copied to clipboard

0.4.0 seems to break REDIS_HOST env variable

Open wollkind opened this issue 10 years ago • 2 comments

I updated our resque pool gem from 0.3.0 to 0.4.0 and had to roll back because what had previously worked for passing the redis host variable to resque-pool no longer does.

I use god to manage resque, so I have a watch that passes the REDIS_HOST via the watch.env variable, but after the upgrade resque-pool changed from using my configured host location to localhost. Since this crashed the whole system on startup I can't comment on whether any other environment variables are getting through any better.

I've rolled back to 0.3.0 for now.

wollkind avatar Jan 29 '15 15:01 wollkind

Very curious. resque-pool should not set (or delete) any environment variables (with one exception which is set by a command line flag). The workers should inherit the exact same environment as the pool master. Can you verify that REDIS_HOST is set appropriately when resque-pool starts up (e.g. log it from inside the resque:setup and resque:pool:setup tasks)? If it is, can you use the logs and hooks (Resque::Pool.after_prefork, Resque.before_fork, Resque.after_fork) to figure out when it is unset?

Thanks for taking the time to test!

nevans avatar Jan 29 '15 16:01 nevans

I will check on these things later today. For now all I have confirmed is that the watch.env contains the same as it used to contain, and rolling back corrected my issue. I'll get back with more details soon.

wollkind avatar Jan 29 '15 16:01 wollkind