Over the past 2 days I have been getting various Internal server errors on server function calls and these are existing functions that have been working without issue. These are some of the error codes I got just this morning. They are all from the same function.
anvil.server.InternalError: Internal server error: 1b6e311aaed8
anvil.server.InternalError: Internal server error: 7439f91f7a20
anvil.server.InternalError: Internal server error: 1920eec816c6
I have a few different server functions that attempt various things like adding rows or deleting rows. Some of the functions using the @anvil.tables.in_transaction
decorator and I noticed the functions started to fire off X times before failing with a timeout error so I broke them down and added try catches to narrow down the issue. Its also inconsistent, between the different errors and then occasionally it just works first try.
here is an example of one of the failing functions.
@anvil.server.callable(require_user=True)
@anvil.tables.in_transaction
def delete_items(row):
log_warning('deleting item for {}: {}'.format(row['package']['part_number'], row['part_number']))
for record in app_tables.packages_item_documents.search(item=row):
record.delete()
for record in app_tables.packages_item_similarities_differences.search(item=row):
record.delete()
app_tables.packages_items.get_by_id(row.get_id()).delete()
I have tried using relaxed transactions, putting each table change into its own transaction, and removing the transaction altogether but I still keep running into internal server errors.
Is it possible something is messed up in this apps DB?