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.

asked 26 May '15, 19:36

Andrix's gravatar image

Andrix
61224
accept rate: 100%


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.

permanent link

answered 28 May '15, 11:57

Andrix's gravatar image

Andrix
61224
accept rate: 100%

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

(28 May '15, 12:20) 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:

×68
×9
×4
×3

question asked: 26 May '15, 19:36

question was seen: 3,879 times

last updated: 28 May '15, 12:20