-
Notifications
You must be signed in to change notification settings - Fork 102
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
maxIdleTimeMS support #272
Comments
I can't say for sure, need to check the code if this setting is considered. But I think connection will reestablish automatically if dropped due to idleness. Are your connections really idle? Do you send queries so rarely? I mean are you sure these issues are really caused by Btw, are you using MongoDB or CosmosDB? If latter, please try this version of TxMongo: #261 . CosmosDB doesn't support legacy version of Mongo's wire protocol. This PR adds support for newer protocol. |
Thanks for fast reply! Here is what I've also noticed (while using legacy wire protocol): Also, I'm using only |
After some investigations, I've noticed that tx-mongo receives pings uninterruptedly for the whole time, but somehow during that, deferred are not resolving themselves (no callback is present) for a very long time and eventually |
Is it possible to reproduce the issue with some minimal script? It would be great if you can give me access to a test instance of CosmosDB so I could try to reproduce and investigate the issue. Unfortunately, I cannot simply create CosmosDB instance by myself because Azure don't work with private persons from Russia, as far as I know. |
As far I can see in the code,
maxIdleTimeMS
option (url) is currently skipped (as well as keepalive). This is causing idle connection issues on Azure which suggests addingmaxIdleTimeMS=120000
to connection string. Is it currently considered while connecting? Should I take care about these options or just let it reconnect again, re-issue query afterAutoReconnect
exception?The text was updated successfully, but these errors were encountered: