[NvimTree] Could not start the fs_event watcher for path /xxxx/xxxx : ENOSPC
Description
Describe the bug Each time I use CTRL + N, the message in the attached picture occurs for each file (or each directory).
To Reproduce Steps to reproduce the behavior:
- open NVIM
- CTRL+N
- error occurs consistently and for each file in the directory
- see picture
Expected behavior No error should occur when activating CTRL+N.
Screenshots
Desktop (please complete the following information):
- Operating System: UBUNTU 24.04
- Terminal: Gnome Terminal
- Version of Neovim: 0.9.5
Using NVCHAD following basic instructions for Linux
No .git file in the ~/.config/nvim directory or my home directory.
Neovim version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
Operating system and version
Ubuntu 24.04 - Kernel 6.8.0-31
Windows variant
N/A
nvim-tree version
tag: v1.3, tag: v1, tag: nvim-tree-v1.3.1
Clean room replication
Using NVCHAD setup out of the box, no changes.
Steps to reproduce
- nvim .
- CTRL+N
- error appears for each file and/or directory
Expected behavior
No error ... installed on my MAC with no errors.
Actual behavior
See screenshots in the description.
Please use steps and minimal configuration as described in https://github.com/nvim-tree/nvim-tree.lua/wiki/Troubleshooting#clean-room-replication. We cannot troubleshoot Nvim configuration distributions.
With that said, are you sure it's not a disk space issue?
No disk issues -
I was able to recreate the error/issue in the clean room environment with no changes to the lua file. I attempted to setup the l"og =" information to create a log file, but it doesn't seem to work or I don't know where to put the "log =" information. But with that said...
After reading the clean room link, at the bottom it talked about increasing the number of watchers. I increased fs.inotify.max_user_watches and instances and the error went away. I am not sure how this works, if it just delays the error as the number of watchers is consumed or if it doesn't reach the max (assuming number of files). But I will watch and see how this behaves.
After reading the clean room link, at the bottom it talked about increasing the number of watchers. I increased fs.inotify.max_user_watches and instances and the error went away. I am not sure how this works, if it just delays the error as the number of watchers is consumed or if it doesn't reach the max (assuming number of files). But I will watch and see how this behaves.
That "checks out" although it does not explain ENOSPC at all; you should receive a reasonable message.
Guessing: quemu is using a lot of inotify, maybe OneDrive. Either way, the default limit is very low and needs to be increased by most users. My colleagues and I use intellij which almost immediately saturates inotify, hence we increase it.
I was able to recreate the error/issue in the clean room environment with no changes to the lua file. I attempted to setup the l"og =" information to create a log file, but it doesn't seem to work or I don't know where to put the "log =" information. But with that said...
The log will usually go in ${XDG_STATE_HOME}/nvim/nvim-tree.log. You should receive a startup message that notifies you of this file however there are bugs in nvim 0.9 that squash this; fixed in 0.10.
:mess usually retains and shows it.
@dawaldow any updates on this one?
This is a serious issue that we should address - logs will identify the problem.
@alex-courtis,
I am observing this as well. Related to https://github.com/linrongbin16/fzfx.nvim/issues/726, seems like it affects other plugins (?!).
This particular computer has the following sysctl preference:
fs.inotify.max_user_watches=325796
...which doesn't help.
I just started getting this error and added
fs.inotify.max_user_watches=524288
fs.inotify.max_user_instances=1024
to the bottom of my /etc/sysctl.conf file.
I then ran sudo sysctl -p, quit NVIM and restarted my terminal and it hasn't come back so far...
I just started getting this error and added
fs.inotify.max_user_watches=524288 fs.inotify.max_user_instances=1024to the bottom of my
/etc/sysctl.conffile.I then ran
sudo sysctl -p, quit NVIM and restarted my terminal and it hasn't come back so far...
Thank you. I've updated the wiki with fs.inotify.max_user_instances = 1024 instead of 256.