#Run the following command to check that your db url is set properly: $ heroku config #In the settings.py import dj_database_url DATABASES['default'] = dj_database_url.config(conn_max_age=600)