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

System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached #1200

Closed
emouawad opened this issue Oct 18, 2022 · 2 comments

Comments

@emouawad
Copy link


smtp4dev version 3.2.0-ci20220905102
https://github.com/rnwood/smtp4dev
.NET Core runtime version: .NET 6.0.5

 > For help use argument --help

Install location: /
DataDir: /smtp4dev
A unhandled exception occurred.
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 System.IO.FileSystemWatcher.StartRaisingEvents()
   at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()
   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 Rnwood.Smtp4dev.Program.<>c__DisplayClass8_0.<BuildWebHost>b__0(HostBuilderContext hostingContext, IConfigurationBuilder configBuilder) in /home/vsts/work/1/s/Rnwood.Smtp4dev/Program.cs:line 164
   at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Rnwood.Smtp4dev.Program.BuildWebHost(String[] args, CommandLineOptions cmdLineOptions, MapOptions`1 commandLineOptions) in /home/vsts/work/1/s/Rnwood.Smtp4dev/Program.cs:line 199
   at Rnwood.Smtp4dev.Program.StartApp(IEnumerable`1 args, Boolean isDesktopApp, Action`1 fixedOptions)
   at Rnwood.Smtp4dev.Program.Main(String[] args) in /home/vsts/work/1/s/Rnwood.Smtp4dev/Program.cs:line 38

@emouawad
Copy link
Author

This is apparently related to stackoverflow - Disabling the reloadOnChange should fix it.

Suggestion is:

public static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .ConfigureAppConfiguration((hostingContext, config) =>
        {
            config.AddJsonFile("appsettings.json",
                optional: true,
                reloadOnChange: false);
        })
        .ConfigureWebHostDefaults(webBuilder =>
        {
            webBuilder.UseStartup<Startup>();
        });
}

@emouawad emouawad reopened this Oct 20, 2022
@rnwood
Copy link
Owner

rnwood commented Mar 3, 2024

Closing stale issue. Feel free to re-open if still and issue with the latest versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants