cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Anywhere Error -108: Connection not found

Former Member
4,363

We started seeing the following error recently, occurring somewhat randomly, but fairly frequently on otherwise good connections that were working fine up to that point:

SQL Anywhere Error -108: Connection not found

This comes from server message callback set on CT library on attempt to execute SQL command on previously established connection. SQL State is 08W02 and Sybase message number is 4224. This is SQL Anywhere 12 on Linux. This may be related to another disconnection problem I posted recently, but symptoms are different. There are no messages in the DB server logs. There are no inactivity/idle timeouts, server starts with -ti 0 option. When I look at the server, the connection in question is still listed by sa_conn_info and it still established on TCP level, but any attempts to do anything with it fail.

We can start a new connection when this happens, of course, but I am trying to understand why we get the above error in the first place. Web search so far hasn't turned up anything useful.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

This was caused by client process doing fork(). It inherited connections from the parent process, and when it closed them implicitly (by exiting) or explicitly, that effectively disabled connections for the parent process, causing the described symptoms. This probably also messed up the protocol while both processes tried to work with it at the same time, but we didn't get to confirm that.

Closing all connections before fork(), and re-opening them after fork() in both parent and child processes solved the problem.

VolkerBarth
Contributor
0 Kudos

Please mark the answer as accepted (i.e. check the marker) if that seems fitting:)

Answers (0)