You On Mon, 9 Sep 2019 at 13:47, 'Christian Buchegger' via H2 Database < [email protected]> wrote:
> I would like to get feedback on the below two proposals: > > 1. 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. > > That sounds reasonable. > > 1. > 2. 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. > > > Note that, with something like this, you are invariably going to occasionally manage to kill a session under a live client, and the client may not notice until it issues a command, whereupon it will need to reconnect and re-issue that command. You can probably mitigate these issues already by (*) chatting to your sysadmin and making the timeout before recycling IP addresses longer, so your users normally get the same IP address again. (*) changing your app to shut down connections aggressively itself, and re-open them as needed - this can normally be configured inside a connection pool. For bonus points, the connection pool can be configured to do a "test if connection OK before handing it out", which will prevent the problem that your app sees a broken connection. But really the root of the problem is that you're using H2 as an application server, which it is not really meant to be - it is not intended to be using directly facing a complex client network. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/CAFYHVnVXsREAztorVWMiPgYv-ovUTyP3o8omyORAgzOnk5BMTQ%40mail.gmail.com.
