memoonlite
Hi! 👋🏻 I'm using Appwrite Cloud and sometimes I randomly get a "fetch failed" error while executing a function:
TypeScript
at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:195:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Databases.listDocuments (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/databases.js:1658:16)
at async Module.default (file:///usr/local/server/src/function/src/index.js:42:35)
at async execute (/usr/local/server/src/server.js:208:16)
at async action (/usr/local/server/src/server.js:225:7)
at async /usr/local/server/src/server.js:14:5```
Running the function again makes it time out:
```Synchronous function execution timed out. Use asynchronous execution instead, or ensure the execution duration doesn't exceed 30 seconds.
Error Code: 408```
The line that is referred to in the exception:
```database.listDocuments('5445545454454545', '3298329823923', [Query.equal('$id', user_id),]);```
This error rarely occurs. But when it does, it happens randomly and at random parts of the code. This potentially causes inconsistencies in my database. Because the function basically errors out in the middle of an operation and it's unpredictable when/where it happens.
Extra information: I don't use a custom domain or anything and I've never added/deleted/changed anything there. It's the default configuration.
Any idea what causes this problem?
TL;DR
Developers using Appwrite Cloud may encounter a "fetch failed" error randomly during function execution, leading to timeout issues and potential inconsistencies in the database. This issue seems to occur unpredictably and at various points in the code.
Solution: To address this problem, consider optimizing your code to ensure it does not exceed the maximum execution duration and check for any potential issues in the code causing the fetch failure. Additionally, verifying the network connection and server status may help in resolving this error. Recommended threads
- How to verify webhook signature in Golan...
I am using webhook and I would like to verify the webhook signature when the call to my server is made via Appwrite webhook. Basically, I have to get the follo...
- How to implement webhook on particular c...
I have a collection where I want to call the API if an entry is added. But, as of now, I don't see the option to choose in which collection if the entry is adde...
- Indexes using relationship
Hello there ! <:appwritecheers:892495536823861258> I was playing around with Database, Collections & Documents and I found an "issue" which isn't realy an iss...