Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set autoflush to false #40

Merged
merged 1 commit into from
Dec 1, 2022
Merged

set autoflush to false #40

merged 1 commit into from
Dec 1, 2022

Conversation

malmans2
Copy link
Member

Attempting to fix this error:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/distributed/worker.py", line 3016, in apply_function_simple
    result = function(*args, **kwargs)
  File "/src/cads-worker/cads_worker/worker.py", line 42, in submit_workflow
    func(metadata=metadata, **kwargs)
  File "/src/cacholote/cacholote/cache.py", line 169, in wrapper
    _delete_cache_entry(session, cache_entry)
  File "/src/cacholote/cacholote/cache.py", line 69, in _delete_cache_entry
    session.commit()
  File "/opt/conda/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1451, in commit
    self._transaction.commit(_to_root=self.future)
  File "/opt/conda/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 827, in commit
    self._assert_active(prepared_ok=True)
  File "/opt/conda/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 601, in _assert_active
    raise sa_exc.PendingRollbackError(
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(psycopg2.OperationalError) server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.

[SQL: SELECT cache_entries.key AS cache_entries_key, cache_entries.expiration AS cache_entries_expiration, cache_entries.timestamp AS cache_entries_timestamp, cache_entries.counter AS cache_entries_counter, cache_entries.tag AS cache_entries_tag
FROM cache_entries
WHERE cache_entries.key = %(pk_1)s AND cache_entries.expiration = %(pk_2)s]
[parameters: {'pk_1': '1b57dec30eac3c33ac6d16ee3034801225f8b9406e0ef33509b0d60a', 'pk_2': datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)}]
(Background on this error at: https://sqlalche.me/e/14/e3q8) (Background on this error at: https://sqlalche.me/e/14/7s2a)

@FussyDuck
Copy link

FussyDuck commented Nov 30, 2022

CLA assistant check
All committers have signed the CLA.

@malmans2 malmans2 merged commit 946a488 into main Dec 1, 2022
@malmans2 malmans2 deleted the autoflush branch December 1, 2022 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants