Are you releasing your response objects when you're done with them? e.g. ClientResponse resp = client.get(...); // do stuff with resp resp.release();
This is an unfortunate requirement of the multithreadedhttpconnectionmanager. - James Neale Upstone wrote: > Hi, > > I'm using Abdera (4.0, recent snapshot) as part of my testing, and I'm > getting a lock up when load testing the creation of an atom entry. > > If I pause the VM and investigate, I find that > MultiThreadedHttpConnectionManager has run out of connections for the > host. It exhibits some strange behaviour, where it used to work, when I > had some other, disk read I/O going on between the writes, but moved > that to a singleton initialisation (reading a database of random > postcodes if you must know ;) > > Is anyone else using AbderaClient (i.e. re-using the same instance) for > multiple repeated posts? > > If I add client.setMaxConnectionsPerHost(20); , for a test of 20 > creates, it works. Otherwise it stops after the first two. > > What's weird, and concerning is that it works when other I/O is going > on. Certainly worth people being aware of. > > Cheers, > > Neale > > > > > > Thread [main] (Suspended) > Object.wait(long) line: not available [native method] > > MultiThreadedHttpConnectionManager.doGetConnection(HostConfiguration, > long) line: 518 > > MultiThreadedHttpConnectionManager.getConnectionWithTimeout(HostConfiguration, > long) line: 416 > HttpMethodDirector.executeMethod(HttpMethod) line: 153 > HttpClient.executeMethod(HostConfiguration, HttpMethod, HttpState) > line: 397 > HttpClient.executeMethod(HttpMethod) line: 323 > AbderaClient.execute(String, String, RequestEntity, RequestOptions) > line: 435 > AbderaClient.post(String, RequestEntity, RequestOptions) line: 156 > TestCreate.create(Entry) line: 162 > TestCreate.testCreateMany() line: 108 > >
