From 56874c442cb1919f8fbbb98898bc51bb1cf90bdd Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Wed, 29 Jan 2025 17:27:58 +0530 Subject: [PATCH] feat: add OOMPolicy for sidekiq systemd service (#10772) - Add OOM policy for `sidekiq` `systemd` service - This ensures `sidekiq` does not consume all the memory available in the system --- deployment/chatwoot-worker.1.service | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deployment/chatwoot-worker.1.service b/deployment/chatwoot-worker.1.service index cbb97e88c..04ee83a69 100644 --- a/deployment/chatwoot-worker.1.service +++ b/deployment/chatwoot-worker.1.service @@ -16,6 +16,11 @@ KillMode=mixed StandardInput=null SyslogIdentifier=%p +MemoryMax=1.5G +MemoryHigh=1.4G +MemorySwapMax=0 +OOMPolicy=stop + Environment="PATH=/home/chatwoot/.rvm/gems/ruby-3.3.3/bin:/home/chatwoot/.rvm/gems/ruby-3.3.3@global/bin:/home/chatwoot/.rvm/rubies/ruby-3.3.3/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin" Environment="PORT=3000" Environment="RAILS_ENV=production"