I’m using SurrealDB js with SvelteKit and I’m getting this error intermittently:
Uncaught Exception: TypeError: fetch failed
at node:internal/deps/undici/undici:12345:11
at async HttpEngine.rpc (file:///D:/CODE/App_V2/node_modules/.pnpm/surrealdb.js@1.0.0-beta.9/node_modules/surrealdb.js/esm/library/engine.js:263:21)
at async Surreal.ping (file:///D:/CODE/App_V2/node_modules/.pnpm/surrealdb.js@1.0.0-beta.9/node_modules/surrealdb.js/esm/surreal.js:133:27) {
cause: SocketError: other side closed
at TLSSocket.onSocketEnd (node:internal/deps/undici/undici:8903:26)
at TLSSocket.emit (node:events:530:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'UND_ERR_SOCKET',
socket: {
localAddress: '10.0.0.8',
localPort: 58122,
remoteAddress: '66.241.124.33',
remotePort: 443,
remoteFamily: 'IPv4',
timeout: undefined,
bytesWritten: 1946,
bytesRead: 1023
}
}
}
Anyone know why?
My SurrealDB database is running on fly.io and is connecting/query-able when working but now and then I get this error. Has something changed recently on fly.io? This was working with no such issue earlier…