1

Heroko Config

DATABASE_URL:                 postgres://xxxxxxxx:xxxxxxxxxx@ec2-54-243-215-140.compute-1.amazonaws.com:5432/xxxxxxxxx
HEROKU_POSTGRESQL_GOLD_URL:   postgres://yyyyyyyyyyy:yyyyyyyyyyyyy@ec2-54-243-243-20.compute-1.amazonaws.com:5432/yyyyyyyyyy
HEROKU_POSTGRESQL_YELLOW_URL: postgres://zzzzzzzzzz:zzzzzzzzzzzz@ec2-54-243-215-140.compute-1.amazonaws.com:5432/zzzzzzzzz

settings.py

DATABASES = {'default': dj_database_url.config(default='postgres://xxxxxxxx:xxxxxxxxxx@ec2-54-243-215-140.compute-1.amazonaws.com:5432/xxxxxxxxx'),}

heroku run python manage.py syncdb

Running `python manage.py syncdb` attached to terminal... up, run.4673
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 60, in handle_noargs
    tables = connection.introspection.table_names()
  File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/__init__.py", line 910, in table_names
    return self.get_table_list(cursor)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/introspection.py", line 33, in get_table_list
    AND pg_catalog.pg_table_is_visible(c.oid)""")
  File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: current transaction is aborted, commands ignored until end of transaction block

Many do not speak English and therefore can not explanation. What's the problem?

Chris Travers
  • 25,424
  • 6
  • 65
  • 182
  • Refer to this one: http://stackoverflow.com/questions/9148915/django-and-pgsql-connection-issues-on-linux-mint – catherine Feb 10 '13 at 15:28
  • possible duplicate of [DatabaseError: current transaction is aborted, commands ignored until end of transaction block](http://stackoverflow.com/questions/2979369/databaseerror-current-transaction-is-aborted-commands-ignored-until-end-of-tra) – Chris Travers Apr 25 '13 at 04:14
  • At this point the only answer can be to check the PostgreSQL logs for the error that proceeded the list of current transaction is aborted messages. Can you provide the error? – Chris Travers Apr 25 '13 at 08:40

1 Answers1

0

The error you have posted merely means that there was a previous error in the transaction and the transaction has already aborted. You cannot fix this problem by troubleshooting this error. You must find out what your real problem is and try to fix it.

To do this, check your PostgreSQL logs, and search backwards from this error until you come to a different error. That will be the error that terminated the transaction and you can work on fixing that one instead. This error however is meaningless from a troubleshooting perspective. Find your real problem and fix it.

Chris Travers
  • 25,424
  • 6
  • 65
  • 182