Giter Site home page Giter Site logo

Too many open files about watchdog HOT 5 CLOSED

oleksandr avatar oleksandr commented on August 16, 2024
Too many open files

from watchdog.

Comments (5)

gorakhargosh avatar gorakhargosh commented on August 16, 2024

Yes, this is owing to kqueue being used on OS X/BSD. I have yet to get around to fixing the FSEvents code to work on OS X. kqueue by design opens file descriptors for all the files it needs to monitor. Hence if you're monitoring a directory with a lot of files, you're likely to run into this problem. For now there's only one workaround and that involves setting ulimit -n <some-high-number> in your ~/.profile file.

Perhaps, if someone can get the fsevents code fixed before I can get around to it, you wouldn't have this problem on OS X.

Cheers!

from watchdog.

oleksandr avatar oleksandr commented on August 16, 2024

Thanks for a prompt response. I would like to take a deeper look, may be implementing the fix... Wouldn't directory snapshotting be a workaround in this case? What would be the other suggestion to fixing this issue?

Thanks!

from watchdog.

gorakhargosh avatar gorakhargosh commented on August 16, 2024

Directory snapshotting code already exists in the code base. Perhaps, another fix could be letting users choose (via a command line option) the observer to use. You can see the --debug-force-polling option to the log subcommand. It forces the use of snapshotting (which is rather slow but works). May be such options can be added to the shell-command subcommand as well.

Cheers!

from watchdog.

oleksandr avatar oleksandr commented on August 16, 2024

Right, the snapshotting is so slooooooooow... According to the following:

try: # pragma: no cover
    from watchdog.observers.fsevents import FSEventsObserver_BUGGY_TODO as _Observer

FSEvents observer never gets called.

from watchdog.

gorakhargosh avatar gorakhargosh commented on August 16, 2024

Yes, it's currently disabled in the release.

from watchdog.

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.