I just found this in an app’s session’s log:
The crash happens when the app calls a server function defined in an uplink and tries to log its failure:
# the server call generated an exception, which should have been logged
try:
result = anvil.server.call(function_name)
except Exception as e:
Logger.log(f'start_next_uplink_machine: Crash: "{e}"', 'queue manager')
The logging is managed by the Logger
dependency app, and it crashes when it tries to add a row to the log
table:
# the log function is defined in the Logger dependency
@anvil.server.callable
@anvil.server.http_endpoint('/log')
def log(what=None, who=None, **kwargs):
# [...] other stuff going on here
app_tables.log.add_row(when=datetime.datetime.now(), who=who, what=what)
I would understand add_row
generating exceptions mentioning transaction failures, conflicts or similar problems, but I don’t understand how a transaction could expire.