MongoServerError

I ran into this issue while trying to push an update. The server keeps crashing regardless of what I try. I rolled back to an older update (6 weeks old) and things work fine. I have a "DEV" env that is on railway as well, however that env uses mongoAtlas directly instead of using the service on railway and no issues there. Any help would be greatly appreciated. Thank you. ProjectID:
dd3f3852-bec4-439c-b5a8-0765d555c6dc
dd3f3852-bec4-439c-b5a8-0765d555c6dc
No description
Solution:
the default MongoDB database is not a replica set, if you need a replica set please use this template that a team member has put together - https://railway.app/template/gFmvuY...
Jump to solution
11 Replies
Percy
Percy6mo ago
Project ID: dd3f3852-bec4-439c-b5a8-0765d555c6dc
Solution
Brody
Brody6mo ago
the default MongoDB database is not a replica set, if you need a replica set please use this template that a team member has put together - https://railway.app/template/gFmvuY
iceman8706
iceman8706OP6mo ago
so this is happening because the replica in the settings ?
Brody
Brody6mo ago
databases cannot have replicas you need to use the template I link if you need a mongo replica set
iceman8706
iceman8706OP6mo ago
I dont and to my knowledge the only place I see it is in the railway settings.. is that where this is coming from ?
Brody
Brody6mo ago
read my first message again please
iceman8706
iceman8706OP6mo ago
my question remains the same.
Brody
Brody6mo ago
my answer remains the same, again, if you need a mongo replica set you need to deploy the template it has nothing to do with the replica setting in the service
iceman8706
iceman8706OP6mo ago
I dont need replica set, I've double checked my codebase and it's not configured, setup, initialized or other there, I asked about the service related replica setting as that is the only thing even remotely close to the issue.
Brody
Brody6mo ago
please read your own error logs, it clearly states that what you're doing requires a mongo replica set. again none of this has anything to do with the replica setting in the service, that's something else entirely.
iceman8706
iceman8706OP6mo ago
just incase anyone else runs into this issue, it was being caused by
.watch()
.watch()
which uses mongoDB change streams.
Want results from more Discord servers?
Add your server