Informix Error -1252: Unable to create shared memory. shmget failed.
Cause and resolution
Unable to create shared memory. shmget failed.
Your application is initializing its communication with the database server, which is a version that uses shared memory for communications. An unexpected error has occurred with an operating-system function, shmget. Look for operating-system messages that might give more information. Consult with the person who installed the IBM Informix shared-memory product.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1252 fires when the application, initializing shared-memory communication with the database
server, hits an unexpected OS error from shmget — per the official guidance, this is an
OS-level resource/configuration problem with System V shared memory segments.
- The System V shared-memory segment limit (or total shared-memory size limit) reached on
the host, per the official guidance's framing —
shmgetitself failed at the OS level. - A permissions problem preventing shared-memory segment creation for the account involved.
Solutions / Resolution
- Check for additional operating-system messages, per the official guidance.
- Consult with the IBM Informix shared-memory product installer, per the official guidance — shared-memory kernel parameters are typically tuned as part of that installation.
Examples
Checking System V shared-memory limits
$ ipcs -m
$ cat /proc/sys/kernel/shmmax
Diagnostic Checks
- Check OS-level shared-memory limits and current usage against what the database server needs.
- Check the operating-system error log for the specific
shmgetfailure reason.
Related Errors / Related Topics
- -1250 — "Unable to create pipes." A related connection-initialization error, about pipes rather than shared memory.
- -1251 — "Unable to create shared memory. semget failed." A closely related error, about a
different shared-memory system call (
semget) failing.
An OS-level shmget failure during shared-memory initialization — check shared-memory limits
and involve whoever installed the shared-memory product.