Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running app with Gunicorn #3

Open
dmartincc opened this issue Jan 7, 2017 · 3 comments
Open

Running app with Gunicorn #3

dmartincc opened this issue Jan 7, 2017 · 3 comments

Comments

@dmartincc
Copy link

When running a flask app with Gunicorn the metrics monitoring doesn't work, do you plan to setup a multithreading capability for multiple workers?

@amitsaha
Copy link

django-prometheus implemented a strategy where if you have multiple workers, the HTTP server for metric will be attempted to be started on a range of ports. Perhaps that's an idea?

@sashgorokhov
Copy link

@dmartincc You can set a prometheus_multiproc_dir environment variable, so that prometheus will handle multiprocess by itself. It is undocumented feature. Note that you must create that directory yourself before any of the metrics will be collected.

See https://github.com/prometheus/client_python/blob/master/prometheus_client/core.py#L461

@bagguo
Copy link

bagguo commented Dec 31, 2023 via email

Repository owner deleted a comment from tobarbaro Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants