Possible to set server props when using AUTO_SERVER?

68 views
Skip to first unread message

h2_mad

unread,
May 24, 2012, 11:30:03 AM5/24/12
to H2 Database
Hi,

I am using auto mixed server mode.

Since i set to use this mode by setting AUTO_SERVER=true on my connect
string and not programmatically like in full server mode, can i affect
the server side of the auto mixed mode by settings the properties
before db startup? By either:

System.setProperty("h2.serverCachedObjects", "512");
System.setProperty("h2.serverResultSetFetchSize", "1024");

or:

-Dh2.serverCachedObjects=512
-Dh2.serverResultSetFetchSize=1024

The reason why i'm asking is that i was seeing problems seemingly
related to this issue:
http://stackoverflow.com/questions/9779324/program-hangs-after-retrieving-100-rows-containg-clob

When i updated to use the latest h2 jar of 167 my similar problems
went away with auto server.

I'm assuming that auto server mode uses full server code. I believe
since moving to 167 where this change is in the change log:
"Server mode: the number of CLOB / BLOB values that were cached on the
server is now the maximum of: 5 times the SERVER_RESULT_SET_FETCH_SIZE
(which is 100 by default), and SysProperties.SERVER_CACHED_OBJECTS."

... my problem has disappeared by accident as the new change to 167 is
masking (temporarily) my similar LOB issues..

Can i affect a change to server settings when i'm in auto mixed server
mode???

Thanks in advance for your replies, cheers

h2_mad

unread,
May 24, 2012, 11:40:30 AM5/24/12
to h2-da...@googlegroups.com
Also when i issue this select stmt i don't see any information relating to the properties i desire to see:

select * from INFORMATION_SCHEMA.SETTINGS

h2_mad

unread,
May 29, 2012, 5:02:21 AM5/29/12
to h2-da...@googlegroups.com
Hi,

Still wondering if you can set the fetch size and server cache size when using auto mixed mode?

Thanks

Thomas Mueller

unread,
May 30, 2012, 3:21:37 AM5/30/12
to h2-da...@googlegroups.com
Hi,

You can't change the settings of the server from within the client. One solution might be to set the system properties in all applications that use the database.

Regards,
Thomas

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/ovyPLYxka2UJ.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

h2_mad

unread,
May 30, 2012, 10:29:29 AM5/30/12
to h2-da...@googlegroups.com
Hi, thanks for the reply.

I've done this but it doesn't seem to affect anything and i get  The object is already closed [90007-167] when using auto_server and select * on a table containing many LOBs

Could i suggest this as a bug and be included in the next release?

Thanks again
To unsubscribe from this group, send email to h2-database+unsubscribe@googlegroups.com.

Thomas Mueller

unread,
Jun 4, 2012, 4:43:32 AM6/4/12
to h2-da...@googlegroups.com
Hi,

Could you post a complete, simple (as simple as possible), reproducible test case?

Regards,
Thomas

To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/vOz4cfQPBoMJ.

To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages