Back

Python: Execution timeout with xasync=true

  • 1
  • Self Hosted
  • Functions
pgk1124
20 Feb, 2025, 16:50

Hello, I have a long running function that is meant to analyze and update ~100k entries into Appwrite.

The data is retrieved as a blob from another source and needs to be processed into various collections.

Running the function locally takes around 5 minutes, but I cannot get it to work on as a function on Appwrite as it times out after a minute with this message :

Internal curl errors has occurred within the executor! Error Number: 28. Error Msg: Operation timed out after 94004 milliseconds with 0 bytes received\nError Code: 500

Since there are thousands of calls, the entire program uses async calls with aiohttp, and I launch the execution with xasync=true.

Running the program locally on the appwrite sdk takes far longer (~20 minutes), but it works ok, indicating that the issue is not in the program itself.

Where should I look to solve the issue ?

Is it possible to create/update multiple documents with a single HTTP call ? I could then craft the appropriate response externally and import the data much faster.

TL;DR
Long-running Python function to update 100k entries in Appwrite times out due to execution timeout with xasync=true. Running locally takes 5 minutes. Issue arises when running on Appwrite, receiving error code 500 with timeout after a minute. Consider optimizing for faster execution or batch updating documents to reduce HTTP calls.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more