on 2019 Dec 24 2:31 PM
Hello,
I am using Sybase Anywhere 12 with a java application. I connect to the db with jdbcTemplate and am using jconn4.
I initially thought the issue was with the Idle connection parameter (even though it is set by default to 240 min). However I noticed in the documentation that Usage: "Anywhere except with TDS connections. TDS connections (including jConnect) ignore the SQL Anywhere Idle connection parameter."
Why is my connection consistently dying after two hours and how do I modify the IDLE time for a TDS connection?
Thanks.
Sometimes you need a law degree to understand the documentation... fortunately, I once stayed at a Holiday Inn Express so we're all set!
Connection parameters are used to set connection properties, and what you may be dealing with is a server property...
SELECT @@VERSION, PROPERTY ( 'IdleTimeout' ) AS "Server Connection Idle Timeout", CONNECTION_PROPERTY ( 'IdleTimeout' ) AS "Connection Connection Idle Timeout" @@VERSION,Server Connection Idle Timeout,Connection Connection Idle Timeout '12.0.1.4231','240','0'
Consider using dbsrv12 -ti 0
SELECT @@VERSION, PROPERTY ( 'IdleTimeout' ) AS "Server Connection Idle Timeout", CONNECTION_PROPERTY ( 'IdleTimeout' ) AS "Connection Connection Idle Timeout" @@VERSION,Server Connection Idle Timeout,Connection Connection Idle Timeout '12.0.1.4231','0','0'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to add: You might also check whether liveness timeout (LTO) checking leads to closed connections. When debugging long running applications (say, batch imports), I usually add LTO=0 to the connection string in order to prevent the connection to be closed by the database server in case the program is paused by a breakpoint or the like...
To clarify: That is different from idle timeout checking, and the latter is certainly relevant in your case because of the 240 minute default.
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.