A bit of an open question here, so I will first pose the problem. We have a working Resque that needs to queue data synchronization jobs, double the reasons, using Cron (and paying for the loading time of the Rails over-and-over environment) sucks, and alternative queues, well, Github made a pretty good case against them when they declared Resque . In addition, the functionality of the Redis Time-Series already plays a large part of our infrastructure, where we also shuffle TS data in RRDTool, etc ...
Here's the problem with the typical three-hour interval between jobs (but staff can schedule jobs at any time ... hence, in the queue), the PostgreSQL server is leaving. I am simple enough to cure, I was expecting the setup reconnect: truein the appropriate environment to ensure that this worked as expected. I read a few that reconnect: truewill not work for applications using fork(). What, of course, Resque does to run this working ... part that I don’t understand is why ActiveRecord cannot work again in these circumstances?
I noticed that the implementation of the reconnect! MySQL Adapter and PostgreSQL Adapter in ActiveRecord are different ... but in any case, I would expect the ActiveRecord configuration reconnect: trueto work.
The problem seems clear enough when the child process exists, it closes the file descriptors created by the parent (thus hanging the database connection) - is it possible to close the file descriptor so that ActiveRecord does not recognize that the connection has been completed?
Also, for what it's worth, ActiveRecord aware fork () , which I could find on Github, as a jaw - it is untested, but I assume it works (haven't tried it with current Rails ..)
, AR , fork()? (, , , ; PGSQL Resque!)