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
Project ID:
N/A
N/A
deploy logs please https://bookmarklets.up.railway.app/log-downloader/
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?
your deployments are on shared dynamic ips, you would need to allow all incoming traffic
okay, gonna try redeploying with the 0.0.0.0/0 and see
have you whitelisted all incoming traffic in atlas?
yes, it works now, I just had to redeploy for the changes to take effect, thanks!
no problem!