Rails - Delayed job stops running

delayed-job, openshift, ruby-on-rails, ruby-on-rails-4

Solution

Try adding this to your database.yml

reconnect: true

I am not sure if this will fix your problem, but its worth trying.

Also, have a look at this MySql documentation about lost connection

Problem

I'm developing this application which I have deployed to OpenShift. I have "moved" the actual user registration process to a delayed job because there are a lot of stuff taking placing during this. Every two days (or so), the delayed job process stops running. In the logs I find this: `Error while reserving job: closed MySQL connection` I tried starting it with the following command: `RAILS_ENV=production bin/delayed_job -m start` but the problem still exists. Any ideas?

Original source