From 3978e8c71bd1f8fc859357660035d10d5b8bfc95 Mon Sep 17 00:00:00 2001 From: olli <> Date: Wed, 3 Jul 2024 15:40:15 +0200 Subject: [PATCH] zombie-curls --- matrix.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/matrix.yml b/matrix.yml index 82c18e4..3c25a02 100644 --- a/matrix.yml +++ b/matrix.yml @@ -509,7 +509,30 @@ # validate: /bin/bash -n %s # notify: run matrix.update - + - name: /usr/local/sbin/runchecks.d/matrix.check + blockinfile: + path: /usr/local/sbin/runchecks.d/matrix.check + mode: "0400" + owner: root + group: root + create: yes + marker: "# {mark} ANSIBLE MANAGED BLOCK" + block: | + egrep "^State:.+D \(|State:.+Z \(|State:.+R \(" /proc/[0-9]*/status | cut -d/ -f3 | while read dzpid + do + if find ${g_tmp}/proc-check/$dzpid -mmin +30 | grep -q $dzpid + then + if ps auxn | egrep -q "3000.*$dzpid.+ Z " + then + #g_echo_warn "Killing synapse server because of zombie curls" + kill $(pgrep -f "/usr/local/bin/python -m synapse.app.homeserver --config-path /data/homeserver.yaml") + sleep 2 + fi + fi + done + backup: yes + validate: /bin/bash -n %s + handlers: - name: run genpw.sh ansible.builtin.shell: ./genpw.sh