NeonN
Neon2y ago
2 replies
excited-coffee

AggregateError [ETIMEDOUT]

when i try to run this code
import postgres from "postgres"
import config from "../config"

export const sql = postgres(config.uri, { types: { bigint: postgres.BigInt } })

;(async () => {
    console.log(await sql<Array<{ code: string; time: number }>>`select * from code`)
})()

i got error
AggregateError [ETIMEDOUT]: 
    at internalConnectMultiple (node:net:1116:18)
    at afterConnectMultiple (node:net:1683:7)
    at cachedError (/home/container/node_modules/postgres/cjs/src/query.js:170:23)
    at new Query (/home/container/node_modules/postgres/cjs/src/query.js:36:24)
    at sql (/home/container/node_modules/postgres/cjs/src/index.js:112:11)
    at code_list (/home/container/index.js:3730:25)

I was ruined the same code before and it was working fine. But from few days, it shows this error almost every query.
Was this page helpful?