Worker crashes when having followers (read-only) postgres slaves after merging: 5de3205f13c55b7911fbbfc528ec499204cbf161 #34

jacob-s-son opened this Issue Feb 21, 2013 · 2 comments


None yet

3 participants


The change introduced new query:

self.find_by_sql(["UPDATE #{quotedTableName} SET locked_at = ?, locked_by = ? WHERE id IN (#{nextScope.to_sql}) RETURNING *",now,])

it seems that find_by_sql is interpreted as "SELECT" query by ActiverRecord/Octopus gem and it tries to execute query on read-only Postgre follower. I guess the issue could be spotted on different envs with DB replicas, but originally I spotted this on Heroku.

For now I rolled back gem to version 0.3.3. I am not very strong with ActiveRecord/Octopus internals to get this fixed. Maybe this should be considered ActiveRecord or Octopus issue.


Can you please verify whether this is fixed in the latest gem version (0.4.4)?


I am getting this issue on delayed_job 4.0.0, delayed_job_activerecord 4.0.0, and ar-octopus 0.8.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment