Connection to Informix still active despite closing

informix

I have a small C# utility connecting (via the IBM Data Server Provider for .NET) to a Informix DBS (version 11.7) and sending one or two queries to several databases. Even though I close each connection after the query is done, a call to onstat -u still lists my computer, with the flags Y and P (Waiting on a condition, Preparing/prepared, respectively) being set, one line for each query:

address          flags   sessid   user     tty      wait         tout locks nreads   nwrites
56413170         Y--P--- 704      user      MYWS  59dce6e8         0    1     64       0

The connections disappear when I end the program, or after a few minutes. I would expect my client not to show up immediately after closing the connection.

Is this a normal occurrence, or a sign that I might be doing something incorrectly?

Best Answer

Check your connection pooling (settings in IBM Data Server Provider). I never used it, but the docs on IBM Data provider say:

When a connection is first opened against a database, a connection pool is created. As connections are closed, they enter the pool, ready to be reused within the same process by other applications that need connections.

So even if you close the "session" from you app to Informix DB, a connection is still active between IBM Server Provider and the Informix instance.

Hope this helps.