You probably see this error when you are trying to start apache with /etc/init.d/apache2 start and there is no effect.
This error is caused by not clearing semaphores by apache and/or mod_fcgid and/or mod_passenger.
You can see the list of semaphores with the command ipcs -s.



warden@host:~$ sudo ipcs -s
[sudo] password for warden:

------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 7798784 www-data 600 1
0x00000000 7831553 www-data 600 1
0x00000000 7864322 www-data 600 1
0x00000000 7897091 www-data 600 1
0x00000000 7929860 www-data 600 1
0x00000000 7962629 www-data 600 1
0x00000000 7995398 www-data 600 1
0x00000000 8028167 www-data 600 1
0x00000000 8060936 www-data 600 1
0x00000000 8093705 www-data 600 1
0x00000000 8126474 www-data 600 1
0x00000000 8159243 www-data 600 1

If this number is too high, you'll see this error while trying up to start apache2.
You can however use the command ipcrm -s ID to clear them out.
To clear all semaphores for www-data user you can use bash loop:

for i in `ipcs -s | grep www-data | awk '{print $2}'` ; do ipcrm -s $i; done

Hope that helps :)