ETIMEDOUT
Hey, I intermittently get the following issue when trying to push my migrations to Neon.
AggregateError [ETIMEDOUT]:
If I just connect with psql to the same url it works fine. Sometimes it works, sometimes it doesn't work.
I thought it might've been a cold start issue or something, so I tried just spinning it up by connecting with psql, but that doesn't seem to solve it. Connecting with psql works fine btw.
Any ideas?8 Replies
adverse-sapphireOP•4mo ago
It's literally unusable in this current state, even when using the http client instead of ws it's just endless and constant ETIMEDOUT.
magic-amber•4mo ago
Hi, this might be the "happy eyeballs" problem. https://r1ch.net/blog/node-v20-aggregateeerror-etimedout-happy-eyeballs.
Is the client you're running from located far away from your neon database region?
adverse-sapphireOP•4mo ago
@Conrad Ludgate Yeah, I'm located in SEA, but I'm working with a stack located in the US east.
magic-amber•4mo ago
Yeah, that's most likely it then. Can you confirm what version of nodejs you're using?
adverse-sapphireOP•4mo ago
22.15.1
magic-amber•4mo ago
I think you can set https://nodejs.org/api/net.html#netsetdefaultautoselectfamilyattempttimeoutvalue to a larger value than 250ms. Maybe 1000
adverse-sapphireOP•4mo ago
yeah that's what I'll try, I'm out doing some grocery shopping, when I'll get back I'll try that out and I'll let you know if the issue is resolved, anyways, thanks for helping out, appreciate it.
This seems to have worked, thanks a lot!
magic-amber•4mo ago
Great to hear