On Mon, Sep 24, 2012 at 4:12 AM, James Jiang <[email protected]> wrote:
> I write a very simple js file. And use httperf to test it with high
> concurrent. but the nodejs will always stop running when rate > 5000 with
> httperf.
> I think is it blocked in "Accept" or other blocking method.
>
>
> client:
> ./httperf --hog --server 10.142.82.42 --myport 8888 --num-conns 50000 --rate
> 9000
>
> JS file(Server):
>
> var http = require("http");
> var i=0;
> function onRequest(request, response) {
>   //console.log("Request received.");
>   response.writeHead(200, {"Content-Type": "text/plain"});
>   response.write("Hello World");
>   response.end();
>   i = i+1;
>         console.log(i);
> }
>
> http.createServer(onRequest).listen(8888);
>
> Result:
> ....
> ....
> ....
> 42881
> 42882
> 42883
> 42884
> 42885
> 42886
> 42887
> 42888
> 42889
> 42890
> 42891
> 42892
> 42893
> 42894
> 42895
> 42896
>
> stopped!!
> When I run it again, it will stop in another number which >40000.

You're probably exhausting your ephemeral ports.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to