Informix Error -4555: Variable size cannot exceed 65535 bytes.
Cause and resolution
Variable size cannot exceed 65535 bytes.
You have attempted to create a variable whose total size exceeds 65535. Arrays can consume space more quickly than you might notice. A simple array A[100,100] of CHAR(6) would consume 10,000 x 7 - 70,000 bytes.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4555 fires when a declared variable's total size exceeds 65,535 bytes — per the official
guidance, arrays in particular can consume space faster than expected: a simple
ARRAY[100,100] OF CHAR(6) consumes 10,000 × 7 = 70,000 bytes.
- A variable (often an array) whose total size exceeds 65,535 bytes, per the official guidance — the direct, only cause.
Solutions / Resolution
- Reduce the variable's dimensions or element size so its total size stays at or below 65,535 bytes, per the official guidance.
Examples
An oversized array
DEFINE grid ARRAY[100,100] OF CHAR(6)
-- -4555: 100 * 100 * 7 bytes (6 chars + null) = 70,000 bytes, over the 65,535 limit
Corrected
DEFINE grid ARRAY[90,100] OF CHAR(6)
-- 90 * 100 * 7 = 63,000 bytes, under the limit
Diagnostic Checks
- Calculate the total byte size of the variable (dimensions × element size, including any null terminator), and reduce it below 65,535 bytes if it exceeds that limit.
Related Errors / Related Topics
- -4556 — "Object size cannot exceed 65535 bytes." The same size limit, applied to objects (e.g. records/classes) rather than individual variables.
A declared variable's total size exceeds 65,535 bytes — reduce its dimensions or element size.