I'm using django-prometheus in multiprocess mode, and I've noticed the time to fetch metrics increases the longer the server has been running. Currently I've got 5414 *.db files in prometheus_multiproc_dir.
MultiProcessCollector.collect reads all db files which I suspect is the bottleneck.
mark_process_dead only removes gauge files.
Do you think it'd be feasible to remove all files by copying the contents of type_{pid}.db files into a single type_old.db file? Or is this something that should be solved in django-prometheus?
I'm using django-prometheus in multiprocess mode, and I've noticed the time to fetch metrics increases the longer the server has been running. Currently I've got 5414
*.dbfiles inprometheus_multiproc_dir.MultiProcessCollector.collectreads all db files which I suspect is the bottleneck.mark_process_deadonly removes gauge files.Do you think it'd be feasible to remove all files by copying the contents of
type_{pid}.dbfiles into a singletype_old.dbfile? Or is this something that should be solved in django-prometheus?