Informix Error -529: Cannot attach to shared memory.
Cause and resolution
Cannot attach to shared memory.
This error message appears prior to Version 6.0. Your application program is unable to initialize its connection to the database server because you are using a shared-memory implementation. Either the database shared memory has not been initialized, or the maximum number of users has already started using the system. Check the accompanying ISAM error code for more information.
-529 Cannot attach to transaction.
This error message appears beginning with Version 6.0. Your application program is unable to initialize its connection to the database server because you are using a shared-memory implementation. Either the database shared memory has not been initialized, or the maximum number of users has already started using the system. Check the accompanying ISAM error code for more information.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-529 fires when a client application can't initialize its connection to the database server's shared-memory-based connection mechanism — per the official guidance, either the server's shared memory hasn't been initialized, or the instance has already reached its configured maximum number of concurrent users.
- The database server instance hasn't been started (shared memory not initialized) when the client attempts to connect — the connection attempt has nothing to attach to.
- The instance is already at its configured maximum concurrent-user limit, per the official guidance, so no further connections can attach.
- A stale or corrupted shared-memory segment left over from an unclean server shutdown, preventing new connections from attaching correctly even though the instance appears to be running.
Solutions / Resolution
- Check the accompanying ISAM error code, per the official guidance, for the specific underlying reason rather than treating -529 alone as diagnostic.
- Confirm the database server instance is actually up:
a summary status of "Quiescent", "Recovery", or no response at all indicates the instance isn't accepting connections yet.onstat - - Check current versus maximum configured connections if the instance is up:
compared against theonstat -g sesNETTYPE/connection-limit settings in$ONCONFIG, if the accompanying ISAM error points toward a user-limit condition. - Restart the instance if shared memory appears corrupted after an unclean shutdown, following
the standard
oninit/recovery procedure for this platform.
Examples
Checking instance status first
$ onstat -
IBM Informix Dynamic Server Version ... -- Quiescent -- Up 00:00:00 -- ...
A "Quiescent" or unreachable status means the client's connection attempt has nothing to attach to yet.
Diagnostic Checks
- Run
onstat -to confirm the instance is actually on-line and accepting connections. - Check the accompanying ISAM error code for the specific reason, per the official guidance, before assuming either shared-memory initialization or a user limit is the cause.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -529 in this set yet.
Check the accompanying ISAM error first, then confirm the instance is actually up (onstat -)
before investigating a possible connection-limit condition.