04/04/2023, 1:37 PM
Hi, I'm running Rancher Desktop 1.8.1 on Windows 11 and have suddenly started having all ASP.NET containers fail with the following error and just wondering if anyone else has had the same issue or knows a fix, thanks
Unhandled exception. System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached.
at <http://System.IO|System.IO>.FileSystemWatcher.StartRaisingEvents()
at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
`at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)`
at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
I've tried increasing fs.inotify.max_user_instances and fs.inotify.max_user_watches via a provisioning script in
%AppData%\rancher-desktop\provisioning\fix.start Contents:
sysctl -w fs.inotify.max_user_instances=262144
sysctl -w fs.inotify.max_user_watches=262144
sysctl -w vm.max_map_count=262144
As far as I can tell that has no effect on the running values though
I recently updated from 1.7
Modifying the values directly works but I assume it may not be persisted
wsl -d rancher-desktop
sysctl -w fs.inotify.max_user_instances=262144
sysctl -w fs.inotify.max_user_watches=262144
You can also set an environment variable to disable the config file watching per container if you don't require it:
But, it would be nice to get the provisioning approach working