From aef8fbbf52b4f071d7241a6406a83a1a48e0ea7c Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Sun, 7 Mar 2021 20:42:26 +0100 Subject: [PATCH] Implement auto-restart on 500s as dirty last measure. --- app/static/js/main.js | 2 ++ prod.ini | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/app/static/js/main.js b/app/static/js/main.js index a65ae6ad5..da300e21e 100644 --- a/app/static/js/main.js +++ b/app/static/js/main.js @@ -41,6 +41,8 @@ document.addEventListener("DOMContentLoaded", function() { localStorage.setItem("theme", "light"); } }); + // this doesn't really work to prevent focus grabbing by etherpad. + document.getElementById("mini-cli").focus(); }); function processSettings(args){ diff --git a/prod.ini b/prod.ini index ccd513205..eb06f3338 100644 --- a/prod.ini +++ b/prod.ini @@ -1,8 +1,15 @@ [uwsgi] module = app:create_app() +touch-reload = /tmp/agora-restart master = true processes = 50 socket = /tmp/agora-uwsgi.sock chmod-socket = 666 vacuum = true die-on-term = true + +; 500s +metric = 500counter +alarm = errors cmd:touch /tmp/restart +metric-alarm = key=500counter,value=5,alarm=errors,rate=60,reset=0 +final-route-status = 500 metricinc:500counter