[CLUE-Tech] weird apache error?

Todd Williams hp205ctl at hotpop.com
Mon Sep 16 13:40:02 MDT 2002


Try "ipcs" to see whats up with the ipc structures.

It will probably show you the real problem.

It sounds like you are out of shared memory or out of
semaphore table entries.  The most likely culprit is
a database - are you running one?

You may need to do a kernel reconfigure and rebuild to
allocate more shared memory and/or semaphore slots and/or
message queues.

Todd Williams

Jim Ockers wrote:
> Hi all,
> 
> Help!
> 
> I'm running apache 1.3.22 from Red Hat 7.2 (fully up2date), with SSL.  I have
> gotten this error on several Dell servers now, all running 2.4.18 kernels from
> kernel.org (not Red Hat kernels):
> 
> Starting httpd: Ouch! ap_mm_create(1048576, "/var/run/httpd.mm.13626") failed
> Error: MM: mm:core: failed to acquire semaphore (No space left on device): OS: Invalid argument
> 
> The web server refuses to start once it decides it can't acquire the semaphore.
> The only way to get the web server to start is to reboot the entire system,
> once the above error is displayed.  (Every subsequent attempt to start the
> web server using "service httpd {restart,start}" generates the same message.)
> 
> The SSLMutex is /var/log/httpd/ssl_mutex in the /etc/httpd/conf/httpd.conf.
> It creates files called /var/log/httpd/ssl_mutex.12345 where the numbers are
> supposedly the parent PID, but I've never see any processes running with the
> PID shown in the ssl_mutex file.
> 
> There are never any /var/run/htt* files that I've seen, even though the error
> message above acts like there's a problem with such a file.
> 
> Here's a code fragment from apache 2.0, I think, which shows what is
> failing:
> 
> #if defined(MM_SEMT_IPCSEM)
> fdsem = semget(IPC_PRIVATE, 1, IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR);
> if (fdsem == -1 && errno == EEXIST)
> fdsem = semget(IPC_PRIVATE, 1, IPC_EXCL|S_IRUSR|S_IWUSR);
> if (fdsem == -1)
> FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to acquire semaphore");
> mm_core_semctlarg.val = 0;
> semctl(fdsem, 0, SETVAL, mm_core_semctlarg);
> fdsem_rd = semget(IPC_PRIVATE, 1, IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR);
> if (fdsem_rd == -1 && errno == EEXIST)
> fdsem_rd = semget(IPC_PRIVATE, 1, IPC_EXCL|S_IRUSR|S_IWUSR);
> if (fdsem_rd == -1)
> FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to acquire semaphore");
> mm_core_semctlarg.val = 0;
> semctl(fdsem_rd, 0, SETVAL, mm_core_semctlarg);
> #endif /* MM_SEMT_IPCSEM */
> 
> I don't know anything about semget() but I'm hoping someone here on the
> list can tell me what I can do about this.  (I also know very little
> about SYSV-IPC other than it seems to work most of the time.)
> 
> These systems have a mount for /dev/shm - here's a typical mount output:
> 
> /dev/sda3 on / type ext3 (rw)
> none on /proc type proc (rw)
> usbdevfs on /proc/bus/usb type usbdevfs (rw)
> /dev/sda1 on /boot type ext3 (rw)
> none on /dev/pts type devpts (rw,gid=5,mode=620)
> none on /dev/shm type tmpfs (rw)
> 
> The httpd semaphore failure  seems to happen at random but after the system 
> has been running for 1+ days and the web server has been restarted a bunch 
> of times.  We typically see it on servers that are undergoing heavy 
> configuration changes because they are being newly configured, since the 
> web server is restarted a lot while the configuration changes are being 
> made.
> 
> Should I upgrade to apache 2.0, and lose the Red Hat support?  Do I have
> to use a Red Hat kernel to make this problem go away?
> 
> I'd appreciate any clues or help about this!  Thanks..
> 
> --
> Jim Ockers (ockers at ockers.net)
> Contact info: please see http://www.ockers.net/
> 
> Fight Spam! Join CAUCE (Coalition Against Unsolicited Commercial Email)
> at http://www.cauce.org/ .
> 
> _______________________________________________
> CLUE-Tech mailing list
> CLUE-Tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech
> 






More information about the clue-tech mailing list