Railway having issues with Mongoose NPM package???
Locally my code works fine, I can connect to Mongo using Mongoose no issues
but when on Railway it randomly started timing out instead of connecting!!
26 Replies
Project ID:
N/A
n/a
would you happen to be using the private network?
I'm using a database hosted by MongoDB
The connection URI and Mongoose work and connect fine running my code locally, but as soon as I try to use Railway it sends a timeout error
And the network settings on the database let Railway connect
so
that sounds like a no
go into the service settings and disable private networking
Nevr was enabled
okay thats one possible cause eliminated
this database is hosted on railway correct?
no it's not
atlas?
Yes
have you whitelisted all ips in atlas?
Yes
I believe it was a change in my code, cause I made some big changes and it stopped working
I tried running older code and it worked fine
I'm trying to understand what I need to change to fix it
ah then tbh theres not all that much i could do to help here, review your old comments and see what you have changed in your new comments that could effect it
uhugugughu
thanks
Knew there was prolly nothing you could do
yeah sorry 😦
its prob just a typo or something, youll get it soon im sure
It's weird, cause it works no issues locally
but now has stopped working with railway
maybe you are using the wrong environment variable name when connection to the database?
I pasted the connection URI directly from my local machine into Railway's environment variables
show me the logs?
maybe something will stick out to me
Idk
it's just the standard mongoose timing out thing
did you update the mongose package?
I did, but I'm pretty sure it started before I updated it
I'll try moving it back down to where it was when it was working
Downgrading it didn't fix it
AAAAA AAA A AA AA
I hate HATE weird issues
I definitely changed something in my code to stop it from working but I have
absolutely
no idea what
and why did it only stop working with Railway
well railway is a whole different environment, docker, ubuntu, default node 16, nix os, etc. not everything will always just work like it does locally, thats not necessarily a platform problem, but just comes with deploying to cloud infrastructure
Well it used to work fine
I have no clue why it stopped
me neither lol