2 years ago
I think it is due to this:
https://docs.railway.app/guides/private-networking#initialization-time
Is there a workaround for this Nextjs app?
Since we are generating static pages from a DB call when building the app.
Here is the log:
12 13.38 Error: getaddrinfo ENOTFOUND pgbouncer.railway.internal
12 13.38 at GetAddrInfoReqWrap.onlookupall as oncomplete
12 13.38 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
12 13.38 errno: -3008,
12 13.38 code: 'ENOTFOUND',
12 13.38 syscall: 'getaddrinfo',
12 13.38 hostname: 'pgbouncer.railway.internal',
12 13.38 digest: '1746059515'
12 13.38 }
12 13.38 Error: getaddrinfo ENOTFOUND pgbouncer.railway.internal
12 13.38 at GetAddrInfoReqWrap.onlookupall as oncomplete
12 13.38 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
12 13.38 errno: -3008,
12 13.38 code: 'ENOTFOUND',
12 13.38 syscall: 'getaddrinfo',
12 13.38 hostname: 'pgbouncer.railway.internal',
12 13.38 digest: '1746059515'
12 13.38 }
ⓘ Deployment information is only viewable by project members and Railway employees.
3 Replies
2 years ago
Sounds like you are calling the private domain during build? if so, you need to enable the new builder in your service settings.
2 years ago
Sounds like you are calling the private domain during build? if so, you need to enable the new builder in your service settings.
Whoa, glad that it is here already albeit still in beta. Thanks brody! Applying the changes now.
2 years ago
Yep it's still very much beta, so it's either that, or don't call your database during build (call it during runtime before you start the app)