To understand pid files, refer this DOC
Some times there are certain applications that require additional support of extra plugins and utilities. So it keeps track of these utilities and plugin process running ids using this pid file for reference.
That is why whenever you restart an application all necessary plugins and dependant apps must be restarted since the pid file will become stale.