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 3.4.3 database-backend) connections to db are not released

Timothy Redmond tredmond at
Sat Feb 20 11:19:49 PST 2010

Sorry for the late reply.

sonre wrote:
> Hi, we are working with protege server with database-backend. (3.4.3)
> Every time we create or open a project, a database connection to MySQL is
> established, which is normal. However, if we do lots of create/open/edit
> operations, the number of connections to database becomes too large, and we
> recieve "max connecitons reached" error.
This is a little strange because we are using a connection pooling 
mechanism.   I am not sure if you have uncovered a bug (that we haven't 
found) or if you are running in a configuration that we don't handle 
correctly.  Do you have a large number of projects on the server with 
different database connection parameters? Do you have custom developed 
clients that make use of long running transactions?  A stack dump [1] 
showing the database reaper threads on the server might help me 
understand the problem a bit better.  Also the Projects panel of the 
server admin user interface [2] can show you which users are in 
transactions for any given project which is important for understanding 
this issue.

The algorithm that the Protege connection pool uses has the following 

    * database connections which are not in a transaction and with the
      same connection url are shared.  Generally there should not be
      much more than two connections to the same url at any time even if
      several users are sharing the same project.
    * After some time a database connection that has remained idle will
      be closed.  The default timeout is actually surprisingly large (60
      minutes) but it can be changed with the
      Database.refresh.connections.interval property measured in minutes.
    * There is a cap (default 3) on the number of database transactions
      that be open for a given database url at a time.  Unfortunately
      this cap cannot include connections that are in the middle of a
      transaction so if a lot of transactions are in progresss (this
      usually doesn't work very well in Protege) then there could be
      more connections.


> When a client opens a project the server says:
> Server: Opened project deneme_1 for Session(id=11, user=Guest) on Tue Feb 16
> 10:15:06 EET 2010
> Then, client does its work and finishes:
> Server: Removing Session(id=11, user=Guest) on Tue Feb 16 10:15:29 EET 2010
> I think when we see the above message (removing session...) the databese
> connection should be released. Is there any way to do that? Thanks..
> Best Regards,
> soner


More information about the protege-discussion mailing list