Giter Club home page Giter Club logo

Comments (9)

eradman avatar eradman commented on July 29, 2024 1

You are asking a good question--it would be better if users never needed to adjust the default resource limits. I will look into modifying entr to add the list of input files to a single inotify queue.

from entr.

eradman avatar eradman commented on July 29, 2024 1

Thanks for the kind words!

I uploaded a change for making better use of inotify in commit 9737442. This will respect limits set by /proc/sys/fs/inotify/max_user_watches

from entr.

abitrolly avatar abitrolly commented on July 29, 2024

The same error occurs when trying to watch directories with

$ fd "\.go$" | entr -d go build -o ./flt

But there are only 64 directories to watch.

$ fd -t d | wc -l

Using inotify with dir monitoring and custom filters could expand watching limits without changes to core system configuration.

from entr.

eradman avatar eradman commented on July 29, 2024

The error you're seeing is caused by hitting the maximum number of file descriptors. inotify can monitor multiple files per file descriptor, but entr uses one file descriptor per file because this is the way kqueue on BSD and Mac works. This was a compromise to make entr portable.

To raised this limit, edit /etc/security/limits.conf

*       hard    nofile  16384
*       soft    nofile  16384

How many total files/directories are you monitoring?

from entr.

abitrolly avatar abitrolly commented on July 29, 2024

Why entr can not use "multiple files per descriptor" interface setting limit of files to 1 if kqueue is used?

How many total files/directories are you monitoring?

About 1024.

$ fd "\.go$" | wc -l
1024

from entr.

abitrolly avatar abitrolly commented on July 29, 2024

Thank you. entr is an awesome tool that I use constantly, and because it is available from major distros, it is easy to use. I'm looking forward to the new version. :D

On a side note, there is a new fanotify mechanism in Linux 5.1 which may or may not be more efficient.

from entr.

eradman avatar eradman commented on July 29, 2024

Updated the documentation limits on LInux at
file:///home/eradman/www/eradman.com/entrproject/limits.html

from entr.

abitrolly avatar abitrolly commented on July 29, 2024

Looks good. Just two fixes for http://eradman.com/entrproject/limits.html#linux

s/permement/permanent/
s/was required //

from entr.

eradman avatar eradman commented on July 29, 2024

Good catch! Text adjusted. Thanks @abitrolly

from entr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.