Oracle OCI client not properly closing connections

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
thedstro
Posts: 3
Joined: Tue May 20, 2008 12:35 am

Oracle OCI client not properly closing connections

Post by thedstro »

After installing HostMonitor and wanting to use it to monitor our main database server (running Oracle 10g) we started running out of dedicated server processes... it seems that HostMonitor is opening a new connection every time it runs a test and these connections are staying open almost indefinitely, until they time out.

This also happens if we use "shared server" mode, it takes longer to happen, but eventually it runs out of shared server processes as well.

Other applications we have that frequently open/close connections, including those using OCI, do not cause the same kind of lingering connections.

Is the "check oracle server" test calling OCILogoff() to close these connections after it tests?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: Oracle OCI client not properly closing connections

Post by KS-Soft Europe »

thedstro wrote:After installing HostMonitor and wanting to use it to monitor our main database server (running Oracle 10g) we started running out of dedicated server processes... it seems that HostMonitor is opening a new connection every time it runs a test and these connections are staying open almost indefinitely, until they time out.
Could you provide more information, please?
- What version of HostMonitor do you use?
- What Windows do you use? Service Pack?
- What version of Oracle Client do you use?
- What exact version of Oracle Call Interface (oci.dll) have you installed?
thedstro wrote:Is the "check oracle server" test calling OCILogoff() to close these connections after it tests?
HostMonitor calls OCISessionEnd() to release user session. When HostMonitor performs Oracle test it uses OCIServerAttach and OCISessionBegin fuctions (oci.dll) to create a user session and begins a user session for a given server. If session established, HostMonitor closes session and sets "host is alive" status.

Regards,
Max
thedstro
Posts: 3
Joined: Tue May 20, 2008 12:35 am

Post by thedstro »

Could you provide more information, please?
- What version of HostMonitor do you use? 7.22c
- What Windows do you use? Service Pack? XP, SP2
- What version of Oracle Client do you use? Oracle InstantClient 11.1.0.6.0 Basic
- What exact version of Oracle Call Interface (oci.dll) have you installed? oci.dll reports itself as version 11.1.0.1

Are you also calling OCIServerDetach() and using OCIHandleFree() to free all associated handles?

http://download.oracle.com/docs/cd/B141 ... htm#462207
"Terminating an Application"
thedstro
Posts: 3
Joined: Tue May 20, 2008 12:35 am

Post by thedstro »

Sooooooooooo................. yeah.

The problem was not caused by the Check Oracle Server test. Rather, the stacking connections are caused by one of the web applications which is ALSO being monitored by HostMonitor. So, the connections are just connections being allocated from the connection pool, and not HostMonitor improperly closing its connections.

:oops:
Sorry...
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Are you also calling OCIServerDetach() and using OCIHandleFree() to free all associated handles?
Sure. HostMonitor calls OCISessionEnd(), OCIServerDetach() and OCIHandleFree() to release several handles
The problem was not caused by the Check Oracle Server test. Rather, the stacking connections are caused by one of the web applications which is ALSO being monitored by HostMonitor. So, the connections are just connections being allocated from the connection pool, and not HostMonitor improperly closing its connections.
Thank you for explanation

Regards
Alex
Post Reply