System.IO.IOException



  • Dear CDF users

    i get this errors when i want to open groups or Computers how can i fix this

    The configured user limit (128) on the number of inotify instances has been reached.
    Description: HTTP 500.Error processing request.

    Details: Non-web exception. Exception origin (name of application or object): System.

    Exception stack trace:

    at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x0006f] in /builddir/build/BUILD/mono-5.18.0.225/external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs:61
    at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in /builddir/build/BUILD/mono-5.18.0.225/external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs:639
    at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in /builddir/build/BUILD/mono-5.18.0.225/external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs:173
    at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool)
    at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/System/System.IO/CoreFXFileSystemWatcherProxy.cs:140
    at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) [0x00184] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/System/System.IO/CoreFXFileSystemWatcherProxy.cs:68



  • i also see error in httpd error

    WARNING: WebConfigurationManager's LRUcache evictions count reached its max size
    Cache Size: 100 (overridable via MONO_ASPNET_WEBCONFIG_CACHESIZE)
    [root@clonedeploy frontend]# tail -f /var/log/httpd/error_log
    at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, System.Boolean is_volatile) [0x00042] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:154
    at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:132
    at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, System.Boolean createNonExisting) [0x0008e] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:418
    at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, System.Boolean writable) [0x00000] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:867
    at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, System.Boolean writable) [0x0001b] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:466
    at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey.OpenSubKey(string,bool)
    at System.Web.Configuration.MachineKeyRegistryStorage.OpenRegistryKey (System.String path, System.Boolean write) [0x00019] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs:101
    at System.Web.Configuration.MachineKeyRegistryStorage.Store (System.Byte[] buf, System.Web.Configuration.MachineKeyRegistryStorage+KeyType kt) [0x0002f] in /builddir/build/BUILD/mono-5.18.0.225/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs:136
    WARNING: WebConfigurationManager's LRUcache evictions count reached its max size
    Cache Size: 100 (overridable via MONO_ASPNET_WEBCONFIG_CACHESIZE



  • WARNING: WebConfigurationManager's LRUcache evictions count reached its max size
    Cache Size: 100 (overridable via MONO_ASPNET_WEBCONFIG_CACHESIZE)



  • I have never seen this error before, could be something new from the latest version of Mono. I'm guessing restarting apache doesn't fix it. Have you tried updating the cache size?



  • Dear clonedeploy

    i did restart apache and reboot my server where can i update the cache size



  • MONO_ASPNET_WEBCONFIG_CACHESIZE

    is an environmental variable, try setting it to 1000



  • dear clonedeploy

    where can i find this environmental variable is by webbased or in Web.config



  • dear users

    anyone know how to set up the

    MONO_ASPNET_WEBCONFIG_CACHESIZE

    is an environmental variable, try setting it to 1000



  • Just set it from terminal
    [code]MONO_ASPNET_WEBCONFIG_CACHESIZE=1000[/code]



  • @sakbari
    I think you can put

    MonoSetEnv MONO_ASPNET_WEBCONFIG_CACHESIZE=1000
    

    somewhere in your apache configuration.



  • Hi

    Same problem on my side. Also when i set MONO_ASPNET_WEBCONFIG_CACHESIZE to more than 2000.

    Could that be programmed differently?
    Where can i set this parameter permanent? Or is it set with the above command permanent by entering it just on the command line?

    Thanks



  • I'm still investigating what is causing this. Since in only started appearing recently and CloneDeploy hasn't been updated in a while, I'm thinking it's a change in mono or a Linux distro. Can you provide details of your mono version and linux distro?



  • @clonedeploy_admin
    I experienced this problem in fedora 28 (fully up to date, more specific info available upon request).

    I put

    MonoSetEnv MONO_ASPNET_WEBCONFIG_CACHESIZE=1000
    

    in the top level of my apache config.
    I found that this didn't work immediately. I had to fully reload some web pages, so it problably means that people should clear their browser caches too (although I didn't bother to do this myself). I think everything is back to normal now. If I see this bug again I will report back.

    Edit: Sorry I'm 100% wrong. I'm still encountering the issue.



  • @clonedeploy_admin
    What I have done is as follows:
    I ran this command:

    sysctl fs.inotify.max_user_instances=1024
    

    and I also added

    fs.inotify.max_user_instances=1024
    

    to /etc/sysctl.conf to make the change stick after reboots. Fingers are crossed.



  • Can you tell me your version of Mono?

    mono -v
    


  • @clonedeploy_admin said in System.IO.IOException:

    mono -v

    [root@clonedeploy ~]# mono --version
    Mono JIT compiler version 5.18.0.225 (tarball Thu Jan 3 08:42:34 UTC 2019)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS: __thread
    SIGSEGV: altstack
    Notifications: epoll
    Architecture: amd64
    Disabled: none
    Misc: softdebug
    Interpreter: yes
    LLVM: yes(600)
    Suspend: preemptive
    GC: sgen (concurrent by default)
    [root@clonedeploy ~]#



  • @hrumph2 said in System.IO.IOException:

    sysctl fs.inotify.max_user_instances

    root@clonedeploy ~]# sysctl fs.inotify.max_user_instances
    fs.inotify.max_user_instances = 128



  • @clonedeploy_admin :

    First of all I'd like to say that running:

    sysctl fs.inotify.max_user_instances=1024
    

    has solved the issue for me (so it seems for now). I kept

    MonoSetEnv MONO_ASPNET_WEBCONFIG_CACHESIZE=1000
    
    

    in my apache configuration so I'm not really sure if that's also needed or if I only needed to set the system variable. However things are working fine for me now.

    For me , mono --version results in:

    Mono JIT compiler version 5.18.0.225 (tarball Thu Jan  3 08:42:34 UTC 2019)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    	TLS:           __thread
    	SIGSEGV:       altstack
    	Notifications: epoll
    	Architecture:  amd64
    	Disabled:      none
    	Misc:          softdebug 
    	Interpreter:   yes
    	LLVM:          yes(600)
    	Suspend:       preemptive
    	GC:            sgen (concurrent by default)