Informix Error -722
-722 Out of stack space.
The database server has run out of memory for stack space. Ask the Informix database administrator to increase the STACKSIZE parameter that is specified in the $ONCONFIG file to allocate more memory. The database server must be restarted for the change to take effect.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-722 fires when the database server runs out of memory for a thread's stack space — per the
official guidance, this is governed by the STACKSIZE ONCONFIG parameter.
STACKSIZEset too small for the workload's actual needs, per the official guidance — the direct, most common cause.- Deeply nested or recursive SPL routine calls, or a routine with large local
variables/automatic arrays, consuming more stack than an otherwise-adequate
STACKSIZEprovides. - A user-defined routine (C UDR) with an excessively deep call sequence or large automatic arrays, a specific known contributor to stack exhaustion.
Solutions / Resolution
- Ask the database administrator to increase
STACKSIZEin$ONCONFIG, per the official guidance — the database server must be restarted for the change to take effect. - Check current stack usage to gauge how much headroom is actually needed:
onstat -g sts - Review any deeply recursive SPL routines or C UDRs with large automatic arrays involved
in the failure, since these are specific known contributors — reducing recursion depth or
array size can help independently of raising
STACKSIZE.
Examples
Checking current stack usage
$ onstat -g sts
-- review per-thread stack usage against the configured STACKSIZE
Increasing STACKSIZE
# $ONCONFIG
STACKSIZE 128
then restart the instance for the change to take effect.
Diagnostic Checks
- Run
onstat -g ststo review current stack usage across threads. - Identify whether a deeply recursive SPL routine or C UDR was involved in the specific
failure, as a contributor independent of the configured
STACKSIZE.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -722 in this set yet.
Increase STACKSIZE in $ONCONFIG (restart required) — and separately review any deeply
recursive routine or large-automatic-array UDR involved in the specific failure.