Skip to content

fs.watch fails on v1.8.1 #1666

Description

@zj8487

environment:

os: ubuntu 13.10
iojs: v1.8.1

step

> var assert = require('assert');
undefined
> fs.watch("/home/xxx/test.js", { persistent: true }, assert.fail)
Error: watch ENOSPC
    at exports._errnoException (util.js:749:11)
    at FSWatcher.start (fs.js:1228:11)
    at Object.fs.watch (fs.js:1254:11)
    at repl:1:4
    at REPLServer.defaultEval (repl.js:124:27)
    at bound (domain.js:254:14)
    at REPLServer.runBound [as eval] (domain.js:267:12)
    at REPLServer.<anonymous> (repl.js:277:12)
    at emitOne (events.js:77:13)
    at REPLServer.emit (events.js:166:7)

Activity

  1. evanlucas commented on May 9, 2015

    @evanlucas
    Contributor

    Do you have drive space left?

  2. zj8487 commented on May 9, 2015

    @zj8487
    Author

    how many space it will cost?

    KiB Mem:   3010684 total,  2877212 used,   133472 free,   127428 buffers
    KiB Swap:  3071996 total,      224 used,  3071772 free.   826616 cached Mem
    

    i free some space it works~~~

  3. bnoordhuis commented on May 9, 2015

    @bnoordhuis
    Member

    ENOSPC can also mean you're running into one of the system limits:

    $ sysctl -a | grep ^fs.inotify
    fs.inotify.max_queued_events = 16384
    fs.inotify.max_user_instances = 128
    fs.inotify.max_user_watches = 8192
    

    I'm going to close this as it's not really a bug. The error message could perhaps be a little nicer but the kernel doesn't tell us anything besides that ENOSPC error.

  4. added
    fsIssues and PRs related to file-system APIs and the fs module.
    on May 9, 2015
  5. zj8487 commented on May 10, 2015

    @zj8487
    Author

    thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to file-system APIs and the fs module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions