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.
This commit is contained in:
parent
76dd8059bb
commit
e70e67211e
1 changed files with 9 additions and 3 deletions
|
@ -260,12 +260,20 @@
|
||||||
path: /srv/impress-2020/cron-logs
|
path: /srv/impress-2020/cron-logs
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Set up cron jobs
|
- name: Set up modeling cron jobs
|
||||||
cron:
|
cron:
|
||||||
name: model-needed-items
|
name: model-needed-items
|
||||||
minute: "*/10" # Every 10 minutes
|
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"
|
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
|
- name: Install dependencies for the npm module node-canvas
|
||||||
become: yes
|
become: yes
|
||||||
apt:
|
apt:
|
||||||
|
@ -277,7 +285,6 @@
|
||||||
- libjpeg-dev
|
- libjpeg-dev
|
||||||
- libgif-dev
|
- libgif-dev
|
||||||
- librsvg2-dev
|
- librsvg2-dev
|
||||||
|
|
||||||
- name: Install Playwright system dependencies
|
- name: Install Playwright system dependencies
|
||||||
# NOTE: I copied the package list from the source list for
|
# NOTE: I copied the package list from the source list for
|
||||||
# `npx playwright install-deps`, which I couldn't get running in
|
# `npx playwright install-deps`, which I couldn't get running in
|
||||||
|
@ -327,7 +334,6 @@
|
||||||
- libxfixes3
|
- libxfixes3
|
||||||
- libxrandr2
|
- libxrandr2
|
||||||
- libxshmfence1
|
- libxshmfence1
|
||||||
|
|
||||||
- name: Enable user namespace cloning for Chromium sandboxing
|
- name: Enable user namespace cloning for Chromium sandboxing
|
||||||
become: yes
|
become: yes
|
||||||
ansible.posix.sysctl:
|
ansible.posix.sysctl:
|
||||||
|
|
Loading…
Reference in a new issue