External MongoDb failing connection after redeployment (without code changes)

javigaralva
HOBBY

2 months ago

After a redeployment (without code changes) one of my services (telegram bot with external connection to MongoDb) has started to fail. It seams it's a connection timeout error.

Error: querySrv ETIMEOUT mongodb.tcp.cluster0.wuyzb.mongodb.net

at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:275:17) {

errno: undefined,

code: 'ETIMEOUT',

syscall: 'querySrv',

hostname: '_mongodb._tcp.cluster0.wuyzb.mongodb.net'

I tried to do a lot of things:

I'm not sure if is something regarding the new metal change. It's wired that without any code changes, after a redeployment (due to crash) the service start to fail.

Any ideas?

Thanks!

Solved$10 Bounty

1 Replies

javigaralva
HOBBY

2 months ago

Solved removing the railway.json file

{
    "$schema": "https://railway.app/railway.schema.json",
    "build": {
      "builder": "NIXPACKS"
    },
    "deploy": {
      "runtime": "UNSPECIFIED",
      "numReplicas": 1,
      "sleepApplication": false,
      "restartPolicyType": "ON_FAILURE",
      "restartPolicyMaxRetries": 10
    }
  }

Status changed to Solved chandrika 2 months ago


External MongoDb failing connection after redeployment (without code changes) - Railway Help Station