octopus icon indicating copy to clipboard operation
octopus copied to clipboard

circleci ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR

Open perryqh opened this issue 9 years ago • 3 comments

I configured my rails 4.2.5 app exactly as described at https://devcenter.heroku.com/articles/distributing-reads-to-followers-with-octopus

I can run specs locally without issue, but circleci fails with:

=> 2 databases enabled as read-only slaves
  * FOLLOWER 1
  * FOLLOWER 2
rake aborted!
ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR:  cannot drop the currently open database
: DROP DATABASE IF EXISTS "mydb-test"

Any tips on how to get past this?

perryqh avatar Feb 17 '16 15:02 perryqh

Do you have any changes in the shards.yml file specified in Heroku article, which is here https://gist.github.com/catsby/6923840?

anhkind avatar Feb 27 '16 14:02 anhkind

Has anyone been able to get past this?

nas887 avatar Dec 02 '16 04:12 nas887

After nearly 18 hours straight of pulling my hair out I was finally able to get my builds working again using custom test configuration in both travis-ci and circle-ci.

My build config can be seen here: https://gist.github.com/nas887/0ba4ba10a9faa63310bb56266c00632d

nas887 avatar Dec 02 '16 23:12 nas887