Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapcraft/commands/daemon.start: bump fs.inotify.max_user_watches #361

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ if [ "$(stat -c '%u' /proc)" = 0 ]; then
fi
fi

if [ -e /proc/sys/fs/inotify/max_user_watches ]; then
if [ "$(cat /proc/sys/fs/inotify/max_user_watches)" -lt "1048576" ]; then
echo "==> Increasing the number of inotify user watches"
echo 1048576 > /proc/sys/fs/inotify/max_user_watches || true
fi
fi

if [ -e /proc/sys/kernel/keys/maxkeys ]; then
if [ "$(cat /proc/sys/kernel/keys/maxkeys)" -lt "2000" ]; then
echo "==> Increasing the number of keys for a nonroot user"
Expand Down