On Sunday, February 16, 2014 4:37:07 AM UTC-5, Ravi wrote:
>
> Ok, if i am reading it correctly, {Agent:'false'} disables any connection
> pooling, therefore setting:
>
> require('http').globalAgent.maxSockets = <some very high value>
>
> won't matter at all?
>
>
Correct. You could create a custom Agent if you didn't want to disable
connection pooling and pass that in to your requests' options:
// somewhere at top of script
var myAgent = new Agent({ maxSockets: 4096 });
// start requests
http.request({
// ...
agent: myAgent,
// ...
}, function(res) {}).end();
> I observed as, i reached, open *file handles* limit (currently set to
> 1024), i began seeing
>
> ERROR: read ECONNRESET
> ERROR: connect ECONNREFUSED
>
That sounds about right.
>
> I increased ulimit -n to 4096 ( both server and client ). and the max open
> file handles limit to ~ 403945
> and saw marked improvement, as expected.
>
ulimit -n is all that should need to be changed to allow that many socket
connections.
>
> What makes me curious is as i reach *ulimit -n *i get increasing
> turnaround time. This would be due to the fact that i have exhausted my
> hard limit to open files, but lots of responses were received by then,
> wont node, flush the current socket and make them available for reuse, or
> is there is a way to explicitly flush such a socket when response is
> received ?
>
Maybe tomcat can't keep up? ;-)
Try putting a node server in it's place to see how that affects timing.
--
--
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
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.