Skip to content

Concurrency issue #21

@Flix6x

Description

@Flix6x
[FLEXMEASURES][2025-12-08 14:47:27,477] INFO: 🔋 FRBC.StorageStatus
[FLEXMEASURES][2025-12-08 14:47:27,478] DEBUG: {"message_type":"FRBC.StorageStatus","message_id":"b3e68f7e-acb6-4bb9-86e5-e0ae112648d6","present_fill_level":0.5}
[FLEXMEASURES][2025-12-08 14:47:27,479][flexmeasures_s2.rm.42b02613] DEBUG: ✅ ReceptionStatus: OK
[FLEXMEASURES][2025-12-08 14:47:27,480][flexmeasures_s2.rm.42b02613] INFO: 🔋 Received FRBCStorageStatus for 6e5d78e5-68ad-4b18-a6ec-ff198cb9d93c
[FLEXMEASURES][2025-12-08 14:47:27,480][flexmeasures_s2.rm.42b02613] DEBUG: {"message_type":"FRBC.StorageStatus","message_id":"b3e68f7e-acb6-4bb9-86e5-e0ae112648d6","present_fill_level":0.5}
[FLEXMEASURES][2025-12-08 14:47:27,493] INFO: 🔋 FRBC.StorageStatus
[FLEXMEASURES][2025-12-08 14:47:27,494] DEBUG: {"message_type":"FRBC.StorageStatus","message_id":"e85a60a0-3718-4a8f-9530-7991c26cc9e6","present_fill_level":0.5}
[FLEXMEASURES][2025-12-08 14:47:27,494][flexmeasures_s2.rm.87724ebb] DEBUG: ✅ ReceptionStatus: OK
[FLEXMEASURES][2025-12-08 14:47:27,495][flexmeasures_s2.rm.87724ebb] INFO: 🔋 Received FRBCStorageStatus for 2d20c301-153a-4b1b-b9ec-0d810a7ffbae
[FLEXMEASURES][2025-12-08 14:47:27,495][flexmeasures_s2.rm.87724ebb] DEBUG: {"message_type":"FRBC.StorageStatus","message_id":"e85a60a0-3718-4a8f-9530-7991c26cc9e6","present_fill_level":0.5}
[FLEXMEASURES][2025-12-08 14:47:27,541] WARNING: Resource could not be saved as an asset: This session is provisioning a new connection; concurrent operations are not permitted (Background on this error at: https://sqlalche.me/e/20/isce)
[FLEXMEASURES][2025-12-08 14:47:27,542] DEBUG: Traceback: Traceback (most recent call last):
  File "/app/flexmeasures-s2/flexmeasures_s2/api/s2_ws_server.py", line 909, in ensure_resource_is_registered
    account_id=self.account.id,
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/attributes.py", line 566, in __get__
    return self.impl.get(state, dict_)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/attributes.py", line 1086, in get
    value = self._fire_loader_callables(state, key, passive)
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/attributes.py", line 1116, in _fire_loader_callables
    return state._load_expired(state, passive)
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/state.py", line 803, in _load_expired
    self.manager.expired_attribute_loader(self, toload, passive)
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/loading.py", line 1670, in load_scalar_attributes
    result = load_on_ident(
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/loading.py", line 509, in load_on_ident
    return load_on_pk_identity(
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/loading.py", line 694, in load_on_pk_identity
    session.execute(
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/session.py", line 2362, in execute
    return self._execute_internal(
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/session.py", line 2237, in _execute_internal
    conn = self._connection_for_bind(bind)
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/session.py", line 2106, in _connection_for_bind
    return trans._connection_for_bind(engine, execution_options)
  File "<string>", line 2, in _connection_for_bind
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/state_changes.py", line 103, in _go
    self._raise_for_prerequisite_state(fn.__name__, current_state)
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/session.py", line 990, in _raise_for_prerequisite_state
    raise sa_exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: This session is provisioning a new connection; concurrent operations are not permitted (Background on this error at: https://sqlalche.me/e/20/isce)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions