Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"server instance pool was destroyed" in a persistence service with mongo when mongo db restarts #333

Open
developez opened this issue Nov 28, 2022 · 2 comments

Comments

@developez
Copy link

I got a persistence service that uses mongo. When mongo restarts, the persistence service returns "server instance pool was destroyed". I think in reset the persistence service when that thing happens. Is there another idea to deal with this???

Moleculer 0.14.12

@intech
Copy link
Member

intech commented Nov 28, 2022

Are you using moleculer-db-adapter-mongo?

@icebob icebob transferred this issue from moleculerjs/moleculer Dec 4, 2022
@zoernert
Copy link

I could confirm that this happens on a Mongo service restart (maybe due to memory) - the pool is not reestablished if the mongo service is down for more than 40 seconds during restart. It should be possible to fix using connection parameters and setting the retry timeout to a higher value:

new MongoDBAdapter("Connection URI",{
            poolSize: 100,
            wtimeout: 2500,
            connectTimeoutMS: 10000,
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants