Informix Error -566: Cannot initiate sort.
Cause and resolution
Cannot initiate sort.
This internal error reflects an unexpected condition during a sort. Check the accompanying ISAM error code for more information. If the error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-566 is flagged by the official text as an internal error at the setup stage of a sort — before any rows are actually sorted, distinct from a failure during the sort itself (-564) or reading back already-sorted rows (-565).
- Insufficient temporary space to even begin the sort, a plausible non-engine-internal contributor even though the official text frames this as internal — the sort couldn't allocate its initial working space in the configured temp dbspace(s).
- A resource limit reached before the sort could start (available sort-memory buffers, temp-dbspace allocation limits), especially under heavy concurrent load.
- A genuine internal engine condition, per the official guidance's framing, with no documented application-level cause.
Solutions / Resolution
- Check the accompanying ISAM error code, per the official guidance, for the specific underlying reason.
- Check temp-space availability before the sort even runs, since failing at initiation
specifically suggests the resource shortage was already present rather than developing
mid-sort:
reviewing free space in the dbspace(s) named byonstat -dDBSPACETEMP. - If this recurs after ruling out a temp-space shortage, note all circumstances and contact IBM Informix Technical Support, per the official guidance.
Examples
Checking temp space before escalating
$ onstat -d
-- review free-page counts for the dbspace(s) listed in DBSPACETEMP
-- before the sort was even attempted
Diagnostic Checks
- Check the accompanying ISAM error code first, per the official guidance.
- Check free space in the
DBSPACETEMPdbspace(s) as the most plausible concrete contributor, since this fires before the sort can even begin.
Related Errors / Related Topics
- -564 — "Cannot sort rows." Same internal-sort-error family, during the sort itself rather than at initiation.
- -565 — "Cannot read sorted rows." Same family, at the read-back stage.
Part of the same three-error sort-phase family as -564/-565 — check the accompanying ISAM error and temp-space availability before escalating.