Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Agent pooling not working? #476

j03m opened this Issue Mar 13, 2013 · 4 comments


None yet
4 participants

j03m commented Mar 13, 2013

Hey - trying to follow the code in get agent, we are passing:

params.pool = {'http:feed.staging.dst2.zynga.com:80':new http.Agent({maxSockets: 10}),'http:user.staging.dst2.zynga.com:80':new http.Agent({maxSockets: 10})};

into our request, but we're always seeing the global agent used. Reading the code, it seems like it can't ever work, but maybe I'm missing something.

Can you advise?

Glad I'm not the only one. I'm following the code too and can't see how providing a custom pool would ever work. Did you ever get a fix for this?

The current code doesn't handle this, but it can be easily patched.

See #848: you can extend the pool key to handle domains & port, like it was required to be done on node <=0.4 (https://github.com/mikeal/request/blob/bfea018c3eaf83b18d49001797096f990b59b446/request.js#L598-L604).


mikeal commented Aug 27, 2014

Is this still an issue?

This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.

@mikeal mikeal closed this Aug 27, 2014

It probably is, but we just set it globally instead to get round it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment