On 6/23/06, Vinod Panicker <[EMAIL PROTECTED]> wrote:
On 6/23/06, Trustin Lee <[EMAIL PROTECTED]> wrote: > On 6/21/06, Vinod Panicker <[EMAIL PROTECTED]> wrote: > > > > On 6/21/06, Trustin Lee <[EMAIL PROTECTED]> wrote: > > > On 6/21/06, Vinod Panicker <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > > > > > Even after upgrading to mina 0.9.4, I'm still seeing ever-increasing > > > > threads for the AnonymousIoService. > > > > > > > > > Do you create a new PooledThreadModel instance whenever you bind? You > > will > > > have to reuse it. > > > > No we don't. This is what we are doing to bind the acceptor - > > > > acceptor.bind( inetSocketAddress, argIoHandler ); > > > > And in the connector we are calling connect() directly. > > > Then do you create an instance of IoConnector or IoAcceptor every time you > connect or bind? If so, it can create so many threads. Because a new > PooledThreadModel instance is created every time you create an IoService. > We need a workaround for this issue. Acceptors are created just once, of course. But for connectors, there have to be multiple instances since we need to connect to different endpoints each time. Do you mean to say that a new Thread pool is created every time we create an instance of a connector? What would be a workaround to this?
To work around this issue, you need to create a new PooledThreadModel which is shared among connectors and set their default thread model to it. But this will look awkard and not very transparent to the implementation. We need to revise this part. Please let me know if you have any suggestion. BTW the thread name 'anonymoudioservice-91-106' means that there can be 91 thread pools in the JVM. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
