N
Neon5mo ago
harsh-harlequin

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
harsh-harlequin
harsh-harlequinOP5mo 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.
xenogeneic-maroon
xenogeneic-maroon5mo 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?
harsh-harlequin
harsh-harlequinOP5mo ago
@Conrad Ludgate Yeah, I'm located in SEA, but I'm working with a stack located in the US east.
xenogeneic-maroon
xenogeneic-maroon5mo ago
Yeah, that's most likely it then. Can you confirm what version of nodejs you're using?
harsh-harlequin
harsh-harlequinOP5mo ago
22.15.1
xenogeneic-maroon
xenogeneic-maroon5mo ago
I think you can set https://nodejs.org/api/net.html#netsetdefaultautoselectfamilyattempttimeoutvalue to a larger value than 250ms. Maybe 1000
harsh-harlequin
harsh-harlequinOP5mo 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!
xenogeneic-maroon
xenogeneic-maroon5mo ago
Great to hear

Did you find this page helpful?