canonical / prometheus-juju-exporter

prometheus-juju-exporter snap collects machines' running status in all models under a Juju controller.
GNU General Public License v3.0
2 stars 8 forks source link

Disconnect each model to prevent memory leak. #14

Closed mkalcok closed 1 year ago

mkalcok commented 1 year ago

If models are not disconnected, libjuju keeps alive websocket connections to them. This, over time, massively increases memory usage as the connections are never terminated.

This is a lightweight alternative solution to #13 . I'm currently running long tests to be completely sure that memory usage is fixed but so far it looks promissing.