Informix Error -565: Cannot read sorted rows.
Cause and resolution
Cannot read sorted rows.
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
-565 is flagged by the official text as an internal error, specifically at the stage of reading back rows after a sort has already completed — distinct from an error during the sort itself (-564) or during sort setup (-566).
- The sort's temporary output was disrupted between completion and read-back — an I/O error or unexpected removal of the temp file/dbspace content holding the sorted rows, a plausible non-engine-internal contributor even though the official text frames this as internal.
- A temp-space shortage arising after the sort completed but before every row was read back, if other concurrent activity consumed the same temp dbspace.
- 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 for concurrent temp-space pressure around the time of the failure — other large
sorts or temp-table operations competing for the same
DBSPACETEMPdbspace(s):onstat -d - If this recurs after ruling out temp-space contention, note all circumstances and contact IBM Informix Technical Support, per the official guidance.
Examples
Checking for concurrent temp-space pressure
$ onstat -d
-- review free-page counts for the dbspace(s) listed in DBSPACETEMP,
-- and onstat -g ses for other sessions running large sorts concurrently
Diagnostic Checks
- Check the accompanying ISAM error code first, per the official guidance.
- Check for other concurrent large sorts/temp-table activity that could have exhausted temp space between the sort's completion and the read-back failing.
Related Errors / Related Topics
- -564 — "Cannot sort rows." Same internal-sort-error family, during the sort itself rather than the read-back stage.
- -566 — "Cannot initiate sort." Same family, at the setup stage.
Part of the same three-error sort-phase family as -564/-566 — check the accompanying ISAM error and for concurrent temp-space contention before escalating.