How to modify SELECT LOB_TIMEOUT

48 views
Skip to first unread message

Sandro Mosdzinski

unread,
Nov 29, 2022, 1:39:32 AM11/29/22
to H2 Database
The default value of SELECT LOB_TIMEOUT is 30000. I want to increase the timeout. Does anyone know how to do it?

Evgenij Ryazanov

unread,
Dec 3, 2022, 2:19:56 AM12/3/22
to H2 Database
Hello.

You can add ;LOB_TIMEOUT=your_value to JDBC URL.

Sandro Mosdzinski

unread,
Dec 3, 2022, 5:34:47 AM12/3/22
to H2 Database
Hi,

I want to change the timeout only for using the H2 console. So I think I have to adapt the command in the h2.bat. At the moment the command is

@java -cp "h2-1.4.200.jar;%H2DRIVERS%;%CLASSPATH%" org.h2.tools.Console %*
@if errorlevel 1 pause

How do I have do modify the command to set the timeout

Evgenij Ryazanov

unread,
Dec 3, 2022, 7:26:55 AM12/3/22
to H2 Database
You cannot specify any connection options in this file.

You need to change JDBC URL in Login window of H2 Console itself.
Message has been deleted

Sandro Mosdzinski

unread,
Dec 3, 2022, 7:48:50 PM12/3/22
to H2 Database
I set LOB_TIMEOUT to 3600000 and expected the console to hold the connection for 1 hour. But I tried to run a SQL command 30 minutes after starting the h2 console and the connection was lost. Did I set the wrong parameter?

Evgenij Ryazanov

unread,
Dec 3, 2022, 10:13:47 PM12/3/22
to H2 Database
Yes, this setting is not related to timeout of web sessions.

You need
java -Dh2.consoleTimeout=3600000 …

Sandro Mosdzinski

unread,
Dec 4, 2022, 3:54:55 AM12/4/22
to H2 Database
Would the timeout counter be resetted if I execute a new sql?

Evgenij Ryazanov

unread,
Dec 4, 2022, 8:19:18 AM12/4/22
to H2 Database
Yes, execution of any SQL command and also actions on toolbar (refresh, commit, rollback, command history, etc.) reset the timeout.

Sandro Mosdzinski

unread,
Dec 4, 2022, 8:23:41 AM12/4/22
to H2 Database
Thank you very much Evgenij for you quick support
Reply all
Reply to author
Forward
0 new messages