Kbase P3439: An explanation of the causes of Progress Errors that suggest "Increase the -s parameter"
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/26/2010 |
|
Status: Verified
GOAL:
An explanation of the causes and corrective measures to take if you encounter PROGRESS errors which indicate that you should increase the stack (-s) startup parameter.
GOAL:
The 4GL stack explained
GOAL:
What is stack used for?
GOAL:
How to debug "Increase -s" errors 279 280 5635
GOAL:
How to calculate the startup parameter -s.
GOAL:
What value should the stack size parameter -s be set to?
GOAL:
How much to increase stack size when getting error messages that suggest "Increase the -s parameter"
FACT(s) (Environment):
Progress 8.x
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
FIX:
This Solution provides an explanation of the causes and corrective measures to take if you encounter PROGRESS errors 279 or 280 which indicate that you should increase the stack (-s) startup parameter.
The stack is an internal memory area used by Progress program modules. Progress uses the -s stack to maintain procedure context (runtime parameters, return addresses) and as space in which to evaluate all expressions. Stack overflow errors appear when the stack size is too small for the application's needs usually resulting in an abnormal termination of client session. These errors are most likely to occur when data definitions are loaded for very large tables or there may be an infinite recursive function or procedure call which require more stack space than usual, for example. The size of the stack is in 1KB units. The minimum value is 9, and the single- and multi-user default is 40 KB; the actual maximum value is limited only by the available memory on the client machine. Progress uses the stack (-s startup parameter) in the following situations, these errors do not in themselves indicate corruption:
- The first time schema is read into memory it is placed on the stack and will remain there for that connection.
- While compiling expressions they are placed on the stack until later placed in the compiled (.r) code.
- All frame information is placed on the stack.
- Arguments that are passed to procedures are placed on the stack.
- Names of procedures are placed on the stack.
- When displaying data or constants, they are placed on the stack for evaluation.
- Complex statements are placed on the stack.
Corrective measures that can be considered are:
Increase stack space (PROGRESS -s startup parameter) if you are not at the maximum value (31k) in Progress versions prior to Progress 9.x In Progress 9.x, the maximum value (in KB) is limited by available memory on the client machine. The default is 40KB for single and multi-user sessions (v9).
Unfortunately there is no way to set limits to help recognize when this error is going to occur or specific rule on calculating the value this parameter should have. The user is probably loading data definitions for very large tables or using recursive procedures which require more stack space. The first option is to increase the -s parameter (in KB units) in the client connection .pf file until the error disappears. If a recursive procedure is involved, consider re-writing the procedure iteratively instead of recursively.
For additional information on where to set the -s parameter for WebClient, AppServer or WebSpeed, reference solution: Where to set the Client Session Stack Size (-s) parameter for WebClient