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 MySQL database

Timothy Redmond tredmond at
Fri Feb 22 12:27:38 PST 2008

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 this.

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:

More information about the protege-discussion mailing list