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
76
76
You can then configure Prometheus to collect metrics on as many
77
77
targets as you have workers, using each port separately.
78
78
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
+
79
86
## Exporting /metrics in a WSGI application with multiple processes globally
80
87
81
88
In 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