From e70e67211ea8da478cf2c8fca88826d084512083 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 15 Oct 2023 14:43:41 -0700 Subject: [PATCH] Restart the app every 8 minutes Idk why it's memory leaking so hard lately? But let's uhhh just reboot it a ton for now, while we continue to work on migrating workloads offa there. --- deploy/playbooks/setup.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/deploy/playbooks/setup.yml b/deploy/playbooks/setup.yml index 113b431..29c15d5 100644 --- a/deploy/playbooks/setup.yml +++ b/deploy/playbooks/setup.yml @@ -260,12 +260,20 @@ path: /srv/impress-2020/cron-logs state: directory - - name: Set up cron jobs + - name: Set up modeling cron jobs cron: name: model-needed-items minute: "*/10" # Every 10 minutes job: "cd /srv/impress-2020/current && yarn model-needed-items 2>&1 > /srv/impress-2020/cron-logs/model-needed-items.log" + # Idk why the app has been so memory leaky lately, but let's just restart it + # like *constantly* tbh. + - name: Set up cron job to restart the app + cron: + name: restart-impress-2020 + minute: "*/8" # Every 8 minutes + job: "pm2 restart impress-2020" + - name: Install dependencies for the npm module node-canvas become: yes apt: @@ -277,7 +285,6 @@ - libjpeg-dev - libgif-dev - librsvg2-dev - - name: Install Playwright system dependencies # NOTE: I copied the package list from the source list for # `npx playwright install-deps`, which I couldn't get running in @@ -327,7 +334,6 @@ - libxfixes3 - libxrandr2 - libxshmfence1 - - name: Enable user namespace cloning for Chromium sandboxing become: yes ansible.posix.sysctl: