Skip to content

lua-language-server exhausts available inotify resources #1709

Open
@xaizek

Description

@xaizek

How are you using the lua-language-server?

Other

Which OS are you using?

Linux

What is the issue affecting?

Other

Expected Behaviour

Using lua-language-server shouldn't consume all available inotify resources.

Actual Behaviour

After opening a project no other application can use inotify, because recursive inotify can try watching too many files (over 125,000 in my case, but depends on the limit).

Reproduction steps

  1. Create a dummy config file (return {}) and place it somewhere with many files (e.g. in home directory).
  2. Specify path to that config via --configpath like in --configpath=$HOME/lsp.lua.
  3. Open some workspace with that configuration (using lsp.vim in Vim9 here, but client shouldn't matter).
  4. Try using inotifywait some/file and observe Failed to watch some/file; upper limit on inotify watches reached!, which shouldn't happen.

Additional Notes

Watch probably shouldn't be recursive when used in https://github.com/sumneko/lua-language-server/blob/d33debdaa7d8748beef0e0365f0314222006058e/script/provider/provider.lua#L34

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationHas to do with documentation either in the wiki or in the repo

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions