Skip to content
Back

Problem with function execution timeout

  • 0
  • Self Hosted
  • Functions
elnur
5 Apr, 2024, 10:08

I have a function that syncs my documents from a collection using the cursor methods of first fetching the documents from appwrite and then syncing those to Typesense in batches.

Due to the amount of documents in my collection this execution takes longer than 15 minutes. How can I solve this?

TL;DR
Problem: Function execution is timing out due to syncing a large number of documents from Appwrite to Typesense in batches. Solution: Change the environment variable `_APP_FUNCTIONS_TIMEOUT` to increase the function timeout. If self-hosting, follow the guide at https://appwrite.io/docs/advanced/self-hosting/environment-variables#functions
darShan
5 Apr, 2024, 10:28

If self-hosting, you can increase the timeout. See - https://appwrite.io/docs/advanced/self-hosting/environment-variables#functions

Variable - _APP_FUNCTIONS_TIMEOUT.

darShan
5 Apr, 2024, 10:30

Change the env., restart the appwrite stack, and then you change the functions timout in the settings.

elnur
5 Apr, 2024, 10:33

Amazing. Thanks!

darShan
5 Apr, 2024, 10:35

no worries, lmk if you face any other issues. please also mark the question as [SOLVED] once the issue resolves.

happy appwriting :appwritepeepo:

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