![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
March 4, 2011
1:29 p.m.
On Thu, 2011-03-03 at 21:00 -0700, Jason J. W. Williams wrote:
Hi All,
I've got a situation where I'm using t.w.c.Agent to make 100,000 POST request against a server. Each time a new Agent instance is built and the request is sent using it. After about 20,000 requests, I get this error:
Failure: twisted.internet.error.ConnectError: An error occurred while connecting: 99: Cannot assign requested address.
Would building the Agent once and reusing the same instance avoid this? I assume I've run out of client ports.
Yes... except it doesn't support persistent connections yet. Do you actually need to run all 100,000 in parallel? If not, set a cap on how many requests can run in parallel.