R
Railway5mo ago
Zerkley

Getting error 503 when trying to make requests to backend hosted in Railway

As the title says, I can't make any requests to my database since it always returns error 503. I have correctly set the port to be const port = process.env.PORT || 3000; and app.listen(port, "0.0.0.0", () => { console.log("server started on port 3000"); }); The credentials to my database(MongoDB) are correct since I could use the requests with no problems when I started the server locally, it's when I host it on railway that it stops me, any ideas?
10 Replies
Percy
Percy5mo ago
Project ID: N/A
Zerkley
Zerkley5mo ago
N/A
Zerkley
Zerkley5mo ago
No description
Zerkley
Zerkley5mo ago
I tried whitelisting 0.0.0.0/0 since it should allow every ip, but doesn't work either. Does railway use dynamic or static ips? if static, where can I find it to add it to the MongoDB whitelist?
Brody
Brody5mo ago
your deployments are on shared dynamic ips, you would need to allow all incoming traffic
Zerkley
Zerkley5mo ago
okay, gonna try redeploying with the 0.0.0.0/0 and see
Brody
Brody5mo ago
have you whitelisted all incoming traffic in atlas?
Zerkley
Zerkley5mo ago
yes, it works now, I just had to redeploy for the changes to take effect, thanks!
Brody
Brody5mo ago
no problem!
Want results from more Discord servers?
Add your server
More Posts