How to find "leaked" resources in Informix
Posted in 2003
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Hi My IDS version :9.2 Platform Solaris 7 Application in ESQL/C. We are having some problem in our application which seems to be leading to some sort of a leak in Informix. So what happens is that Informix IDS keeps allocating more and more "Virtual Shared memory" segments there by increasing its size. Once the Informix reaches ~4G size the server crashes (exits). Now the problem is that I am not able to figure out a way to find out where or how are these resources being "leaked". can someone list down : a. Scenarios when Informix would allocate more virtual shared memory (I mean what kind of queries etc b. What kind of resources are allocated in Informix via my application (this is a ESQL/C application ) Any pointers are appreciated. Thanks Ankur
"Tinku" <anbharga@cisco.com> wrote in message news:c47f56ca.0311241353.aa3d333@posting.google.com...
> Hi
>
> My IDS version :9.2
> Platform Solaris 7
> Application in ESQL/C.
>
> We are having some problem in our application which seems to be
> leading to some sort of a leak in Informix. So what happens is that
> Informix IDS keeps allocating more and more "Virtual Shared memory"
> segments there by increasing its size. Once the Informix reaches ~4G
> size the server crashes (exits).
>
> Now the problem is that I am not able to figure out a way to find out
> where or how are these resources being "leaked".
>
> can someone list down :
>
> a. Scenarios when Informix would allocate more virtual shared memory
> (I mean what kind of queries etc
>
> b. What kind of resources are allocated in Informix via my
> application (this is a ESQL/C application )
>
> Any pointers are appreciated.
Tinku,
I don't know whether this is related to your problem.
What is the exact version of Informix. Is it anything earlier than 9.21.UC4.
Till UC4, there was a bug in dbaccess/dbload etc while loading varchar and
other variable length fields. If you are loading huge number of rows it can
just gobble up memory with the same message you are seeing.
Also long time back I used 'purify' with Informix 5.x and we noticed that ESQL/C
application has to be very particular about destroying cursors and prepared
statements once they are no longer needed. That is a close cursor should always
be followed by free cursor and followed by free prepare statement. I always do
it as a matter of practice.
anbharga@cisco.com (Tinku) writes: > My IDS version :9.2 > Platform Solaris 7 > Application in ESQL/C. > > We are having some problem in our application which seems to be > leading to some sort of a leak in Informix. So what happens is that > Informix IDS keeps allocating more and more "Virtual Shared memory" > segments there by increasing its size. Once the Informix reaches ~4G > size the server crashes (exits). > > Now the problem is that I am not able to figure out a way to find out > where or how are these resources being "leaked". > > Any pointers are appreciated. Any malloc debugger that keeps track of malloc()s and free()s should do the job. -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412 Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142 President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B