R
Railway

✋|help

Railway having issues with Mongoose NPM package???

Ttehcheese9/9/2023
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!!
Ttehcheese9/9/2023
n/a
BBrody9/9/2023
would you happen to be using the private network?
Ttehcheese9/9/2023
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
BBrody9/9/2023
that sounds like a no
go into the service settings and disable private networking
Ttehcheese9/9/2023
Nevr was enabled
Ttehcheese9/9/2023
BBrody9/9/2023
okay thats one possible cause eliminated
this database is hosted on railway correct?
Ttehcheese9/9/2023
no it's not
BBrody9/9/2023
atlas?
Ttehcheese9/9/2023
Yes
BBrody9/9/2023
have you whitelisted all ips in atlas?
Ttehcheese9/9/2023
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
BBrody9/9/2023
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
Ttehcheese9/9/2023
uhugugughu
thanks
Knew there was prolly nothing you could do
BBrody9/9/2023
yeah sorry 😦
its prob just a typo or something, youll get it soon im sure
Ttehcheese9/9/2023
It's weird, cause it works no issues locally
but now has stopped working with railway
BBrody9/9/2023
maybe you are using the wrong environment variable name when connection to the database?
Ttehcheese9/9/2023
I pasted the connection URI directly from my local machine into Railway's environment variables
BBrody9/9/2023
show me the logs?
maybe something will stick out to me
Ttehcheese9/9/2023
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (/app/node_modules/undici/lib/core/connect.js:182:24)
at /app/node_modules/undici/lib/core/connect.js:129:46
at Immediate._onImmediate (/app/node_modules/undici/lib/core/connect.js:170:9)
at processImmediate (node:internal/timers:466:21)

Idk
it's just the standard mongoose timing out thing
BBrody9/9/2023
did you update the mongose package?
Ttehcheese9/9/2023
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
BBrody9/9/2023
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
Ttehcheese9/9/2023
Well it used to work fine
I have no clue why it stopped
BBrody9/9/2023
me neither lol

Looking for more? Join the community!

Recommended Posts
No VAT taxes on invoicesHello everyone I've just joined this server. On my invoices, I don't see any VAT tax prices includeIssue with mounting volumeHello, I have an instance of n8n running, I need to attach a volume to keep community node persistenPin memory usageI'm running a service that scales memory usage unpredictably and quickly, and it crashes in these caVariables redeploy infoSometimes when I don't have an active deployment and I change the variables it triggers a redeploy bStatic IPsIs there any updates for static IPs? I would love to use Railway for a Discord bot so everything is Prebuilt Mqtt Service and PortsLooking for some guidance. Currently have a couple different services in my project, including a posMySQL queries timeout or lead to blank screen on web versionFor the last 2 days or so I've been running into some problems with my personal project database. ItAdonisjs Migration - MySQL using password noTrying to deploy an app on railway with adonisjs and a MySQL database, I can get the web app runningGraalVMHi, is it possible to build a graalvm image in nixpacks? https://github.com/railwayapp/nixpacks/issuDebugging issuesIs their someway to get into filesystem so I can debug production errors a0aaa94d-45ad-410c-bcae-31Debugging issuesIs their somehow to get into file system? or the built filesEnabled mlockHi everyone, I'm currently creating a template for the hashicorp vault service (https://developer.hSubscription already existsI can't enable the developer plan, the system returns the message: "Subscription already exists"simple socket server got timeout errorhi i have a simple question if i have a java simple sever (spring boot) and in my app in another porCheck SuitesI'm looking for a feature that could allow to deploy if failed build So I try to use Check Suites bTypeError: fetch failed error without much description in the logsFull error below: TypeError: fetch failed at Object.fetch (/app/node_modules/next/dist/compiled/unRenamed user/organization for GitHub - unsafe?A student organization I work with has a cron job service for our database, and it's linked with ourContainer Failed to StartError Response from Daemonssh tunneling errorWhen trying to deploy a django project the following error occurs "raise ValueError('No password or Paths not working when deployed to railway but works in local environmentCurrently making a vite/typescript/react project that has working route handling locally but does no