Skip to content
Back

My function automatically re-executed after failed timeout

  • 0
  • Web
  • Cloud
Leхa
12 Jan, 2025, 13:43

I have a function that creates documents, and sometimes it fails with timeout error, no idea why. But it's not a problem, the problem is when this function fails appwrite automatically re-executes this function again. Why? It causes duplication in collections

TL;DR
Function re-executing after timeout, leading to duplicate entries in collections. Check appwrite.json for similar settings. Increase timeout value if necessary. Ensure function is not accidentally triggered. Consider removing duplicates by a specific attribute like email.
Leхa
12 Jan, 2025, 13:54

please suggest an example how to remove duplicates by some attribute, e.g. email

Tomic R.
12 Jan, 2025, 13:56

You sure you did not accidentally trigger it again? Cause normally appwrite does not automatically re-execute the function.

How is your function triggered? Automatically (and if so, how) or manually (e.g. by a user)?

Tomic R.
12 Jan, 2025, 13:59

And if it fails because of timeout, just set the timeout value higher:

Tomic R.
12 Jan, 2025, 13:59

And don't forget to do the same in your appwrite.json if you deploy with appwrite cli

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