Error 3626

Severity

17

Message text

The transaction was aborted because it used too much stack space. Either use sp_configure to increase the stack size, or break the query into smaller pieces. spid: %d, suid: %d, hostname: %.*s, application name: %.*s

Explanation

At start-up, Adaptive Server allocates one stack for each configured user connection. These stacks are in contiguous areas of memory, with a guard area at the end of each stack. Adaptive Server periodically checks to determine whether the stack point for a user connection has entered the stack guard area adjacent to that connection's stack. Error 3626 occurs when this has happened.

Because error 3626 occurs before any stack corruption, Adaptive Server does not shut down. Instead, it aborts the user process and rolls back any transactions that existed for that process.

An Adaptive Server process usually encounters this error for one of two reasons:

If this error occurs frequently, there is increased risk that a process may overflow its stack area and corrupt another process’ stack. This situation will cause Adaptive Server to shut down with this error:

kernel:  *** Stack guardword corrupted.

See “Stack guardword corrupted” for more information.

Action

If this error occurs with a transaction that contains a where or where-in clause, you may need to rewrite the query.

If this error occurs because a complex query has run out of stack area, you can resolve it in either of two ways:

When changing the stack size of Adaptive Server, consider:

Additional information

Refer to “sp_configure” in the Reference Manual: Procedures and “Setting Configuration Parameters” in the System Administration Guide: Volume 1 for information about sp_configure and stack size and stack guard size configuration parameters.

Refer to the Adaptive Server Enterprise performance and tuning guides and “Configuring Memory” in the System Administration Guide: Volume 2 for details about configuring Adaptive Server memory.

Versions in which this error is raised

All versions