File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,13 @@ This will make Django-Prometheus try to export /metrics on port
7676You can then configure Prometheus to collect metrics on as many
7777targets as you have workers, using each port separately.
7878
79+ This approach requires the application to be loaded into each child process.
80+ uWSGI and Gunicorn typically load the application into the master process before forking the child processes.
81+ Set the [ lazy-apps option] ( https://uwsgi-docs.readthedocs.io/en/latest/Options.html#lazy-apps ) to ` true ` (uWSGI)
82+ or the [ preload-app option] ( https://docs.gunicorn.org/en/stable/settings.html#preload-app ) to ` false ` (Gunicorn)
83+ to change this behaviour.
84+
85+
7986## Exporting /metrics in a WSGI application with multiple processes globally
8087
8188In some WSGI applications, workers are short lived (less than a minute), so some
You can’t perform that action at this time.
0 commit comments