From db8f4c44ddb04c7a5c049dc2c3ebf7f5652ee0f5 Mon Sep 17 00:00:00 2001 From: lashman Date: Fri, 13 Nov 2026 01:46:46 +0200 Subject: [PATCH] cap nginx workers for small instances --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index ba057ad..a75ed67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,7 @@ FROM nginx:1.27-bookworm # render ssh needs ~/.ssh for the running user and an unlocked root RUN mkdir -p /root/.ssh && chmod 0700 /root/.ssh && usermod --unlock root +# auto workers counts host cpus, not the instance quota +RUN sed -i 's/worker_processes auto;/worker_processes 2;/' /etc/nginx/nginx.conf + COPY nginx.render.conf /etc/nginx/conf.d/default.conf