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 bruehlicke <br...@gmail.com> on 2012/02/13 21:06:39 UTC

Derby Embedded losing connection ?

I am happy using Derby Embedded DB. Currently we are on 10.5.3.0 no
issues, but ...  from time to time (currently not reproduceable) we
get reports (and also felt it our self) that our app simply is losing
its connection to the DB. We are using standard JDBC to get a
connection and hold this guy as a hard ref. We connect to a project,
sometimes we disconnect and connect to a different project. All this
works in 99% of the time.

Is there any known issue/situations anyone know of (could not find any
on JIRA) ? Any hints how to start tracking down this ? (nothing in the
log file of a projectdb). Any soft or weak references build into Derby
DB embedded which could cause this ?

Anyhow - thanx for all the good work out there - its a wonderful product.

Bernd

Re: Derby Embedded losing connection ?

Posted by bruehlicke <br...@gmail.com>.
Thanx for the info - at least I am not feeling alone ;-) ... I will
try to trigger the problem and catch all info. Than I will double
check our code to see the sequence of closing/reconnecting. After that
I will try to upgrade to 10.8.x and see if "it goes away".

Bernd

On Tue, Feb 14, 2012 at 8:42 AM, Bartosz, Jan (NSN - PL/Wroclaw)
<ja...@nsn.com> wrote:
> 1) First of all - check if you - or somebody in your team does not close
> connection explicitly;) - f.e.: there is some PMD rule about not closing
> connection and someone could fix this PMD...;) - was a real case in our
> project;)
>
> 2) In our project there was also problem with loosing connection and
> reconnecting in derby 10.7.x - don't know how about the previous
> versions, as we didn't use the DB so heavily.
> Problem disappeared in latest i.e. 10.8 ver. - where some improvements
> have been made regarding interruption handlings :
> * Improved interrupt handling - Interrupting connection threads no
> longer crashes the Derby engine.
> http://old.nabble.com/-ANNOUNCE--Apache-Derby-10.8.1.2-released-to315235
> 46.html#a31523546
>
> Hopefully helps!;)
>
>
> ..........................
> Regards / Pozdrowienia
> Jan Bartosz
> My contact info in Phonebook
> Click to call me by using Softphone
> -----Original Message-----
> From: ext bruehlicke [mailto:bruehlicke@gmail.com]
> Sent: Tuesday, February 14, 2012 3:12 PM
> To: Derby Discussion
> Subject: Re: Derby Embedded losing connection ?
>
> Thanx for you interest. Its version 10.5.3.0 - I will collect more
> info. No connection pooling by the way. Simple JDBC createConnection.
>
> Bernd
>
> On Tue, Feb 14, 2012 at 1:24 AM, Bartosz, Jan (NSN - PL/Wroclaw)
> <ja...@nsn.com> wrote:
>> Which derby version? Can you provide some stacktrace?
>>
>> ..........................
>> Regards / Pozdrowienia
>> Jan Bartosz
>> My contact info in Phonebook
>> Click to call me by using Softphone
>> -----Original Message-----
>> From: ext Bryan Pendleton [mailto:bpendleton.derby@gmail.com]
>> Sent: Tuesday, February 14, 2012 3:19 AM
>> To: Derby Discussion
>> Subject: Re: Derby Embedded losing connection ?
>>
>>> get reports (and also felt it our self) that our app simply is losing
>>> its connection to the DB.
>>
>> What are the symptoms, exactly?
>>
>> That is, what is it that makes you think you are losing your
> connection?
>>
>> One thing that occurs to me is a bit of a long-shot: are you using a
>> connection pooling framework of some sort? If so, is it possible that
>> the connection pooling framework is making a mistake and closing a
>> connection inappropriately?
>>
>> thanks,
>>
>> bryan
>>

RE: Derby Embedded losing connection ?

Posted by "Bartosz, Jan (NSN - PL/Wroclaw)" <ja...@nsn.com>.
1) First of all - check if you - or somebody in your team does not close
connection explicitly;) - f.e.: there is some PMD rule about not closing
connection and someone could fix this PMD...;) - was a real case in our
project;)

2) In our project there was also problem with loosing connection and
reconnecting in derby 10.7.x - don't know how about the previous
versions, as we didn't use the DB so heavily.
Problem disappeared in latest i.e. 10.8 ver. - where some improvements
have been made regarding interruption handlings : 
* Improved interrupt handling - Interrupting connection threads no
longer crashes the Derby engine.
http://old.nabble.com/-ANNOUNCE--Apache-Derby-10.8.1.2-released-to315235
46.html#a31523546

Hopefully helps!;)


..........................
Regards / Pozdrowienia 
Jan Bartosz
My contact info in Phonebook
Click to call me by using Softphone
-----Original Message-----
From: ext bruehlicke [mailto:bruehlicke@gmail.com] 
Sent: Tuesday, February 14, 2012 3:12 PM
To: Derby Discussion
Subject: Re: Derby Embedded losing connection ?

Thanx for you interest. Its version 10.5.3.0 - I will collect more
info. No connection pooling by the way. Simple JDBC createConnection.

Bernd

On Tue, Feb 14, 2012 at 1:24 AM, Bartosz, Jan (NSN - PL/Wroclaw)
<ja...@nsn.com> wrote:
> Which derby version? Can you provide some stacktrace?
>
> ..........................
> Regards / Pozdrowienia
> Jan Bartosz
> My contact info in Phonebook
> Click to call me by using Softphone
> -----Original Message-----
> From: ext Bryan Pendleton [mailto:bpendleton.derby@gmail.com]
> Sent: Tuesday, February 14, 2012 3:19 AM
> To: Derby Discussion
> Subject: Re: Derby Embedded losing connection ?
>
>> get reports (and also felt it our self) that our app simply is losing
>> its connection to the DB.
>
> What are the symptoms, exactly?
>
> That is, what is it that makes you think you are losing your
connection?
>
> One thing that occurs to me is a bit of a long-shot: are you using a
> connection pooling framework of some sort? If so, is it possible that
> the connection pooling framework is making a mistake and closing a
> connection inappropriately?
>
> thanks,
>
> bryan
>

Re: Derby Embedded losing connection ?

Posted by bruehlicke <br...@gmail.com>.
Thanx for you interest. Its version 10.5.3.0 - I will collect more
info. No connection pooling by the way. Simple JDBC createConnection.

Bernd

On Tue, Feb 14, 2012 at 1:24 AM, Bartosz, Jan (NSN - PL/Wroclaw)
<ja...@nsn.com> wrote:
> Which derby version? Can you provide some stacktrace?
>
> ..........................
> Regards / Pozdrowienia
> Jan Bartosz
> My contact info in Phonebook
> Click to call me by using Softphone
> -----Original Message-----
> From: ext Bryan Pendleton [mailto:bpendleton.derby@gmail.com]
> Sent: Tuesday, February 14, 2012 3:19 AM
> To: Derby Discussion
> Subject: Re: Derby Embedded losing connection ?
>
>> get reports (and also felt it our self) that our app simply is losing
>> its connection to the DB.
>
> What are the symptoms, exactly?
>
> That is, what is it that makes you think you are losing your connection?
>
> One thing that occurs to me is a bit of a long-shot: are you using a
> connection pooling framework of some sort? If so, is it possible that
> the connection pooling framework is making a mistake and closing a
> connection inappropriately?
>
> thanks,
>
> bryan
>

RE: Derby Embedded losing connection ?

Posted by "Bartosz, Jan (NSN - PL/Wroclaw)" <ja...@nsn.com>.
Which derby version? Can you provide some stacktrace?

..........................
Regards / Pozdrowienia 
Jan Bartosz
My contact info in Phonebook
Click to call me by using Softphone
-----Original Message-----
From: ext Bryan Pendleton [mailto:bpendleton.derby@gmail.com] 
Sent: Tuesday, February 14, 2012 3:19 AM
To: Derby Discussion
Subject: Re: Derby Embedded losing connection ?

> get reports (and also felt it our self) that our app simply is losing
> its connection to the DB.

What are the symptoms, exactly?

That is, what is it that makes you think you are losing your connection?

One thing that occurs to me is a bit of a long-shot: are you using a
connection pooling framework of some sort? If so, is it possible that
the connection pooling framework is making a mistake and closing a
connection inappropriately?

thanks,

bryan


Re: Derby Embedded losing connection ?

Posted by Bryan Pendleton <bp...@gmail.com>.
> get reports (and also felt it our self) that our app simply is losing
> its connection to the DB.

What are the symptoms, exactly?

That is, what is it that makes you think you are losing your connection?

One thing that occurs to me is a bit of a long-shot: are you using a
connection pooling framework of some sort? If so, is it possible that
the connection pooling framework is making a mistake and closing a
connection inappropriately?

thanks,

bryan