From 574e97ec6a3f3cd8d8da5ee3d99d0430c3a085c2 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 13 Oct 2021 11:50:35 -0400 Subject: [PATCH] Fine tune nginx config While doing a large number of Debian package builds, it was observed that aptly database would lockup, causing concerrency issues between nginx and aptly. This would ultimately prevent nginx to serve Debian packages. It was determined that running nginx in daemon mode would work around this issue. Tested by running sequential package builds of 1, 10, 50, and 100 of the tsconfig package. After this change the lockup issues were not present. Story: 2008846 Task: 43626 Signed-off-by: Charles Short Change-Id: I278d6f494848030fb13c470e65fee5f6f2c3eb2f --- stx/dockerfiles/stx-aptly.Dockerfile | 1 - stx/toCOPY/aptly/supervisord.nginx.conf | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stx/dockerfiles/stx-aptly.Dockerfile b/stx/dockerfiles/stx-aptly.Dockerfile index cedc01a9..b3a39f5a 100644 --- a/stx/dockerfiles/stx-aptly.Dockerfile +++ b/stx/dockerfiles/stx-aptly.Dockerfile @@ -65,7 +65,6 @@ COPY stx/toCOPY/aptly/aptly.conf /etc/aptly.conf COPY stx/toCOPY/aptly/supervisord.aptly.conf /etc/supervisor/conf.d/aptly.conf # Configure Nginx -RUN echo "daemon off;" >> /etc/nginx/nginx.conf COPY stx/toCOPY/aptly/nginx.conf.template /etc/nginx/nginx.conf.template COPY stx/toCOPY/aptly/supervisord.nginx.conf /etc/supervisor/conf.d/nginx.conf diff --git a/stx/toCOPY/aptly/supervisord.nginx.conf b/stx/toCOPY/aptly/supervisord.nginx.conf index dbd9b95d..08716971 100644 --- a/stx/toCOPY/aptly/supervisord.nginx.conf +++ b/stx/toCOPY/aptly/supervisord.nginx.conf @@ -1,4 +1,5 @@ [program:nginx] -command=/usr/sbin/nginx +# "daemon off" should be used in Docker or under Supervisord +command=/usr/sbin/nginx -g "daemon off;" redirect_stderr=true stdout_logfile_maxbytes=1MB