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