chatwoot/deployment
Vishnu Narayanan 775b73d1f9
fix: raise open file descriptor limit to prevent EMFILE errors (#13895)
## Summary
- Adds `LimitNOFILE=65536` to both web and worker systemd service units
- Fixes recurring `Errno::EMFILE` (Too many open files) errors during
peak traffic after deploys

## Context
Puma workers idle at 720-770 open FDs against the default soft limit of
1024, leaving ~250 FDs of headroom. During deploy-triggered instance
refreshes at peak traffic, concurrent requests exhaust the remaining
FDs, causing EMFILE across all web instances.

3 incidents in March 2026 with escalating event counts. The hard limit
is already 524288, so this just raises the soft limit to a standard
production value.

Self-hosted instances pick this up automatically via `cwctl --upgrade`.

Fixes
https://linear.app/chatwoot/issue/CW-6685/errnoemfile-too-many-open-files-rb-sysopen
2026-03-24 17:37:07 -07:00
..
chatwoot feat: add chatwoot ctl(cwctl) cli tool (#4836) 2022-06-22 23:39:01 +05:30
chatwoot-web.1.service fix: raise open file descriptor limit to prevent EMFILE errors (#13895) 2026-03-24 17:37:07 -07:00
chatwoot-web.target feat: allow setting up only web/worker deployments for linux (#12004) 2025-07-22 12:54:25 +04:00
chatwoot-worker.1.service fix: raise open file descriptor limit to prevent EMFILE errors (#13895) 2026-03-24 17:37:07 -07:00
chatwoot-worker.target feat: allow setting up only web/worker deployments for linux (#12004) 2025-07-22 12:54:25 +04:00
chatwoot.target Feature: Add installation script (#776) 2020-05-05 01:59:38 +05:30
nginx_chatwoot.conf chore: Improve Nginx settings for speed and security (#5144) 2022-10-03 17:43:50 +05:30
setup_18.04.sh chore: Update ruby and docker base image to 3.0.4 (#4693) 2022-05-27 17:33:24 +05:30
setup_20.04.sh chore: upgrade node to 24.x LTS (#13004) 2026-01-12 18:10:23 +05:30