On Mon, 28 Jan 2008 12:29:56 -0500 "Alex Karasulu" <[EMAIL PROTECTED]> wrote:
> Hi Julien, > > Thanks for the update to the mailing list. > > On Jan 28, 2008 12:25 PM, Julien Vermillard <[EMAIL PROTECTED]> > wrote: > > > Hi, > > Following an IRC convo, between alex, tazle and me : > > > > We had a few complaint recently about remaining unclosed socket and > > thread after multiple connection using the NioSocketConnector or > > simply the AsyncHttpClient not releasing correctly file descriptor > > on linux. > > > > The problem for AsyncHttpClient is was because each connection > > create a NioSocketConnector and forget to .dispose() it. > > > > When you connect and close a session a thread will remain in the > > threadpool for 1 minute (it's the default behaviour), you can still > > overide it specifying another Executorfilter behaviour. > > > > BTW AHC is using 1 SocketConnector per AHC instance, I think it > > should be changed to share it. > > > > I fully agree. I just have to get up to speed enough figure out how > this can be done. Any suggestions? > > Thanks, > Alex Perhaps AHC should be invoked 1 time and be used for multiple http connections, so you can have 1 NioSocketAcceptor/selector per AHC and shared across http connections. That would prevent to instanciate a lot of objects and save some memory (connector, handler, codec, etc..). Another issues with AHC is the way you recieve the result of your connection in a big IoBuffer, it should be nice to be able to receive big results like files or http streaming in chunks and no a big memory buffer. Julien
