N
Neon16mo ago
stormy-gold

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`)
})()
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)
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.
2 Replies
ambitious-aqua
ambitious-aqua16mo ago
@null are you on WSL 1?
stormy-gold
stormy-goldOP16mo ago
Nope. It works on my IP address, but when I connect VPN, it gives me this error message.

Did you find this page helpful?