#289 √ resolved
Gabriel Handford

[PATCH] Pidfile with cluster nodes setting is invalid

Reported by Gabriel Handford | April 29th, 2008 @ 11:55 PM

If you use the pidfile setting with cluster nodes the pid for each process gets written to the same pidfile.

merb -P /var/run/merb-app.pid -c 2 -p 5000

This should write the following pids:

/var/run/merb-app.5000.pid

/var/run/merb-app.5001.pid

In order to support this I added a check for :cluster config and then add the port number to the pid file base.

Merb::Config[:pid_file].gsub(/\.pid$/, ".#{port}.pid")

You can pull this fix from:

http://github.com/gabriel/merb-c...

I also noticed the alive? and kill methods do not use the pidfile config setting, so I patched those to common pid_file and pid_files methods.

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »