Strange timeouts on Vercel
I'm connecting to Neon from Vercel Serverless Functions with
The call sometimes works and sometimes doesn't. For those that it doesn't, the request may be bigger than those that do, not sure.
@neondatabase/serverless@neondatabase/serverless and drizzle-orm/neon-httpdrizzle-orm/neon-http I get strange timeouts:error saving to db when updating conversation NeonDbError: Error connecting to database: fetch failed
at execute (/var/task/apps/web/.next/server/chunks/375.js:53:7255)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async lI (/var/task/apps/web/.next/server/app/haku/[id]/page.js:56:2168) {
severity: undefined,
code: undefined,
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: undefined,
line: undefined,
routine: undefined,
sourceError: TypeError: fetch failed
at node:internal/deps/undici/undici:12502:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async execute (/var/task/apps/web/.next/server/chunks/375.js:53:7166)
at async lI (/var/task/apps/web/.next/server/app/haku/[id]/page.js:56:2168) {
[cause]: ConnectTimeoutError: Connect Timeout Error (attempted addresses: 3.126.212.11:443, 3.124.121.135:443)
at onConnectTimeout (node:internal/deps/undici/undici:6635:28)
at node:internal/deps/undici/undici:6587:50
at Immediate._onImmediate (node:internal/deps/undici/undici:6619:13)
at process.processImmediate (node:internal/timers:478:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'UND_ERR_CONNECT_TIMEOUT'error saving to db when updating conversation NeonDbError: Error connecting to database: fetch failed
at execute (/var/task/apps/web/.next/server/chunks/375.js:53:7255)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async lI (/var/task/apps/web/.next/server/app/haku/[id]/page.js:56:2168) {
severity: undefined,
code: undefined,
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: undefined,
line: undefined,
routine: undefined,
sourceError: TypeError: fetch failed
at node:internal/deps/undici/undici:12502:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async execute (/var/task/apps/web/.next/server/chunks/375.js:53:7166)
at async lI (/var/task/apps/web/.next/server/app/haku/[id]/page.js:56:2168) {
[cause]: ConnectTimeoutError: Connect Timeout Error (attempted addresses: 3.126.212.11:443, 3.124.121.135:443)
at onConnectTimeout (node:internal/deps/undici/undici:6635:28)
at node:internal/deps/undici/undici:6587:50
at Immediate._onImmediate (node:internal/deps/undici/undici:6619:13)
at process.processImmediate (node:internal/timers:478:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'UND_ERR_CONNECT_TIMEOUT'The call sometimes works and sometimes doesn't. For those that it doesn't, the request may be bigger than those that do, not sure.
