You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Björn Bachman <bj...@ericsson.com> on 2008/11/17 09:42:49 UTC

SQLTransientConnectionException

Hi!

I have several java processes running on a server, collecting data from
several databases(on other servers), processing the data and then storing it
into different tables in a derby running network mode (same machine).
I'm using version 10.4.2 and nave set the number of threads to 50(as god as
any value).

It seems like when 2 processes tries to access the derby server one of them
gets a SQLTransientConnectionException with reason connection already in
use.
Is this a known problem (either to Derby or to code design) with a known
workaround or ... 

Best Reagards
\Björn Bachman

Re: SQLTransientConnectionException

Posted by Kristian Waagan <Kr...@Sun.COM>.
Björn Bachman wrote:
>
> Hi!
>
> I have several java processes running on a server, collecting data 
> from several databases(on other servers), processing the data and then 
> storing it into different tables in a derby running network mode (same 
> machine).
>
> I'm using version 10.4.2 and nave set the number of threads to 50(as 
> god as any value).
>
> It seems like when 2 processes tries to access the derby server one of 
> them gets a SQLTransientConnectionException with reason connection 
> already in use.
>
> Is this a known problem (either to Derby or to code design) with a 
> known workaround or ...
>

Hello Björn,

This sounds like a bug to me, either in Derby or maybe in the 
application code.

o Can you post the exception stack trace?
o Have you specified any other properties for the network server, like 
time-slicing?
o How do you obtain connections in the application code?
o Are using some kind of connection pooling software?
o Does it happen at once, or do you suspect that it happens when the 50 
threads/connections have been "exhausted"?
o Are you cleaning up the resources in the application code? (i.e. 
closing result sets and connections)

Maybe answers to some of these questions can help make the problem clearer.


-- 
Kristian

> Best Reagards
> \Björn Bachman
>