[olug] Closing Socket Connections

Nick Walter waltern at iivip.com
Wed Mar 3 16:30:42 UTC 2004


O/S settings won't help in this case.  Oracle will keep these
connections alive.  Tell the developer to fix his code so that
connections are shut down when no longer needed.  Oracle offers example
code and libraries for connection pooling for almost any conceivable
language one would write an Oracle application in.  I'd tell him to look
into that.

Leaving Oracle connections open is like a time bomb for a database app. 
Once the list of connections gets too large Oracle won't allow any
more.  This is usually governed by the "processes" parameter in the
Oracle instance configuration, assuming dedicated server mode.  When
Oracle starts refusing new connections and the app fails then of course
the developer will blame either Oracle, the network, or the O/S (never
their own app).  Then it takes an extra specially large hammer to
convince them to fix their damn app.

Nick Walter

P.S.  I hope I don't sound too bitter about this issue, but I've had
this happen to me sooooooooo many times.

On Wed, 2004-03-03 at 09:15, Dave Hull wrote:
> Quoting Terry <td3201 at yahoo.com>:
> 
> > Are all of the established connections you are
> > referring to related to Oracle?
> > netstat -anp might be useful too.
> 
> Yes. I actually did a netstat -aepn. All of the connections I'm concerned about
> are to the tnslistener. I have talked to the user/developer who the connections
> belonged to and he says it may be a problem with his code, but he's also the one
> who told me about the setting on Sun systems where one can automatically close
> idle connections.
> 
> >From what I've read the SO_KEEPALIVE option will start sending probes to the
> client connection after it's been idle for so long. If the client doesn't
> respond in a timely manner and after the set number of probes have been sent,
> then the connection is closed.
> 
> Now I need to find out where to enable this feature.



More information about the OLUG mailing list