oTree Forum >

Postgres Database Migration on Heroku

#1 by woodsd42

Hi,

I was running an experiment and everything was going fine before suddenly getting a 500 error and an email with the following:  "We're migrating your database (DATABASE on XXXXX) plan to essential-1. Your database is in read-only mode until the migration completes, which takes around 15 minutes."  
Which was unannounced, but not unrecoverable.  However, then it did it again, but the email was slightly different: "We're changing your database (DATABASE on XXXXX) plan to essential-1."  And then I had to wait another 15 minutes.  Hopefully it doesn't do it again.

I have three questions:
1.) Why did it do this, especially unannounced?  The email I got is not very informative.
2.) Why did it do this twice?  What's the difference between a migration and a change?
3.) How can I avoid this happening again in the future?  Today was only a pilot, but I'd like to run sessions with many more subjects, where any downtime would be a much larger issue.  Is this anything to do with the postgres plans I had originally initiated through otreehub?

Best Regards,
Daniel Woods

#2 by woodsd42

So I've spoken with Heroku, and they said that this can happen, and will continue to happen, with essential tier databases.  That means that, at any time your experiment could go down for 15-30 minutes at a time.

The only way to avoid this is to provision a standard or greater database.  However, this isn't an option on the configure page otreehub.  Perhaps it should be, particularly for those who want to run larger experiments?  Or at least, a link with instructions on how to do this ourselves?

Write a reply

Set forum username