Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Protege Server lost connection to MySQLdatabase

Jonathan Carter jonathan.carter at
Mon Feb 25 07:29:54 PST 2008

Thanks Timothy,

Good to know that you're on top of this.
I'll keep going with the MySQL timeout being high. A colleague has suggested
using a 3rd party connection pooling toolkit that appears to the client as a
JDBC driver but operates as an adapter layer between the client and the
_real_ JDBC driver. In this you can configure "keep alive" type statements
which periodically run simple queries against the database to keep the
connection up. 
However, I've just realised that if I use that, the Protégé code won't be
able to recognise the MySQL driver for any MySQL-specific coding.


Jonathan Carter - Head of Technical Architecture

-----Original Message-----
From: protege-discussion-bounces at
[mailto:protege-discussion-bounces at] On Behalf Of Timothy
Sent: 22 February 2008 20:28
To: User support for Core Protege and the Protege-Frames editor
Subject: Re: [protege-discussion] Protege Server lost connection to

On Feb 21, 2008, at 2:54 AM, Jonathan Carter wrote:

> Hi,
> Has anyone else had a similar exception from Protege Server - 
> connection lost to database?
> I'm using MySQL 5.051 Community edition and my server had been running 
> for about 1.5 days with possibly more than 8 hours idle time over 
> night.
> When the server received the database connection loss, it seemed to go 
> into a funny state, locking up a Protege Client that was connected at 
> the time. The only way forward was to restart the Protege server.

Yes this is a known bug.  The database is closing the connection and the
client does not know.  Sometimes there are ways to correct the problem which
a new session but it is awkward.  For some time I was unclear on how to fix

The good news is that it is fixed in the release coming in March thanks to a
suggestion by Bob Dionne.  I did not find a good way to determine that a
connection has been closed.  So what the new version of Protege does is to
have a timeout on idle connections so that it can close the connection on
its side.  Then when the user tries to access the knowledge base again
protege automatically sets up a new connection with the database.  The idle
timeout can be set with a flag (and should be longer than any single
database operation).

>  I've done some digging and losing connections to MySQL 5 appears to 
> be something that others (in the wider Java community) have seen and 
> it sounds like when MySQL shuts down idle connections, any connection 
> pools don't seem to get notified of this.
> Has anyone had a similar experience?
> Does the Protege Server attempt to reconnect explicitly (rather than 
> relying on the connection pool) with MySQL?
> Are there any recommended settings on MySQL that have been used to 
> avoid this? e.g. I've found a suggestion to up the wait-timeout in 
> MySQL from default of 8 hours to much more to stop MySQL culling idle 
> connections. I'm going to try putting this to 36 hours and see how 
> that affects things.

NCI is using this setting and it is working for them.  I believe that the
code has been fixed on their branch though.


> Thanks
> Jonathan
> _______________________________________
> Jonathan Carter - Head of Technical Architecture Enterprise 
> Architecture Solutions Ltd
> Mobile: +44 (0) 7904 198295
> Email: jonathan.carter at
> Web:
> _______________________________________
> Assess your EA maturity at:
> _______________________________________
> W O R L D    C L A S S    A R C H I T E C T U R E
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing: 

protege-discussion mailing list
protege-discussion at

Instructions for unsubscribing: 

More information about the protege-discussion mailing list