Hi @anvil
guess what? Different App, same error as here.
anvil.tables.TableError: Internal database error: ERROR: canceling statement due to user request
<running on the server>
called from /downlink/anvil/_server.py, line 42
called from update_module, line 63
Session ID:BUJKV4WFU7BA6CHUG7TALA5QTUCZJLZP
Code where the exception is raised, is the insert loop of the “new version” data: (translated from italian to english)
print(f"{timestamp()} Begin insert new data in table")
for d in df.to_dict(orient="records"):
# d is now a dict of {columnname -> value} for this row
# We use Python's **kwargs syntax to pass the whole dict as
# keyword arguments
d['data_version'] = new_data_version
app_tables.comuni_anpr.add_row(**d) -----> this throws the error
print(f"{timestamp()} Begin insert new data in table")
Hopeless and frustrated.
Don’t start telling me use transactions, I tried in this App and had to revert back because DB service is raising transactional conflicts while I am adding rows in single-user.
What’s common in this 3 posts? Those are both background tasks running daily at 03.00 CEST.
@anvil is there any Database maintenance operation scheduled at that time that could conflict ?
I’ve run out of options.
I’m losing trust in the database service.