Red Hat Bugzilla – Bug 1464698
prevent two miq servers from starting
Last modified: 2018-03-06 10:45:31 EST
After looking at the top_output.log, we found that there were two MIQ Server processes running on the system with their own set of workers running below them.
It appears that manually running evmserver.sh start, outside of using systemctl evmserverd, may have complicated the issue and could be a reason for the two server processes on the same machine. Nevertheless, the machines were rebooted, and the request was to always use systemd through systemctl to start and stop evmserverd.
PID PPID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19502 1 root 20 0 666920 295924 6752 S 5.4 1.8 39:43.70 MIQ Server
5899 1 root 20 0 652524 299860 6752 S 3.7 1.8 5672:04 MIQ Server
The multiple servers would cause the workers to constantly try to stop workers and possibly prevent them from successfully exiting.
New commit detected on ManageIQ/manageiq/master:
Author: Joe Rafaniello <email@example.com>
AuthorDate: Fri Jun 30 16:51:56 2017 -0400
Commit: Joe Rafaniello <firstname.lastname@example.org>
CommitDate: Fri Jun 30 17:54:33 2017 -0400
Only remove my process' pidfile.
at_exit handlers created in the server process are inherited when the
server forks workers. As soon as one of these workers exits, this
at_exit was being run and removing the server's pidfile. This allowed a
subsequent rake evm:start or systemctl start evmserverd to fail to
detect an existing server process, allowing a second MIQ Server to
We can workaround this by only removing a pidfile that matches my
lib/pid_file.rb | 2 +-
spec/lib/pid_file_spec.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Verified in 22.214.171.124