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

Forever not cleaning up ~/.forever/pids/ #53

Closed
ghost opened this issue May 10, 2011 · 2 comments
Closed

Forever not cleaning up ~/.forever/pids/ #53

ghost opened this issue May 10, 2011 · 2 comments

Comments

@ghost
Copy link

ghost commented May 10, 2011

forever list command crashes because there are too many .fvr files (over 100). Maybe it is forever needs to clean up after it deletes or the list command should be fixed if there are too many files.

info: Running action: list
pipe(): Too many open files

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: Error spawning
    at ChildProcess.spawn (child_process.js:243:28)
    at child_process.js:31:15
    at child_process.js:77:15
    at child_process.js:38:27
    at checkProcess (/usr/local/lib/node_modules/forever/lib/forever.js:482:3)
    at /usr/local/lib/node_modules/forever/lib/forever.js:372:7
    at Array.forEach (native)
    at Object.cleanUp (/usr/local/lib/node_modules/forever/lib/forever.js:371:15)
    at Object.exec (/usr/local/lib/node_modules/forever/lib/forever/cli.js:44:22)
    at Object.<anonymous> (/usr/local/lib/node_modules/forever/bin/forever:185:13)
@indexzero
Copy link
Member

@NlCO This is a good find. Forever is trying to cleanup the processes, but it's exceeding the number of open file descriptors at one time because it is using the parallel async.forEach(). I will write a patch to batch these unlink operations so this doesn't happen in the future.

This will be more common as haibu users increase because each haibu process also has a corresponding .fvr file.

@indexzero
Copy link
Member

In the meantime, you can get around this by running:

killall node && rm -rf ~/.forever

I don't know how killall works on Ubuntu, so let me know if you hit a snag there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant