Back

Why it fails scheduled function??

  • 1
  • Functions
-N I N J A-
30 Nov, 2023, 04:49

Error got : Unexpected curl error between proxy and executor ID exc2 (110): Operation timed out\nError Code: 500

TL;DR
Issue: The scheduled function is failing and not updating the limits correctly. Solution: It seems like the issue is related to the pagination of the documents. By default, only 25 documents are returned unless a limit is specified. You should use pagination to retrieve all the documents at once. Increase the execution timeout to avoid timeout errors. Also, make sure to rotate your API key for security reasons. The code might need to be checked for errors as well. Note: The user has made some adjustments to the execution timeout and is waiting to see if it resolves the issue. They also mention that the ID and execution logs have changed, and they
Drake
30 Nov, 2023, 18:06

maybe something wrong with the code?

-N I N J A-
30 Nov, 2023, 18:06

Manually execution works fine but getting failed in scheduled

Drake
30 Nov, 2023, 18:43

What's your code?

-N I N J A-
30 Nov, 2023, 18:55

code

Drake
30 Nov, 2023, 19:09

so scheduled executions work now without changing any code?

-N I N J A-
30 Nov, 2023, 19:09

Yes

Drake
30 Nov, 2023, 19:11

deleted due to sensitive data. You might want to rotate your API key

-N I N J A-
30 Nov, 2023, 19:12

I think that was execution timeout error, after today's successful execution. I have changed execution second more than 15 sec so that in futur, no error happen. Let's see next time

Drake
30 Nov, 2023, 19:12

so your 2nd update...how many documents does it match?

-N I N J A-
30 Nov, 2023, 19:13

But in today's execution New 5 users limit not updated to 0, don't know why

-N I N J A-
1 Dec, 2023, 08:03

Also execution Id is changed i cannot find them by id but still have failed logs. I don't know how appwrite worksπŸ₯²

-N I N J A-
1 Dec, 2023, 08:04

I mean, ID shown in image is not available they are changedπŸ€”

Drake
1 Dec, 2023, 17:47

Sooo is it still failing?

-N I N J A-
1 Dec, 2023, 18:58

I have 28 docs in users collection but when .listDocument, I am getting users.total: 28 but inside of users.document: I am getting only 25 document objects.

Still I don't know how appwrite is working, so disappointed πŸ˜”

-N I N J A-
1 Dec, 2023, 19:00

That's why scheduled function not updating limits of new 5(yesterday) and 3(today) users.πŸ˜₯

-N I N J A-
1 Dec, 2023, 19:02

No, Increased execution timeout and not failing

Drake
1 Dec, 2023, 20:53

Total is the number of documents matching the filter queries. If no limit is supplied, the default is 25. You need to paginate

Drake
1 Dec, 2023, 20:53

What do you mean you don't know how Appwrite is working?

Drake
1 Dec, 2023, 20:54

What?

-N I N J A-
2 Dec, 2023, 04:33

I mean, that's why scheduled execution updated only 25 docs yesterday

-N I N J A-
2 Dec, 2023, 04:39

Any way to get all docs at once?? .limit('All')

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