Skip to content
Back

Function gets stuck, doesn't terminate. It executes everything but then throws 30s sync timeout.

  • 0
  • Self Hosted
  • Functions
Ludwig
24 Jan, 2025, 11:53

I have random occurrences of sync function executions not terminating. I added a test log message right before the return res.json(response, 200, headers); (last line of the function).

While logs don't show in the exeucution view in Appwrite Console, because there it only shows the timeout error (see screenshot), they do show in Sentry. And that test log is being sent, which means the function executes until that line before return statement.

Also, the actual database operations of this function get done.

So it basically does everything it should, but somewhere (on the client perhaps?) completion of the function is not detected. And the 30s sync timeout error gets thrown.

Self-hosted setup with server specs: 4 vCPU 8 GB RAM 40 GB Disk local

Function is not heavy, some db operations. If successful, it finishes in approx. 500ms.

TL;DR
Function occasionally does not terminate, throwing a 30s sync timeout error. Logs don't display in Appwrite Console but do in Sentry. Function executes until the last line before `return`, completing the database operations. The issue may be with the client not detecting the function's completion. Server setup is not the cause.
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