Hello,
So I have worked on the problems I have had earlier and basically have
broken it down. The error I get is:
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Connection is
broken: "session closed" [90067-126]
And i get this when my program tries to connect to the database
through the server too frequently...
I start the server as usual (tried a few different ways - all with
identical results).
I've reproduced the problem in a simplified environment. Running
multiple instances of this program will cause the error:
public class DBtest {
public static void main(String[] a) throws Exception {
int StrategyInterval=50;
for (int i=0; i<600000; i++){
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection
( "jdbc:h2:tcp://localhost/~/test", "sa", "");
Thread.sleep(StrategyInterval);
System.out.println(i);
conn.close();
}
}
}
Is there a limit to the number of connections in a certain timeframe?
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.