Does GCCollector work in multiprocess mode?
Hi all,
First of all sorry if the question is kinda stupid, I would not ask if the answer was evident somewhere to me, but I'm interested to find out does GC reporting works in multiprocess (gunicorn) mode of work. As when I have used this client in multiprocess mode with gunicorn I did not get any metrics about GC at all out of the box, I needed to write my own metric.
I took a look through old issues at this project and managed to find some related to this problem:
- https://github.com/prometheus/client_python/issues/322
And I saw that implementation of GCCollector uses get_stats() from Python module, there is no custom callback in this code (lock is still there to manage files) so I'm somewhat confused does this work or not, because, it seems to me that this gc.get_stats can be used as any other metric where you would report GC metrics per PID (this is little too much of data but still) and just for example set gauge to some value when reporting.
AM I missing something here or?
Thank you :)
Hello, as you found when looking through old issues GCCollector caused deadlocks. Generally, custom collectors are not supported by multi-process (documented in the README), so therefore the GCCollector is also not supported.