For a while I was thinking that it was ab acting up. But curl also
doesn't get a response for several seconds when it's in this state.
Here's the server that I'm running:
require("http").createServer(function (_, response) {
response.writeHead(200, {});
response.write("hello");
response.close();
}).listen(8000);
And the ab command:
ab -k -c 50 -n 20000 http://0.0.0.0:8000/
Also tried this:
ab -k -c 50 -n 20000 http://127.0.0.1:8000/
Same results on HEAD and v0.1.33. Omitting the -c 50 seems to have no
significant effect.
Any ideas?
--i
Try running with --trace-gc
You might also try --never-compact though the long term consequences
of that are unknown (the heap may stabilize or it may get more and
more fragmented and grow).
2010/3/26 Isaac Schlueter <i...@izs.me>:
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>
The same is happening to me:
http://groups.google.com/group/nodejs/browse_thread/thread/e4c8ca9430dafc53#5acb52814507c99f
On OSX 10.6.2. What OS is yours ?
I have opened a separate shell with a netstat -w 1 to monitor the
traffic, and there are cyclic freezes:
$ netstat -w 1
input (Total) output
packets errs bytes packets errs bytes colls
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1 0 125 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1 0 112 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
2 0 106 1 0 46 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
input (Total) output
packets errs bytes packets errs bytes colls
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
22289 0 2029184 22289 0 2029170 0
43920 0 3992248 43920 0 3992248 0
43932 0 3994074 43932 0 3994074 0
43664 0 3970829 43664 0 3970829 0
43711 0 3973479 43711 0 3973479 0
43469 0 3954326 43469 0 3954326 0
1146 0 106110 1145 0 105985 0
3 0 168 3 0 168 0
3 0 168 3 0 168 0
3 0 168 3 0 168 0
3 0 168 3 0 168 0
3 0 168 3 0 168 0
1 0 112 0 0 0 0
3 0 168 3 0 168 0
input (Total) output
packets errs bytes packets errs bytes colls
0 0 0 0 0 0 0
1 0 60 1 0 46 0
1 0 46 0 0 0 0
3 0 152 3 0 152 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
3 0 152 3 0 152 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
2 0 106 1 0 46 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1 0 85 2 0 171 0
input (Total) output
OTOH, if while it's in the frozen state I do in another shell a
netstat -f inet and I see that there are lots (several thousands) of
ports in TIME_WAIT, IOW, ISTM, the ports are not being released
quickly enough:
$ netstat -f inet
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address
(state)
tcp4 0 0 localhost.http localhost.53454
TIME_WAIT
tcp4 0 0 localhost.http localhost.53454
TIME_WAIT
.
.
tcp4 0 0 localhost.http localhost.60456
TIME_WAIT
tcp4 0 0 localhost.http localhost.60457
TIME_WAIT
$ netstat -f inet | grep TIME_WAIT | wc -l
16379
And, it happens as well with the Apache server -IT'S NOT ONLY NODE !-,
so it must be an OS issue, or an ab issue, or there's a valid reason
for this that we ignore.. :-)
Any thoughts ?
--
Jorge.
Can anyone reproduce this on a non Mac?
-Ray
As clear as an unmuddied lake, Fred. As clear as an azure sky of
deepest summer.
> Maybe we should explain this somewhere on the node docs since someone seems
> to ask about this every few weeks.
Yes...
Thanks,
--
Jorge.
I wonder why it never affected my mac until just now. Weird.
--i
--
Dav Glass
davg...@gmail.com
blog.davglass.com
+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine +
http://stackoverflow.com/questions/1216267/ab-program-freezes-after-lots-of-requests-why
Maybe we should explain this somewhere on the node docs since someone seems to ask about this every few weeks.