thiagopradi / octopus

Database Sharding for ActiveRecord
2.53k stars 505 forks source link

circleci ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR #355

Open perryqh opened 8 years ago

perryqh commented 8 years ago

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?

anhkind commented 8 years ago

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

nas887 commented 7 years ago

Has anyone been able to get past this?

nas887 commented 7 years ago

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