NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Ruby | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | ERP | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | GNU/Linux Reference OS Build | MCJ How-to | Keywords | RSS



Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Ruby
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·ERP
·REALbasic
·All Categories


Apache and System V IPCs
Topic:Web   Date: 2009-05-03
Printer Friendly: Print

spacerspacer
<<  <   >  >>

Subject

Apache and some other programs need System V Inter-Process Communication (IPC) enabled in the Linux kernel. If you get this error when starting Apache:

[emerg] (38)Function not implemented: Couldn't create accept lock

then it is possible that System V IPC is not enabled. If you are creating a custom Linux kernel, the option you want to enable System V IPC is:

CONFIG_SYSVIPC=y

The proc filesystem, if enabled on your kernel, will list the semaphore usage. With Apache off:

root:/proc/sysvipc# cat sem
       key      semid perms      nsems   uid   gid  cuid  cgid      otime      ctime

Let's start Apache:

root:/proc/sysvipc# /usr/local/apache2/bin/apachectl start

Now we see some usage:

root:/proc/sysvipc# cat sem
       key      semid perms      nsems   uid   gid  cuid  cgid      otime      ctime
         0      98304   600          1  1001 4294967295     0     0          0 1241364839
root:/proc/sysvipc#

The uid should match the uid of the process running Apache. Another way to check is with the ipcs command:

root:/proc/sysvipc# ipcs -s

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x00000000 98304      apache    600        1         

root:/proc/sysvipc#

Note that there are resources associated with System V IPCs, and that a heavily used server can run out of these resources and throw a similar error. Specifically, you might see an error like "No space left on device: Couldn't create accept lock". This may be because the limit on semaphores had been reached and you need to set this at a higher number or free up some semaphores. You can use the ipcs -u command to list a summary of all related resources:


root:/proc/sysvipc# ipcs -u

------ Shared Memory Status --------
segments allocated 10
pages allocated 960
pages resident  833
pages swapped   0
Swap performance: 0 attempts	 0 successes

------ Semaphore Status --------
used arrays = 1
allocated semaphores = 1

------ Messages: Status --------
allocated queues = 0
used headers = 0
used space = 0 bytes

root:/proc/sysvipc#



People:
Places:
Things:
Times:





Please read our Terms of Use and our Privacy Policy
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2010 NetAdminTools.com