-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support for auto reconnect #14
Comments
can you give more details on this? Is this an option that should be set? |
Some other mongodb drivers have an option, called something like Examples from other drivers:
|
Why not always attempt to automatically re-connect? I am wondering if this is functionality that can be built into resource-pool rather than mongoDB. Probably should switch to resource-pool before trying to implement this. |
Automatic reconnect by default? That would work for me as well :) |
I saw this in my error logs:
Is that what you saw also? (Minus the Persist wrapper if you aren't using persistent) |
I don't have access the the logs anymore. But the symptom was that after I restarted, the application didn't work anymore. |
after you restarted the database? |
Oh, I deleted too much text while editing the comment, should have read 'after I restarted mongodb, the app...' |
I was easily able to write a one-off for mongodb-queue that does this https://github.com/docmunch/haskell-mongodb-queue/blob/master/Database/MongoDB/Queue.hs#L158 |
It would be nice to have this option so that the driver automatically reconnects to the server if the connection goes down.
The text was updated successfully, but these errors were encountered: