Merge pull request #21599 from prezha/fix-fs.inotify-limits

set sysctl params for inotify, to avoid 'too many open files' errors
pull/21607/head
Medya Ghazizadeh 2025-09-20 11:44:45 -07:00 committed by GitHub
commit b374745bd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -89,6 +89,13 @@ if [ "$(uname)" = "Darwin" ]; then
fi
fi
## set sysctl params for inotify, to avoid "too many open files" errors
## ref: https://cloud.google.com/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/configure-os/ubuntu
if [ "$OS" == "linux" ]; then
sudo sysctl -w fs.inotify.max_user_instances=8192
sudo sysctl -w fs.inotify.max_user_watches=524288
fi
# We need pstree for the restart cronjobs
if [ "$(uname)" != "Darwin" ]; then
sudo apt-get -y install lsof psmisc dnsutils