Skip to content

Commit

Permalink
Disable uswgi cheaper mode in the Python 3 base dockerfile (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre authored Nov 19, 2019
1 parent d7655a7 commit f6dd168
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions Docker/python-nginx/python3.6-alpine3.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,12 @@ COPY supervisord.ini /etc/supervisor.d/supervisord.ini
# Which uWSGI .ini file should be used, to make it customizable
ENV UWSGI_INI /app/uwsgi.ini

# By default, run 2 processes
ENV UWSGI_CHEAPER 2

# By default, when on demand, run up to 16 processes
ENV UWSGI_PROCESSES 16
# By default, disable uwsgi cheaper mode and run 2 processes.
# If UWSGI_CHEAPER=N and UWSGI_PROCESSES=M, N is the min and M is the max
# number of processes. UWSGI_CHEAPER must be lower than UWSGI_PROCESSES.
# We set them here instead of in uwsgi.ini so that they can be overwritten.
ENV UWSGI_CHEAPER=
ENV UWSGI_PROCESSES=2

# By default, allow unlimited file sizes, modify it to limit the file sizes
# To have a maximum of 1 MB (Nginx's default) change the line to:
Expand Down
2 changes: 1 addition & 1 deletion Docker/python-nginx/python3.6-alpine3.7/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ socket = /tmp/uwsgi.sock
chown-socket = nginx:nginx
chmod-socket = 664
# Graceful shutdown on SIGTERM, see https://github.com/unbit/uwsgi/issues/849#issuecomment-118869386
hook-master-start = unix_signal:15 gracefully_kill_them_all
hook-master-start = unix_signal:15 gracefully_kill_them_all

0 comments on commit f6dd168

Please sign in to comment.