Run while true; do echo $(date -u +"%Y-%m-%d %H:%M:%S") $(sudo lsof -p $(pgrep -f mongodb_exporter) | wc -l); sleep 5; done and you will see increases over all time
How to test
With Standalone Exporter
Extract MongoDB exporter from client archive (in feature build).
Run exporter against Mongo instance with: ./mongodb_exporter --log.level=debug --collector.pbm --web.listen-address 0.0.0.0:9216
While exporter is running, watch opened client connections (while true; do echo $(date -u +"%Y-%m-%d %H:%M:%S") $(sudo lsof -p $(pgrep -f mongodb_exporter) | wc -l); sleep 5;).
Number of opened connections should remain stable over time (For comparison, do the same for current released version, the number of opened connections will be increasing).
Alternative (within PMM).
Set up MongoDB instance with PMM.
View the number of total allocations in the Explore tab (go_memstats_alloc_bytes_total), it should increase relatively slower compared to current version.
How to document
None
FB test
None
Attachments
1
Screenshot 2024-10-16 at 10.12.19.png
16 Oct, 2024
Activity
Nailya Kutlubaeva
October 16, 2024 at 11:13 AM
CPU and Memory usage is better but the problem is still exists
MongoDB exporter doesn't close connections, and this leads to increasingly high memory consumption.
Example reports from community:
https://github.com/percona/mongodb_exporter/issues/924
https://github.com/percona/mongodb_exporter/issues/927
https://github.com/percona/mongodb_exporter/issues/922
Steps to reproduce the behavior:
Install
mongodb_exporter
0.41.1Run
while true; do echo $(date -u +"%Y-%m-%d %H:%M:%S") $(sudo lsof -p $(pgrep -f mongodb_exporter) | wc -l); sleep 5; done
and you will see increases over all time