nvim-tree.lua icon indicating copy to clipboard operation
nvim-tree.lua copied to clipboard

[NvimTree] Could not start the fs_event watcher for path /xxxx/xxxx : ENOSPC

Open dawaldow opened this issue 1 year ago • 8 comments

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:

  1. open NVIM
  2. CTRL+N
  3. error occurs consistently and for each file in the directory
  4. see picture

Expected behavior No error should occur when activating CTRL+N.

Screenshots Screenshot from 2024-04-30 14-11-35 Screenshot from 2024-04-30 14-16-33

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 image

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

  1. nvim .
  2. CTRL+N
  3. 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.

dawaldow avatar May 01 '24 15:05 dawaldow

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?

gegoune avatar May 02 '24 06:05 gegoune

No disk issues - image

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.

dawaldow avatar May 02 '24 15:05 dawaldow

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.

alex-courtis avatar May 04 '24 04:05 alex-courtis

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.

alex-courtis avatar May 04 '24 04:05 alex-courtis

@dawaldow any updates on this one?

This is a serious issue that we should address - logs will identify the problem.

alex-courtis avatar May 27 '24 01:05 alex-courtis

@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.

savchenko avatar Jun 22 '24 09:06 savchenko

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...

AndrewIzatt avatar Jun 22 '24 21:06 AndrewIzatt

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...

Thank you. I've updated the wiki with fs.inotify.max_user_instances = 1024 instead of 256.

alex-courtis avatar Jun 23 '24 01:06 alex-courtis