With our application using h2(1.4.199) as database in server mode, we see stale sessions and sometime they hold locks.
We understand the cause for this behavior and can reproduce it. Application users are hopping with their notebooks between meeting rooms, loose their connections and eventually get assigned new IP addresses in another network.
While the keep-alive feature discussed in https://github.com/h2database/h2database/issues/2032 may mitigate this to some extend, we possibly need further functionality to have more control.
I would like to get feedback on the below two proposals:
Please provide your view regarding:
I would like to get feedback on the below two proposals:
- Add a function abort_session:
Abort current command and call session.close() so that the locks and resources will be released. This will avoid the need of server restart.
- Add a parameter SQL_SESSION_IDLE_TIMEOUT
With this parameter, a session will be closed by the server, when there was no client activity within the defined timeout period.
Would you kindly elaborate on your last statement there about H2 is not intended to be used over a complex client network?