Operation timed out after 30000 milliseconds with 0 bytes received with status code 0\nError Code: 0
- 0
- Self Hosted
- Functions

When executing a function from the Appwrite SDK, I encountered an error message that reads ‘Operation timed out’ if the function takes longer than 30 seconds to complete. However, when I executed the same function from my server console, I did not encounter this error even it takes longer than 30s to executed. I have come across similar issues before, but none of the solutions I found worked for me. my docker compose exec appwrite vars shows : and docker logs appwrite shows:

Synchronous executions have a hard timeout of 30s

You can try executing it with async set to true

Is this mentioned in the Appwrite documentation or somewhere else?

I tried again with asynchronous executions, and it works now.

Thanks for your support!

I have another question If one user calls or executes a function, should other users wait until the function is executed by the first user?

ex: If 1000 users call a specific function that requires 10 seconds to complete, should the last user wait until all previous executions are finished based on the Appwrite worker execution design?

no need to wait. async functions get queued

What I’m facing an issue where 10 users are executing the same function that requires 10 seconds to complete at the same time. As a result, the last user has to wait 100 seconds to be served. I tried using asynchronous executions and listening to the database in real-time whenever an execution is completed in the client.

I think the execution queue here is following the first-in-first-out principle, so I need parallel execution.

If it's only 10 seconds and they need the result right away, you can execute synchronously

Yes, that is correct

I am really sorry for the late reply. I had some exams at university.

Anyway, I know that. but they are executing the same function at the same time, so the last user had to wait 100 seconds to be served based on the first-in-first-out principle which Appwrite execute worker uses. I think I need the parallel execution concept here to execute multiple calling function at the same time. So if they call or execute the same function at the same time (which it takes 10s to complete) then the last user won't be wait 100s to be served.

You want to implement a rate limit?

Rate limit for what? Could you please explain more? Is my problem clear to you?

Basically a cooldown between executions I mean

Hmmm
Recommended threads
- ENV vars not updating
When i do `nano .env` it shows `_APP_DOMAIN_TARGET=` as set to my domain, but when i do `docker compose exec appwrite vars` it shows `_APP_DOMAIN_TARGET=` as ...
- Index with the requested key already exi...
I'm using appwrite cli to create DB and I'm getting index_already_exists Is there a way to undestand the index name and maybe to skip if it's already exits?
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
