Skip to content

Commit

Permalink
Elastic Beanstalk: restart the app every day to clean up memory bloat.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Nov 21, 2021
1 parent eb01d24 commit 341fe24
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .ebextensions/30-restart.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://github.com/puma/puma/blob/master/docs/restart.md
# Restart puma every day to clean up memory bloat.

files:
/opt/restart-app:
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash -ex
kill -SIGUSR1 $(cat /var/pids/web.pid)

/etc/cron.d/restart:
mode: "000644"
owner: root
group: root
content: |
@daily root /opt/restart-app

0 comments on commit 341fe24

Please sign in to comment.