R
Railway10mo 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
Percy10mo ago
Project ID: N/A
Zerkley
Zerkley10mo ago
N/A
Zerkley
Zerkley10mo ago
No description
Zerkley
Zerkley10mo 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
Brody10mo ago
your deployments are on shared dynamic ips, you would need to allow all incoming traffic
Zerkley
Zerkley10mo ago
okay, gonna try redeploying with the 0.0.0.0/0 and see
Brody
Brody10mo ago
have you whitelisted all incoming traffic in atlas?
Zerkley
Zerkley10mo ago
yes, it works now, I just had to redeploy for the changes to take effect, thanks!
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server