Skip to content

Commit de1f539

Browse files
uwsgi: default to 4 processes x 4 threads (#13080)
1 parent 44cbfec commit de1f539

7 files changed

Lines changed: 12 additions & 51 deletions

File tree

Dockerfile.django-alpine

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ ENV \
132132
DD_INITIALIZE=true \
133133
DD_UWSGI_MODE="socket" \
134134
DD_UWSGI_ENDPOINT="0.0.0.0:3031" \
135-
DD_UWSGI_NUM_OF_PROCESSES="2" \
136-
DD_UWSGI_NUM_OF_THREADS="2"
135+
DD_UWSGI_NUM_OF_PROCESSES="4" \
136+
DD_UWSGI_NUM_OF_THREADS="4"
137137
ENTRYPOINT ["/entrypoint-uwsgi.sh"]
138138

139139
FROM django AS django-unittests

Dockerfile.django-debian

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ ENV \
135135
DD_INITIALIZE=true \
136136
DD_UWSGI_MODE="socket" \
137137
DD_UWSGI_ENDPOINT="0.0.0.0:3031" \
138-
DD_UWSGI_NUM_OF_PROCESSES="2" \
139-
DD_UWSGI_NUM_OF_THREADS="2"
138+
DD_UWSGI_NUM_OF_PROCESSES="4" \
139+
DD_UWSGI_NUM_OF_THREADS="4"
140140
ENTRYPOINT ["/entrypoint-uwsgi.sh"]
141141

142142
FROM django AS django-unittests

docker/entrypoint-uwsgi-dev.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ exec uwsgi \
3434
--protocol uwsgi \
3535
--wsgi dojo.wsgi:application \
3636
--enable-threads \
37-
--processes "${DD_UWSGI_NUM_OF_PROCESSES:-2}" \
38-
--threads "${DD_UWSGI_NUM_OF_THREADS:-2}" \
37+
--processes "${DD_UWSGI_NUM_OF_PROCESSES:-4}" \
38+
--threads "${DD_UWSGI_NUM_OF_THREADS:-4}" \
3939
--reload-mercy 1 \
4040
--worker-reload-mercy 1 \
4141
--py-autoreload 1 \

docker/entrypoint-uwsgi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ exec uwsgi \
3636
"--${DD_UWSGI_MODE}" "${DD_UWSGI_ENDPOINT}" \
3737
--protocol uwsgi \
3838
--enable-threads \
39-
--processes "${DD_UWSGI_NUM_OF_PROCESSES:-2}" \
40-
--threads "${DD_UWSGI_NUM_OF_THREADS:-2}" \
39+
--processes "${DD_UWSGI_NUM_OF_PROCESSES:-4}" \
40+
--threads "${DD_UWSGI_NUM_OF_THREADS:-4}" \
4141
--wsgi dojo.wsgi:application \
4242
--buffer-size="${DD_UWSGI_BUFFER_SIZE:-8192}" \
4343
--http 0.0.0.0:8081 --http-to "${DD_UWSGI_ENDPOINT}" \

docs/content/en/open_source/installation/running-in-production.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ handle 4 concurrent connections.
5858
Based on your resource settings, you can tweak:
5959

6060
- `DD_UWSGI_NUM_OF_PROCESSES` for the number of spawned processes.
61-
(default 2)
61+
(default 4)
6262
- `DD_UWSGI_NUM_OF_THREADS` for the number of threads in these
63-
processes. (default 2)
63+
processes. (default 4)
6464

6565
For example, you may have 4 processes with 6 threads each, yielding 24
6666
concurrent connections.

docs/content/en/open_source/performance.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

helm/defectdojo/templates/configmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ data:
4545
DD_UWSGI_ENDPOINT: /run/defectdojo/uwsgi.sock
4646
DD_UWSGI_HOST: localhost
4747
DD_UWSGI_PASS: unix:///run/defectdojo/uwsgi.sock
48-
DD_UWSGI_NUM_OF_PROCESSES: '{{ .Values.django.uwsgi.appSettings.processes | default 2 }}'
49-
DD_UWSGI_NUM_OF_THREADS: '{{ .Values.django.uwsgi.appSettings.threads | default 2 }}'
48+
DD_UWSGI_NUM_OF_PROCESSES: '{{ .Values.django.uwsgi.appSettings.processes | default 4 }}'
49+
DD_UWSGI_NUM_OF_THREADS: '{{ .Values.django.uwsgi.appSettings.threads | default 4 }}'
5050
DD_UWSGI_MAX_FD: '{{ .Values.django.uwsgi.appSettings.maxFd }}'
5151
DD_DJANGO_METRICS_ENABLED: '{{ .Values.monitoring.enabled }}'
5252
NGINX_METRICS_ENABLED: '{{ .Values.monitoring.enabled }}'

0 commit comments

Comments
 (0)