Just something I stumbled accross since we went from 8.0.3 to 12.0.1: When debugging an ODBC application (running on a different box and connectin via TCP/IP) and staying within a breakpoint for some time, it seems that with the default liveness checking (120 seconds), the liveness times out unexpectedly, and the connection gets dropped. (The debugged thread is using a database connection but does not necessarily have cursors open during the breakpoint.) Setting LTO=0 in the connection string prevents this undesired behaviour. As I'm not aware that I have changed the liveness settings between both versions, is this a known behaviour change? |
This is expected behaviour. The client needs to send one or more packets within the liveness timeout to prevent the connection from being dropped. On an idle connection this is done by a thread started by the SQL Anywhere client DLL. All threads are stopped (frozen) when you are debugging an application and the application is paused by the debugger, so the thread that needs to send liveness packets can't. Thanks for the clarification - that's understandable. However, I'm still somewhat irritated that I haven't noticed the behaviour with 8.0.3, and I'm quite sure I have never modified the -tl settings. So is there a change in behaviour w.r.t. v8? FWIW, both the 8.0.3 and the 12.0.1 server have always used a non-standard -ti setting (-ti 0) - would this have any influence - and a different one in v8 than currently?
(04 Jan '12, 09:52)
Volker Barth
You should get liveness timeouts if the client is paused all the way back to ASA 6.0 and likely even earlier. Note there are no liveness packets on shared memory (we check if the process is running instead) so maybe that is why you didn't notice this before. -ti (idle timeout) should have no impact on liveness (-tl)
(04 Jan '12, 10:08)
Ian McHardy
Replies hidden
Strange thing (or I should checksum my main memory...) - debugging has generally be done via TCP/IP as the database server is not running locally. - Well, let's leave the past behind, nowadays LTO=0 does its job as wanted:)
(04 Jan '12, 10:19)
Volker Barth
|
We've had similar problems IIRC starting with ASA9. To me it looked like while at a breakpoint, the application stops processing messages. So the db connection layer can't respond to the liveliness request, if it runs within the application process (e.g. DLL). That might come out differently depending on OS, development enviroment and application design