Project

General

Profile

Bug #7211

Several H2 connections for one single session

Added by Alexandru Lungu over 1 year ago. Updated about 1 year ago.

Status:
WIP
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

History

#1 Updated by Alexandru Lungu over 1 year ago

This is an issue as there are several messages like the following in the server log:

(com.goldencode.p2j.persist.dialect.H2Helper:WARNING) Connecting to H2 database "_temp0" with LOCK MODE set on 0.

The message itself is not quite an warning and it should be downgraded to info level. It just states that a certain H2 database doesn't use locking. This is expected for temporary tables in private-temp-dbs mode.

The problem however is that such messages appear for tens of times at run-time, with different values (e.g. _temp0, _temp5, _temp8, temp23, etc.). The number of messages increases overtime, until the server is closed. Usually, each value is displayed 4 times:

(com.goldencode.p2j.persist.dialect.H2Helper:WARNING) Connecting to H2 database "_temp32" with LOCK MODE set on 0.
(com.goldencode.p2j.persist.dialect.H2Helper:WARNING) Connecting to H2 database "_temp32" with LOCK MODE set on 0.
(com.goldencode.p2j.persist.dialect.H2Helper:WARNING) Connecting to H2 database "_temp32" with LOCK MODE set on 0.
(com.goldencode.p2j.persist.dialect.H2Helper:WARNING) Connecting to H2 database "_temp32" with LOCK MODE set on 0.

In fact, there are two sub-issues:
  • why are there 4 H2 connections attempted at once? Note that dirty and meta tables are using locking, so there is no reason for such message in this case.
  • why are there several such chunks of connections attempted? We have a well-defined connection/session lifecycle, so it may be that we close a session and reopen it, thus we see several such connection attempts at run-time. This should be tested.

#3 Updated by Thanasis Giannakopoulos over 1 year ago

  • File server.log added

Adding a server log that contains around 100 of such connections. Note that is just during server startup without the client launched or anything. I get this consistently and I also get low app performance which I suspect is related.

#4 Updated by Thanasis Giannakopoulos over 1 year ago

  • File deleted (server.log)

#5 Updated by Alexandru Lungu about 1 year ago

  • Status changed from New to WIP
  • Assignee set to Radu Apetrii

#6 Updated by Radu Apetrii about 1 year ago

I might be wrong on this, but I am not seeing tens of messages any more.

I navigated a large customer application and got the following observations:
  • When the server started, <5 messages of this type appeared (the only value being _temp0).
  • When the application itself started, <10 messages appeared (with 2 or 3 values, e.g. _temp0, _temp13).
  • No other messages appeared while navigating the application.

I tried doing this test twice with 7323a and once with (the no longer existing) 7026d.
Alex, can you please check and see if this is the case for you too? Perhaps the new logger played a part in this(?).

Also available in: Atom PDF