Getting "cannot attach to shared memory error"
Posted in 2013
Topics: Stored Procedures & SPL, Server Administration, Platform-Specific Issues
OS: Solaris 5.6
Informix version: 7.30.UC11
We have a script that runs every 15 minutes on the server that checks for the
log space available by querying the syslogfil table in the sysmaster database.
It has been running fine without issue for years. Then I got a page from this
script saying the following:
onstat: Cannot attach to shared memory. errno = 22
I checked the SHMMAX kernel variable with the SA team and they haven't changed
the variable, and the ONCONFIG hasn't been changed for a long time. I also
checked the memory segments and those appear to be fine as well. I can run
this script successfully from the command prompt, but it suddenly doesn't want
to run in the cron.
Any ideas on what needs to be done to get this to work without bouncing the
instance (or upgrading to a newer version of Informix)?
Keith Schleicher
IT Database Administrator
Cell: 224-210-8358
Blackberry:
2242108358@messaging.sprintpcs.com<mailto:2242108358@messaging.sprintpcs.com>
Page: 2242108358@sprint.skytel.com<mailto:2242108358@sprint.skytel.com>
For more information, use our DBA Wiki page link below:
http://wiki.intra.sears.com/confluence/display/TechStrag/Database+Management#Dat
abaseManagement<http://wiki.intra.sears.com/confluence/display/TechStrag/Databas
e+Management>
This message, including any attachments, is the property of Sears Holdings
Corporation and/or one of its subsidiaries. It is confidential and may contain
proprietary or legally privileged information. If you are not the intended
recipient, please delete it without reading the contents. Thank you.
onstat is pretty simple in version 7.30. It is really only looking for the
correct
onconfig and pulls the informix server number out to build the shared
memory key.
I would ensure the correct INFORMIXDIR & ONCONFIG environment variables
are set and all the permissions leading up to the $INFORMIXDIR are correct.
Also make sure the permissions on onstat are correct.
John F. Miller III
STSM, Lead Architect
miller3@us.ibm.com
503-747-1366
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 05/10/2013 02:07:59 PM:
> From: "Schleicher, Keith" <Keith.Schleicher@searshc.com>
> To: ids@iiug.org,
> Date: 05/10/2013 02:09 PM
> Subject: Getting "cannot attach to shared memory error" [30246]
> Sent by: ids-bounces@iiug.org
>
> OS: Solaris 5.6
> Informix version: 7.30.UC11
>
> We have a script that runs every 15 minutes on the server that checks for
the
> log space available by querying the syslogfil table in the
sysmasterdatabase.
> It has been running fine without issue for years. Then I got a page from
this
> script saying the following:
>
> onstat: Cannot attach to shared memory. errno = 22
>
> I checked the SHMMAX kernel variable with the SA team and they
> haven't changed
> the variable, and the ONCONFIG hasn't been changed for a long time. I
also
> checked the memory segments and those appear to be fine as well. I can
run
> this script successfully from the command prompt, but it suddenly
> doesn't want
> to run in the cron.
>
> Any ideas on what needs to be done to get this to work without bouncing
the
> instance (or upgrading to a newer version of Informix)?
>
> Keith Schleicher
> IT Database Administrator
> Cell: 224-210-8358
> Blackberry:
>
2242108358@messaging.sprintpcs.com<mailto:2242108358@messaging.sprintpcs.com>
> Page: 2242108358@sprint.skytel.com<mailto:2242108358@sprint.skytel.com>
>
> For more information, use our DBA Wiki page link below:
>
> http://wiki.intra.sears.com/confluence/display/TechStrag/Database
> +Management#DatabaseManagement<http://wiki.intra.sears.com/
> confluence/display/TechStrag/Database+Management>
>
> This message, including any attachments, is the property of Sears
Holdings
> Corporation and/or one of its subsidiaries. It is confidential and
> may contain
> proprietary or legally privileged information. If you are not the
intended
> recipient, please delete it without reading the contents. Thank you.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Well, I checked that $INFORMIXDIR and $ONCONFIG were set, and I don't know =
why anything would have suddenly changed. The system administrators didn't=
see anything change around the time these errors started. The odd thing i=
s that the instance seems to work without issue, while this error would ind=
icate that the server is down.
Keith Schleicher
IT Database Administrator
Cell: 224-210-8358
Blackberry: 2242108358@messaging.sprintpcs.com
Page: 2242108358@sprint.skytel.com=A0
For more information, use our DBA Wiki page link below:
http://wiki.intra.sears.com/confluence/display/TechStrag/Database+Managemen=
t#DatabaseManagement
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of John =
Miller iii
Sent: Friday, May 10, 2013 7:51 PM
To: ids@iiug.org
Subject: Re: Getting "cannot attach to shared memory error" [30247]
onstat is pretty simple in version 7.30. It is really only looking for the =
correct onconfig and pulls the informix server number out to build the shar=
ed memory key.=20
I would ensure the correct INFORMIXDIR & ONCONFIG environment variables are=
set and all the permissions leading up to the $INFORMIXDIR are correct.=20
Also make sure the permissions on onstat are correct.=20
John F. Miller III
STSM, Lead Architect
miller3@us.ibm.com
503-747-1366
IBM Informix Dynamic Server (IDS)=20
ids-bounces@iiug.org wrote on 05/10/2013 02:07:59 PM:=20
> From: "Schleicher, Keith" <Keith.Schleicher@searshc.com>
> To: ids@iiug.org,
> Date: 05/10/2013 02:09 PM
> Subject: Getting "cannot attach to shared memory error" [30246] Sent=20
> by: ids-bounces@iiug.org
>=20
> OS: Solaris 5.6
> Informix version: 7.30.UC11
>=20
> We have a script that runs every 15 minutes on the server that checks=20
> for
the=20
> log space available by querying the syslogfil table in the
sysmasterdatabase.=20
> It has been running fine without issue for years. Then I got a page=20
> from
this=20
> script saying the following:=20
>=20
> onstat: Cannot attach to shared memory. errno =3D 22
>=20
> I checked the SHMMAX kernel variable with the SA team and they haven't=20
> changed the variable, and the ONCONFIG hasn't been changed for a long=20
> time. I
also=20
> checked the memory segments and those appear to be fine as well. I can
run=20
> this script successfully from the command prompt, but it suddenly=20
> doesn't want to run in the cron.
>=20
> Any ideas on what needs to be done to get this to work without=20
> bouncing
the=20
> instance (or upgrading to a newer version of Informix)?=20
>=20
> Keith Schleicher
> IT Database Administrator
> Cell: 224-210-8358
> Blackberry:=20
>=20
2242108358@messaging.sprintpcs.com<mailto:2242108358@messaging.sprintpcs.co=
m>=20
> Page:=20
> 2242108358@sprint.skytel.com<mailto:2242108358@sprint.skytel.com>
>=20
> For more information, use our DBA Wiki page link below:=20
>=20
> http://wiki.intra.sears.com/confluence/display/TechStrag/Database
> +Management#DatabaseManagement<http://wiki.intra.sears.com/
> confluence/display/TechStrag/Database+Management>
>=20
> This message, including any attachments, is the property of Sears
Holdings=20
> Corporation and/or one of its subsidiaries. It is confidential and may=20
> contain proprietary or legally privileged information. If you are not=20
> the
intended=20
> recipient, please delete it without reading the contents. Thank you.=20
>=20
>=20
>=20
***************************************************************************=
****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20
>=20
***************************************************************************=
****
Forum Note: Use "Reply" to post a response in the discussion forum.=20
This message, including any attachments, is the property of Sears Holdings =
Corporation and/or one of its subsidiaries. It is confidential and may cont=
ain proprietary or legally privileged information. If you are not the inten=
ded recipient, please delete it without reading the contents. Thank you.
Hi,
we had such a situation a long while ago. The shared memory was not accessible
for some reason,
ontape could not run through SHM, but with TCP.
Access with dbaccess and JDBC through tcp was without problems.
We found out that sqlhosts file was changed. The last parameter on_servername
of the line (for shared memory not really used)
gives some kind of internal key for shared memory.
Marcus Haarmann
----- Ursprüngliche Mail -----
Von: "Keith Schleicher" <Keith.Schleicher@searshc.com>
An: ids@iiug.org
Gesendet: Samstag, 11. Mai 2013 04:04:52
Betreff: RE: Getting "cannot attach to shared memory error" [30248]
Well, I checked that $INFORMIXDIR and $ONCONFIG were set, and I don't know =
why anything would have suddenly changed. The system administrators didn't=
see anything change around the time these errors started. The odd thing i=
s that the instance seems to work without issue, while this error would ind=
icate that the server is down.
Keith Schleicher
IT Database Administrator
Cell: 224-210-8358
Blackberry: 2242108358@messaging.sprintpcs.com
Page: 2242108358@sprint.skytel.com=A0
For more information, use our DBA Wiki page link below:
http://wiki.intra.sears.com/confluence/display/TechStrag/Database+Managemen=
t#DatabaseManagement
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of John =
Miller iii
Sent: Friday, May 10, 2013 7:51 PM
To: ids@iiug.org
Subject: Re: Getting "cannot attach to shared memory error" [30247]
onstat is pretty simple in version 7.30. It is really only looking for the =
correct onconfig and pulls the informix server number out to build the shar=
ed memory key.=20
I would ensure the correct INFORMIXDIR & ONCONFIG environment variables are=
set and all the permissions leading up to the $INFORMIXDIR are correct.=20
Also make sure the permissions on onstat are correct.=20
John F. Miller III
STSM, Lead Architect
miller3@us.ibm.com
503-747-1366
IBM Informix Dynamic Server (IDS)=20
ids-bounces@iiug.org wrote on 05/10/2013 02:07:59 PM:=20
> From: "Schleicher, Keith" <Keith.Schleicher@searshc.com>
> To: ids@iiug.org,
> Date: 05/10/2013 02:09 PM
> Subject: Getting "cannot attach to shared memory error" [30246] Sent=20
> by: ids-bounces@iiug.org
>=20
> OS: Solaris 5.6
> Informix version: 7.30.UC11
>=20
> We have a script that runs every 15 minutes on the server that checks=20
> for
the=20
> log space available by querying the syslogfil table in the
sysmasterdatabase.=20
> It has been running fine without issue for years. Then I got a page=20
> from
this=20
> script saying the following:=20
>=20
> onstat: Cannot attach to shared memory. errno =3D 22
>=20
> I checked the SHMMAX kernel variable with the SA team and they haven't=20
> changed the variable, and the ONCONFIG hasn't been changed for a long=20
> time. I
also=20
> checked the memory segments and those appear to be fine as well. I can
run=20
> this script successfully from the command prompt, but it suddenly=20
> doesn't want to run in the cron.
>=20
> Any ideas on what needs to be done to get this to work without=20
> bouncing
the=20
> instance (or upgrading to a newer version of Informix)?=20
>=20
> Keith Schleicher
> IT Database Administrator
> Cell: 224-210-8358
> Blackberry:=20
>=20
2242108358@messaging.sprintpcs.com<mailto:2242108358@messaging.sprintpcs.co=
m>=20
> Page:=20
> 2242108358@sprint.skytel.com<mailto:2242108358@sprint.skytel.com>
>=20
> For more information, use our DBA Wiki page link below:=20
>=20
> http://wiki.intra.sears.com/confluence/display/TechStrag/Database
> +Management#DatabaseManagement<http://wiki.intra.sears.com/
> confluence/display/TechStrag/Database+Management>
>=20
> This message, including any attachments, is the property of Sears
Holdings=20
> Corporation and/or one of its subsidiaries. It is confidential and may=20
> contain proprietary or legally privileged information. If you are not=20
> the
intended=20
> recipient, please delete it without reading the contents. Thank you.=20
>=20
>=20
>=20
***************************************************************************=
****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20
>=20
***************************************************************************=
****
Forum Note: Use "Reply" to post a response in the discussion forum.=20
This message, including any attachments, is the property of Sears Holdings =
Corporation and/or one of its subsidiaries. It is confidential and may cont=
ain proprietary or legally privileged information. If you are not the inten=
ded recipient, please delete it without reading the contents. Thank you.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
RUn ipcs -a as root and check what state the relevant shared memory segments
are
in.
Regards,
David.
Also run top can check
On 11 May 2013 at 08:37 Marcus Haarmann <marcus.haarmann@midoco.de> wrote:
> Hi,
>
> we had such a situation a long while ago. The shared memory was not
accessible
> for some reason,
> ontape could not run through SHM, but with TCP.
> Access with dbaccess and JDBC through tcp was without problems.
> We found out that sqlhosts file was changed. The last parameter on_servername
> of the line (for shared memory not really used)
> gives some kind of internal key for shared memory.
>
> Marcus Haarmann
>
> ----- Ursprüngliche Mail -----
>
> Von: "Keith Schleicher" <Keith.Schleicher@searshc.com>
> An: ids@iiug.org
> Gesendet: Samstag, 11. Mai 2013 04:04:52
> Betreff: RE: Getting "cannot attach to shared memory error" [30248]
>
> Well, I checked that $INFORMIXDIR and $ONCONFIG were set, and I don't know =
> why anything would have suddenly changed. The system administrators didn't=
> see anything change around the time these errors started. The odd thing i=
> s that the instance seems to work without issue, while this error would ind=
> icate that the server is down.
>
> Keith Schleicher
> IT Database Administrator
> Cell: 224-210-8358
> Blackberry: 2242108358@messaging.sprintpcs.com
> Page: 2242108358@sprint.skytel.com=A0
>
> For more information, use our DBA Wiki page link below:
> http://wiki.intra.sears.com/confluence/display/TechStrag/Database+Managemen=
> t#DatabaseManagement
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of John =
> Miller iii
> Sent: Friday, May 10, 2013 7:51 PM
> To: ids@iiug.org
> Subject: Re: Getting "cannot attach to shared memory error" [30247]
>
> onstat is pretty simple in version 7.30. It is really only looking for the =
> correct onconfig and pulls the informix server number out to build the shar=
> ed memory key.=20
>
> I would ensure the correct INFORMIXDIR & ONCONFIG environment variables are=
> set and all the permissions leading up to the $INFORMIXDIR are correct.=20
> Also make sure the permissions on onstat are correct.=20
>
> John F. Miller III
> STSM, Lead Architect
> miller3@us.ibm.com
> 503-747-1366
> IBM Informix Dynamic Server (IDS)=20
>
> ids-bounces@iiug.org wrote on 05/10/2013 02:07:59 PM:=20
>
> > From: "Schleicher, Keith" <Keith.Schleicher@searshc.com>
> > To: ids@iiug.org,
> > Date: 05/10/2013 02:09 PM
> > Subject: Getting "cannot attach to shared memory error" [30246] Sent=20
> > by: ids-bounces@iiug.org
> >=20
> > OS: Solaris 5.6
> > Informix version: 7.30.UC11
> >=20
> > We have a script that runs every 15 minutes on the server that checks=20
> > for
> the=20
> > log space available by querying the syslogfil table in the
> sysmasterdatabase.=20
> > It has been running fine without issue for years. Then I got a page=20
> > from
> this=20
> > script saying the following:=20
> >=20
> > onstat: Cannot attach to shared memory. errno =3D 22
> >=20
> > I checked the SHMMAX kernel variable with the SA team and they haven't=20
> > changed the variable, and the ONCONFIG hasn't been changed for a long=20
> > time. I
> also=20
> > checked the memory segments and those appear to be fine as well. I can
> run=20
> > this script successfully from the command prompt, but it suddenly=20
> > doesn't want to run in the cron.
> >=20
> > Any ideas on what needs to be done to get this to work without=20
> > bouncing
> the=20
> > instance (or upgrading to a newer version of Informix)?=20
> >=20
> > Keith Schleicher
> > IT Database Administrator
> > Cell: 224-210-8358
> > Blackberry:=20
> >=20
> 2242108358@messaging.sprintpcs.com<mailto:2242108358@messaging.sprintpcs.co=
> m>=20
>
> > Page:=20
> > 2242108358@sprint.skytel.com<mailto:2242108358@sprint.skytel.com>
> >=20
> > For more information, use our DBA Wiki page link below:=20
> >=20
> > http://wiki.intra.sears.com/confluence/display/TechStrag/Database
> > +Management#DatabaseManagement<http://wiki.intra.sears.com/
> > confluence/display/TechStrag/Database+Management>
> >=20
> > This message, including any attachments, is the property of Sears
> Holdings=20
> > Corporation and/or one of its subsidiaries. It is confidential and may=20
> > contain proprietary or legally privileged information. If you are not=20
> > the
> intended=20
> > recipient, please delete it without reading the contents. Thank you.=20
> >=20
> >=20
> >=20
>
> ***************************************************************************=
> ****=20
>
> > Forum Note: Use "Reply" to post a response in the discussion forum.=20
> >=20
>
> ***************************************************************************=
> ****
> Forum Note: Use "Reply" to post a response in the discussion forum.=20
>
> This message, including any attachments, is the property of Sears Holdings =
> Corporation and/or one of its subsidiaries. It is confidential and may cont=
> ain proprietary or legally privileged information. If you are not the inten=
> ded recipient, please delete it without reading the contents. Thank you.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>