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

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

Open
dawaldow opened this issue May 1, 2024 · 8 comments
Labels
awaiting feedback bug Something isn't working

Comments

@dawaldow
Copy link

dawaldow commented May 1, 2024

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 dawaldow added the bug Something isn't working label May 1, 2024
@gegoune
Copy link
Collaborator

gegoune commented May 2, 2024

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?

@dawaldow
Copy link
Author

dawaldow commented May 2, 2024

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.

@alex-courtis
Copy link
Member

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
Copy link
Member

alex-courtis commented May 4, 2024

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
Copy link
Member

@dawaldow any updates on this one?

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

@savchenko
Copy link

savchenko commented Jun 22, 2024

@alex-courtis,

I am observing this as well. Related to linrongbin16/fzfx.nvim#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.

@AndrewIzatt
Copy link

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

@alex-courtis
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants