We have a system running on SQL Anywhere 12 which was working fine for long time, but recently we started to get random timeouts on connections that have been inactive for a while. I excluded possibility that client application somehow messes up the connection, and the problem is now reproducible with a simple test program that does this:
When N reaches 64 (minutes), SQL starts to time out on the call to ct_results(). Message callback gets called with the following message:
This message gets repeated every 15 seconds for up to several minutes, while ct_results() call is in progress. This is also reflected on the database server, which logs the following message in its own log:
That message is repeated several times. At that point, the connection is still visible to sa_conn_info, but attempts to execute any SQL on it result in the timeout. We have no idle timeout enabled. Server starts with -ti0 option, and liveness timeout doesn't apply to TDS connections, from what I understand.
Server version is SQL Anywhere Network Server Version 220.127.116.1157.
I've seen this bug description: link:http://search.sybase.com/kbx/changerequests?bug_id=743662 which mentions similar problem, but the error message is not exactly the same.
Has anyone run into similar problem ? Is this a bug in the DB engine or client library ?
asked 26 May '15, 15:40
You may have to open up a support issue or start a new thread supplying more details about your test program.
From what little I know about CT-Library the error
can only come about because you are waiting on a result set to come back from your query AND you have exceed your CS_TIMEOUT setting. If your SQL is a batch that loops and waits without returning that could be the perfectly normal and expected result.
The repeat of that same exception every 15 seconds is likely has more to do with the CS_TIMEOUT being set to 15 seconds than anything else. The fact that the same error is coming back, could be because it is the same error for the same reason ... and most likely will be related back to the way your code loops and make repeated calls to ct_results().
As to how that correlates to the server abnormal disconnect, I would need to get exact clock timings on when these get logged (both sides) but that too could be after the application gave up; and thus perfectly normal.
If the two, possibly, normal interpretations apply to your situation you could be just looking at a problem that is slowing the server down. That could be contention, excessive concurrency, just loading up the system enough to exceed the hardware and platform capabilities or something else that is contributing here.
And finally, if all you are using is the CT-Library applications to diagnose this then you may be missing the server-busy scenarios that could be leading up to this. Whenever this is occurring can you verify if the server is responsive to connections and requests from dbisql or scjview; and is not busy when monitored by Performance Monitor or other admin tools.
Of course if it is not server and it is not client then you could be looking at a glitch at the network level.
Best of luck.
answered 03 Jun '15, 18:00
Nick Elson S...