Back

async false function times out after 30 seconds

  • 0
  • Self Hosted
  • Functions
  • Web
gaurav_ch
10 Jan, 2024, 07:14

self host v1.4.13, I have a very simple node js 20 function which returns a user id from a collection with only 5 records. When I execute it using by web client sdk, it randomly times out after 30 seconds IF I make the async as false. I need to make it as false because I need the user_id in return.

here is my client code:

TypeScript
return this.getFunctions(this.getClient()).createExecution('listing', ({"code":"91","mobile":"9999999999","request_type":1}, false);

and it should return a user_id but the execution times out Operation timed out after 30001 milliseconds with 0 bytes received with status code 0\nError Code: 0

But it I make it async true, even a long running code (like a curl request) executes in the same function. I am not sure what is the problem. docker logs are attached.

TL;DR
The user is experiencing a timeout issue with an async function that takes more than 30 seconds. They previously used BUN and were recommended to use Node.js but are still encountering the problem intermittently. No solution is provided in the thread.
ideclon
10 Jan, 2024, 07:35

Synchronous Functions have a limit of 30 seconds.

erikkamalov
10 Jan, 2024, 11:16

I also have this problem. in the beginning, I used BUN, then I was recommended to use node.js . but still experiencing a problem. he sometimes disappears and reappears.

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