Skip to content

Commit 9aa180d

Browse files
authored
Merge pull request #137 from kingdonb/gunicorn-workers
feat(controller): permit setting GUNICORN_WORKERS
2 parents 3aab23d + 787faf4 commit 9aa180d

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

charts/controller/templates/controller-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ spec:
7373
value: "{{ .Values.global.registry_location }}"
7474
- name: "DEIS_REGISTRY_SECRET_PREFIX"
7575
value: "{{ .Values.global.secret_prefix }}"
76+
- name: "GUNICORN_WORKERS"
77+
value: "{{ .Values.global.gunicorn_workers }}"
78+
- name: "CONN_MAX_AGE"
79+
value: "{{ .Values.global.conn_max_age }}"
7680
- name: "SLUGRUNNER_IMAGE_NAME"
7781
valueFrom:
7882
configMapKeyRef:

charts/controller/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ global:
4949
host_port: 5555
5050
# Prefix for the imagepull secret created when using private registry
5151
secret_prefix: "private-registry"
52+
# Clusters with large nodes (24 CPU+) may need to lower or tune the number of GUNICORN_WORKERS.
53+
#
54+
# Default value is based on your number of CPUs:
55+
# - (os.cpu_count() or 4) * 4 + 1
56+
# This setting probably should not be higher than max_connections which defaults to 100
57+
# gunicorn_workers: 13
58+
# If there are enough gunicorn workers to use up max_connections, you may also want to reduce CONN_MAX_AGE
59+
# so health checks time out their connection faster and don't use all available connections
60+
#
61+
# Valid values are a number of seconds, or 0 to disable persistent connections.
62+
# Setting the value to "None" will ensure that connections are never timed out.
63+
# - 0
64+
# - 600
65+
# - "None"
66+
# conn_max_age: 600
5267
# Experimental feature to toggle using kubernetes ingress instead of the Deis router.
5368
#
5469
# Valid values are:

0 commit comments

Comments
 (0)