W
Wasp2w ago
AC

Deployment issue on Railway

I'm experiencing an issue with my Wasp app deployment that started after the recent Railway update (April 4 changelog). My app was working fine before, but now deployments are failing with this error: pg-boss failed to start! error: role "u9o4bahro8glkv" is not permitted to log in The strange thing is, when I check my database using \du and SELECT rolname, rolcanlogin FROM pg_roles;, this role doesn't exist in my database at all. The only role with login privileges is "postgres", which matches my DATABASE_URL connection string (postgresql://postgres:[email protected]:XXXX/railway). This suggests something at the Railway infrastructure level is trying to use a different username than what's in my connection string. I haven't made any changes to my database configuration, and this was working before the recent update. I suspect this is a Railway issue, unrelated to Wasp, but just wanted to ask - Has anyone else experienced similar issues with pg-boss or database connections on Railway after the update? Any guidance on how to resolve this would be greatly appreciated. I'm on V0.15 of Wasp.
2 Replies
kapa.ai
kapa.ai2w ago
Hi @AC. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources, I can see that your issue with pg-boss failing to start is similar to problems other Wasp users have experienced, though the specific error message is different. The error you're seeing (pg-boss failed to start! error: role "u9o4bahro8glkv" is not permitted to log in) suggests a database connection issue. From the knowledge sources, there are a few potential solutions to try: 1. Change localhost to 127.0.0.1: One user fixed a similar pg-boss connection issue by updating their database URL from localhost to 127.0.0.1, as Node.js was having trouble resolving localhost:
Thanks Community Member 23 Community Member 16 I fixed it by updating the database URL from localhost to 127.0.0.1, it seems the node can not resolve the localhost.

Thanks Community Member 23 Community Member 16 I fixed it by updating the database URL from localhost to 127.0.0.1, it seems the node can not resolve the localhost.

2. Check your DATABASE_URL: Ensure your connection string is correctly formatted and contains the right credentials. Since you mentioned your connection string uses "postgres" as the username, but the error mentions a different role, there might be a mismatch. 3. Run wasp clean: Several users resolved pg-boss issues by running wasp clean and then restarting their application:
if you do manage to ruin something, you can always run `wasp clean` and then `wasp start` again, and wasp will reinstall and recompile everything for you for a fresh start

if you do manage to ruin something, you can always run `wasp clean` and then `wasp start` again, and wasp will reinstall and recompile everything for you for a fresh start

Since you mentioned this started happening after a Railway update, it's possible that Railway changed something in their infrastructure that affects how pg-boss connects to the database. The knowledge sources don't specifically mention Railway issues, but the connection problems described are similar. If none of these solutions work, you might need to contact Railway support directly, as this could indeed be related to their recent update rather than a Wasp-specific issue. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @AC, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
AC
ACOP2w ago
Solved - another env var mismatch.

Did you find this page helpful?