Reputation: 217
Is there any relationship with http.Agent.maxSockets and the number of sockets created on the server?
I set maxSockets to 30 using http.Agent(), but there are still TIME_WAIT signals a lot. It seems like more than 30.
Is that impossible to control socket number by http.Agent()? How can I reduce the number of TIME_WAIT?
Upvotes: 2
Views: 4178
Reputation: 163334
TIME_WAIT
isn't a problem. It's a natural state of how TCP works, and you're not going to be able to reduce it by changing sockets on your HTTP client's agent. You're looking at two completely different things.
See also:
Upvotes: 2