Skip to content

Commit b374745

Browse files
authored
Merge pull request #21599 from prezha/fix-fs.inotify-limits
set sysctl params for inotify, to avoid 'too many open files' errors
2 parents 53b5dcb + 0e4fa50 commit b374745

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hack/jenkins/common.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ if [ "$(uname)" = "Darwin" ]; then
8989
fi
9090
fi
9191

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

0 commit comments

Comments
 (0)