httpd.service: main process exited kill: cannot find process

Apache was stuck with the below error and it was not starting at all.

Sep 15 06:18:24 server.example.com systemd[1]: Starting The Apache HTTP Server…
Sep 15 06:18:24 server.example.com httpd[15037]: [Thu Sep 15 06:18:24.591424 2016] [so:warn] [pid 15037] AH01574: module ruid2_module is alread…skipping
Sep 15 06:18:33 server.example.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 15 06:18:33 server.example.com kill[15038]: <strong>kill: cannot find process “”</strong>
Sep 15 06:18:33 server.example.com systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 15 06:18:33 server.example.com systemd[1]: Failed to start The Apache HTTP Server.
Sep 15 06:18:33 server.example.com systemd[1]: Unit httpd.service entered failed state.
Sep 15 06:18:33 server.example.com systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

It turned to be an semaphore issue.

Solution:

RHEL CentOS 5/6:

Aadd the below to /etc/sysctl.conf

kernel.msgmni = 1024
kernel.sem = 250 32000 100 512
kernel.shmmax = 16296951808
kernel.shmall = 17039360

and then run “sysctl -p” command

RHEL CentOS 7:

Add the below to /etc/sysctl.d/httpdfix.conf

kernel.msgmni = 1024
kernel.sem = 250 32000 100 512
kernel.shmmax = 16296951808
kernel.shmall = 17039360

and then run “sysctl -p /etc/sysctl.d/httpdfix.conf” command

I was able to restart apache after this fix.