Back

function execution was frozen when sending concurrent request to appwrite function

  • 1
  • Functions
  • Cloud
animeyeet
7 Jun, 2023, 08:49

hey when i execute an appwrite function that is inside a for loop means: send multiple executions of that function it stop at processing

then it fails after timeout

TL;DR
User is experiencing freezing of function execution when sending concurrent requests to an appwrite function. They deleted the function multiple times to stop the execution. User suspects that adding a time.sleep during execution creation or changes to the function itself may have caused the issue. Another user asks for more code. User provides code snippet involving batches and sending data. Another user suggests that there may be an infinite loop or faulty execution. User confirms that the code works fine on their IDE. User confirms that the freezing issue only occurs in the appwrite cloud, not the local docker. User states that the function stops at processing when executing multiple instances in a for loop and
animeyeet
7 Jun, 2023, 08:50

only the first one is seems frozen rest all the execution process successfully

dammy
7 Jun, 2023, 09:40

appwrite cloud or local docker?

animeyeet
7 Jun, 2023, 09:46

Cloud

dammy
7 Jun, 2023, 10:25

does code work fine on your IDE?

animeyeet
7 Jun, 2023, 10:27

yaa

animeyeet
7 Jun, 2023, 10:27

wait

animeyeet
7 Jun, 2023, 10:27

oh yes

dammy
7 Jun, 2023, 10:50

oooo, I may not be able to answer this

joeyouss
7 Jun, 2023, 11:35

hi, is there a possibility that your loop might be going into an infinite loop and/or faulty execution?

animeyeet
7 Jun, 2023, 11:37

batches = [ data_array[i : i + batch_size] for i in range(0, len(data_array), batch_size) ] for batch in batches: batch = json.dumps( {"urls": {"others": batch}, "bucketId": "somethng"} ) send_data_batch(batch)

animeyeet
7 Jun, 2023, 11:38

doesn't seems like it

animeyeet
7 Jun, 2023, 11:39
animeyeet
7 Jun, 2023, 11:40
dammy
7 Jun, 2023, 11:46

that is true

Drake
7 Jun, 2023, 17:23

would you please share more of your code?

animeyeet
7 Jun, 2023, 18:42

sorry Steven i can't is to reproduce the problem maybe it because i add time.sleep in during creating execution or i changes i made to the function itself

animeyeet
7 Jun, 2023, 18:42
animeyeet
7 Jun, 2023, 18:44

earlier when this problem occurred i deleted the function 2 times to stop the execution(didn't wait for it to timeout)

animeyeet
7 Jun, 2023, 18:44

but if you want to check the logs from your side

animeyeet
7 Jun, 2023, 18:44

projectId -> 6463a34a73ca03c70d35

Drake
7 Jun, 2023, 18:53

oh...yes, that could cause it...

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