-mmax and called programs dynamically compiled for each run

rf08

New Member
-mmax is constantly being incremented for called programs that must be compiled each time because of passed arguments. How can this be avoided (not for effeciency sake) so that -mmax does not reach it's limit?
 

Chris Kelleher

Administrator
Staff member
You can force PROGRESS to adhere to the specified -mmax limit by starting the session with the -hardlimit startup parameter. When you use the -hardlimit startup parameter, PROGRESS, issues the WARNING message when you exceed the Local Buffer Size limit. It also issues a message that a resource limit was reached and raises an untrappable STOP condition. Note also that -hardlimit also enforces the limits set by the Directory Entries (-D), the Local Buffer Size (-l), and the Nested Blocks (-nb) startup parameters. So the STOP condition is raised when any of the specified limits are reached.
 

rf08

New Member
I understand the purpose of -mmax and -hardlimit but how does this explain that
the session memory being continually consumed ? Do repeatedly called (compiled at runtime) modules cause this? Clue: the compiled at runtime programs gets a unique program name such as 12345678.ped and this assigned name might be changing each time the module is called. I will have to check this out.
 

Chris Kelleher

Administrator
Staff member
Why are the programs being compiled at run-time? Are these programs dynamically generated by another program? Or are you passing parameters to a program? Maybe a sample of what you are doing and what version of Progress you are running might help.
 

rf08

New Member
There are 10 programs - the first does user selection of what table to analysis and obtains information about the table from the sub-schema, the second obtains information again from the sub-schema about each and every field (column) in the user selected table. The other eight programs are very simple in that they receive by argument (&) the user selected table name and field name. Each one of the eight represent one of the possible datatypes stored within a table record structure. each datatype module returns a set value depending upon the data content of the passed tablename.filename. These eight modules are the ones compiled each time they are called - because the tablename and fieldname are different each time. So, if a file had 10 records and 20 fields the aggregate call count would be 200 program calls, if 15 of the fields were INTEGER type 150 of those calls would be to one of the eight modules. Therefore, with a table of 1,000,000 records and 60 fields the -mmax value is constantly being incremented.
 

Chris Kelleher

Administrator
Staff member
I took a look at the code you had emailed me offline. Since you are passing the table/field name to the sub-programs, Progress compiles the program each time the parameters change. The only way around this might be to use dynamic buffers and queries available in version 9.x.
 

rf08

New Member
We are using version 8 and have no need for 9 at this time. We have decided to put in checkpoints (saving stats and record position) for a restart if the users session runs out of memory when and if -mmax reaches maximum. This situation has also been reviewed by Progress Techs as well. Consider this issue closed for me.
 
Top