[Mongrel] mongrel_rails service on windows incompatible with recent ruby builds?

Luis Lavena luislavena at gmail.com
Mon Sep 10 15:05:52 EDT 2007

On 9/10/07, Ralf Vitasek <neongrau at gmail.com> wrote:
> i was suffering from a massive memory leak in my application. after
> searching and testing for quite a while i finally found that it wasn't
> my app that had a leak but the win32ole support that was used by the
> ADO driver in sqlserver adapter.

Ralf, we need to clarify that win32-service, mongrel and even
mongrel_service are quite different stuff from quite different

> the solution to fix the leak was to install ruby 1.8.5p52 or 1.8.6p36
> but sadly as soon i install one of the fixed releases mongrel won't
> start as service anymore.
> the latest version i was able to run as a service is 1.8.5p35 but that
> doesn't have the leak fixed.
> "mongrel_rails start" will run the app in dev or production mode on
> the console without problems.
> when trying to start the service in mmc it fails with the message that
> the service was started and that it stopped right away.
> when running mongrel_service.exe with the "console" option:
> ###
> C:\informer_rails>"c:/ruby/bin/mongrel_service.exe" console -e development -p 30
> 00 -a -l "log/mongrel.log" -P "log/mongrel.pid" -c "c:/informer_rails" -
> t 0 -r "public" -n 1024
> Mongrel Win32 Service, version 0.3.1
> (c) 2006 The Mongrel development team.
> Starting service 'single' in console mode, please wait...
> Service is in running state.
> Press Ctrl-C to stop it.
> ###
> i see a ruby.exe for a second in the task manager that seems to die
> right away. no log files are created.
> i also wonder why it says "Mongrel Win32 Service, version 0.3.1"
> because i have 0.3.2 installed. i tried uninstalling and then
> reinstalling mongrel, mongrel_service and win32-service without any
> luck.

Version 0.3.1 was a error in the definition headers, my mistake.

> and the error doesn't seem to come from win32-service as i'm able to
> run an acts_as_ferret serving DRb without any problems with every ruby
> version.

For the record, the problem with win32-service was not able to serve
Rails application properly, for other ruby tasks, it works fine.

Also, mongrel_service only uses win32-service to install/remove the
service from the SCM, nothing else.

> please check the attached servicefb.log and mongrel_service.log
> as i can't see anything wrong in those logs.

>From mongrel_service.log, could you try running this command line?
ruby.exe c:\ruby\bin\mongrel_rails start -e development -p 3000 -a -l log/mongrel.log -P log/mongrel.pid -c c:/informer_rails -t
0 -r public -n 1024

It seems it's trying to run ruby.exe from the PATH, maybe you don't
have it in your environment variables?

Latest version (0.3.2) properly uses C:\ruby\bin\ruby.exe as ruby executable.

For get that fixes, you need to remove and reinstall the service.

Sorry the troubles, and please let us know if that help you :-)

Luis Lavena
Multimedia systems
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

More information about the Mongrel-users mailing list