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

node.js v0.10.0 Issues (CentOS 6.3) #400

Closed
elronalds opened this issue Mar 17, 2013 · 34 comments
Closed

node.js v0.10.0 Issues (CentOS 6.3) #400

elronalds opened this issue Mar 17, 2013 · 34 comments

Comments

@elronalds
Copy link

Does forever work with node.js v0.10.0? I am trying to use forever with node.js v0.10.0 on CentOS 6.3 however when I run the server via the CLI and then check forever list it seems to hang and never return a response to the console. My setup is explained below:

I see the read me states "Remark: As of [email protected] processes will not automatically be available in forever.list(). In order to get your processes into forever.list() or forever list you must instantiate the forever socket server:" but does this apply when using forever via. the CLI? If so how would the example script below be modified?

Cent OS 6.3 Install node.js Rackspace Cloud Server

yum install openssl-devel gcc-c++ make
cd /usr/local/src
wget http://nodejs.org/dist/node-latest.tar.gz
tar zxvf node-latest.tar.gz
cd node-v0.10.0
make
make install

Check Node.js version

node --version

Open default iptables firewall port 80

vi /etc/sysconfig/iptables
Open Port 80
/sbin/service iptables restart
/sbin/service iptables save

Install node.js forever

npm install forever -g

Create Example node.js server

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(80);
console.log('Server running on port 80');

Run server using forever

forever start example.js

List forever instances

forever list
Seems to hang at this step

@Southern
Copy link

This is related to flatiron/flatiron#99.

@okeydoke
Copy link

Same issue in OSX 10.7.5. Also hangs on forever stopall

@reqshark
Copy link

"LATENCY AND IDLE GARBAGE COLLECTION

One of the toughest things to get right in a garbage collected language is garbage collection. In order to try to avoid excessive memory usage, Node used to try to tell V8 to collect some garbage whenever the event loop was idle.

However, knowing exactly when to do this is extremely difficult. There are different degrees of "idleness", and if you get it wrong, you can easily end up spending massive amounts of time collecting garbage when you'd least expect. In practice, disabling the IdleNotification call yields better performance without any excessive memory usage, because V8 is pretty good at knowing when it's the best time to run GC.

So, in v0.10, we just ripped that feature out. (According to another point of view, we fixed the bug that it was ever there in the first place.) As a result, latency is much more predictable and stable. You won't see a difference in the benchmarks as a result of this, but you'll probably find that your app's response times are more reliable." -Isaac Schlueter

@matth3wga0
Copy link

same here, forever list/stop seems not working anymore, need an update since the last one was 8 month ago:{

@reqshark
Copy link

v0.10 on ubuntu 12.04 gives us this stack trace below before hanging. I mentioned Isaac's quote above because both Isaac and my machine are kinda saying the same thing in different words, am I wrong?

$ forever list
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at EventEmitter.Lazy.self.once (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:14:14)
at EventEmitter.Lazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:27:14)
at EventEmitter.Lazy.self.bucket (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:150:20)
at EventEmitter.lines (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:176:21)
at NsSocket._setup (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:369:7)
at new exports.NsSocket (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:80:8)
at getProcess (/usr/lib/node_modules/forever/lib/forever.js:97:18)
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:185:13
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:86:13
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at EventEmitter.Lazy.self.once (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:14:14)
at EventEmitter.Lazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:28:14)
at newLazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:44:20)
at EventEmitter.Lazy.self.map (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:68:16)
at NsSocket._setup (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:370:8)
at new exports.NsSocket (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:80:8)
at getProcess (/usr/lib/node_modules/forever/lib/forever.js:97:18)
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:185:13
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:86:13
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at newLazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:45:14)
at EventEmitter.Lazy.self.map (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:68:16)
at NsSocket._setup (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:370:8)
at new exports.NsSocket (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:80:8)
at getProcess (/usr/lib/node_modules/forever/lib/forever.js:97:18)
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:185:13
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:86:13
at Array.forEach (native)
at _forEach (/usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:26:24)

@Elido
Copy link

Elido commented Mar 18, 2013

