You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Isuru Suriarachchi <is...@gmail.com> on 2011/04/29 16:10:13 UTC

Default ThreadPool Size

Hi all,

Currently the default max thread pool size is set to Integer.MAX_VALUE. Due
to this, there can be situations where a huge number of threads created when
lot of non blocking requests are done by a client. To test this, I just
wrote a simple service client which continuously fire and forget one way
requests in a non blocking manner (using following parameter).

options.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, Boolean.TRUE);

When I got a thread dump after some time, there where about 20000 "Axis2
Task" threads created. Sometimes the client hangs due to this reason.

Then I set the maxPoolSize in ThreadPool to 100 and did the same test again.
then there were only few (less than 10) "Axis2 Task" threads in the thread
dump and the client ran smoothly.

So shall we fix this and set the default value to something like 100?

Thanks,
~Isuru

-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: Default ThreadPool Size

Posted by Afkham Azeez <af...@gmail.com>.
+1
On Apr 29, 2011 7:40 PM, "Isuru Suriarachchi" <is...@gmail.com> wrote:
> Hi all,
>
> Currently the default max thread pool size is set to Integer.MAX_VALUE.
Due
> to this, there can be situations where a huge number of threads created
when
> lot of non blocking requests are done by a client. To test this, I just
> wrote a simple service client which continuously fire and forget one way
> requests in a non blocking manner (using following parameter).
>
> options.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, Boolean.TRUE);
>
> When I got a thread dump after some time, there where about 20000 "Axis2
> Task" threads created. Sometimes the client hangs due to this reason.
>
> Then I set the maxPoolSize in ThreadPool to 100 and did the same test
again.
> then there were only few (less than 10) "Axis2 Task" threads in the thread
> dump and the client ran smoothly.
>
> So shall we fix this and set the default value to something like 100?
>
> Thanks,
> ~Isuru
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/