2trc / katika

6 stars 6 forks source link

Infrequent exception thrown when inserting new tender or contribuable #26

Open 2trc opened 1 year ago

2trc commented 1 year ago

ERROR get_armp_entries connection already closed Traceback (most recent call last): File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 236, in _set_autocommit self.connection.autocommit = autocommit psycopg2.InterfaceError: connection already closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/katika/tender/management/commands/get_armp_entries.py", line 118, in parse_and_persist tender.save() File "/opt/katika/tender/models.py", line 88, in save super(ArmpEntry, self).save(*args, **kwargs) File "/opt/katika/venv/lib/python3.6/site-packages/django/db/models/base.py", line 806, in save force_update=force_update, update_fields=update_fields) File "/opt/katika/venv/lib/python3.6/site-packages/django/db/models/base.py", line 833, in save_base with transaction.atomic(using=using, savepoint=False): File "/opt/katika/venv/lib/python3.6/site-packages/django/db/transaction.py", line 184, in enter connection.set_autocommit(False, force_begin_transaction_with_broken_autocommit=True) File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/base/base.py", line 411, in set_autocommit self._set_autocommit(autocommit) File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 236, in _set_autocommit self.connection.autocommit = autocommit File "/opt/katika/venv/lib/python3.6/site-packages/django/db/utils.py", line 94, in exit six.reraise(dj_exc_type, dj_exc_value, traceback) File "/opt/katika/venv/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise raise value.with_traceback(tb) File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 236, in _set_autocommit self.connection.autocommit = autocommit django.db.utils.InterfaceError: connection already closed