Last Updated: February 25, 2016
·
528
· akosipc

Postgres/Resque Bug Fix

If you are using Resque as a background process worker and Postgres as a database, you may encounter this numerous PG related errors such as Postgres disconnecting. To fix this, you'll need to add this Resque initializers to your config/initializers/resque.rb

Resque.before_fork = Proc.new {
  ActiveRecord::Base.establish_connection
}