Why httpd.pid file is required for a running HTTP server

The Oracle HTTP Server or OHS is the Web server component for Oracle Fusion Middleware. This HTTP server that comes with the Oracle Web Tier is basically the Apache server. When Apache/HTTP server starts it writes the pid or process id number in a file called as httpd.pid. This file contains one line and is the pid number of the httpd server process that is currently running in the OS. So every time OHS HTTP Server is restarted it gets a new pid, which gets written in this file "httpd.pid".

The http server from Oracle is derived from Apache server and when Apache server starts it writes its pid into this file. When any signal needs to be sent to this process (process being the httpd daemon process), the pid of the process should be known- this is available from the httpd.pid file. Hence the presence of this file is required during the lifetime of a running httpd server. If this file is missing/deleted then there is no way to contact the httpd daemon process- since the pid is not known.
Also I have noticed few times when httpd server has an issue due to resources or not started properly etc the presence of this file from a previous running httpd server causes issues during starting of fresh httpd server. I had to delete the httpd.pid file for the zombie httpd server in order to restart http server.

I have also noticed similar behavior with ObAccessclient.xml.lck file. These .lck files are lock files which provide the server process read/write locks. Hence these are required during the runtime of the http server process/webgate. Also sometimes when http server has issues or needs to be restarted one needs to delete this .lck file from the previous run. I think if the http server is shutdown gracefully this file should get deleted automatically but sometimes this file exists then it causes issues with restarting http server.

Here is a blog which cautions not to delete the lck files (similar to the 4 files you posted, Chuni Lal Kukreja OAM, OIM, Webgate,Active Directory,SharePoint 2013,IIS7.5,OAAM Blog: Lock Files in OAM 11g R2PS2)

Below are the reasons why this pid number is important and requiredpid number in httpd.pid file
http://superuser.com/questions/422850/why-does-apache-write-its-own-process-id-in-httpd-pid


Comments

Popular posts from this blog

VMware fix for Invalid manifest and ova file import failed errors

SOAPUI - import certificate

Session Timeout in Oracle Access Manager