In a Debian lenny server running postgresql, I noticed that a lack of semaphore arrays is preventing Apache from starting up.Looking at the limits, I see 128 arrays used out of 128 arrays maximum, for semaphores. I know this is the problem because it happens on a semget call.How do I increase the number of arrays?PS: I need Apache running to make use of phppgadmin.
How do I increase the number of semaphore arrays in Linux?
linux;limit;semaphore;ipc
If you read the manpage for semget, in the Notes section you'll notice:System wide maximum number of semaphore sets: policy dependent (on Linux, this limit can be read and modified via the fourth field of /proc/sys/kernel/sem).On my system, cat /proc/sys/kernel/sem reports:250 32000   32  128So do that on your system, and then echo it back after increasing the last number:printf '250\t32000\t32\t200' >/proc/sys/kernel/sem(There are tab characters between the numbers, so I'm using printf to generate them.)