#async false function times out after 30 seconds

5 messages · Page 1 of 1 (latest)

knotty agate
#

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:

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.

young zealot
short pebble
knotty agate
# young zealot Synchronous Functions have a limit of 30 seconds.

true but seriously, searching through 5 records with try catch block in node js function code, takes 30 seconds even if the indexes are made? I set _APP_FUNCTIONS_INACTIVE_THRESHOLD to 240 and in this case the subsequent calls do not time out but this is a bad hack.

young zealot