man-group / arctic

High performance datastore for time series and tick data
https://arctic.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
3.06k stars 583 forks source link

What's the recommended way to clean up connections when program completes? #870

Closed at-cf closed 4 years ago

at-cf commented 4 years ago

I have a system that uses Arctic and my workers get spawned frequently/randomly, if they open connections to Mongo through Arctic, how should I clean them up properly? arctic.reset()? I don't want to exhaust Mongo's connection pool and depend on timeout to clean up, that's poor practice.

shashank88 commented 4 years ago

.reset() should close all connections, are you seeing leakage after running it?

at-cf commented 4 years ago

No sir, for some reason I was seeing reconnect and thought reset() might be intended to reconnect, but this was my mistake. Thank you.