database DATABASE_URL on heroku app exceeded its allocated storage capacity

305 views
Skip to first unread message

Tobias Brevik

unread,
Apr 8, 2020, 11:39:00 AM4/8/20
to oTree help & discussion
I got an email from Heroku saying that an app has exceeded its allocated storage capacity, that I have 10,208 rows which exceed the Hobby-dev plan limit of 10,000. It says I either need to migrate the database to Hobby Basic or higher database plan, or reduct the number of records. What does it mean to reduce the number of records, is it potentially harmful to do that, and how would I go about doing that?

Thanks in advance,
Tobias

Chris @ oTree

unread,
Apr 8, 2020, 11:40:54 AM4/8/20
to oTree help & discussion
reducing the number of records means to delete rows, i.e. resetdb.

Tobias Brevik

unread,
Apr 8, 2020, 12:09:58 PM4/8/20
to Chris @ oTree, oTree help & discussion
Thanks for the fast response, Chris!

To clarify: do rows include rows in the data AND lines in my otree programs? Right now I have some programs that were for testing that I didn't comment out in my settings file. If I comment out enough of these would that resolve the issue? 

Tobias

--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/31824db8-6657-4714-a764-1ef8096bd44a%40googlegroups.com.

Chris @ oTree

unread,
Apr 8, 2020, 12:12:33 PM4/8/20
to Tobias Brevik, oTree help & discussion
That wouldn’t make much difference. It’s all about deleting sessions. 

Sent from my phone

On Apr 9, 2020, at 12:10 AM, Tobias Brevik <tobias.br...@gmail.com> wrote:



Jantsje Mol

unread,
Mar 1, 2021, 7:53:40 AM3/1/21
to oTree help & discussion
Hi all,

I'm looking for a way to have my apps at oTreehub for demonstration purposes. I don't want to collect any data. Still, I got the same warning as mentioned above and my apps stopped working. Any ideas on how to prevent this? Or is it mandatory to have a creditcard attached and to delete old demo sessions every month? 

Best, 
Jantsje

Gonzalo Arrieta

unread,
Aug 3, 2021, 4:40:46 PM8/3/21
to oTree help & discussion
My database seems to be "close to limit" yet I only have 1 session active with only 100 participants (and no data yet). I deleted a session just now and the used rows in database did not change.  Any ideas why this might be the case? thanks!

Chris @ oTree

unread,
Aug 3, 2021, 4:52:40 PM8/3/21
to oTree help & discussion
If you delete a session then the number of rows in the DB should definitely change. Maybe there is some lag in the database reporting, or you have multiple Postgres addons, and the one giving the warning is not the main database attached to your application

Other general advice for many DB rows used:
- You have many rounds, which multiplies the number of database rows used (1 per player)
- You are using some other model like ExtraModel
- You have created demo sessions, which take up DB rows but are not shown in the UI

The definite way to know is to use the postgres command line (psql) and query your database, which will show all tables and how many rows each table has.

Chris @ oTree

unread,
Aug 3, 2021, 4:53:24 PM8/3/21
to oTree help & discussion
By the way oTree 5 uses fewer database rows than earlier versions.

Gonzalo Arrieta

unread,
Aug 3, 2021, 4:56:24 PM8/3/21
to oTree help & discussion
Thank you Chris! Let's hope its a lag.

Chris @ oTree

unread,
Aug 3, 2021, 7:22:42 PM8/3/21
to oTree help & discussion
I just tested it and can see that the heroku interface lags at least by  couple of minutes in reporting row numbers. However, in psql I saw that my player rows were deleted immediately when I deleted a session with 20 players:

otree-snippets::DATABASE=> select count(*) from are_you_sure_player;
 count
-------
    26
(1 row)


otree-snippets::DATABASE=> select count(*) from are_you_sure_player;
 count
-------
     6
(1 row)




Chris @ oTree

unread,
Aug 3, 2021, 8:09:32 PM8/3/21
to oTree help & discussion
Reply all
Reply to author
Forward
0 new messages