Back

[Solved] Calling createExecution runs function twice

  • 0
  • Functions
  • Web
Ajit Singh
23 Oct, 2023, 07:08

I am calling create execution to a function its running twice in the appwrite backend

TL;DR
Summary: The user is experiencing an issue where calling createExecution runs a function twice in the appwrite backend. They mention that this issue occurs inconsistently and are having trouble pinpointing the cause. Suggestions are given to check for triggers setup for the function, log request parameters, and clarify if the SDK and custom domain are being used. The user is asked for more details to help reproduce the issue, but a solution is not mentioned in the thread.
Meldiron
23 Oct, 2023, 10:52

Hello 👋 Can you reproduce it easily with a new function? Could you share more details so we can try it on our end?

Ajit Singh
23 Oct, 2023, 11:28

It does not happen always

Ajit Singh
23 Oct, 2023, 11:29

its just buggy I can't even pinpoint why it happens

Meldiron
23 Oct, 2023, 11:30

Are you executing with SDK, using custom domain, ir some other way? For example, domain executions done in browser sometimes load some extra files like favicon. Or could send request just to get og image

Ajit Singh
23 Oct, 2023, 11:31

Yes using the sdk, custom domain

Meldiron
23 Oct, 2023, 12:51

You can log params on request, such as req.path, req.url and req.method, to see if they are exactpy the same, or different requests being sent

Ajit Singh
23 Oct, 2023, 16:27

Ok

ThatGuySam
23 Oct, 2023, 21:35

I’ve had this happen in the past because I forgot that I had triggers setup for an event. Check that your function has no events setup to trigger it

Ajit Singh
24 Oct, 2023, 04:02

If that happened it will be consistent it happens and sometimes it does notr

Ajit Singh
25 Oct, 2023, 07:39

[Solved] Calling createExecution runs function twice

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