google-code-export / h2database

Automatically exported from code.google.com/p/h2database
0 stars 1 forks source link

DriverManager.getConnection throws "Connection is broken" in embeded in-mem H2 under load #324

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
Run the attached test case, most of the times the following exception occurs:
org.h2.jdbc.JdbcSQLException: Connection is broken [90067-117]
    at org.h2.message.Message.getSQLException(Message.java:105)
    at org.h2.message.Message.getSQLException(Message.java:116)
    at org.h2.message.Message.getSQLException(Message.java:75)
    at org.h2.message.Message.getSQLException(Message.java:151)
    at org.h2.engine.SessionRemote.checkClosed(SessionRemote.java:462)
    at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:341)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:229)
    at org.h2.engine.SessionRemote.createSession(SessionRemote.java:223)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
    at org.h2.Driver.connect(Driver.java:58)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.h2.test.H2ConnectTest$1.run(H2ConnectTest.java:34)
    at java.lang.Thread.run(Unknown Source)

What version of the product are you using? On what operating system, file
system, and virtual machine?
H2 1.1.117 with JRE 1.6u24 on Win7/x64

Do you know a workaround?
No

How important/urgent is the problem for you?
It blocks load testing Jetty in a cluster environment as we use H2 to store 
session data.

Please provide any additional information below.

Original issue reported on code.google.com by ruediger...@gmx.de on 15 Jun 2011 at 5:51

Attachments:

GoogleCodeExporter commented 9 years ago
This is a networking problem if you try to open too many TCP/IP connection. It 
also occurs with a simple Java test case: 
http://h2database.com/p.html#4976575fa21dbca9acce1222a297167b

I'm afraid there is no easily workaround.

Instead, I suggest to reduce the number of concurrent threads that need an 
TCP/IP connection (within your application / test case).

Therefore, I'm resolving as 'wont fix'

Original comment by thomas.t...@gmail.com on 17 Jun 2011 at 9:56