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.

asked 24 Dec '19, 14:31

tony2840's gravatar image

tony2840
56115
accept rate: 0%

edited 24 Dec '19, 14:35


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'
permanent link

answered 24 Dec '19, 15:56

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

converted 27 Dec '19, 07:18

Volker%20Barth's gravatar image

Volker Barth
40.1k361549819

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.

(27 Dec '19, 07:29) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×86
×78
×9

question asked: 24 Dec '19, 14:31

question was seen: 1,156 times

last updated: 27 Dec '19, 07:31