Back

Fetch failed (Connect Timeout Error) in Functions, 1.5.7, self-hosted, Node 18

  • 0
  • Self Hosted
  • Functions
Al
6 Aug, 2024, 17:25

When trying to run function (which also run successfully from local machine) in Appwrite self-hosted instance on 1.5.7 and Node 18 runtime (picked 18 after trying on 21 and finding out about this issue - https://github.com/appwrite/appwrite/issues/8311) and on the listDocuments call (first line of code in the function basically, nothing else is going on) I get fetch failed error with the following stack. Function runs 12 seconds before failing (time limit is maxed in settings).

`TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11731:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async _Client.call (file:///usr/local/server/src/function/node_modules/node-appwrite/dist/client.mjs:263:22) at async Databases.listDocuments (file:///usr/local/server/src/function/node_modules/node-appwrite/dist/services/databases.mjs:1576:12) at async Module.default (file:///usr/local/server/src/function/index.mjs:49:21) at async execute (/usr/local/server/src/server.js:157:22) at async action (/usr/local/server/src/server.js:174:13) at async /usr/local/server/src/server.js:10:9

at async action async /usr/local/server/src/server.js:10:9","message":"fetch failed","cause":{"stack":"ConnectTimeoutError: Connect Timeout Error at process.processImmediate (node:internal/timers:476:21)","message":"Connect Timeout Error"}}`

Node 21 and Node 18 runtimes behaved absolutely the same.

What it could be?

TL;DR
Developers are experiencing a 'Fetch failed' error with a Connect Timeout when running a function in the Appwrite self-hosted instance on 1.5.7 and Node 18. The issue arises in the listDocuments call, stopping the function after 12 seconds. This problem persists across Node 21 and Node 18 runtimes. The potential cause could be related to a Connect Timeout Error. Consider revisiting other available solutions within the Appwrite repository or documentation.
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