Informix Error -4556: Object size cannot exceed 65535 bytes.
Cause and resolution
Object size cannot exceed 65535 bytes.
You have attempted to create an object 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
-4556 fires when a declared object's (e.g. record's or class'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.
- An object (often containing an array) whose total size exceeds 65,535 bytes, per the official guidance — the direct, only cause.
Solutions / Resolution
- Reduce the object's member dimensions or element sizes so its total size stays at or below 65,535 bytes, per the official guidance.
Examples
An oversized record member
DEFINE rec RECORD
grid ARRAY[100,100] OF CHAR(6)
-- -4556: 100 * 100 * 7 bytes = 70,000 bytes, over the 65,535 limit
END RECORD
Corrected
DEFINE rec RECORD
grid ARRAY[90,100] OF CHAR(6)
-- 90 * 100 * 7 = 63,000 bytes, under the limit
END RECORD
Diagnostic Checks
- Calculate the total byte size of the object, including all of its members, and reduce it below 65,535 bytes if it exceeds that limit.
Related Errors / Related Topics
- -4555 — "Variable size cannot exceed 65535 bytes." The same size limit, applied to an individual variable rather than an object.
A declared object's total size exceeds 65,535 bytes — reduce its members' dimensions or element sizes.