How do I increase the number of allowed file system watchers inside a toolbox container?

Hi! I tried to increase the number of allowed file system watchers inside a toolbox container with the following command:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

I’m getting these errors:

sudo: setrlimit(RLIMIT_CORE): Operation not permitted
fs.inotify.max_user_watches=524288
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
sysctl: permission denied on key 'fs.inotify.max_user_watches'
sysctl: permission denied on key 'fs.inotify.max_user_watches'
sysctl: permission denied on key 'fs.inotify.max_user_watches'

Is there any way I can do this?

Same issue here, I’m also interested by a solution.

You usually do that on the host and the container inherits the setting

3 Likes

Thanks, it works for me :slight_smile:

1 Like

Works for me too, thank you very much @returntrip!

1 Like