8 months ago
I just updated my server to connect to my db when the hono server is initialized and running into a an error when trying to connect to DATABASE_URL.{ "severity": "error", "timestamp": "2025-03-25T12:22:41.667033319Z", "message": "error: password authentication failed for user \"postgres\"", "tags": { "deploymentId": "670f9da5-75d3-4a37-9550-9f84abb1588c", "deploymentInstanceId": "2bf09dcf-271c-4d27-8bff-8ab957c3ae33", "environmentId": "fcdf00b4-fcbb-476c-9162-f304ba8ebd9c", "pluginId": null, "projectId": "1bf4bf99-3690-4b6a-aed4-a2655303f1bc", "serviceId": "7a158b7b-9dcb-4fd8-b7b0-920e969fb845", "snapshotId": null }, "attributes": { "level": "error" } }
7 Replies
8 months ago
my backend has a DATABASE_URL set to ${{postgres.DATABASE_URL}}
using the DATABASE_PUBLIC_URL locally and have no issues connecting to the remote dev env railway db. this is causing the healthcheck to fail since its trying to await initDatabase(); which is initializing db when main server file is run.
Attachments
8 months ago
This might be a config issue that disabling the connection pool check might have bypassed. I'll leave this open to the community as it seems like an app level issue but I'd also recommend looking around on Stack overflow and other resources to see why disabling that might have worked.
Status changed to Awaiting User Response Railway • 9 months ago
8 months ago
when I run the build locally, in prod mode using bun run build:prod, the app builds fine and it returns 200 for the /health endpoint. Isn't that what railway health checks are verifying?
Status changed to Awaiting Railway Response Railway • 9 months ago
8 months ago
Since disabling the connection pool check is resolving the issue, could you double check the connection pool config? There might be a setting or parameter causing the authentication to fail
Status changed to Awaiting User Response Railway • 9 months ago
8 months ago
what do you mean? how do i check this? the code i provided is all there is. am i like console logging something specific?
Status changed to Awaiting Railway Response Railway • 9 months ago
8 months ago
Hey, this looks like it is specific to your application level code. Due to volume, we can only answer platform level issues here
This thread is public so the community might be able to help
Status changed to Awaiting User Response Railway • 8 months ago
4 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 4 months ago