[Mongrel] running mongrel in production on win32
luislavena at gmail.com
Sun Dec 17 15:46:28 EST 2006
On 12/15/06, Ball, Donald A Jr (Library) <donald.ball at nashville.gov> wrote:
> > On 12/15/06, Ball, Donald A Jr (Library)
> > <donald.ball at nashville.gov> wrote:
> > > Hey guys, I'm running the mongrel server that comes with
> > rails-1.2rc1
> > > for development on a winxp box, anticipating taking it into
> > production
> > > on a win2k3 box in the next few weeks.
> > Ok, which version of mongrel is bundled with rails-1.2?
> > Please list the gems you have installed, because, AFAIK,
> > script\server will only load mongrel if the gem is found.
> I'm using mongrel-0.3.13.3-mswin32, the latest publicly available
> mswin32 gem, along with mongrel_service-0.2, though I'm not using the
> service in development. I tried to install 0.3.19 but got odd
> compilation warnings when I did so and the server failed to start.
That is the *latest* stable gem available via rubyforge, but no the latest one:
>From my site you could download the pre-compiled win32 gem based on
latest svn. Just change 0.3.18 to 0.3.20 and you're done.
Install it manually using 'gem install' and the full pathname,
including extension of the gem file.
> > You are starting it using mongrel_rails or script/server?
Then is rails which is loading mongrel, and not the way around. Please
inside your application folder and see if that report any problem
> > > I've had a couple of crashes
> > > occur during development that give me pause, however. I
> > made a ticket
> > > for the last one here:
> > >
> > > http://dev.rubyonrails.org/ticket/6841
> > That bug seems weird, also unrelated to rails but Ruby itself.
> So you believe I've run into a bug in ruby-1.8.4-mswin32? Looked to me
> more like an unhandled exception in activesupport, but the rails folks
> seemed to think that was not the case.
Its look like a bug with the GC, but I only could say that if your
application isn't doing something memory intensive or nasty to the
whole Ruby VM.
> > Lastest mongrel_service gem provide what you need, if somehow
> > the ruby process die (due a unhandled exception) the service
> > will automatically spawn a new one.
> I'll give that a whirl, thanks! Would the log files indicate when/if
> this occurs?
The current mongrel_service will report when something like that
happens, but, mea culpa, I forgot to include timestamp information of
that! (will do a fix in the svn).
> > There is no way (yet, still need to test some things) to
> > monitor deeply if the ruyb process hang and not die.
> > The mongrel_cluster base his "magic" on daemonize, which requires
> > fork() and isn't compatible with win32.
> > Its planned for mongrel_service to provide this
> > functionality, maybe during january.
> If I can help in this endeavor in any way, please let me know. I'm a
> beginning ruby developer, but I've been doing web development for time
> out of mind and I have a copy of visual studio 2003 if needed for
So far testing for one or N child process is the same, I'll want to
test the single service a bit longer to iron the logging issues it
currently present (or lack of).
> > Will be very helpful if you provide more information about
> > your database (and version), mongrel, rails, ruby and windows
> > version to we could get a better picture of your situation.
> Sure thing. I'm using mssql2k with the ADO driver, mongrel-0.3.13.3,
> rails-1.2rc1, ruby-1.8.4, winxpsp2 (but will be deploying to win2k3). I
> am using RMagick with file_column, though the crashes have not (yet)
> occurred while testing that portion of the application.
Ok, are you sure about RMagick? you know when your application
crashes? doing what, which kind of request, the exact line of the
controller or something?
The stack trace on this situation will be very helpful.
Based on some web searching, the "rb_gc_mark: unknown data type" bug
is related to some memory allocated that didn't conform any of the
known data types by the Garbage Collector.
Maybe some C extension (RMagick or any other) is allocating memory and
not freeing it in the right way.
> > Regards and good weekend,
> Thanks for your help and for your work in providing rails folks with a
> potentially workable solution for win32 deployment! It would not be my
> choice for a production environment, but it's out of my hands.
You're welcome, but you should thank a lot of ppl, win32utils guys and
Zed for their work directly or indirectly to this :-)
Regards and good weekend.
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
More information about the Mongrel-users