I have a function that iterate over all users to get their emails, I'm calling this function with a pagination of 600 users (I tried lowering it to 100/200, it didn't fix anything).
The function seems to work fine at the begining but a one moment, it just stops working and timeout (in the screenshot, it crashed at 16200 users)
Summary
Developers are experiencing a function crash with a timeout error after approximately 30 seconds. The function normally takes around 10 seconds to run but suddenly spikes at 30 seconds. They are using Appwrite cloud Pro tier. The function iterates over all users to retrieve their emails using a pagination of 600 users. They have tried lowering the pagination to 100/200, but it didn't solve the issue. The function works fine initially but eventually stops working and times out (crashed at 16200 users).
louga31
Rank 1: Thread
Feb 9, 2024, 16:56
It's like the function executor get overloaded but the function calls and just stops working (I'm on Appwrite cloud Pro tier)
D5
Moderator
Feb 9, 2024, 16:57
Does the function needs more than 30 seconds to run?
D5
Moderator
Feb 9, 2024, 16:57
What's the error you're getting?
louga31
Rank 1: Thread
Feb 9, 2024, 16:58
The function need ~10 seconds for every run but sudently it spikes at 30 seconds and times out
louga31
Rank 1: Thread
Feb 9, 2024, 16:58
on the last call:
Operation timed out after 30004 milliseconds with 0 bytes received with status code 0\nError Code: 0
D5
Moderator
Feb 9, 2024, 17:00
Are you always returning a result with this? return res.send();