Linux ps reports mongrel as [ruby18]

I’m running two sets of mongrels using mongrel 1.1.4, one for production
one for staging. When executing ‘ps’ from a linux shell, the production
mongrels report as expected, however the staging processes are listed as
[ruby 18]. The result seems to be that mongrel_rails cannot stop the
staging processes because it doesn’t recognize [ruby18] as a mongrel
process.

I’ve read that this was a problem in older versions of mongrel and
fixable by editing the init.rb file. The same posts seem to indicate
that it is a problem with the kernel on my linux box. I can’t change
the kernel on this box, so how can I get mongrel_rails to stop the
[ruby18] processes?

The same scripts/version of mongrel were running fine on a different
box. The sites were just upgraded to new boxes, apparently with new
kernels. Thanks for any help.

On Wed, Feb 18, 2009 at 05:32:35AM +0100, Jay Kraly wrote:

I’m running two sets of mongrels using mongrel 1.1.4, one for production
one for staging. When executing ‘ps’ from a linux shell, the production
mongrels report as expected, however the staging processes are listed as
[ruby 18]. The result seems to be that mongrel_rails cannot stop the
staging processes because it doesn’t recognize [ruby18] as a mongrel
process.

You could try adding a line like this to the mongrel_rails script:

$0 = “mongrel_rails”

That will set the process name.

Mark