Forum: Mongrel Linux ps reports mongrel as [ruby18]

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jay K. (Guest)
on 2009-02-18 06:32
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.
Mark S. (Guest)
on 2009-02-20 15:41
(Received via mailing list)
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
This topic is locked and can not be replied to.