Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory allocation error in informix 4gl program

Status
Not open for further replies.

aft5425

Programmer
Oct 23, 2012
16
US
Database: Informix 11.50.FC3
Server: AIX 7.1 o/s with 64 GB of memory

We have an Informix 4GL program that runs in batch mode and creates an output file. The output file is an xml file. Recently, the program starting failing with the following error:

Program stopped at 'siebel_outleads_rev.4gl', line number 832.
SQL statement error number -406.
Memory allocation failed.
ERROR: siebel_outleads_rev.42r failed - aborting

Every time it gets this error, it fails on a different SQL statement where its building a cursor (DECLARE CURSOR) to fetch rows from the database with. This program has been running for several months and there have been no recent changes to it, so that’s why I'm confused as to why this is failing with this error all of a sudden.

The SQL error -406 refers to “memory not being available”.

Do we have to worry about allocating memory and freeing it when we open and close a cursor? I thought the database or operating system would handle that automatically. We open 12 cursors within this program.
 
there have been no recent changes to it
And no change to the OS nor to Informix ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That's correct. The program hasn't changed in months, nor has the Informix version, nor has the database version changed. The only thing that i can see happening is that the program is now processing more data than it ever has before and the output files are larger.

We've even gone it and made sure to CLOSE and FREE cursors after using them...although the database does some of this automatically.

Any idea why we are getting this memory allocation error and how we can fix it in an Informix 4GL program?
 
Does anyone know how i can check to see if this informix program has a memory leak?

SQL error -406 refers to "memory leak", but i'm not sure how i could tell.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top