Add Documentation for the Too Many Files Open Error
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
During a recent deployment of an EC2 instance I ran into the following error:
```
...
2026-08-05 09:22:27.9518 ERROR [NewFileWatcherChannel @ filewatcherchannel.go.104] [ssm-agent-worker] [MessageService] [Association] [associationId=] [OutOfProcExecuter] [.2026-08-05T09-22-27.928Z] filewatcher listener encountered error when start watcher: too many open file
...
```
I've seen that quite a few people have this issue. We initially tried to increase `fs.nr_open` and `file-max`, which didn't work. After some further research we eventually stumbled on this comment [^1] from @torson, which resolved our issue:
> It turned out another configuration tweak was needed:
> ```
> echo fs.inotify.max_user_watches=524288 >> /etc/sysctl.conf
> echo fs.inotify.max_user_instances=256 >> /etc/sysctl.conf
> sysctl -p
> ```
> This then ultimately solved the issue.
It would be nice to have this mentioned somewhere, may it be in the FAQ, the troubleshooting guide, or somewhere else easily accessible.
[^1]: https://github.com/aws/amazon-ssm-agent/issues/330#issuecomment-1563229665
Contributor guide
Research direction
Start by locating the repository's existing FAQ or troubleshooting guide, then review issue #330 and its linked comment for the confirmed inotify settings. Document the too-many-open-files symptom, the relevant sysctl configuration, and where users should find it; done means the guidance is accessible in the selected documentation location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, linux
- Domain
- documentation, operating-systems
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100