1 min read

What happen when you exceed the 10000 rows Heroku free plan limitation?

Today the Heroku Paas web hosting switched to Postgres 9.1 for all the users, but what does it mean that the free plan will have 10000 or 14000 rows limitation?

I tried to reach and exceed that limit and nothing happen apparently, but after a couple of hours you'll receive an email notification where you are invited to respect the limitation otherwise your website risks to be suspended, an alternative is to switch to a paid plan.

[Warning] Database disruption imminent, row limit exceeded for dev database on Heroku app gpsnotes
The database HEROKU_POSTGRESQL_COLOR_URL on Heroku app gpsnotes has exceeded its allocated storage capacity.
The database contains 188980 rows, exceeding the  plan limit of 10000. INSERT privileges to the database will be automatically be revoked in 24 hours.

So if you are worried about that keep an eye to the commands and the tools Heroku provides.
From the console

heroku pg:info    
=== HEROKU_POSTGRESQL_BLACK (DATABASE_URL)
Plan:        Dev
Status:      available
Connections: 2
PG Version:  9.1.5
Created:     2012-08-06 15:11 UTC
Data Size:   63.3 MB
Tables:      2
Rows:        24/10000 (In compliance)
Fork/Follow: Unavailable
=== SHARED_DATABASE
Data Size: (empty)

From the web

Log in to https://postgres.heroku.com

You can use the same Heroku credentials, and if click on the gear you can get a command, like the one below, to access to your database directly via PSQL (the postgressql db console).

$ psql "dbname=d70hphrgqfgkb5 host=ec2-23-23-93-130.compute-1.amazonaws.com user=rzlgqjudynoxur password=8FbmRnj1oYPJt-3Us-4DycqKlU port=5432 sslmode=require"
  psql (9.1.3, server 9.1.4)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
select count(*) from posts;
 count  
--------
 188980
(1 row)

I'm not sure, but the limitation should be per table and not the sum of every row you could have in different tables inside a single db.

The limitation of 10000 is per db, so the sum of every row per each table.