From 8a4a4469e49d76d6c7191dd641603160df8866e3 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sun, 22 Jan 2023 13:51:23 -0800 Subject: [PATCH] proxies: Override the httpd systemd unit file to up file limit and restart on failure The proxies seem to be hitting file limits, so try increasing them. Also, set httpd to restart on failure, this should help mask the problem if it persists with the higher limit. Signed-off-by: Kevin Fenzi --- roles/httpd/proxy/files/httpdoverride.conf | 3 +++ roles/httpd/proxy/tasks/main.yml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 roles/httpd/proxy/files/httpdoverride.conf diff --git a/roles/httpd/proxy/files/httpdoverride.conf b/roles/httpd/proxy/files/httpdoverride.conf new file mode 100644 index 0000000000..8b1e8d0bbe --- /dev/null +++ b/roles/httpd/proxy/files/httpdoverride.conf @@ -0,0 +1,3 @@ +[Service] +LimitNOFILE=98304 +Restart=on-failure diff --git a/roles/httpd/proxy/tasks/main.yml b/roles/httpd/proxy/tasks/main.yml index fac12fb3e0..2bb2766c65 100644 --- a/roles/httpd/proxy/tasks/main.yml +++ b/roles/httpd/proxy/tasks/main.yml @@ -97,3 +97,19 @@ - httpd - httpd/proxy - disablesystemdoomd + +- name: create systemd drop in dir for httpd + file: path=/etc/systemd/system/httpd.service.d/ state=directory + tags: + - httpd + - httpd/proxy + - httpdoverride + +- name: create systemd drop in dir for httpd + copy: src=httpdoverride.conf dest=/etc/systemd/system/httpd.service.d/httpdoverride.conf + tags: + - httpd + - httpd/proxy + - httpdoverride + notify: + - reload systemd