v10 on ubuntu 12.10 gives me the same issue as above:

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at EventEmitter.Lazy.self.once (/usr/local/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:14:14)
at EventEmitter.Lazy (/usr/local/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:27:14)
at EventEmitter.Lazy.self.bucket (/usr/local/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:150:20)
at EventEmitter.lines (/usr/local/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:176:21)
at NsSocket._setup (/usr/local/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:369:7)
at new exports.NsSocket (/usr/local/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:80:8)
at getProcess (/usr/local/lib/node_modules/forever/lib/forever.js:97:18)
at /usr/local/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:185:13
at /usr/local/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:86:13

@MikeWills
Copy link

Same issue on my Ubuntu 12.04 server

forever list
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at EventEmitter.Lazy.self.once (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:14:14)
at EventEmitter.Lazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:27:14)
at EventEmitter.Lazy.self.bucket (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:150:20)
at EventEmitter.lines (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:176:21)
at NsSocket._setup (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:369:7)
at new exports.NsSocket (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:80:8)
at getProcess (/usr/lib/node_modules/forever/lib/forever.js:97:18)
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:185:13
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:86:13
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at EventEmitter.Lazy.self.once (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:14:14)
at EventEmitter.Lazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:28:14)
at newLazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:44:20)
at EventEmitter.Lazy.self.map (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:68:16)
at NsSocket._setup (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:370:8)
at new exports.NsSocket (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:80:8)
at getProcess (/usr/lib/node_modules/forever/lib/forever.js:97:18)
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:185:13
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:86:13

@osher
Copy link

osher commented Mar 19, 2013

Ubuntu 12, node 0.10.0 - DIFFERENT errors

First - during install, got a warning re forever wants 0.8, but has 0.10

When trying to forever list I get:

osg@br1:~$ forever list

module.js:340
    throw err;
          ^
Error: Cannot find module './daemon.v0.10.0'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/forever/node_modules/daemon/lib/daemon.js:12:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
osg@br1:~$

Im upgrading from node 0.6

