shared memory already exists
Posted in 1999
Topics: General Discussion
Hello Everybody I am getting the following error when I tried to initialize one of my instances. shmget:[EEXIST][17]: key 52564801:shared memory already exists mt_shm_init:cant' create resident segemnt. Someone please let me know how t fix this. Thank You Saleem
Saleem Mohammad wrote: > I am getting the following error when I tried to initialize one of my > instances. > > shmget:[EEXIST][17]: key 52564801:shared memory already exists > mt_shm_init:cant' create resident segemnt. > > Someone please let me know how t fix this. It probably means that the instance is already running, or that there's another instance on the machine with the same server number which is running. Failing that, an initialization attempt failed and didn't clean up behind itself. Use ipcrm to remove the shared memory segment. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
I've experienced this a lot lately.
Once I accidentally used the same server number for two instances. To check
this, go into onmonitor:parameters:shared memory, it one of the first
fields.
If that's not the problem, do a ps -ef | grep oninit. If you have a master
oninit running, one whose parent is 1, and *all* of your instances are off
line, then kill -9 the master oninit. Do this by determining the process id
from the pe -ef output, then executing the command line kill -9 <process
id>. This should clean up the shared memory segments (you can verify this
with ipcs | grep informix).
Saleem Mohammad wrote:
> Hello Everybody
>
> I am getting the following error when I tried to initialize one of my
> instances.
>
> shmget:[EEXIST][17]: key 52564801:shared memory already exists
> mt_shm_init:cant' create resident segemnt.
>
> Someone please let me know how t fix this.
>
> Thank You
> Saleem