From 4f26daa0b0cc8304fa75f73efa8ed18ff17da85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Mrekaj?= Date: Mon, 8 Apr 2024 17:38:27 +0200 Subject: [PATCH] increase worker_connections per worker process (#1328) * increase worker_connections per worker process * Auto commit - update kustomization.yaml --------- Co-authored-by: CI/CD pipeline --- manifests/claudie/kustomization.yaml | 2 +- services/ansibler/templates/conf.gotpl | 2 +- services/ansibler/templates/nginx.goyml | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/manifests/claudie/kustomization.yaml b/manifests/claudie/kustomization.yaml index 7d2b0a4c7..6ea409847 100644 --- a/manifests/claudie/kustomization.yaml +++ b/manifests/claudie/kustomization.yaml @@ -58,7 +58,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: ghcr.io/berops/claudie/ansibler - newTag: 4f4c7c9-2693 + newTag: 81b00f5-2706 - name: ghcr.io/berops/claudie/autoscaler-adapter newTag: 688726a-1932 - name: ghcr.io/berops/claudie/builder diff --git a/services/ansibler/templates/conf.gotpl b/services/ansibler/templates/conf.gotpl index bc17580e7..91179ed58 100644 --- a/services/ansibler/templates/conf.gotpl +++ b/services/ansibler/templates/conf.gotpl @@ -15,4 +15,4 @@ server { proxy_next_upstream on; } {{- end }} -} \ No newline at end of file +} diff --git a/services/ansibler/templates/nginx.goyml b/services/ansibler/templates/nginx.goyml index dac5570a3..dd99237c4 100644 --- a/services/ansibler/templates/nginx.goyml +++ b/services/ansibler/templates/nginx.goyml @@ -27,6 +27,19 @@ file: path: "/etc/nginx/sites-enabled/default" state: absent + - name: Increase worker connections + ansible.builtin.lineinfile: + path: /etc/nginx/nginx.conf + regexp: '^(\s*)worker_connections (\d+);' + backrefs: yes + line: '\1worker_connections 65535;' + - name: Ensure worker_rlimit_nofile is set + ansible.builtin.blockinfile: + path: /etc/nginx/nginx.conf + block: | + worker_rlimit_nofile 65535; + insertbefore: '^events {' + marker: "# {mark} ANSIBLE MANAGED BLOCK" - name: restart nginx service: name: nginx