looking inside I could see `daemon.v0.6.19.node', but not 0.8.x or 0.10.x

anybody?

UPDATED:

I had a bad installation problem, I'm back with everybody now...
I now have the same errors as everybody else

@ghost
Copy link

ghost commented Mar 19, 2013

+1 I also have the problem on a ubuntu 12.04 machine.

@legomind
Copy link

+1 ubuntu 12.04 server

@zweifisch
Copy link

+1 ubuntu 12.10 server

@ruslanchek
Copy link

It looks like the project is gone 👎

@legomind
Copy link

Guess ill be using monit. Crap. I wanted to avoid that.
On Mar 20, 2013 7:29 AM, "Ruslan" [email protected] wrote:

It's look like the project is gone [image: 👎]


Reply to this email directly or view it on GitHubhttps://github.com//issues/400#issuecomment-15170043
.

@willglaub
Copy link

same here on ubuntu 12.04 desktop and server, worked one day, broken the next (after the 0.10.0 automatic update), frustrating!

following error given twice, and process doesn't return to command line for any command other than start or help, requiring me to kill it by pid:

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at EventEmitter.Lazy.self.once (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:14:14)
at EventEmitter.Lazy (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:27:14)
at EventEmitter.Lazy.self.bucket (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:150:20)
at EventEmitter.lines (/usr/lib/node_modules/forever/node_modules/nssocket/node_modules/lazy/lazy.js:176:21)
at NsSocket._setup (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:369:7)
at new exports.NsSocket (/usr/lib/node_modules/forever/node_modules/nssocket/lib/nssocket.js:80:8)
at getProcess (/usr/lib/node_modules/forever/lib/forever.js:97:18)
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:185:13
at /usr/lib/node_modules/forever/node_modules/utile/node_modules/async/lib/async.js:86:13

@ghost
Copy link

ghost commented Mar 20, 2013

@legomind this happens because node is v0.10, so use nvm and install node v0.8. It's the temporary solution I found till this issue gets fixed :)

@indexzero
Copy link
Member

We haven't upgraded to 0.10 yet. Sorry. Big update coming in the next month or so. A PR would be very welcomed. The underlying issue appears to be in Lazy through nssocket

@rylio
Copy link

rylio commented Mar 21, 2013

There is a pull request for lazy that fixes the problem at https://github.com/Nathanaela/node-lazy/tree/Cleanup

@MikeWills
Copy link

So... I got sick of waiting. I started tracking down the source of the problems. Implemented the changes from Lazy. While it suppressed the error messages, that alone doesn't fix it. It still hangs like it did before.

@NathanaelA
Copy link

@MikeWills - Hmm, I just did a "npm install forever", copied my fixed version of "lazy.js" manually into the forever/node_module/nssocket/node_module/lazy folder (overritting the broken copy) and forever appears to be now working correctly. I did a forever start myscript, then in another console connected to my linux box did a forever list and forever stop 0. You might try deleting your entire npm cache; & forever, then doing a re-install of forever and then grabbing the lazy.js from my repository and manually sticking it into the nssockets/node_module/lazy folder...

@yyx990803
Copy link
Contributor

@NathanaelA it works! Thank you man. I tried to pin down the problem as well but gave up after getting to nssocket. FYI I didn't even reinstall anything, simply replaced lazy.js. Hope your pull request gets accepted soon... this fragile dependency hierarchy kinda troubles me.

@MikeWills
Copy link

I still can't get it to work, but maybe I need to shut down my forever processes first before uninstalling and reinstalling. I'll test that when I have time. My problem is that forever list and both stop commands hang.

@yyx990803
Copy link
Contributor

@MikeWills yep - you need to manually kill all the currently running forever processes before using forever again

@dexmans
Copy link

dexmans commented Mar 22, 2013

@MikeWills see @kimptoc's comment #370 (comment)

@MikeWills
Copy link

I got it working. After changing that file. I just rebooted :-P

@jirotoh
Copy link

jirotoh commented Mar 25, 2013

@NathanaelA Worked for me ! Thank you :)

@0b10011
Copy link

0b10011 commented Mar 28, 2013

Update: The issue in lazy was fixed in 1.0.9 (see pkrumins/node-lazy@7bf31b8 and pkrumins/node-lazy#33 (comment)).

@adambrod
Copy link

adambrod commented Apr 2, 2013

For the record, I'm seeing this issue on node v0.10.1 on CentOS 5.8. Even after patching lazy I haven't been able to get everything to work properly, so I'm not 100% sure the lazy patch will fix forever for me.

@yyx990803
Copy link
Contributor

@adambrod lazy recently got updated, supposedly if you do an npm update in your forever folder and get lazy 1.0.9, forever should be running fine on node v0.10.x

@legomind
Copy link

legomind commented Apr 2, 2013

Or just remove forever and reinstall. That did the trick for me.
On Apr 2, 2013 6:09 PM, "Evan You" [email protected] wrote:

@adambrod https://github.com/adambrod lazy recently got updated,
supposedly if you do an npm update in your forever folder and get lazy
1.0.9, forever should be running fine on node v0.10.x


Reply to this email directly or view it on GitHubhttps://github.com//issues/400#issuecomment-15805990
.

@kimptoc
Copy link

kimptoc commented Apr 3, 2013

That works for me - thought it hadn't but the old forever version was still running.

Thanks all.

@gabrielf
Copy link

gabrielf commented Apr 5, 2013

Reinstalling forever got me lazy 1.0.9 and I can use forever again with node 0.10. Time to close the issue or should the engines element in package.json perhaps be updated to reflect that node 0.10 is ok?

@alanristic
Copy link

Reinstalling forever got me lazy 1.0.9 and I can use forever again with node 0.10.3 — works perfect on ubuntu 12.04 LTS

@schlowmo
Copy link

schlowmo commented Apr 9, 2013

Changes in lazy.js worked for me under debian squeeze with v10.0.3. Thanks a lot!

@adambrod
Copy link

adambrod commented Apr 9, 2013

Worked for me after removing and re-adding forever. Thanks!

On Tue, Apr 9, 2013 at 9:12 AM, schlowmo [email protected] wrote:

Changes in lazy.js worked for me under debian squeeze with v10.0.3. Thanks a lot!

Reply to this email directly or view it on GitHub:
#400 (comment)

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