zombie-curls

This commit is contained in:
olli 2024-07-03 15:40:15 +02:00
parent 7df9373094
commit 3978e8c71b

View File

@ -509,6 +509,29 @@
# validate: /bin/bash -n %s # validate: /bin/bash -n %s
# notify: run matrix.update # 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: handlers:
- name: run genpw.sh - name: run genpw.sh