What I’m trying to do:
I am getting data from a database server via a background task. The task never finishes and I get this error message:
anvil.server.ExecutionTerminatedError: Server code exited unexpectedly: 5107b8af69
What I’ve tried and what’s not working:
The background task works ok when the database is returning smaller datasets, but this is the biggest one yet.
Is there any way of understanding this error message, or should I implement limit and offset logic in the query?
** Code snippet **
With additional debugging, I found the error to be in building the pandas dataframe. Here is the snippet where it crashes.
res = self._post_query(query_string, accept="text/csv") print("slow dataframe sparql query finished") try: result = pd.read_csv(StringIO(res)) print("dataframe ready", result.shape) except Exception as e: print("bad dataframe", e) return result
As an aside, it above Termination never raises the exception. So it is in
I have established that the size of the in-memory csv is over 125MB. DO you think this is too big?