Пређи на главни садржај

How to fix the "inotify instances" error by disabling CounterStrikeSharp hot reload

If you have many CounterStrikeSharp plugins on your Counter-Strike 2 server, some of them may fail to load with this error:

[EROR] (cssharp:PluginManager) Failed to load plugin from .../plugins/PluginName/PluginName.dll
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.

What this error means​

inotify is the Linux feature that programs use to watch files for changes. CounterStrikeSharp uses it for hot reload: it watches the folder of every plugin, so a plugin reloads automatically when you upload a new version. Some plugins also watch their own config files.

Every watcher uses one inotify instance, and the system has a limit. With a lot of plugins the limit is reached, and the plugins that load last have no free instance — so they fail to load.

How to disable hot reload​

Without hot reload CounterStrikeSharp doesn't need a watcher for every plugin, and the error goes away.

Step 1) Go to your console and stop your server using the "STOP" button.

Step 2) Go to "FILE MANAGER" and navigate to game > csgo > addons > counterstrikesharp > configs. Open the file core.json.

Step 3) Find this line:

"PluginHotReloadEnabled": true,

and change it to:

"PluginHotReloadEnabled": false,

Step 4) Save the file and start your server.

Step 5) Type css_plugins list in the console and check that all your plugins are loaded.

NOTE

With hot reload disabled, a plugin you upload or update is not loaded automatically. Restart the server, or use css_plugins load PluginName / css_plugins reload PluginName in the console.

Remove plugins you don't use​

Every plugin uses resources even when you don't use its features. Delete test plugins and plugins you replaced (for example old VIP_Test modules or a second map chooser). That also makes your server faster and more stable.

TIP

If you still see the error after disabling hot reload, contact our support and we will check it on our side.