Projet

Général

Profil

Bug #49622

Mis à jour par Frédéric Péters il y a plus de 3 ans

https://sentry.entrouvert.org/entrouvert/publik/issues/25782/

Sur un postgresql occupé à se couper, ça échoue mais derrière on tente @get_connection().rollback()@ qui échoue aussi parce qu'il n'y a plus du tout de connexion.

<pre>
OperationalError: terminating connection due to administrator command
SSL connection has been closed unexpectedly

File "wcs/sql.py", line 432, in f
return func(*args, **kwargs)
File "wcs/qommon/substitution.py", line 26, in f
return func(*args, **kwargs)
File "wcs/sql.py", line 1715, in store
cur.execute(sql_statement, sql_dict)

InterfaceError: connection already closed
(3 additional frame(s) were not displayed)
...
File "wcs/formdata.py", line 489, in perform_workflow
url = perform_items(wf_status.items, self)
File "wcs/workflows.py", line 87, in perform_items
url = perform_items(wf_status.items, formdata, depth=depth-1) or url
File "wcs/workflows.py", line 72, in perform_items
url = item.perform(formdata) or url
File "wcs/wf/dispatch.py", line 232, in perform
formdata.store()
File "wcs/sql.py", line 434, in f
get_connection().rollback()

InterfaceError: connection already closed
File "wcs/sql.py", line 340, in get_connection_and_cursor
cur = conn.cursor()

OperationalError: FATAL: the database system is shutting down
FATAL: the database system is shutting down

File "wcs/sql.py", line 432, in f
return func(*args, **kwargs)
File "wcs/sql.py", line 451, in do_formdef_tables
conn, cur = get_connection_and_cursor()
File "wcs/sql.py", line 343, in get_connection_and_cursor
conn = get_connection(new=True)
File "wcs/sql.py", line 318, in get_connection
get_publisher().pgconn = psycopg2.connect(**postgresql_cfg)
File "__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

AttributeError: 'NoneType' object has no attribute 'rollback'
(7 additional frame(s) were not displayed)
...
File "wcs/publisher.py", line 339, in notify_of_exception
self.log_internal_error(error_summary, plain_error_msg, record=record, notify=notify)
File "wcs/publisher.py", line 345, in log_internal_error
error_summary, plain_error_msg, publisher=self)
File "wcs/logged_errors.py", line 127, in record_exception
formdata = formdef.data_class().get(formdata_id, ignore_errors=True)
File "wcs/formdef.py", line 282, in data_class
actions = sql.do_formdef_tables(self)
File "wcs/sql.py", line 434, in f
get_connection().rollback()
</pre>

Retour