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:
Enable whilelist in mongo (I had
0.0.0.0/0
already but I added these ones: https://station.railway.com/questions/connecting-to-external-mongodb-828dc4c3#sg95) -> Not workingChange to private network -> Not working -> and now I can't disable it
Change to different regions -> Not working
Create a simple script with a Mongodb test connection example from their Atlas Mongo doc page -> Not working
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!
1 Replies
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