db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag Wanvik <dag.wan...@oracle.com>
Subject Re: Connection threads sticking around
Date Sun, 24 Mar 2013 03:39:13 GMT

On 23.03.2013 17:18, Brett Wooldridge wrote:
> I do not understand why Derby is keeping these around once the
> client-side has closed the connection.  What controls server-side
> connection (thread) retirement?  If it is pooling them for efficiency,
> it still seems there must be a way to control how many/how long they
> live.

I think Derby has its own cache of connection threads so save creating
new ones, cf NetworkServerControlImpl#freeThreads
line 316).

The maximum number is controlled by derby.drda.maxThreads

See also the property controlling the minimum number of threads at

I don't think there is a mechanism to withdraw threads from that pool if
they sit idle for a long time though.


> Looking at the thread dump, something else interesting is that
> DRDAConnThread_0 thru 9 seemed to die off correctly.
>  DRDAConnThread_10 thru 19 are still around.  And then there is a jump
> in number to threads numbers > ~19300.
> Thanks in advance.
> Brett

View raw message