From alisonrowland at fastmail.fm Thu Jun 1 10:09:55 2006
From: alisonrowland at fastmail.fm (Alison Rowland)
Date: Thu, 01 Jun 2006 10:09:55 -0400
Subject: [Mongrel] Getting /etc/mongrel_cluster and startup script to
work?
In-Reply-To: <50c31cc40605311850u2badb44ctbc258d039a24e725@mail.gmail.com>
References:
<447CA2EA.8060106@uberhip.com>
<50c31cc40605311850u2badb44ctbc258d039a24e725@mail.gmail.com>
Message-ID: <447EF533.9030901@fastmail.fm>
Austin Godber wrote:
>
> Hmm ... take a look at your init script ... I bet it can't find
> mongrel_cluster_ctl because its in /usr/local/bin ... try changing
> this:
> CONF_DIR=/etc/mongrel_cluster
> RETVAL=0
>
> to this:
>
> CONF_DIR=/etc/mongrel_cluster
> PATH=/usr/local/bin:$PATH
> RETVAL=0
Okay, solved it! mongrel_cluster_ctl is actually in /usr/bin on my
machine, so the path wasn't the problem. The actual problem was the
shebang line, which read like this:
#!/usr/bin/env ruby
But on bootup (thanks to my hosting provider's tech support guy for
tipping me off on this), it was throwing this error:
/usr/bin/env: ruby: No such file or directory
Apparently, ruby is in the env for my logged-in user, but not for the
machine at bootup time, so a quick change to the shebang line to make it
#!/usr/bin/ruby1.8, and I've got mongrel starting up on reboot. I've
still gotta figure out how to fix my env, but I guess that's another issue.
Thanks again for your help.
--Alison
From jon.fernyhough at zogix.com Thu Jun 1 10:14:39 2006
From: jon.fernyhough at zogix.com (Jon Fernyhough)
Date: Thu, 1 Jun 2006 15:14:39 +0100
Subject: [Mongrel] Packaging with mongrel
In-Reply-To: AAAAAHj/vIFIZNBDnH33+xu0BQskWiIA
Message-ID: <003b01c68585$b91bf6c0$1a02a8c0@jondell>
Hi Zed - we are currently finalising our beta release - but when I get chance will be happy to write some documentation for the Mongrel site.
Jon Fernyhough
Zogix Ltd
-----Original Message-----
From: mongrel-users-bounces at rubyforge.org [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Zed Shaw
Sent: 26 May 2006 18:40
To: mongrel-users at rubyforge.org
Subject: Re: [Mongrel] Packaging with mongrel
On Fri, 2006-05-26 at 11:39 +0100, Jon Fernyhough wrote:
> ?
> Hi All
>
> Since we are providing the local server as a download application we
> wanted to find a way to package up the code and ruby modules that were
> being used. Erik Veenstra packaging application
> (http://www.erikveen.dds.nl/distributingrubyapplications/rails.html)
> provides a mechanism to generate a minimal size download with
> everything needed to run the ruby application. We had to overcome a
> couple of issues to get the package working with Mongrel and thought
> it good to share that info (and check that we haven't done something
> stupid)!
>
> With these two changes, the packaged exe can now successfully run
> mongrel with our rails application. Can anybody see a reason why this
> is a bad thing to do or have suggestions on how this can be improved.
>
Hey Jon, that's great. Do you think you'd like to write some documentation on this for the Mongrel site? Take a look at:
http://mongrel.rubyforge.org/docs/contrib.html
And then follow the instructions if you're interested. I'm sure other folks would like it. Since it's wiki syntax for the documentation (using webgen) you could probably start off by just cut-pasting your e-mail into a text file and cleaning it up a bit.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
_______________________________________________
Mongrel-users mailing list
Mongrel-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users
From aldursys at gmail.com Sat Jun 3 04:02:52 2006
From: aldursys at gmail.com (Neil Wilson)
Date: Sat, 3 Jun 2006 09:02:52 +0100
Subject: [Mongrel] Gem versioning and auto installs
Message-ID:
Gem drives me daft sometimes.
It gives you this wonderful ability to specify a platform for a gem, but
forgets to provide a command line switch to select the platform. Politely it
asks you, which is all very well when you are installing on one machine
interactively, but no good at all on a cluster of 15 machines from a
Capistrano script.
Is there any way to get gem to automatically select the correct platform for
a particular version of Mongrel?
Failing that can I respectively request slightly different version numbers
for the differing platforms to assist automatic installs.
Thanks
--
Neil Wilson
Aldur Systems
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060603/69e470da/attachment.htm
From zedshaw at zedshaw.com Sat Jun 3 16:59:25 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sat, 03 Jun 2006 13:59:25 -0700
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To:
References:
Message-ID: <1149368365.6171.8.camel@localhost.localdomain>
On Sat, 2006-06-03 at 09:02 +0100, Neil Wilson wrote:
> Gem drives me daft sometimes.
>
> It gives you this wonderful ability to specify a platform for a gem,
> but forgets to provide a command line switch to select the platform.
> Politely it asks you, which is all very well when you are installing
> on one machine interactively, but no good at all on a cluster of 15
> machines from a Capistrano script.
>
> Is there any way to get gem to automatically select the correct
> platform for a particular version of Mongrel?
>
> Failing that can I respectively request slightly different version
> numbers for the differing platforms to assist automatic installs.
You've got two options at the moment:
1) Manually grab the version you want and then install the gem file.
I'd do it like this:
$ wget \
http://rubyforge.org/frs/download.php/9700/mongrel-0.3.12.4.gem
$ gem install mongrel-0.3.12.4.gem
2) Install the pre-release. This is always just one version. It's
released fairly frequently but we try to keep it stable. You can do
this with:
$ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
If neither of these are good, and other people would like to just
install the current version without a prompt, then I can setup
a /current/ gem source that's like /releases/ but it just contains the
current production release. But, at least try the other two options
before making me do work. :-)
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From neil at aldur.co.uk Sat Jun 3 17:27:10 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Sat, 3 Jun 2006 22:27:10 +0100
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To: <1149368365.6171.8.camel@localhost.localdomain>
References:
<1149368365.6171.8.camel@localhost.localdomain>
Message-ID:
On 03/06/06, Zed Shaw wrote:
>
> You've got two options at the moment:
>
> 1) Manually grab the version you want and then install the gem file.
> I'd do it like this:
>
> $ wget \
> http://rubyforge.org/frs/download.php/9700/mongrel-0.3.12.4.gem
> $ gem install mongrel-0.3.12.4.gem
Tried that - local gem install doesn't handle dependencies automatically :-(
Not at all keen on pre-release for various reasons.
The third option is this ugly hack that I cobbled together this afternoon
right before I ran out of hair to pull out. Those with a weak stomach should
look away now.
sudo sh -c "gem install mongrel -v 0.3.12.4 &1|
sed -ne '/(ruby)/s/ \([0-9][0-9]*\).*/\1/p' |
gem install -y --no-rdoc -v 0.3.12.4 mongrel"
--
Neil Wilson (neil at aldur.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060603/dc174c9d/attachment.htm
From neil at aldur.co.uk Sat Jun 3 17:34:11 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Sat, 3 Jun 2006 22:34:11 +0100
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To: <1149368365.6171.8.camel@localhost.localdomain>
References:
<1149368365.6171.8.camel@localhost.localdomain>
Message-ID:
The way the 'mysql' gem handles this is pretty good. It adds the ISO date to
the version number for platforms other than 'ruby', viz:
Select which gem to install for your platform (i686-linux)
1. mysql 2.7.2006.05.10 (mswin32)
2. mysql 2.7.2006.04.21 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. mysql 2.5.1 (ruby)
6. Cancel installation
>
On 03/06/06, Zed Shaw wrote:
>
>
> If neither of these are good, and other people would like to just
> install the current version without a prompt, then I can setup
> a /current/ gem source that's like /releases/ but it just contains the
> current production release. But, at least try the other two options
> before making me do work. :-)
>
>
--
Neil Wilson (neil at aldur.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060603/f1366f49/attachment.htm
From zedshaw at zedshaw.com Sat Jun 3 18:52:35 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sat, 03 Jun 2006 15:52:35 -0700
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To:
References:
<1149368365.6171.8.camel@localhost.localdomain>
Message-ID: <1149375155.6171.25.camel@localhost.localdomain>
On Sat, 2006-06-03 at 22:34 +0100, Neil Wilson wrote:
> The way the 'mysql' gem handles this is pretty good. It adds the ISO
> date to the version number for platforms other than 'ruby', viz:
>
> Select which gem to install for your platform (i686-linux)
> 1. mysql 2.7.2006.05.10 (mswin32)
> 2. mysql 2.7.2006.04.21 (mswin32)
> 3. mysql 2.7 (ruby)
> 4. mysql 2.6 (ruby)
> 5. mysql 2.5.1 (ruby)
> 6. Cancel installation
> >
Uh, how does putting a date on the mswin32 gem help you? You still have
a prompt here, you'd still have to pick the latest ruby version, and it
would just complicate things. I guess I don't see what this does for
you.
Another option is for you to simply install it like normal on one
machine, and then just rsync your gem directory to the other machines.
Considering there are quite a few ways to clone software from one
machine to a group of others (PIKT, rsync, cfengine, unison to name a
few), I think you should check out a few of those first. It might be
that capistrano and gems just isn't really the right tool for this job.\
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From banshee at banshee.com Sat Jun 3 19:08:58 2006
From: banshee at banshee.com (James Moore)
Date: Sat, 3 Jun 2006 16:08:58 -0700
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To:
Message-ID: <011301c68762$b1d292f0$6401a8c0@BansheeSoftware.local>
> Tried that - local gem install doesn't handle dependencies automatically
Is that much of an issue for deployment, though? Seems like you want to
know precisely what's installed on production servers, and having
dependencies resolved for you isn't quite so much of an issue.
- James Moore
From neil at aldur.co.uk Sun Jun 4 03:16:45 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Sun, 4 Jun 2006 08:16:45 +0100
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To: <1149375155.6171.25.camel@localhost.localdomain>
References:
<1149368365.6171.8.camel@localhost.localdomain>
<1149375155.6171.25.camel@localhost.localdomain>
Message-ID:
Because I can do 'gem install -v 2.7 mongrel' and pick up just the ruby
version, or 'gem install -v 2.7.2006.05.10 mongrel' and pick up the mswin
version - automatically. I can't do that if the 'ruby' and 'mswin' versions
both have identical version number. It's the lack of a gem switch to pick up
the platform that is causing the problem, so if you move the differentiator
to the version number it works around the problem. I still have to specify
the version number, but at least if I do gem gets on with the job.
Using a version number indicator at the end would achieve the same effect -
say 1 for Linux, 2 for ms win, thus:
0.3.12.4-1
0.3.12.4-2
(assuming you can have dashes in gem version numbers - I haven't tried it!)
On 03/06/06, Zed Shaw wrote:
>
> Uh, how does putting a date on the mswin32 gem help you? You still have
>
--
Neil Wilson (neil at aldur.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060604/8bb6c14f/attachment.htm
From neil at aldur.co.uk Sun Jun 4 03:29:33 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Sun, 4 Jun 2006 08:29:33 +0100
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To: <011301c68762$b1d292f0$6401a8c0@BansheeSoftware.local>
References:
<011301c68762$b1d292f0$6401a8c0@BansheeSoftware.local>
Message-ID:
Full specification gets remarkably unmanageable when you decide to change
something. Having tried it both ways the design decision I took was to stick
to specifying the major software items as lightly as possible and let the
machines deal with pulling in the rest. Otherwise your list of modules is
four foot long and you end up being unable to see the wood for the trees.
My goal is automation with flexibility. What gets in the way is tools that
assume there is a human sat at a terminal or, worse, clicking with a mouse.
gem is at fault here, not mongrel but nobody seems to be fixing gem at the
moment - the patches to fix the platform problem are already in the gem
tracker.
On 04/06/06, James Moore wrote:
>
> > Tried that - local gem install doesn't handle dependencies automatically
>
> Is that much of an issue for deployment, though? Seems like you want to
> know precisely what's installed on production servers, and having
> dependencies resolved for you isn't quite so much of an issue.
>
> - James Moore
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Neil Wilson ( neil at aldur.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060604/5e76ebd2/attachment.htm
From banshee at banshee.com Sun Jun 4 13:24:34 2006
From: banshee at banshee.com (James Moore)
Date: Sun, 4 Jun 2006 10:24:34 -0700
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To:
Message-ID: <000001c687fb$c008a190$6501a8c0@BansheeSoftware.local>
> Full specification gets? remarkably unmanageable when you decide to change
> something.
I suspect you're going to change your mind fairly soon.
Virtually everywhere I've been has a system for stamping out production
servers that look precisely the way you want them to. Letting production
machines figure out what they're supposed to install on their own is going
to come back and sink its rabid little teeth into your ankles at some point
in the very near future. Every time a problem comes up you're going to need
to convince yourself that it's not an environment issue on that specific
machine.
I'm not a system administrator, but I've worked with teams of really good
sysadmins at some reasonably large sites (tens of millions of user
accounts). Any time I have a sysadmin-type problem, I imagine myself in a
meeting with them, explaining what the deployment process for my software
looks like. They'd be asking things like:
Q - So, when a problem comes up, how do we know it's not because machine X
is ever-so-slightly different than machine Y?
A - Uh, mmm, er...
Q - You really expect us to pull live updates from the net, without checking
them first? With customer data?
A - Err, ah...
Q - And what happens when we get a media mention of our product and we have
to install three new servers _right now_ and the network resource we're
supposed to pull these dependencies from is down? (Yes, this happens.) Or
we've just scheduled a block of time for system updates? You've just
trashed our schedule, right?
A - Gah, mmm...
Q - And what do we do when one of these so-called "dependencies" breaks
something that we thought was unrelated?
A -
I hate those meetings :-).
- James Moore
From banshee at banshee.com Sun Jun 4 13:32:03 2006
From: banshee at banshee.com (James Moore)
Date: Sun, 4 Jun 2006 10:32:03 -0700
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To:
Message-ID: <000101c687fc$cb3cddf0$6501a8c0@BansheeSoftware.local>
I do agree with the basic point that installers should never under any
circumstances ask a human being anything, though. Better to just fail if
the default install isn't sufficient.
In particular, it's weird to me that gem install mongrel comes up with:
C:\radw\rv>gem install mongrel
Attempting local installation of 'mongrel'
Local gem file not found: mongrel*.gem
Attempting remote installation of 'mongrel'
Updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i386-mswin32)
1. mongrel 0.3.12.4 (ruby)
2. mongrel 0.3.12.4 (mswin32)
3. mongrel 0.3.12.3 (mswin32)
4. mongrel 0.3.12.3 (ruby)
5. mongrel 0.3.12.2 (ruby)
6. mongrel 0.3.12.2 (mswin32)
7. mongrel 0.3.12.1 (mswin32)
8. mongrel 0.3.12.1 (ruby)
9. mongrel 0.3.12 (mswin32)
10. mongrel 0.3.12 (ruby)
11. mongrel 0.3.11 (ruby)
12. mongrel 0.3.11 (mswin32)
13. mongrel 0.3.10.1 (ruby)
14. mongrel 0.3.10 (ruby)
15. mongrel 0.3.9 (ruby)
16. mongrel 0.3.8 (ruby)
17. mongrel 0.3.8 (mswin32)
18. mongrel 0.3.7.1 (ruby)
19. mongrel 0.3.7.1 (mswin32)
20. mongrel 0.3.7 (ruby)
21. mongrel 0.3.6 (ruby)
22. mongrel 0.3.6 (mswin32)
23. mongrel 0.3.5 (ruby)
24. mongrel 0.3.5 (mswin32)
25. mongrel 0.3.4 (mswin32)
26. mongrel 0.3.4 (ruby)
27. mongrel 0.3.3 (ruby)
28. mongrel 0.3.2 (ruby)
29. mongrel 0.3.1 (ruby)
30. mongrel 0.3 (ruby)
31. mongrel 0.2.2 (ruby)
32. mongrel 0.2.1 (ruby)
33. mongrel 0.2.0 (ruby)
34. Cancel installation
>
Seems like you should just install whatever the latest stable version is.
If someone needs to install something like mongrel 0.3.1, they should know
how to do that on their own.
(This list is a mongrel thing, not a gem thing, right?)
- James
From neil at aldur.co.uk Sun Jun 4 14:01:42 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Sun, 4 Jun 2006 19:01:42 +0100
Subject: [Mongrel] Gem versioning and auto installs
In-Reply-To: <000101c687fc$cb3cddf0$6501a8c0@BansheeSoftware.local>
References:
<000101c687fc$cb3cddf0$6501a8c0@BansheeSoftware.local>
Message-ID:
Nah. It's a gem thing due to the multiple platforms within the single gem.
On 04/06/06, James Moore wrote:
>
>
> (This list is a mongrel thing, not a gem thing, right?)
> n/listinfo/mongrel-users
>
--
Neil Wilson (neil at aldur.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060604/37cdfd97/attachment.htm
From zedshaw at zedshaw.com Mon Jun 5 06:07:42 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 05 Jun 2006 03:07:42 -0700
Subject: [Mongrel] Mongrel Pre-Release 0.3.13 -- Katana Suicide Concurrency
Message-ID: <1149502062.10820.21.camel@localhost.localdomain>
We are *days* away from the official 0.3.13 release, which will be
followed quickly by 0.4 code named Enterprisey Edition 1.2. This latest
pre-release update closes off the last of the annoying bugs, and adds
one very nasty feature people should check out before we release. Read
about Katanas below.
** This release doesn't have win32 yet. That'll be uploaded Monday. **
WHAT IS MONGREL
It's a web server that runs Ruby web applications. Currently supports
Rails, Camping and Nitro. You can check it out at:
http://mongrel.rubyforge.org/
GETTING IT
Best thing to do is this:
$ gem install daemons
$ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
WHAT'S FIXED
* Fixes a failure of -P to find PID files.
* Changes the RailsHandler so that only passes GET or HEAD requests to
the DirHandler for page caching.
* Confirms that the new send_file and upload to tempfile works on win32.
More tests with big files uploaded on win32 are needed.
* Lots of documentation on installing, with more to come. Full Apache
documentation and information on writing your own snazzy handlers and
filters.
* Fran?ois SIMOND suggested a check for allow_concurrency and to avoid
locking Rails if that's set to true. I tried it, had to change the
patch but I left it in. Read below.
* Moved some of the "change to user/group" code around so that any
Mongrel command can use it.
* Various code clean-ups and big improvements on the unit test coverage
and reporting. Check out http://mongrel.rubyforge.org/coverage/
* Lots of thrashing and code review, not much more will come for 0.3.13
unless an obviously broken piece needs work.
KATANA SUICIDE CONCURRENCY
I resisted doing this, but it's going to come down sooner or later now
that Fran?ois SIMOND figured it out. Mongrel was protecting the world
from the allow_concurrency "feature" but now it lets you kill yourself
in obscenely horrible ways.
If you set ActionController::Base.allow_concurrency=true in your
config/environments/* then Mongrel will *NOT* guard the Rails
Dispatcher. This means that you'll get full threaded madness thrashing
your Rails controllers until they die horribly slicing themselves into
tiny little bits leaving you breathless with the destruction.
Mongrel will obnoxiously warn you about this, and people who try it will
NOT get support from me without mad amounts of dough. If you turn this
on, and your world comes crashing around your head, then I warned you.
Otherwise, go ahead and give it a try and see if that improves things
for you.
Enjoy the release, and get those bugs in so we can fix them:
http://rubyforge.org/tracker/?atid=5145&group_id=1306&func=browse
And we still want documentation authors:
http://mongrel.rubyforge.org/docs/contrib.html
Pick a blank page and write it up.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From neil at aldur.co.uk Mon Jun 5 17:38:58 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Mon, 5 Jun 2006 22:38:58 +0100
Subject: [Mongrel] Mongrel Rails - default URI
Message-ID:
Is there any particular reason why mongrel rails hard codes '/' as the URI
it
registers as the URI node?
If not would there be any objection to a patch that allows you to specify
it as an option?
--
Neil Wilson (neil at aldur.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060605/b881c5a3/attachment.htm
From zedshaw at zedshaw.com Mon Jun 5 18:26:15 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 05 Jun 2006 15:26:15 -0700
Subject: [Mongrel] Mongrel Rails - default URI
In-Reply-To:
References:
Message-ID: <1149546375.5857.14.camel@localhost.localdomain>
On Mon, 2006-06-05 at 22:38 +0100, Neil Wilson wrote:
> Is there any particular reason why mongrel rails hard codes '/' as the
> URI it
> registers as the URI node?
>
> If not would there be any objection to a patch that allows you to
> specify it as an option?
>
Shoot the patch to me, but you actually need to mount rails at / and
then use Rail's routing and settings to tell it it's at a different base
URI. Otherwise weirdness ensues.
If setting it to some other URI solves something for you then let me
know what. Might be another solution you're not aware of.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From neil at aldur.co.uk Tue Jun 6 14:21:50 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Tue, 6 Jun 2006 19:21:50 +0100
Subject: [Mongrel] Mongrel Rails - default URI
In-Reply-To: <1149546375.5857.14.camel@localhost.localdomain>
References:
<1149546375.5857.14.camel@localhost.localdomain>
Message-ID:
On 05/06/06, Zed Shaw wrote:
>
> but you actually need to mount rails at / and
> then use Rail's routing and settings to tell it it's at a different base
> URI. Otherwise weirdness ensues.
That looks like your good reason for hard coding '/' to me. I presume from
what you are saying that Mongrel simply matches the URI to determine a
handler and passes the entire URI to the Handler intact. Any rewriting is
pushed forward to the front-end dispatcher or backwards to the application
itself.
> If setting it to some other URI solves something for you then let me
> know what. Might be another solution you're not aware of.
It was really to test hanging an application off a different base URI
without having to mess around altering Rails routing or setting up rewriting
rules on a webserver.
Plus I have this idea in the back of my mind that the webserver should
really be replaced with something else that is lighter and faster -
particularly as with an app layer that talks HTTP the webserver is reduced
to little more than a glorified load balancer. However at the moment we seem
to need it for its URL rewriting and re-rooting capability.
NeilW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060606/3fd6be5f/attachment.htm
From dburkes at infoteria.com Tue Jun 6 18:17:21 2006
From: dburkes at infoteria.com (Daniel Burkes)
Date: Tue, 6 Jun 2006 15:17:21 -0700
Subject: [Mongrel] Comet/Continuations/Armeggedon
Message-ID:
Hello all-
Forgive me if this has been discussed before- I searched the archives
and didn't see anything. Anyway, here it goes-
There is a lot of talk lately about Comet-based applications- that
is, web apps that hold connections to the server open for a very long
time, to effectively achieve realtime data push from the server to
the browser. Currently, there are a few web servers out there that
are specially architected to support this- Twisted and Jetty 6 come
to mind. The problem with those solutions is that neither of them is
natively Ruby/Rails- you have to step into Python-land or Java-land
there. What would really be nice is if Mongrel supported long-lived
connections by separating the notion of a serviceable request from a
thread or process. That is, be able to suspend a request until it is
resumed by some other request, or by timeout, a-la Jetty 6's
Continuations (they're really nice!).
Has there been any thought or discussion to adding such a feature to
Mongrel? I realize it probably seems a bit pie-in-the-sky at
present, but it could really enable some exciting new types of in-
browser applications. Combined with all the innovation that is going
into Rails apps now, it could produce some really thrilling
applications.
I know that there is some talk around about something called
"Armageddon", which I believe achieves basically the same end, but
requires Flash on the client side to manage the backchannel socket.
In any case, the requirements on the server side for tolerating huge
numbers of idle connections are similar.
Any thoughts or comments are appreciated.
Best Regards,
Danny Burkes
From technoweenie at gmail.com Tue Jun 6 18:30:01 2006
From: technoweenie at gmail.com (Rick Olson)
Date: Tue, 6 Jun 2006 17:30:01 -0500
Subject: [Mongrel] Comet/Continuations/Armeggedon
In-Reply-To:
References:
Message-ID: <48fe25b0606061530o50ef52cnf6c65e9efafc33bb@mail.gmail.com>
> Has there been any thought or discussion to adding such a feature to
> Mongrel? I realize it probably seems a bit pie-in-the-sky at
> present, but it could really enable some exciting new types of in-
> browser applications. Combined with all the innovation that is going
> into Rails apps now, it could produce some really thrilling
> applications.
I think a Mongrel Gem Plugin would be a much better fit. Zed has done
a great job of making it easily extensible. Josh Ferguson released a
secure download plugin
(http://rubyforge.org/projects/msecuredownload/) for mongrel. I also
added you to the mongrel upload progress backpack page
(http://technoweenie.backpackit.com/pub/602283) that I've set up. The
code isn't *quite* ready so I have not set up a rubyforge project yet.
--
Rick Olson
http://techno-weenie.net
From dburkes at infoteria.com Tue Jun 6 22:47:54 2006
From: dburkes at infoteria.com (Daniel Burkes)
Date: Tue, 6 Jun 2006 19:47:54 -0700
Subject: [Mongrel] Comet/Continuations/Armeggedon
In-Reply-To: <48fe25b0606061530o50ef52cnf6c65e9efafc33bb@mail.gmail.com>
References:
<48fe25b0606061530o50ef52cnf6c65e9efafc33bb@mail.gmail.com>
Message-ID:
> I think a Mongrel Gem Plugin would be a much better fit. Zed has done
> a great job of making it easily extensible. Josh Ferguson released a
> secure download plugin
> (http://rubyforge.org/projects/msecuredownload/) for mongrel. I also
> added you to the mongrel upload progress backpack page
> (http://technoweenie.backpackit.com/pub/602283) that I've set up. The
> code isn't *quite* ready so I have not set up a rubyforge project yet.
>
Thanks- I'll take a look at the Mongrel Gem Plugin APIs and see if
they would be sufficient to serve Comet apps. Essentially what we
need to be able to do is hold a socket open while releasing it's
associated thread back to the pool handling incoming connections.
Based on your knowledge of Mongrel Gem Plugins et al, do you know if
this is possible? Do you have access to the worker threads and
sockets at THAT low of a level?
Best Regards,
Danny
From zedshaw at zedshaw.com Wed Jun 7 01:13:32 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Tue, 06 Jun 2006 22:13:32 -0700
Subject: [Mongrel] Comet/Continuations/Armeggedon
In-Reply-To:
References:
Message-ID: <1149657212.6034.71.camel@localhost.localdomain>
On Tue, 2006-06-06 at 15:17 -0700, Daniel Burkes wrote:
> Hello all-
>
> Forgive me if this has been discussed before- I searched the archives
> and didn't see anything. Anyway, here it goes-
>
It was brought up in the past, but nothing came of it.
> There is a lot of talk lately about Comet-based applications- that
> is, web apps that hold connections to the server open for a very long
> time, to effectively achieve realtime data push from the server to
> the browser. Currently, there are a few web servers out there that
> are specially architected to support this- Twisted and Jetty 6 come
> to mind. The problem with those solutions is that neither of them is
> natively Ruby/Rails- you have to step into Python-land or Java-land
> there. What would really be nice is if Mongrel supported long-lived
> connections by separating the notion of a serviceable request from a
> thread or process. That is, be able to suspend a request until it is
> resumed by some other request, or by timeout, a-la Jetty 6's
> Continuations (they're really nice!).
I would now like to point you at:
http://en.wikipedia.org/wiki/Rube_Goldberg
And ask you to read about Ruby Goldberg machines. The most important
quote being:
"A Rube Goldberg machine or device is any exceedingly complex apparatus
that performs a very simple task in a very indirect and convoluted way."
> Has there been any thought or discussion to adding such a feature to
> Mongrel? I realize it probably seems a bit pie-in-the-sky at
> present, but it could really enable some exciting new types of in-
> browser applications. Combined with all the innovation that is going
> into Rails apps now, it could produce some really thrilling
> applications.
>
Well, Ruby has serious serious problems dealing with IO. Number one
problem is that it uses select so you only get 1024 open files at once.
And that's *all* files, not just sockets. Throw in lacking performance,
poor IO processing, and only having Strings to do data storage and
you're screwed.
I tried to bring this up in my interview with Pat Eyler at
oreillynet.com and it failed miserably. Nobody in the Ruby community
seems interested in improving Ruby's speed or scalability. Rather than
face facts and listen to people like me who are in the trenches dealing
with Ruby's problems, they would rather rant about how nobody really
needs performance.
I'd say, don't even bother until Ruby reaches 2.0 and I've ported over
to Rite/YARV/Whatever. Until then, trying to do anything that can
handle more than a few persistent connections is just not worth it.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From dburkes at infoteria.com Wed Jun 7 01:30:16 2006
From: dburkes at infoteria.com (Daniel Burkes)
Date: Tue, 6 Jun 2006 22:30:16 -0700
Subject: [Mongrel] Comet/Continuations/Armeggedon
In-Reply-To: <1149657212.6034.71.camel@localhost.localdomain>
References:
<1149657212.6034.71.camel@localhost.localdomain>
Message-ID: <6ACE9455-3CF6-4F56-B94F-56D0A8D3CE22@infoteria.com>
> Well, Ruby has serious serious problems dealing with IO. Number one
> problem is that it uses select so you only get 1024 open files at
> once.
> And that's *all* files, not just sockets. Throw in lacking
> performance,
> poor IO processing, and only having Strings to do data storage and
> you're screwed.
>
Yeah that is a problem. On the comet app I'm working on now, we
expect thousands of suspended connections per server to be a nominal
situation.
> I tried to bring this up in my interview with Pat Eyler at
> oreillynet.com and it failed miserably. Nobody in the Ruby community
> seems interested in improving Ruby's speed or scalability. Rather
> than
> face facts and listen to people like me who are in the trenches
> dealing
> with Ruby's problems, they would rather rant about how nobody really
> needs performance.
>
> I'd say, don't even bother until Ruby reaches 2.0 and I've ported over
> to Rite/YARV/Whatever. Until then, trying to do anything that can
> handle more than a few persistent connections is just not worth it.
>
While I respect greatly the fact that you have intimate knowledge of
Ruby's scalability issues, I think you're missing a bit of the point
here. I really don't care whether the connection suspend/resume
functionality is itself implemented in Ruby, only that it is
implemented in a web server which supports calling the suspend/resume
APIs from Ruby handlers. I was hoping that maybe mongrel could help
out here, since part of it was already built in C, but it appears
that all the socket handling and thread scheduling is in Ruby- is
that correct?
In any case, I appreciate your comments and thank you for your work
on Mongrel so far- I'm seriously considering using it on the Rails
side of the comet site I mentioned above, rather than lightty/
fastcgi. Anyway, it's hard to complain about being involved in such
interesting decisions :-)
Best Regards,
Danny
From jan.svitok at gmail.com Wed Jun 7 15:34:39 2006
From: jan.svitok at gmail.com (Jan Svitok)
Date: Wed, 7 Jun 2006 21:34:39 +0200
Subject: [Mongrel] mongrel_rails: bug in -C handling?
Message-ID: <8d9b3d920606071234j5b0ad9a8p32e5edaa2518c0bb@mail.gmail.com>
Hi,
I wanted to set port in config file (via mongrel_rails -C
config/config.yaml), and it seems to not take it into account.
I've looked into the code, (line 58), and it reads:
settings = conf.merge(settings)
Now settings contain all the possible (important) keys (possibly with
nil values, line 49, and lib/mongrel/command.rb, line 46) so
everything from conf get overwritten with settings' content.
Therefore, I think line 58 has no effect.
My question is: Is this really a bug or am I missing something?
(i'm using 1.3.12.4-mswin32)
Jano
From zedshaw at zedshaw.com Wed Jun 7 18:55:13 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Wed, 07 Jun 2006 15:55:13 -0700
Subject: [Mongrel] mongrel_rails: bug in -C handling?
In-Reply-To: <8d9b3d920606071234j5b0ad9a8p32e5edaa2518c0bb@mail.gmail.com>
References: <8d9b3d920606071234j5b0ad9a8p32e5edaa2518c0bb@mail.gmail.com>
Message-ID: <1149720913.8133.16.camel@localhost.localdomain>
On Wed, 2006-06-07 at 21:34 +0200, Jan Svitok wrote:
> Hi,
>
> I wanted to set port in config file (via mongrel_rails -C
> config/config.yaml), and it seems to not take it into account.
>
> I've looked into the code, (line 58), and it reads:
> settings = conf.merge(settings)
>
> Now settings contain all the possible (important) keys (possibly with
> nil values, line 49, and lib/mongrel/command.rb, line 46) so
> everything from conf get overwritten with settings' content.
>
> Therefore, I think line 58 has no effect.
>
> My question is: Is this really a bug or am I missing something?
>
> (i'm using 1.3.12.4-mswin32)
I'll be damned, that's been backwards this whole time and nobody
noticed? That's just disgusting. I'll fix it right now and update the
pre-release.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From thorin at gmail.com Wed Jun 7 19:56:29 2006
From: thorin at gmail.com (Curtis Spencer)
Date: Wed, 7 Jun 2006 16:56:29 -0700
Subject: [Mongrel] Ajax and IE causing Page Not Found and 500 Errors behind
SSL
Message-ID:
Hi,
Forgive this if it is a duplicate, because I was having trouble
posting to the list.
I have a setup of mongrel behind an apache proxy and I am getting a
few people using IE (5.5 & 6.0) complaining about getting sporadic
page not found errors when using AJAX features of the site and file
uploads behind SSL. I am posting the research I have done on the
subject.
I have the following in my Apache conf
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
in an effort to make SSL work better with IE, but I am still getting
the problem.
I am not sure if this is working as I have tried the following:
curl -D header -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)" https://www.server
.com
and I get the following result in the headers:
HTTP/1.1 200 OK
Date: Wed, 07 Jun 2006 23:35:41 GMT
Server: Mongrel 0.3.12.4
Content-Length: 7363
Status: 200 OK
Cache-Control: no-cache
Content-Type: text/html
Set-Cookie: _session_id=4a000ec09f7b9fd417400ec3d9235492; path=/
Vary: Accept-Encoding
X-Pad: avoid browser bug
Should I see
HTTP/1.0 200 OK
instead?
Even when I request something that is cached I get the following:
HTTP/1.1 200 OK
Date: Wed, 07 Jun 2006 23:39:56 GMT
Server: Apache
Last-Modified: Wed, 07 Jun 2006 23:39:12 GMT
ETag: "2b1f-709d-dfe82800"
Accept-Ranges: bytes
Content-Length: 28829
Vary: Accept-Encoding
Content-Type: text/html
so it appears that HTTP/1.1 is still in effect, which may be
problematic.
The site worked fine with lighttpd and fastcgi, and I used the
following in my lighttpd.conf to get around it:
$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
server.max-keep-alive-requests = 0
}
Does someone know an Apache snippet to disable keepalives for IE when
it is behind SSL, so hopefully I can make this go away? I thought
the above BrowserMatch snippet would work, but I am having mixed
results with it.
These Apache environment variables may hold the key, but at this
point I am just guessing:
force-proxy-request-1.0, proxy-nokeepalive, proxy-sendchunked, proxy-
sendcl
Thanks,
Curtis
From zedshaw at zedshaw.com Thu Jun 8 05:56:08 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Thu, 08 Jun 2006 02:56:08 -0700
Subject: [Mongrel] Ajax and IE causing Page Not Found and 500
Errors behind SSL
In-Reply-To:
References:
Message-ID: <1149760568.5943.7.camel@localhost.localdomain>
On Wed, 2006-06-07 at 16:56 -0700, Curtis Spencer wrote:
> Hi,
>
> Forgive this if it is a duplicate, because I was having trouble
> posting to the list.
>
> I have a setup of mongrel behind an apache proxy and I am getting a
> few people using IE (5.5 & 6.0) complaining about getting sporadic
> page not found errors when using AJAX features of the site and file
> uploads behind SSL. I am posting the research I have done on the
> subject.
>
Hey Curtis, can you tell me the versions of your operating system,
Apache, Mongrel, and Ruby? Can't really go on much without that.
As for HTTP/1.1 -- Mongrel is an HTTP/1.1 only web server. There should
be no clients that claim to be 1.0 anymore, but Mongrel will accept
requests from them, it just doesn't do much to support 1.0. Trying to
support both is really not worth the effort in order to support such a
tiny share of the servers out there. If you have 1.0 clients that
absolutely can't be upgraded, then put Mongrel behind apache (like you
are) or Pound and have those proxy servers do the translation.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Thu Jun 8 06:34:50 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Thu, 08 Jun 2006 03:34:50 -0700
Subject: [Mongrel] mongrel_rails: bug in -C handling?
In-Reply-To: <8d9b3d920606071234j5b0ad9a8p32e5edaa2518c0bb@mail.gmail.com>
References: <8d9b3d920606071234j5b0ad9a8p32e5edaa2518c0bb@mail.gmail.com>
Message-ID: <1149762890.6699.1.camel@localhost.localdomain>
On Wed, 2006-06-07 at 21:34 +0200, Jan Svitok wrote:
> Hi,
>
> I wanted to set port in config file (via mongrel_rails -C
> config/config.yaml), and it seems to not take it into account.
>
Ok, this should be quickly fixed in the latest pre-release, so please
grab it with:
gem install mongrel --source=http://mongrel.rubyforge.org/releases/
And let me know how it works for you. One change is that I went with
the config file overriding everything that you set. This turns out to
be a lot easier to implement, but people should let me know if they find
this weird.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From thorin at gmail.com Thu Jun 8 14:27:29 2006
From: thorin at gmail.com (Curtis Spencer)
Date: Thu, 8 Jun 2006 18:27:29 +0000 (UTC)
Subject: [Mongrel] Ajax and IE causing Page Not Found and 500
Errors behind SSL
In-Reply-To: <1149760568.5943.7.camel@localhost.localdomain>
References:
<1149760568.5943.7.camel@localhost.localdomain>
Message-ID: <20060608182952.GA6855@jubo.ath.cx>
> Hey Curtis, can you tell me the versions of your operating system,
> Apache, Mongrel, and Ruby? Can't really go on much without that.
>
> As for HTTP/1.1 -- Mongrel is an HTTP/1.1 only web server. There should
> be no clients that claim to be 1.0 anymore, but Mongrel will accept
> requests from them, it just doesn't do much to support 1.0. Trying to
> support both is really not worth the effort in order to support such a
> tiny share of the servers out there. If you have 1.0 clients that
> absolutely can't be upgraded, then put Mongrel behind apache (like you
> are) or Pound and have those proxy servers do the translation.
Zed,
Thanks for the quick reply. After logging the environment
variables such as nokeepalive, I found that the BrowserMatch statement
that I had wasn't working because it was for the _default_:443 virtual
host the environment variables weren't being set properly. So I put
another
BrowserMatch ...
inside the more specific virtual host and I was getting the downgrade
to 1.0 effect I desired. My curl output now looks like this:
HTTP/1.0 200 OK
Date: Thu, 08 Jun 2006 18:02:40 GMT
Server: Mongrel 0.3.12.4
Content-Length: 7176
Status: 200 OK
Cache-Control: no-cache
Content-Type: text/html
Set-Cookie: _session_id=3952e4e54aa9dc3433dc0c030040a9cf; path=/
Vary: Accept-Encoding
Connection: close
when I simulate the IE user agent.
Thanks,
Curtis
From jan.svitok at gmail.com Fri Jun 9 03:42:55 2006
From: jan.svitok at gmail.com (Jan Svitok)
Date: Fri, 9 Jun 2006 09:42:55 +0200
Subject: [Mongrel] mongrel_rails: bug in -C handling?
In-Reply-To: <1149762890.6699.1.camel@localhost.localdomain>
References: <8d9b3d920606071234j5b0ad9a8p32e5edaa2518c0bb@mail.gmail.com>
<1149762890.6699.1.camel@localhost.localdomain>
Message-ID: <8d9b3d920606090042j7fbea94as3c1c94d750a21a2a@mail.gmail.com>
I've tried it and it works fine. I've thought about a more proper
handling, but I've to conclusion that it's not worth the trouble ;-)
I'd let it as it is.
It would be a different case when there was a default config file.
Then, command-line switches should override the config file.
J.
> And let me know how it works for you. One change is that I went with
> the config file overriding everything that you set. This turns out to
> be a lot easier to implement, but people should let me know if they find
> this weird.
From zedshaw at zedshaw.com Sat Jun 10 02:30:45 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Fri, 09 Jun 2006 23:30:45 -0700
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Win32! Win32!
Message-ID: <1149921045.5927.9.camel@localhost.localdomain>
Hello Windows Users!
I have finally got my new computer with it's win32 build working and
have just done the first pre-release for 0.3.13 that has win32 support.
*** All win32 users should try to grab the pre-release and tell me if it
works. ***
You can install it with:
$ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
>From EITHER win32 or any other platform (this release is for everyone).
--WORKS FOR EVERYONE. ALL PEOPLE TEST.--
It's not only for win32, just the first big one for them.
REPORTING BUGS
Just reply to this so I can fix them fast. You can also post bugs on
the Mongrel site at:
http://rubyforge.org/tracker/?atid=5145&group_id=1306&func=browse
LATEST BUG FIXES
* Fixes the -B debug mode for Edge Rails (because people really like
raping object_id and class function calls in order to Monkey patch in
their own versions with nasty ass parameters killing all introspection).
* Documentation fixes for pound and mongrel_cluster.
* Fixes group and user changing so that if you are already that user it
will let you.
* Fixes a problem with -C (config file) where many options weren't being
set. Config files now OVERRIDE any command line settings.
OFFICIAL 0.3.13 THIS WEEKEND
Unless a horrible bug is found this pre-release will graduate to an
official release on Sunday.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Sat Jun 10 03:01:03 2006
From: zedshaw at zedshaw.com (zedshaw at zedshaw.com)
Date: Sat, 10 Jun 2006 00:01:03 -0700 (PDT)
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Win32! Win32!
In-Reply-To: <1149921045.5927.9.camel@localhost.localdomain>
References: <1149921045.5927.9.camel@localhost.localdomain>
Message-ID: <3204.154.20.112.139.1149922863.squirrel@webmail.zedshaw.com>
> Hello Windows Users!
>
> I have finally got my new computer with it's win32 build working and
> have just done the first pre-release for 0.3.13 that has win32 support.
>
> *** All win32 users should try to grab the pre-release and tell me if it
> works. ***
>
> You can install it with:
>
> $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
>
Correction! You have to do these things instead:
gem install win32-service
gem install mongrel --source=http://mongrel.rubyforge.org/releases/
gem install mongrel_service --source=http://mongrel.rubyforge.org/releases/
Then you'll now not use mongrel_rails_service, but instead just use
mongrel_rails and you'll get these commands:
- restart
- service::install
- service::remove
- service::start
- service::stop
- start
- stop
- version
The service::install, service::remove, service::start, and service::stop
now all do what the mongrel_rails_service sript did.
This means DO NOT DO THIS ON PRODUCTION SITES!!!!!!!!
Sorry for the confusion. Thanks.
Zed A. Shaw
From kevwil at gmail.com Sat Jun 10 11:10:25 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Sat, 10 Jun 2006 09:10:25 -0600
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Win32! Win32!
In-Reply-To: <3204.154.20.112.139.1149922863.squirrel@webmail.zedshaw.com>
References: <1149921045.5927.9.camel@localhost.localdomain>
<3204.154.20.112.139.1149922863.squirrel@webmail.zedshaw.com>
Message-ID: <683a886f0606100810l440b7f44r42d7ed0fa2abc080@mail.gmail.com>
I just played with the service stuff for the first time (win32), and
it seems _almost_ perfect.
The service installed and ran just fine. Stopping the service actually
did stop the service but the call threw an exception. Removing the
service seems to have only disabled the service rather than actually
removing it.
On 6/10/06, zedshaw at zedshaw.com wrote:
> > Hello Windows Users!
> >
> > I have finally got my new computer with it's win32 build working and
> > have just done the first pre-release for 0.3.13 that has win32 support.
> >
> > *** All win32 users should try to grab the pre-release and tell me if it
> > works. ***
> >
> > You can install it with:
> >
> > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
> >
>
> Correction! You have to do these things instead:
>
> gem install win32-service
> gem install mongrel --source=http://mongrel.rubyforge.org/releases/
> gem install mongrel_service --source=http://mongrel.rubyforge.org/releases/
>
> Then you'll now not use mongrel_rails_service, but instead just use
> mongrel_rails and you'll get these commands:
>
> - restart
> - service::install
> - service::remove
> - service::start
> - service::stop
> - start
> - stop
> - version
>
> The service::install, service::remove, service::start, and service::stop
> now all do what the mongrel_rails_service sript did.
>
> This means DO NOT DO THIS ON PRODUCTION SITES!!!!!!!!
>
> Sorry for the confusion. Thanks.
>
> Zed A. Shaw
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Cheers,
Kevin
From kevwil at gmail.com Sat Jun 10 11:19:02 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Sat, 10 Jun 2006 09:19:02 -0600
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Win32! Win32!
In-Reply-To: <683a886f0606100810l440b7f44r42d7ed0fa2abc080@mail.gmail.com>
References: <1149921045.5927.9.camel@localhost.localdomain>
<3204.154.20.112.139.1149922863.squirrel@webmail.zedshaw.com>
<683a886f0606100810l440b7f44r42d7ed0fa2abc080@mail.gmail.com>
Message-ID: <683a886f0606100819q7db61a1bta5e9066427b196f2@mail.gmail.com>
Actually, forget the removing part -- I needed to close and re-open
the services mmc to see it was actually removed already.
On 6/10/06, Kevin Williams wrote:
> I just played with the service stuff for the first time (win32), and
> it seems _almost_ perfect.
>
> The service installed and ran just fine. Stopping the service actually
> did stop the service but the call threw an exception. Removing the
> service seems to have only disabled the service rather than actually
> removing it.
>
>
> On 6/10/06, zedshaw at zedshaw.com wrote:
> > > Hello Windows Users!
> > >
> > > I have finally got my new computer with it's win32 build working and
> > > have just done the first pre-release for 0.3.13 that has win32 support.
> > >
> > > *** All win32 users should try to grab the pre-release and tell me if it
> > > works. ***
> > >
> > > You can install it with:
> > >
> > > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
> > >
> >
> > Correction! You have to do these things instead:
> >
> > gem install win32-service
> > gem install mongrel --source=http://mongrel.rubyforge.org/releases/
> > gem install mongrel_service --source=http://mongrel.rubyforge.org/releases/
> >
> > Then you'll now not use mongrel_rails_service, but instead just use
> > mongrel_rails and you'll get these commands:
> >
> > - restart
> > - service::install
> > - service::remove
> > - service::start
> > - service::stop
> > - start
> > - stop
> > - version
> >
> > The service::install, service::remove, service::start, and service::stop
> > now all do what the mongrel_rails_service sript did.
> >
> > This means DO NOT DO THIS ON PRODUCTION SITES!!!!!!!!
> >
> > Sorry for the confusion. Thanks.
> >
> > Zed A. Shaw
> >
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
>
>
> --
> Cheers,
>
> Kevin
>
--
Cheers,
Kevin
From zedshaw at zedshaw.com Sat Jun 10 17:41:10 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sat, 10 Jun 2006 14:41:10 -0700
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Win32! Win32!
In-Reply-To: <683a886f0606100810l440b7f44r42d7ed0fa2abc080@mail.gmail.com>
References: <1149921045.5927.9.camel@localhost.localdomain>
<3204.154.20.112.139.1149922863.squirrel@webmail.zedshaw.com>
<683a886f0606100810l440b7f44r42d7ed0fa2abc080@mail.gmail.com>
Message-ID: <1149975670.5883.0.camel@localhost.localdomain>
On Sat, 2006-06-10 at 09:10 -0600, Kevin Williams wrote:
> I just played with the service stuff for the first time (win32), and
> it seems _almost_ perfect.
>
> The service installed and ran just fine. Stopping the service actually
> did stop the service but the call threw an exception. Removing the
> service seems to have only disabled the service rather than actually
> removing it.
Yeah, there's an exception that sometimes gets thrown when you try to
stop the service. This is due to how the win32-service code is written
so there's not too much we can do about it right now.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From luislavena at gmail.com Sat Jun 10 14:49:22 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Sat, 10 Jun 2006 15:49:22 -0300
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Win32! Win32!
In-Reply-To: <683a886f0606100810l440b7f44r42d7ed0fa2abc080@mail.gmail.com>
References: <1149921045.5927.9.camel@localhost.localdomain>
<3204.154.20.112.139.1149922863.squirrel@webmail.zedshaw.com>
<683a886f0606100810l440b7f44r42d7ed0fa2abc080@mail.gmail.com>
Message-ID: <71166b3b0606101149h60b98340yb6cf00da3df55ec7@mail.gmail.com>
On 6/10/06, Kevin Williams wrote:
> I just played with the service stuff for the first time (win32), and
> it seems _almost_ perfect.
>
> The service installed and ran just fine. Stopping the service actually
> did stop the service but the call threw an exception. Removing the
> service seems to have only disabled the service rather than actually
> removing it.
>
Hi Kevin, as Zed said, the problem is how win32-... erh, actually, how
ruby-threading model play with Native Threads.
I've been working on workarounds for this, but top of my priority list
are other projects, will work on this 2 weeks from now (starting june
19).
>
> On 6/10/06, zedshaw at zedshaw.com wrote:
> > > Hello Windows Users!
> > >
> > > I have finally got my new computer with it's win32 build working and
> > > have just done the first pre-release for 0.3.13 that has win32 support.
> > >
> > > *** All win32 users should try to grab the pre-release and tell me if it
> > > works. ***
> > >
> > > You can install it with:
> > >
> > > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
> > >
> >
> > Correction! You have to do these things instead:
> >
> > gem install win32-service
> > gem install mongrel --source=http://mongrel.rubyforge.org/releases/
> > gem install mongrel_service --source=http://mongrel.rubyforge.org/releases/
> >
> > Then you'll now not use mongrel_rails_service, but instead just use
> > mongrel_rails and you'll get these commands:
> >
> > - restart
> > - service::install
> > - service::remove
> > - service::start
> > - service::stop
> > - start
> > - stop
> > - version
> >
> > The service::install, service::remove, service::start, and service::stop
> > now all do what the mongrel_rails_service sript did.
> >
> > This means DO NOT DO THIS ON PRODUCTION SITES!!!!!!!!
> >
> > Sorry for the confusion. Thanks.
> >
> > Zed A. Shaw
> >
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
>
>
> --
> Cheers,
>
> Kevin
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
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
From carl.lerche at verizon.net Sat Jun 10 19:41:10 2006
From: carl.lerche at verizon.net (Carl Lerche)
Date: Sat, 10 Jun 2006 16:41:10 -0700
Subject: [Mongrel] mongrel (0.3.12.4) blows up
Message-ID:
Hello, I don't know if this is really relevant anymore because a new
version is about to be released it seems, however I've been trying to
run mongrel 0.3.12.4 on a development server in development mode
(simply with mongrel_rails start). I try to access the server and the
first page (static file) loads, but then the server dies and I get
this in the logs.
I'm not sure if it's a problem with me, my configuration, or mongrel,
but I switched back to webrick for now. I am running ruby 1.8.4
(2005-12-24) [i386-freebsd5].
** Starting Rails in environment development ...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no
restart).
** Rails signals registered. HUP => reload (without restart). It
might not work well.
** Running 0.0.0.0:3000 listener.
** Mongrel available at 0.0.0.0:3000
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/
tcphack.rb:6:in `initialize_without_backlog': Address already in use
- bind(2) (Errno::EADDR
INUSE)
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/
mongrel/tcphack.rb:6:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/
mongrel.rb:387:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/
mongrel.rb:653:in `listener'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/
mongrel_rails:69:in `cloaker_'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/
mongrel.rb:616:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/
mongrel_rails:61:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/
mongrel/command.rb:163:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/
mongrel_rails:194
from /usr/local/bin/mongrel_rails:18
** TERM signal received.
** Stopping 0.0.0.0:3000 listener.
Server stopped. Exiting.
Thanks,
Carl
From jason.young at eXtension.org Sat Jun 10 19:55:57 2006
From: jason.young at eXtension.org (Jason Young)
Date: Sat, 10 Jun 2006 19:55:57 -0400
Subject: [Mongrel] mongrel (0.3.12.4) blows up
In-Reply-To:
References:
Message-ID: <3B2955AF-0D5B-4B86-8B16-AAAB236E4DAB@eXtension.org>
You already have something on that box (maybe even an daemonized
mongrel_rails process) running on port 3000
Try doing a netstat -tlp (if your netstat supports that) and seeing
what other process is holding on to port 3000.
Jason
On Jun 10, 2006, at 7:41 PM, Carl Lerche wrote:
> Hello, I don't know if this is really relevant anymore because a new
> version is about to be released it seems, however I've been trying to
> run mongrel 0.3.12.4 on a development server in development mode
> (simply with mongrel_rails start). I try to access the server and the
> first page (static file) loads, but then the server dies and I get
> this in the logs.
>
> ** Mongrel available at 0.0.0.0:3000
> /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/
> tcphack.rb:6:in `initialize_without_backlog': Address already in use
> - bind(2) (Errno::EADDR
> INUSE)
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jason Young -- Systems Engineer, eXtension
http://about.extension.org/wiki/Jason_Young
______________________________________
From schoenm at earthlink.net Sun Jun 11 03:20:55 2006
From: schoenm at earthlink.net (Michael A. Schoen)
Date: Sun, 11 Jun 2006 00:20:55 -0700
Subject: [Mongrel] StatusHandler
In-Reply-To: <200605230957.k4N9vimT032597@rubyforge.org>
References: <200605230957.k4N9vimT032597@rubyforge.org>
Message-ID: <448BC457.8050303@earthlink.net>
Zed,
Very cool, finally got around to playing with StatusHandler and
StatisticsHandler. One thing that was missing that I wanted was insight
into _what_ the RailsHandler was working on, and what was queued up
while it sat in single-threaded mode -- ie., the current list of requests.
W/ the attached mongrel.conf, I hacked the RailsHandler to keep a hash
of active requests, and spit that out in the StatusHandler.
Any thoughts or feedback on this (attached)?
thanks,
Michael
noreply at rubyforge.org wrote:
> Feature Requests item #4420, was opened at 2006-05-10 02:10
> You can respond by visiting:
> http://rubyforge.org/tracker/?func=detail&atid=5148&aid=4420&group_id=1306
> Initial Comment:
> It would be really nice to have some insight into what a production Mongrel process is doing, in particular if it's stuck running a long-running Rails process.
>
> I'm thinking something like Apache's server-status, or maybe having it dump to the log the list of queued requests in response to a signal.
>
> ----------------------------------------------------------------------
>
>> Comment By: Zed Shaw (zedshaw)
> Date: 2006-05-23 05:57
>
> Message:
> Done and in svn. Take a look at examples/simpletest.rb for how it's used. I'll be documenting it, but basically add
>
> stats = Mongrel::StatisticsFilter.new(:sample_rate => 1)
> uri "/", :handler => stats
> uri "/status", :handler => Mongrel::StatusHandler.new(:stats_filter => stats)
>
> To a config/mongrel.conf and use -S to run it. Adjust sample rate to around 300 for a lower load.
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mongrel.conf
Url: http://rubyforge.org/pipermail/mongrel-users/attachments/20060611/2362a424/attachment.bat
From hutch at recursive.ca Mon Jun 12 08:37:03 2006
From: hutch at recursive.ca (Bob Hutchison)
Date: Mon, 12 Jun 2006 08:37:03 -0400
Subject: [Mongrel] Input/output error on linux
Message-ID:
Hi,
I'm trying to use mongrel 0.3.13 with Rail 1.0
Believe it or not, on OS/X it works well for weeks at a time. On
linux I'm getting Input/output errors after anything from a few hours
to days, never more than a week. Once they start they don't stop.
The only pattern I've seen is that it always (seems) to happen while
rendering an rhtml file. I've never seen it happen with a static
file, for instance.
Until yesterday, once the errors started they happened on every page
rendered. Yesterday, some pages would be rendered okay, others fail.
I mean that some rhtml files would work and other wouldn't -- the
rhtml files all follow a similar pattern so there's nothing
particularly special about any of them, working or failing.
Has anyone seen this before? Any suggestions? Is there something
useful to check in Rails or Mongrel?
I've appended a recent stack trace. Don't read anything into the
rhtml where it failed, it happens with the simplest you
can imagine. This trace might not be the best example, but it is the
one I've got.
Cheers,
Bob
----
Bob Hutchison -- blogs at
Recursive Design Inc. --
Raconteur --
xampl for Ruby --
Processing StoryController#index (for 216.138.231.102 at 2006-06-12
07:34:38) [GET]
Parameters: {"story"=>"1144782860_45", "action"=>"index",
"id"=>"cdmb-migrated", "controller"=>"raconteur/story",
"pub"=>"1145371264_1"}
raconteur_user: super
Rendering within layouts/raconteur
Rendering raconteur/story/index
ActionView::TemplateError (Input/output error) on line #15 of app/
views/raconteur/story/index.rhtml:
12:
15:

16:
/home/raconteur/gems/gems/actionpack-1.11.2/lib/action_view/
helpers/java_script_macros_helper.rb:62:in `write'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/action_view/
helpers/java_script_macros_helper.rb:62:in `in_place_editor_field'
#{RAILS_ROOT}/app/views/raconteur/story/index.rhtml:15
/home/raconteur/gems/gems/actionpack-1.11.2/lib/action_view/
base.rb:268:in `compile_and_render_template'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/action_view/
base.rb:244:in `render_template'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/action_view/
base.rb:205:in `render_file'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/base.rb:655:in `render_file'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/base.rb:595:in `render_with_no_layout'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/layout.rb:220:in `render_without_benchmark'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/benchmarking.rb:53:in `render'
/home/raconteur/lib/ruby/1.8/benchmark.rb:293:in `measure'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/benchmarking.rb:53:in `render'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/base.rb:854:in `perform_action_without_filters'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/filters.rb:332:in `perform_action_without_benchmark'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
/home/raconteur/lib/ruby/1.8/benchmark.rb:293:in `measure'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/rescue.rb:82:in `perform_action'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/base.rb:369:in
`process_without_session_management_support'
/home/raconteur/gems/gems/actionpack-1.11.2/lib/
action_controller/session_management.rb:116:in `process'
/home/raconteur/gems/gems/rails-1.0.0/lib/dispatcher.rb:38:in
`dispatch'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel/rails.rb:
85:in `process'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel.rb:532:in
`process_client'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel.rb:531:in
`process_client'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel.rb:600:in
`run'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel.rb:599:in
`run'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel.rb:588:in
`run'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel.rb:918:in
`run'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel.rb:917:in
`run'
/home/raconteur/gems/gems/mongrel-0.3.13/bin/mongrel_rails:
122:in `run'
/home/raconteur/gems/gems/mongrel-0.3.13/lib/mongrel/command.rb:
208:in `run'
/home/raconteur/gems/gems/mongrel-0.3.13/bin/mongrel_rails:230
/home/raconteur/gems/bin/mongrel_rails:18
From riley.ross at gmail.com Mon Jun 12 08:51:58 2006
From: riley.ross at gmail.com (Ross Riley)
Date: Mon, 12 Jun 2006 13:51:58 +0100
Subject: [Mongrel] Broken Pipe Error with Mysql
Message-ID: <15365f130606120551i44e2954due29a33dc8bf3e4cb@mail.gmail.com>
Hello.
Been getting the dreaded MySQL broken pipe error after a few hours of
the app being started. Obviously restarting the server fixes
everything. I gather from a few posts about running rails on fast-cgi
that this happens when mysql timesout before the application. Just
wondering what the timeout for mongrel is and which mysql variable it
has to be lower than.
Thanks for any help
--
Ross Riley
riley.ross at gmail.com
From zedshaw at zedshaw.com Mon Jun 12 09:03:51 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 12 Jun 2006 09:03:51 -0400
Subject: [Mongrel] Input/output error on linux
In-Reply-To:
References:
Message-ID: <1150117431.6940.0.camel@localhost.localdomain>
On Mon, 2006-06-12 at 08:37 -0400, Bob Hutchison wrote:
> Hi,
>
> I'm trying to use mongrel 0.3.13 with Rail 1.0
>
> Believe it or not, on OS/X it works well for weeks at a time. On
> linux I'm getting Input/output errors after anything from a few hours
> to days, never more than a week. Once they start they don't stop.
>
> The only pattern I've seen is that it always (seems) to happen while
> rendering an rhtml file. I've never seen it happen with a static
> file, for instance.
>
> Until yesterday, once the errors started they happened on every page
> rendered. Yesterday, some pages would be rendered okay, others fail.
> I mean that some rhtml files would work and other wouldn't -- the
> rhtml files all follow a similar pattern so there's nothing
> particularly special about any of them, working or failing.
>
> Has anyone seen this before? Any suggestions? Is there something
> useful to check in Rails or Mongrel?
Are you seeing these errors usually after midnight and do you have log
rotation enabled for any of the log files? I've found log rotation
causes many problems.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Mon Jun 12 09:07:38 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 12 Jun 2006 09:07:38 -0400
Subject: [Mongrel] Broken Pipe Error with Mysql
In-Reply-To: <15365f130606120551i44e2954due29a33dc8bf3e4cb@mail.gmail.com>
References: <15365f130606120551i44e2954due29a33dc8bf3e4cb@mail.gmail.com>
Message-ID: <1150117658.6940.4.camel@localhost.localdomain>
On Mon, 2006-06-12 at 13:51 +0100, Ross Riley wrote:
> Hello.
>
> Been getting the dreaded MySQL broken pipe error after a few hours of
> the app being started. Obviously restarting the server fixes
> everything. I gather from a few posts about running rails on fast-cgi
> that this happens when mysql timesout before the application. Just
> wondering what the timeout for mongrel is and which mysql variable it
> has to be lower than.
There is no "timeout" in mongrel other than in the rare condition where
mongrel is overloaded with too many connections and any current
connections have taken too long. These are set with the -n and -t
options.
You are most likely running into:
http://mongrel.rubyforge.org/faq.html
"Q: Mongrel stops working if it?s left alone for a long time."
Read that, and there were quite a few posts to the mailing list on the
subject last month or so (google loves you because I'm lazy).
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From hutch at recursive.ca Mon Jun 12 09:14:08 2006
From: hutch at recursive.ca (Bob Hutchison)
Date: Mon, 12 Jun 2006 09:14:08 -0400
Subject: [Mongrel] Input/output error on linux
In-Reply-To: <1150117431.6940.0.camel@localhost.localdomain>
References:
<1150117431.6940.0.camel@localhost.localdomain>
Message-ID: <9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca>
Hi Zed,
On Jun 12, 2006, at 9:03 AM, Zed Shaw wrote:
> On Mon, 2006-06-12 at 08:37 -0400, Bob Hutchison wrote:
>> Hi,
>>
>> I'm trying to use mongrel 0.3.13 with Rail 1.0
>>
>> Believe it or not, on OS/X it works well for weeks at a time. On
>> linux I'm getting Input/output errors after anything from a few hours
>> to days, never more than a week. Once they start they don't stop.
>>
>> The only pattern I've seen is that it always (seems) to happen while
>> rendering an rhtml file. I've never seen it happen with a static
>> file, for instance.
>>
>> Until yesterday, once the errors started they happened on every page
>> rendered. Yesterday, some pages would be rendered okay, others fail.
>> I mean that some rhtml files would work and other wouldn't -- the
>> rhtml files all follow a similar pattern so there's nothing
>> particularly special about any of them, working or failing.
>>
>> Has anyone seen this before? Any suggestions? Is there something
>> useful to check in Rails or Mongrel?
>
> Are you seeing these errors usually after midnight and do you have log
> rotation enabled for any of the log files? I've found log rotation
> causes many problems.
I don't have log rotation enabled. And there doesn't appear to be any
time of day involvement either.
Cheers,
Bob
>
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
----
Bob Hutchison -- blogs at
Recursive Design Inc. --
Raconteur --
xampl for Ruby --
From zedshaw at zedshaw.com Mon Jun 12 09:19:14 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 12 Jun 2006 09:19:14 -0400
Subject: [Mongrel] StatusHandler
In-Reply-To: <448BC457.8050303@earthlink.net>
References: <200605230957.k4N9vimT032597@rubyforge.org>
<448BC457.8050303@earthlink.net>
Message-ID: <1150118354.6940.12.camel@localhost.localdomain>
On Sun, 2006-06-11 at 00:20 -0700, Michael A. Schoen wrote:
> Zed,
>
> Very cool, finally got around to playing with StatusHandler and
> StatisticsHandler. One thing that was missing that I wanted was insight
> into _what_ the RailsHandler was working on, and what was queued up
> while it sat in single-threaded mode -- ie., the current list of requests.
>
> W/ the attached mongrel.conf, I hacked the RailsHandler to keep a hash
> of active requests, and spit that out in the StatusHandler.
>
Pretty cool. I'll look at adding this, but I'll have to work out how to
include that RailsHandler monkey patch. I'll see if tracking rails
requests is a big performance hit or not, and if it's not that big then
I'll just do this (I can see other uses for this). If it's a hit then
I'll have to devise a way to selectively enable this.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Mon Jun 12 09:31:18 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 12 Jun 2006 09:31:18 -0400
Subject: [Mongrel] Input/output error on linux
In-Reply-To: <9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca>
References:
<1150117431.6940.0.camel@localhost.localdomain>
<9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca>
Message-ID: <1150119078.6940.16.camel@localhost.localdomain>
On Mon, 2006-06-12 at 09:14 -0400, Bob Hutchison wrote:
> >> Has anyone seen this before? Any suggestions? Is there something
> >> useful to check in Rails or Mongrel?
> >
> > Are you seeing these errors usually after midnight and do you have log
> > rotation enabled for any of the log files? I've found log rotation
> > causes many problems.
>
> I don't have log rotation enabled. And there doesn't appear to be any
> time of day involvement either.
You know there's no "write" in that help file anywhere, and even if
there were it's being written to a StringIO internally so you wouldn't
get a write error. The only possible places to get write errors are:
1) MySQL -- See the e-mail today about mysql timeouts.
2) $stderr,$stdout -- rhtml *LOVES* to write crap to these, but Mongrel
catches these and redirects to StringIO as well.
3) Files -- Make sure you're not dumping to a file that's then removed
on accident. Although this is weird.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From hutch at recursive.ca Mon Jun 12 09:48:09 2006
From: hutch at recursive.ca (Bob Hutchison)
Date: Mon, 12 Jun 2006 09:48:09 -0400
Subject: [Mongrel] Input/output error on linux
In-Reply-To: <1150119078.6940.16.camel@localhost.localdomain>
References:
<1150117431.6940.0.camel@localhost.localdomain>
<9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca>
<1150119078.6940.16.camel@localhost.localdomain>
Message-ID:
On Jun 12, 2006, at 9:31 AM, Zed Shaw wrote:
> On Mon, 2006-06-12 at 09:14 -0400, Bob Hutchison wrote:
>
>>>> Has anyone seen this before? Any suggestions? Is there something
>>>> useful to check in Rails or Mongrel?
>>>
>>> Are you seeing these errors usually after midnight and do you
>>> have log
>>> rotation enabled for any of the log files? I've found log rotation
>>> causes many problems.
>>
>> I don't have log rotation enabled. And there doesn't appear to be any
>> time of day involvement either.
>
> You know there's no "write" in that help file anywhere,
Yeah I know :-) I don't know what to think of that. Maybe something
is trapping and then re-throwing the exception?
In other cases, when I've checked there had been a write.
> and even if
> there were it's being written to a StringIO internally so you wouldn't
> get a write error.
StringIO throws IOErrors for a number of reasons (I just looked at
the C code). So, your comments below are looking very interesting.
> The only possible places to get write errors are:
>
> 1) MySQL -- See the e-mail today about mysql timeouts.
I don't use a conventional database (and if any I/O were to happen
with the DB I use I would know about it since it log the fact if
legal, or throw its own exception otherwise). The log it uses is the
standard log (where I got the stack trace from so that should be okay).
> 2) $stderr,$stdout -- rhtml *LOVES* to write crap to these, but
> Mongrel
> catches these and redirects to StringIO as well.
This is interesting. stderr and stdout have probably been detached.
I'll look into this for sure.
> 3) Files -- Make sure you're not dumping to a file that's then
> removed
> on accident. Although this is weird.
I don't think this is happening. Everything is pretty uniform and so
if even one page is working this probably isn't happening.
Thanks,
Bob
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
----
Bob Hutchison -- blogs at
Recursive Design Inc. --
Raconteur --
xampl for Ruby --
From carl.lerche at verizon.net Mon Jun 12 22:47:12 2006
From: carl.lerche at verizon.net (Carl Lerche)
Date: Mon, 12 Jun 2006 19:47:12 -0700
Subject: [Mongrel] mongrel_upload_progress & plugin question in general
Message-ID:
Hello,
So, I grabbed the mongrel_upload_progress code from subversion
because I really need something similar for a project I am working
on. Anyway, I installed the gem and can't figure out a few things.
1) I'm not sure what Upload < GemPlugin::Plugin "/handlers" is for
2) How to call the Progress < GemPlugin::Plugin "/handlers" handler.
While I was trying to figure it out, I wrote my own test plugin to
mess around with the general plugin system and what I think it is is
that the handlers aren't registering with a particular uri. In the
Rdoc for mongrel there is the following code:
require 'mongrel'
class SimpleHandler < Mongrel::HttpHandler
def process(request, response)
response.start(200) do |head,out|
head["Content-Type"] = "text/plain"
out.write("hello!\n")
end
end
end
h = Mongrel::HttpServer.new("0.0.0.0", "3000")
h.register("/test", SimpleHandler.new)
h.register("/files", Mongrel::DirHandler.new("."))
h.run.join
Now, the key thing here is the h.register which associates a uri with
a handler (or the method uri). I don't see anything like that
happening with the gem plugins. Am I missing something? What would be
the "GemPlugin" way to register a uri with a handler. I'm not even
sure that it should be associated with the plugin, in which case do I
have to modify mongrel_rails ?
Thanks for any pointers or suggestions on where to look.
-carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060612/fef72159/attachment-0001.htm
From jan.svitok at gmail.com Tue Jun 13 04:58:19 2006
From: jan.svitok at gmail.com (Jan Svitok)
Date: Tue, 13 Jun 2006 10:58:19 +0200
Subject: [Mongrel] mongrel_upload_progress & plugin question in general
In-Reply-To:
References:
Message-ID: <8d9b3d920606130158m66ad35i32a726b904e16de6@mail.gmail.com>
Hi,
look for documentation for Mongrel::Configurator.
It has method plugin that returns an instance of particular handler:
...
uri '/whatever', :handler => plugin('/handlers/progress', options)
...
if you have
class Progress < GemPlugin::Base '/handlers'
then
plugin('/handlers/progress', options)
is the same as
Progress.new(options)
Then, if you use mongrel_rails, you can use -S switch to insert
additional configuration into
RailsConfigurator, which is a subclass of Mongrel::Configurator
In your script write:
uri '/whatever', :handler => plugin('/handlers/progress', options)
Hope this helps.
What was useful for me to figure this out:
- reading the rdoc for mongrel and gemplugin
- reading the thread on progress plugin on this list
- reading the source of mongrel_rails
- reading the source of another plugin, but I don't remember which one it was
Jano
On 6/13/06, Carl Lerche wrote:
>
> Hello,
>
> So, I grabbed the mongrel_upload_progress code from subversion because I
> really need something similar for a project I am working on. Anyway, I
> installed the gem and can't figure out a few things.
>
> 1) I'm not sure what Upload < GemPlugin::Plugin "/handlers" is for
>
> 2) How to call the Progress < GemPlugin::Plugin "/handlers" handler.
>
> While I was trying to figure it out, I wrote my own test plugin to mess
> around with the general plugin system and what I think it is is that the
> handlers aren't registering with a particular uri. In the Rdoc for mongrel
> there is the following code:
>
> require 'mongrel'
>
> class SimpleHandler < Mongrel::HttpHandler
> def process(request, response)
> response.start(200) do |head,out|
> head["Content-Type"] = "text/plain"
> out.write("hello!\n")
> end
> end
> end
>
> h = Mongrel::HttpServer.new("0.0.0.0", "3000")
> h.register("/test", SimpleHandler.new)
> h.register("/files", Mongrel::DirHandler.new("."))
> h.run.join
>
> Now, the key thing here is the h.register which associates a uri with a
> handler (or the method uri). I don't see anything like that happening with
> the gem plugins. Am I missing something? What would be the "GemPlugin" way
> to register a uri with a handler. I'm not even sure that it should be
> associated with the plugin, in which case do I have to modify mongrel_rails
> ?
>
> Thanks for any pointers or suggestions on where to look.
>
> -carl
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
From mcornick at mcornick.org Tue Jun 13 17:46:50 2006
From: mcornick at mcornick.org (Mark Cornick)
Date: Tue, 13 Jun 2006 17:46:50 -0400
Subject: [Mongrel] log and pid file problems when using a config file w/ -C
Message-ID: <20060613214649.GA21805@mcornick.org>
Hi there,
I'm using Mongrel (0.3.13 prerelease, installed today) to serve up some
Rails apps in production. Everything works fine if I give all the
appropriate options on the command line, such as:
$ mongrel_rails start -c /home/mcornick/rails/mcornick.org/current -P log/mongrel.pid -l log/mongrel.log -e production -d -a 127.0.0.1 -p 6833
So, having accomplished that, I thought it would be easier to dump all
that stuff into a config file to use with the -C option. So I did this:
$ mongrel_rails start -c /home/mcornick/rails/mcornick.org/current -P log/mongrel.pid -l log/mongrel.log -e production -d -a 127.0.0.1 -p 6833 -G config/mongrel.yml
Which also worked, and generated a YAML file with my options:
---
:cwd: /home/mcornick/rails/mcornick.org/current
:includes:
- mongrel
:environment: production
:timeout: 0
:log_file: log/mongrel.log
:config_script:
#:pid_file: log/mongrel.pid
:num_processors: 1024
:debug: false
:group:
:docroot: public
:user:
:host: 127.0.0.1
:mime_map:
:port: "6833"
:daemon: true
And it almost works. If I then try:
$ mongrel_rails start -C /home/mcornick/rails/mcornick.org/current/config/mongrel.yml
** You have sendfile installed, will use that to serve files.
!!! Path to log file not valid: log/mongrel.log
start reported an error. Use mongrel_rails start -h to get help.
Which makes me think the cwd option isn't being picked up. OK, no biggie,
I change directories to /home/mcornick/rails/mcornick.org/current and:
$ mongrel_rails start -C config/mongrel.yml
** You have sendfile installed, will use that to serve files.
** Loading settings from config/mongrel.yml (command line options override).
** Starting Mongrel in production mode at 127.0.0.1:6833
** Daemonizing, any open files are closed. Look at log/mongrel.pid and log/mongrel.log for info.
Looks good, mongrel is running, except that the log/mongrel.pid file is not
created (although the log/mongrel.log file is.) So I can't later do
mongrel_rails stop, or easily restart from my Capistrano recipe, etc.
Do I have the config file syntax right? (I didn't change any of the keys
from the -G output.) Is there something else I should be doing here?
BTW, I am running with Ruby 1.8.4 on FreeBSD 6.1-RELEASE. I have the
sendfile gem installed, as well as mongrel_cluster which I haven't done
anything with yet, in addition to the standard set of Rails 1.1.2 gems.
Thanks,
--mark
From mcornick at mcornick.org Tue Jun 13 17:49:29 2006
From: mcornick at mcornick.org (Mark Cornick)
Date: Tue, 13 Jun 2006 17:49:29 -0400
Subject: [Mongrel] log and pid file problems when using a config file w/
-C
In-Reply-To: <20060613214649.GA21805@mcornick.org>
References: <20060613214649.GA21805@mcornick.org>
Message-ID: <20060613214929.GB21805@mcornick.org>
On Tue, Jun 13, 2006 at 05:46:50PM -0400, Mark Cornick wrote:
> Which also worked, and generated a YAML file with my options:
>
> ---
> :cwd: /home/mcornick/rails/mcornick.org/current
> :includes:
> - mongrel
> :environment: production
> :timeout: 0
> :log_file: log/mongrel.log
> :config_script:
> #:pid_file: log/mongrel.pid
> :num_processors: 1024
> :debug: false
> :group:
> :docroot: public
> :user:
> :host: 127.0.0.1
> :mime_map:
> :port: "6833"
> :daemon: true
Oops. I left :pid_file: commented out; I had tried it that way to see if
just leaving it at the default setting would help. It didn't; I see no
pid file written whether I have :pid_file: commented or not. Sorry 'bout
that.
--mark
From bofh7606 at yahoo.com Wed Jun 14 17:04:34 2006
From: bofh7606 at yahoo.com (Chuck Rhoades)
Date: Wed, 14 Jun 2006 14:04:34 -0700 (PDT)
Subject: [Mongrel] uninitialized constant Mongrel::HttpHandler (NameError)
Message-ID: <20060614210434.50465.qmail@web35804.mail.mud.yahoo.com>
I am trying to get a basic apache 2.0.55 + mongrel + rails app configuration setup and i keep getting this:
# mongrel_rails
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:28: uninitialized constant Mongrel::HttpHandler (NameError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:5
from /usr/local/bin/mongrel_rails:18
It looks like the http11.so is not getting compiled correctly, but I really have no idea what to do about it. here is the output from the gem install:
Building native extensions. This could take a while...
make: ./install-sh: Command not found
make: *** [/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/http11.so] Error 127
ruby extconf.rb install mongrel
checking for main() in -lc... yes
creating Makefile
make
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c http11.c
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c http11_parser.c
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c tst_cleanup.c
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c tst_delete.c
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c tst_grow_node_free_list.c
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c tst_init.c
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c tst_insert.c
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -c tst_search.c
gcc -Wl,-G -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o http11.so http11.o http11_parser.o tst_cleanup.o tst_delete.o tst_grow_node_free_list.o tst_init.o tst_insert.o tst_search.o -lc -ldl -lcrypt -lm -lc
make install
./install-sh -c -m 0755 http11.so /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib
Successfully installed mongrel-0.3.12.4
Installing RDoc documentation for mongrel-0.3.12.4...
Thanks in advance,
Chuck
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060614/c37b6813/attachment.htm
From hutch at recursive.ca Thu Jun 15 07:18:38 2006
From: hutch at recursive.ca (Bob Hutchison)
Date: Thu, 15 Jun 2006 07:18:38 -0400
Subject: [Mongrel] Input/output error on linux
In-Reply-To:
References:
<1150117431.6940.0.camel@localhost.localdomain>
<9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca>
<1150119078.6940.16.camel@localhost.localdomain>
Message-ID: <393ED45A-1849-4269-A8AD-4E7A4D40FCBD@recursive.ca>
Hi,
More on this problem. Maybe a even a clue??
I restarted the server just before I sent the last message (Jun 12,
2006, at 9:48 AM). The difference was that I redirected stderr to a
file (you had mentioned stdout and stderr issues). Things were
running fine until between 17:04 and 17:12 EDT yesterday.
The error this time was really different, so maybe not related at
all. It was getting name errors like:
NameError (undefined method `options_of' for class `Module')
but for all kinds of different methods and classes.
Looking in the stderr file it looks as though there was a HUP signal
caught. But no timestamp. I'm guessing it happened sometime between
17:04 and 17:12.
Now, the specific errors I've been getting are different than those
I've been complaining about. Is it possible that previously the HUP
signal handling actually worked (mostly) but left the IO system in
trouble?
Thanks,
Bob
On Jun 12, 2006, at 9:48 AM, Bob Hutchison wrote:
>
> On Jun 12, 2006, at 9:31 AM, Zed Shaw wrote:
>
>> On Mon, 2006-06-12 at 09:14 -0400, Bob Hutchison wrote:
>>
>>>>> Has anyone seen this before? Any suggestions? Is there something
>>>>> useful to check in Rails or Mongrel?
>>>>
>>>> Are you seeing these errors usually after midnight and do you
>>>> have log
>>>> rotation enabled for any of the log files? I've found log rotation
>>>> causes many problems.
>>>
>>> I don't have log rotation enabled. And there doesn't appear to be
>>> any
>>> time of day involvement either.
>>
>> You know there's no "write" in that help file anywhere,
>
> Yeah I know :-) I don't know what to think of that. Maybe something
> is trapping and then re-throwing the exception?
>
> In other cases, when I've checked there had been a write.
>
>> and even if
>> there were it's being written to a StringIO internally so you
>> wouldn't
>> get a write error.
>
> StringIO throws IOErrors for a number of reasons (I just looked at
> the C code). So, your comments below are looking very interesting.
>
>> The only possible places to get write errors are:
>>
>> 1) MySQL -- See the e-mail today about mysql timeouts.
>
> I don't use a conventional database (and if any I/O were to happen
> with the DB I use I would know about it since it log the fact if
> legal, or throw its own exception otherwise). The log it uses is
> the standard log (where I got the stack trace from so that should
> be okay).
>
>> 2) $stderr,$stdout -- rhtml *LOVES* to write crap to these, but
>> Mongrel
>> catches these and redirects to StringIO as well.
>
> This is interesting. stderr and stdout have probably been detached.
> I'll look into this for sure.
>
>> 3) Files -- Make sure you're not dumping to a file that's then
>> removed
>> on accident. Although this is weird.
>
> I don't think this is happening. Everything is pretty uniform and
> so if even one page is working this probably isn't happening.
>
>
> Thanks,
> Bob
>
>>
>>
>> --
>> Zed A. Shaw
>> http://www.zedshaw.com/
>> http://mongrel.rubyforge.org/
>>
>>
>> _______________________________________________
>> Mongrel-users mailing list
>> Mongrel-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/mongrel-users
>
> ----
> Bob Hutchison -- blogs at hutch/>
> Recursive Design Inc. --
> Raconteur --
> xampl for Ruby -- xampl/>
>
>
>
----
Bob Hutchison -- blogs at
Recursive Design Inc. --
Raconteur --
xampl for Ruby --
From curio at free.fr Thu Jun 15 10:49:26 2006
From: curio at free.fr (Francois Simond)
Date: Thu, 15 Jun 2006 16:49:26 +0200
Subject: [Mongrel] Performance leak with concurrent requests on static files
(Rails)
Message-ID: <44917376.5020605@free.fr>
Hi,
I just found something weird for mongrel with static files.
Performance endlessly decreases if mongrel serve static files from
simultaneous requests :
Here is the test setup:
Ruby on Rails
Mongrel (tested with 1.3.12.4 and 1.3.13-pre installed today)
Ubuntu dapper, compiled ruby 1.8.4.
http client :
while true; do ab -n 1000 -c 30 http://localhost:3000/ 2>/dev/null |
grep quest.*mean ; echo -- ; done
Requests per second: 276.85 [#/sec] (mean)
Time per request: 108.362 [ms] (mean)
Time per request: 3.612 [ms] (mean, across all concurrent requests)
--
Requests per second: 276.91 [#/sec] (mean)
Time per request: 108.340 [ms] (mean)
Time per request: 3.611 [ms] (mean, across all concurrent requests)
--
Requests per second: 146.76 [#/sec] (mean)
Time per request: 204.419 [ms] (mean)
Time per request: 6.814 [ms] (mean, across all concurrent requests)
--
Requests per second: 84.16 [#/sec] (mean)
Time per request: 356.448 [ms] (mean)
Time per request: 11.882 [ms] (mean, across all concurrent requests)
--
Requests per second: 52.18 [#/sec] (mean)
Time per request: 574.902 [ms] (mean)
Time per request: 19.163 [ms] (mean, across all concurrent requests)
--
Requests per second: 34.79 [#/sec] (mean)
Time per request: 862.400 [ms] (mean)
Time per request: 28.747 [ms] (mean, across all concurrent requests)
--
Requests per second: 24.75 [#/sec] (mean)
Time per request: 1212.168 [ms] (mean)
Time per request: 40.406 [ms] (mean, across all concurrent requests)
--
Requests per second: 18.40 [#/sec] (mean)
Time per request: 1630.574 [ms] (mean)
Time per request: 54.352 [ms] (mean, across all concurrent requests)
--
Requests per second: 14.05 [#/sec] (mean)
Time per request: 2135.263 [ms] (mean)
Time per request: 71.175 [ms] (mean, across all concurrent requests)
--
Requests per second: 10.79 [#/sec] (mean)
Time per request: 2779.148 [ms] (mean)
Time per request: 92.638 [ms] (mean, across all concurrent requests)
lsof tool give indications about what happened :
$ lsof -p 32200
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
mongrel_r 32200 curio cwd DIR 8,3 4096 67168034 /home/curio/truc
mongrel_r 32200 curio rtd DIR 8,3 4096 128 /
mongrel_r 32200 curio txt REG 8,3 782262 671306909
/usr/local/bin/ruby
mongrel_r 32200 curio mem REG 0,0 0 [heap]
(stat: No such file or directory)
mongrel_r 32200 curio mem REG 8,3 18707 134491718
/usr/local/lib/ruby/1.8/i686-linux/iconv.so
mongrel_r 32200 curio mem REG 8,3 16101 335612184
/usr/local/lib/ruby/1.8/i686-linux/racc/cparse.so
mongrel_r 32200 curio mem REG 8,3 159997 134491721
/usr/local/lib/ruby/1.8/i686-linux/nkf.so
mongrel_r 32200 curio mem REG 8,3 10796 134491709
/usr/local/lib/ruby/1.8/i686-linux/digest.so
mongrel_r 32200 curio mem REG 8,3 10754 201362293
/usr/local/lib/ruby/1.8/i686-linux/digest/md5.so
mongrel_r 32200 curio mem REG 8,3 6780 134491717
/usr/local/lib/ruby/1.8/i686-linux/fcntl.so
mongrel_r 32200 curio mem REG 8,3 20689 134491735
/usr/local/lib/ruby/1.8/i686-linux/strscan.so
mongrel_r 32200 curio mem REG 8,3 77368 671116608
/usr/lib/libz.so.1.2.3
mongrel_r 32200 curio mem REG 8,3 12261 134491716
/usr/local/lib/ruby/1.8/i686-linux/etc.so
mongrel_r 32200 curio mem REG 8,3 42358 134491740
/usr/local/lib/ruby/1.8/i686-linux/zlib.so
mongrel_r 32200 curio mem REG 8,3 30975 537298194
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/http11.so
mongrel_r 32200 curio mem REG 8,3 45420 134491732
/usr/local/lib/ruby/1.8/i686-linux/socket.so
mongrel_r 32200 curio mem REG 8,3 126144 134491736
/usr/local/lib/ruby/1.8/i686-linux/syck.so
mongrel_r 32200 curio mem REG 8,3 1232784 671088799
/lib/tls/i686/cmov/libc-2.3.6.so
mongrel_r 32200 curio mem REG 8,3 136368 671088803
/lib/tls/i686/cmov/libm-2.3.6.so
mongrel_r 32200 curio mem REG 8,3 18900 671088801
/lib/tls/i686/cmov/libcrypt-2.3.6.so
mongrel_r 32200 curio mem REG 8,3 8204 671088802
/lib/tls/i686/cmov/libdl-2.3.6.so
mongrel_r 32200 curio mem REG 8,3 22108 134491734
/usr/local/lib/ruby/1.8/i686-linux/stringio.so
mongrel_r 32200 curio mem REG 8,3 86404 469763148 /lib/ld-2.3.6.so
mongrel_r 32200 curio 0r CHR 1,3 875 /dev/null
mongrel_r 32200 curio 1w REG 8,3 2502854 101379
/home/curio/truc/log/mongrel.log
mongrel_r 32200 curio 2w REG 8,3 2502854 101379
/home/curio/truc/log/mongrel.log
mongrel_r 32200 curio 3u sock 0,4 3232114 can't
identify protocol
mongrel_r 32200 curio 4w REG 8,3 90682401 17288
/home/curio/truc/log/production.log
mongrel_r 32200 curio 5u sock 0,4 3234156 can't
identify protocol
mongrel_r 32200 curio 6u sock 0,4 3234188 can't
identify protocol
mongrel_r 32200 curio 7u sock 0,4 3234189 can't
identify protocol
mongrel_r 32200 curio 8u sock 0,4 3234190 can't
identify protocol
- cut -
mongrel_r 32200 curio 205u sock 0,4 3246825 can't
identify protocol
mongrel_r 32200 curio 206u sock 0,4 3246826 can't
identify protocol
mongrel_r 32200 curio 207u sock 0,4 3246827 can't
identify protocol
mongrel_r 32200 curio 208u sock 0,4 3248760 can't
identify protocol
This problem always appears when concurrency level is > 1 and is
amplified by concurrency level.
Thanks !
--
Fran?ois Simond
From zedshaw at zedshaw.com Thu Jun 15 11:44:09 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Thu, 15 Jun 2006 11:44:09 -0400
Subject: [Mongrel] Input/output error on linux
In-Reply-To: <393ED45A-1849-4269-A8AD-4E7A4D40FCBD@recursive.ca>
References:
<1150117431.6940.0.camel@localhost.localdomain>
<9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca>
<1150119078.6940.16.camel@localhost.localdomain>
<393ED45A-1849-4269-A8AD-4E7A4D40FCBD@recursive.ca>
Message-ID: <1150386249.6044.2.camel@localhost.localdomain>
On Thu, 2006-06-15 at 07:18 -0400, Bob Hutchison wrote:
> Hi,
>
> More on this problem. Maybe a even a clue??
>
> I restarted the server just before I sent the last message (Jun 12,
> 2006, at 9:48 AM). The difference was that I redirected stderr to a
> file (you had mentioned stdout and stderr issues). Things were
> running fine until between 17:04 and 17:12 EDT yesterday.
>
> The error this time was really different, so maybe not related at
> all. It was getting name errors like:
>
> NameError (undefined method `options_of' for class `Module')
>
> but for all kinds of different methods and classes.
>
> Looking in the stderr file it looks as though there was a HUP signal
> caught. But no timestamp. I'm guessing it happened sometime between
> 17:04 and 17:12.
>
> Now, the specific errors I've been getting are different than those
> I've been complaining about. Is it possible that previously the HUP
> signal handling actually worked (mostly) but left the IO system in
> trouble?
So you're seeing a HUP signal for some reason, so that's something you
have to track down. But, HUP does a "reload" of Rails, which tends to
not work so well. If you get a HUP and the server stops working after
that, then the only thing you can do is not send the process HUP
signals.
Is someone doing a capistrano deployment that is doing a reload rather
than a restart?
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Thu Jun 15 12:22:27 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Thu, 15 Jun 2006 12:22:27 -0400
Subject: [Mongrel] Performance leak with concurrent requests on
static files (Rails)
In-Reply-To: <44917376.5020605@free.fr>
References: <44917376.5020605@free.fr>
Message-ID: <1150388547.6044.10.camel@localhost.localdomain>
On Thu, 2006-06-15 at 16:49 +0200, Francois Simond wrote:
> Hi,
>
> I just found something weird for mongrel with static files.
> Performance endlessly decreases if mongrel serve static files from
> simultaneous requests :
>
> Here is the test setup:
> Ruby on Rails
> Mongrel (tested with 1.3.12.4 and 1.3.13-pre installed today)
> Ubuntu dapper, compiled ruby 1.8.4.
>
> http client :
>
> while true; do ab -n 1000 -c 30 http://localhost:3000/ 2>/dev/null |
> grep quest.*mean ; echo -- ; done
Fantastic. You may have found the slow socket leak I couldn't
replicate, all thanks to ab's horribly implemented client protocol
(you'd think guys who wrote the most popular web server could write a
well behaved testing tool).
ab basically makes a ton of connections when concurrency > 1, and then
when it runs out of time it just closes the connection causing an EPIPE
on the socket.
Mongrel seems to not be closing the socket when this happens--which I
have to investigate. The slowdown you're seeing comes from sockets that
never close slowly filling up the 1024 available sockets for the
internal select call. As this fills up Mongrel gets less and less space
to deal with connections until it finally dies.
Thanks for tracking this down, I'll have it fixed today.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Thu Jun 15 15:07:08 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Thu, 15 Jun 2006 15:07:08 -0400
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Caulking Release
Message-ID: <1150398428.5847.15.camel@localhost.localdomain>
Hello Everyone,
Francois Simond inadvertently found a way to replicate a rare but deadly
bug right as I was working up the official release of Mongrel 0.3.13.
This bug only happened to a few people, but thanks to the wonderful
fuzzing tool Apache Bench[1] he could replicate the slow select
starvation people were seeing.
TESTING
This bug is now fixed in the current pre-release, and I'd like everyone
to grab it in the usual way:
$ gem install mongrel --source=http://mongrel.rubyforge.org/releases/
And run Francois little mongrel killer script (in a bash shell):
while true; do ab -n 1000 -c 30 http://localhost:3000/ 2>/dev/null |
grep quest.*mean ; echo -- ; done
You will need Apache Bench for this to work.
Specifically hit this against a file and potentially a Rails action or
two. Also try varying the -c option to higher levels.
EXPECTED RESULTS
You will probably see a bunch of Broken Pipe or other errors when you
hit files, but otherwise you should see the same performance for the
same -c settings. If you see the performance degrade over time (very
quickly) then shoot me an e-mail with the errors you see and the
operating system you use.
OFFICIAL RELEASE
If nobody has problems with this release then I'll make it official
tonight.
BUG DESCRIPTION
In general, if you are using Ruby threads and a socket produces an
error, then *don't use that socket anymore*. Turns out that Ruby will
happily let you continue using the socket, but most OS select()
functions have strange semantics with dead sockets. In this case, Ruby
is most likely waiting for a read or write event on the socket, but
since it's dead there will be none.
On most operating systems this turns out to put any thread that uses
that socket into a permanently sleeping state.
What *should* happen is that any socket that throws an exception should
be put into an invalid state so that further operations on it blow up
and then any invalid sockets are not put into the select loop for
threads.
I've got tests going which exercise this bug and have refactored all of
the socket usage so that exceptions are detected and the socket isn't
used anymore after that. Hopefully this squashes it permanently.
Thanks for the help.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
[1] Apache Bench is the worst piece of crap on the planet. The reason
this bug shows up is because ab actually violently closes sockets on any
connections that "take too long". It of course doesn't define what "too
long" is and doesn't tell you it's going to do this. Use httperf. This
behavior is available with httperf but you have to turn it on
explicitly. If you need to see what happens when really nasty clients
hit your server in the thousands, then use ab. Otherwise it's
performance measurements are total crap since it can't possibly be
getting an accurate reading if it's closing most of the sockets.
From hutch at recursive.ca Thu Jun 15 17:15:47 2006
From: hutch at recursive.ca (Bob Hutchison)
Date: Thu, 15 Jun 2006 17:15:47 -0400
Subject: [Mongrel] Input/output error on linux
In-Reply-To: <1150386249.6044.2.camel@localhost.localdomain>
References:
<1150117431.6940.0.camel@localhost.localdomain>
<9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca>
<1150119078.6940.16.camel@localhost.localdomain>
<393ED45A-1849-4269-A8AD-4E7A4D40FCBD@recursive.ca>
<1150386249.6044.2.camel@localhost.localdomain>
Message-ID:
On Jun 15, 2006, at 11:44 AM, Zed Shaw wrote:
> On Thu, 2006-06-15 at 07:18 -0400, Bob Hutchison wrote:
>> Hi,
>>
>> More on this problem. Maybe a even a clue??
>>
>> I restarted the server just before I sent the last message (Jun 12,
>> 2006, at 9:48 AM). The difference was that I redirected stderr to a
>> file (you had mentioned stdout and stderr issues). Things were
>> running fine until between 17:04 and 17:12 EDT yesterday.
>>
>> The error this time was really different, so maybe not related at
>> all. It was getting name errors like:
>>
>> NameError (undefined method `options_of' for class `Module')
>>
>> but for all kinds of different methods and classes.
>>
>> Looking in the stderr file it looks as though there was a HUP signal
>> caught. But no timestamp. I'm guessing it happened sometime between
>> 17:04 and 17:12.
>>
>> Now, the specific errors I've been getting are different than those
>> I've been complaining about. Is it possible that previously the HUP
>> signal handling actually worked (mostly) but left the IO system in
>> trouble?
>
> So you're seeing a HUP signal for some reason, so that's something you
> have to track down. But, HUP does a "reload" of Rails, which tends to
> not work so well. If you get a HUP and the server stops working after
> that, then the only thing you can do is not send the process HUP
> signals.
I'm not sending a HUP signal, and I don't know who did. Looking into
it...
>
> Is someone doing a capistrano deployment that is doing a reload rather
> than a restart?
>
No.
When you force a reload (or restart) does Mongrel wait until all
current requests are done, or does it do it right away?
Cheers,
Bob
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
----
Bob Hutchison -- blogs at
Recursive Design Inc. --
Raconteur --
xampl for Ruby --
From curio at free.fr Thu Jun 15 18:40:12 2006
From: curio at free.fr (Francois SIMOND)
Date: Fri, 16 Jun 2006 00:40:12 +0200
Subject: [Mongrel] [ANN] Mongrel 0.3.13 Pre-Release -- Caulking Release
In-Reply-To: <1150398428.5847.15.camel@localhost.localdomain>
References: <1150398428.5847.15.camel@localhost.localdomain>
Message-ID: <4491E1CC.3030504@free.fr>
Thanks Zed : You rock !
Now mongrel is damn solid, even with bad benchmarks ;)
Tested with and without sendfile gem support.
Ps : I'm looking for bad "Rails allow_concurrency" testcases, do you
still have some ?
Thank you :)
--
Francois Simond
From wilsonb at gmail.com Fri Jun 16 11:23:32 2006
From: wilsonb at gmail.com (Wilson Bilkovich)
Date: Fri, 16 Jun 2006 11:23:32 -0400
Subject: [Mongrel] How normal is this memory usage?
Message-ID:
The following is from just two invocations of "mongrel_rails". Is
this normal? 57M x 3 seems a little high to me.
This is the latest pre-release, Debian sarge, on my VPS. Two Rails
apps running against SQLite3, with Pound in front.
top - 10:50:12 up 47 days, 12:09, 1 user, load average: 0.06, 0.03, 0.01
Tasks: 52 total, 2 running, 50 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 99.3% id, 0.7% wa, 0.0% hi, 0.0% si
Mem: 196772k total, 193036k used, 3736k free, 40404k buffers
Swap: 131064k total, 27688k used, 103376k free, 16160k cached
PID %MEM USER PR NI VIRT SHR RES S %CPU TIME+ COMMAND
20220 29.7 wilson 16 0 63352 2044 57m S 0.0 0:03.19
mongrel_rails
20222 29.7 wilson 16 0 63352 2044 57m S 0.0 0:00.00
mongrel_rails
20223 29.7 wilson 15 0 63352 2044 57m S 0.0 0:00.00
mongrel_rails
20191 11.0 wilson 16 0 27144 1704 21m S 0.0 0:02.58
mongrel_rails
20193 11.0 wilson 16 0 27144 1704 21m S 0.0 0:00.00
mongrel_rails
20194 11.0 wilson 15 0 27144 1704 21m S 0.0 0:00.00
mongrel_rails
21746 0.8 wilson 16 0 6684 1308 1668 R 0.0 0:00.00 sshd
21742 0.8 root 16 0 6552 1340 1648 S 0.0 0:00.00 sshd
21744 0.8 root 16 0 6552 1340 1648 S 0.0 0:00.00 sshd
21747 0.8 wilson 15 0 2680 1140 1480 S 0.0 0:00.00 bash
25903 0.7 www-data 16 0 5356 672 1292 S 0.0 0:00.00 pound
25904 0.7 www-data 16 0 5356 672 1292 S 0.0 0:00.01 pound
25905 0.7 www-data 16 0 5356 672 1292 S 0.0 0:00.02 pound
25906 0.7 www-data 19 0 5356 672 1292 S 0.0 188:06.70 pound
From tom at onidle.com Fri Jun 16 11:25:13 2006
From: tom at onidle.com (Tom Brice)
Date: Fri, 16 Jun 2006 10:25:13 -0500
Subject: [Mongrel] Mongrel_rails restart and sudo
Message-ID:
Sorry for the newbie question but I'm stumped:
I have an app that requires sudo to run mongrel_rails. For my capistrano
recipe is do it like this:
sudo "mongrel_rails start -e production -p #{application_port} -d -c
#{current_path}"
Which works famously.
Now I have tried several things for my restart task. Here they are:
sudo "cd #{current_path} && sudo mongrel_rails restart"
That doesn't work. For some reason the "cd..." command does not work. I'm
assuming that is some sort of problem with capistrano or my server. So
moving on I tried:
sudo "mongrel_rails restart -c #{current_path}"
to avoid having to do the "cd...". When I do that I get this in my
mongrel.log:
** USR2 signal received.
** Restarting with arguments: ruby
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails start -e
production -p 81 -d -c /Library/WebServer/rails/kd/current
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:158:in
`exec': Operation not supported - ruby
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails start -e
production -p 81 -d -c /Library/WebServer/rails/kd/current
(Errno::EOPNOTSUPP)
from
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:158:in
`run'
from
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel/command.rb:188:
in `run'
from
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:247
from /opt/local/bin/mongrel_rails:18
Which I assume is due to the "sudo" not being added to the "mongrel_rails
start..." command that is being called by "mongrel_rails restart". So it
seems that one cannot do "mongrel_rails restart" with "sudo". My ugly hack
is to to "mongrel_rails stop" and then "mongrel_rails start". Any ideas?
Now, I have control over this server and am fine with changing permissions
so that I don't have to use "sudo". This is probably off-topic for this
list (better suited to "Server Admin for Dummies" perhaps) but how do I do
that? I assume I need sudo because mongrel needs to write stuff to a tmp
dir that my user does not have access to. Any pointers?
Thanks,
Tom
From alisonrowland at fastmail.fm Fri Jun 16 11:29:40 2006
From: alisonrowland at fastmail.fm (Alison Rowland)
Date: Fri, 16 Jun 2006 11:29:40 -0400
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
References:
Message-ID:
"cd" does not respond to the sudo command. So separate the command
into two lines, like so:
run "cd #{current_path}"
sudo "mongrel_rails restart"
--Alison
http://blog.alisonrowland.com
On Jun 16, 2006, at 11:25 AM, Tom Brice wrote:
> Sorry for the newbie question but I'm stumped:
>
> I have an app that requires sudo to run mongrel_rails. For my
> capistrano
> recipe is do it like this:
>
> sudo "mongrel_rails start -e production -p #{application_port} -d -c
> #{current_path}"
>
> Which works famously.
>
> Now I have tried several things for my restart task. Here they are:
>
> sudo "cd #{current_path} && sudo mongrel_rails restart"
>
> That doesn't work. For some reason the "cd..." command does not
> work. I'm
> assuming that is some sort of problem with capistrano or my
> server. So
> moving on I tried:
>
> sudo "mongrel_rails restart -c #{current_path}"
>
> to avoid having to do the "cd...". When I do that I get this in my
> mongrel.log:
>
> ** USR2 signal received.
> ** Restarting with arguments: ruby
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails
> start -e
> production -p 81 -d -c /Library/WebServer/rails/kd/current
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:
> 158:in
> `exec': Operation not supported - ruby
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails
> start -e
> production -p 81 -d -c /Library/WebServer/rails/kd/current
> (Errno::EOPNOTSUPP)
> from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:
> 158:in
> `run'
> from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel/
> command.rb:188:
> in `run'
> from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:247
> from /opt/local/bin/mongrel_rails:18
>
> Which I assume is due to the "sudo" not being added to the
> "mongrel_rails
> start..." command that is being called by "mongrel_rails restart".
> So it
> seems that one cannot do "mongrel_rails restart" with "sudo". My
> ugly hack
> is to to "mongrel_rails stop" and then "mongrel_rails start". Any
> ideas?
>
> Now, I have control over this server and am fine with changing
> permissions
> so that I don't have to use "sudo". This is probably off-topic for
> this
> list (better suited to "Server Admin for Dummies" perhaps) but how
> do I do
> that? I assume I need sudo because mongrel needs to write stuff to
> a tmp
> dir that my user does not have access to. Any pointers?
>
> Thanks,
> Tom
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
From tom at onidle.com Fri Jun 16 11:47:07 2006
From: tom at onidle.com (Tom Brice)
Date: Fri, 16 Jun 2006 10:47:07 -0500
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
Message-ID:
On 6/16/06 10:29 AM, Alison Rowland wrote:
> two lines, like so:
>
> run "cd #{current_path}"
> sudo "mongrel_rails restart"
Thanks Alison.
I though I tried this but I just rechecked. Problem is capistrano. When I
try this the cd executes but doesn't "hold". This means that my
mongrel_rails restart command is executed in my home dir (not my
RAILS_ROOT). It doesn't find the PID file so it fails.
Any other ideas?
Tom
From tom at onidle.com Fri Jun 16 11:56:37 2006
From: tom at onidle.com (Tom Brice)
Date: Fri, 16 Jun 2006 10:56:37 -0500
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
Message-ID:
On 6/16/06 10:47 AM, Tom Brice wrote:
> On 6/16/06 10:29 AM, Alison Rowland wrote:
>
>> two lines, like so:
>>
>> run "cd #{current_path}"
>> sudo "mongrel_rails restart"
>
> Thanks Alison.
>
> I though I tried this but I just rechecked. Problem is capistrano. When I
> try this the cd executes but doesn't "hold". This means that my mongrel_rails
> restart command is executed in my home dir (not my RAILS_ROOT). It doesn't
> find the PID file so it fails.
>
> Any other ideas?
>
> Tom
Also just checked doing this at the server (to take capistrano out of the
equation):
sudo mongrel_rails restart
Still gives me the failure because the mongrel_rails start command executed
by mongrel_rails restart does not "inherit" sudo privileges. So same error
trace as my original message.
Tom
From david at vrensk.com Fri Jun 16 12:10:15 2006
From: david at vrensk.com (David Vrensk)
Date: Fri, 16 Jun 2006 18:10:15 +0200
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
References:
Message-ID: <81b453920606160910y44304912k195e324c54b0dc2@mail.gmail.com>
On 6/16/06, Tom Brice wrote:
>
> Sorry for the newbie question but I'm stumped:
>
> sudo "cd #{current_path} && sudo mongrel_rails restart"
>
> That doesn't work.
Not having worked with capistrano (yet! I will better myself one day!) I
really shouldn't advice you, but here goes:
'cd', as you note, doesn't "hold" since it affects the process it runs in,
and I assume that capistrano's sudo either splits your command in two,
running them in two different, consecutive processes, or just sends it
along, in which case the system's sudo doesn't handle && very well.
But I assume that you have the full power of Ruby in capistrano, so you
could try
Dir.chdir(current_path)
sudo "mongrel_rails restart"
making sure to chdir back if you need to. If that doesn't work, how about
putting your commands in a shell script and running that:
-----------script.sh--------
#!/bin/sh
cd whatever
mongrel_rails restart
-----------end script.sh----
with a
sudo "/path/to/script.sh"
I haven't tried it, but it should be worth a shot.
Good luck,
/David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060616/054e124f/attachment.htm
From alisonrowland at fastmail.fm Fri Jun 16 12:13:51 2006
From: alisonrowland at fastmail.fm (Alison Rowland)
Date: Fri, 16 Jun 2006 12:13:51 -0400
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
References:
Message-ID: <1553E809-A545-4572-AB81-A0BB0454A7D9@fastmail.fm>
I don't know what's going on with your restart task failing. You
should probably fix that before worrying about Capistrano, but in the
event that you get it working, here's a bit more Cap info.
I just looked at my deploy.rb, and it has a little extra bit of
structure which may help. Here's my whole restart task, which I
originally grabbed from somebody's snippets:
desc "Restart the web server"
task :restart, :roles => :app do
begin
run "cd #{current_path}"
sudo "mongrel_cluster_ctl restart"
rescue RuntimeError => e
puts e
puts "Probably not a big deal, so I'll just keep trucking..."
end
end
Perhaps wrapping it in begin...rescue...end lets Capistrano know to
execute it all as one thing.
--Alison
http://blog.alisonrowland.com
On Jun 16, 2006, at 11:47 AM, Tom Brice wrote:
> On 6/16/06 10:29 AM, Alison Rowland wrote:
>
>> two lines, like so:
>>
>> run "cd #{current_path}"
>> sudo "mongrel_rails restart"
>
> Thanks Alison.
>
> I though I tried this but I just rechecked. Problem is
> capistrano. When I
> try this the cd executes but doesn't "hold". This means that my
> mongrel_rails restart command is executed in my home dir (not my
> RAILS_ROOT). It doesn't find the PID file so it fails.
>
> Any other ideas?
>
> Tom
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
From neil at aldur.co.uk Fri Jun 16 12:20:04 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Fri, 16 Jun 2006 17:20:04 +0100
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
References:
Message-ID:
The implementation of 'sudo' in capistrano is a little flawed. It ought to
wrap the command in a 'sh -c' wrapper to make sure that the sudo privileges
apply to the entire command string and not just the first command. At the
moment you have to do that manually.
To do what you want do this
sudo </dev/null"
CMD
Rgs
NeilW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060616/fc8ffc24/attachment.htm
From zedshaw at zedshaw.com Fri Jun 16 14:01:02 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Fri, 16 Jun 2006 14:01:02 -0400
Subject: [Mongrel] How normal is this memory usage?
In-Reply-To:
References:
Message-ID: <1150480862.6302.6.camel@localhost.localdomain>
On Fri, 2006-06-16 at 11:23 -0400, Wilson Bilkovich wrote:
> The following is from just two invocations of "mongrel_rails". Is
> this normal? 57M x 3 seems a little high to me.
Man, if this was Java you'd be jumping with joy at "just" 57M for three
instances. :-)
> This is the latest pre-release, Debian sarge, on my VPS. Two Rails
> apps running against SQLite3, with Pound in front.
Kind of OT, but do you run into problems with the three instances
accessing one SQLite3 db at the same time? There has always been
concurrency problems with the sqlite3 driver (and sqlite2).
> PID %MEM USER PR NI VIRT SHR RES S %CPU TIME+ COMMAND
> 20220 29.7 wilson 16 0 63352 2044 57m S 0.0 0:03.19
> mongrel_rails
> 20222 29.7 wilson 16 0 63352 2044 57m S 0.0 0:00.00
> mongrel_rails
> 20223 29.7 wilson 15 0 63352 2044 57m S 0.0 0:00.00
> mongrel_rails
> 20191 11.0 wilson 16 0 27144 1704 21m S 0.0 0:02.58
> mongrel_rails
> 20193 11.0 wilson 16 0 27144 1704 21m S 0.0 0:00.00
> mongrel_rails
> 20194 11.0 wilson 15 0 27144 1704 21m S 0.0 0:00.00
> mongrel_rails
You're running a total of 6 instances and 3 of them seem to have high
ram?
First off your pound setup may be "favoring" those first three, which
isn't so bad but would explain why it's unevenly distributed. If this
is the case then you could probably just get rid of the other three
since it seems like they aren't being used.
Second, make sure you have the very latest pre-release as it fixes a big
socket/thread leak which could very well cause this. One way to verify
that you have the right version is run this comman:
while true; do ab -n 1000 -c 30 http://localhost:3000/ 2>/dev/null |
grep quest.*mean ; echo -- ; done
against one of the intances and see if your speed continually drops. If
it drops then update from the pre-release.
Hit me up on IRC for more help.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From wilsonb at gmail.com Fri Jun 16 14:09:45 2006
From: wilsonb at gmail.com (Wilson Bilkovich)
Date: Fri, 16 Jun 2006 14:09:45 -0400
Subject: [Mongrel] How normal is this memory usage?
In-Reply-To: <1150480862.6302.6.camel@localhost.localdomain>
References:
<1150480862.6302.6.camel@localhost.localdomain>
Message-ID:
On 6/16/06, Zed Shaw wrote:
> On Fri, 2006-06-16 at 11:23 -0400, Wilson Bilkovich wrote:
> > The following is from just two invocations of "mongrel_rails". Is
> > this normal? 57M x 3 seems a little high to me.
>
> Man, if this was Java you'd be jumping with joy at "just" 57M for three
> instances. :-)
Aah. Then there is some kind of problem, right? I only typed
"mongrel_rails start" twice, one for each app. I'm intending to only
be running one instance per app.
>
> > This is the latest pre-release, Debian sarge, on my VPS. Two Rails
> > apps running against SQLite3, with Pound in front.
>
> Kind of OT, but do you run into problems with the three instances
> accessing one SQLite3 db at the same time? There has always been
> concurrency problems with the sqlite3 driver (and sqlite2).
Someone on IRC today was saying that it was OK to do that for apps
that were read-heavy, but personally I'd move up to postgresql as soon
as I needed multiple Mongrels.
>
> Second, make sure you have the very latest pre-release as it fixes a big
> socket/thread leak which could very well cause this. One way to verify
> that you have the right version is run this comman:
>
I updated the install last night from mongrel.rubyforge.org/releases/
> Hit me up on IRC for more help.
>
I don't see you in the channel.
Thanks,
--Wilson.
From zedshaw at zedshaw.com Fri Jun 16 14:48:31 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Fri, 16 Jun 2006 14:48:31 -0400
Subject: [Mongrel] Need Success Stories and Mongrel Pics
Message-ID: <1150483711.6302.9.camel@localhost.localdomain>
Hey Folks,
I'm going to start up a success stories page and link to people. I'm
looking for *short* statements about how you use Mongrel and how you
love it. People who hate Mongrel should send me a private e-mail
begging forgiveness. :-) Make sure to include a link to your site if
it's public.
I'll put it up tonight when I do the official 0.3.13 release. I'm also
putting up more pictures of peoples dogs, so if you've got a pet you
like put their pic up on flickr or something and send me the link.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From tom at onidle.com Fri Jun 16 17:20:15 2006
From: tom at onidle.com (Tom Brice)
Date: Fri, 16 Jun 2006 16:20:15 -0500
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
Message-ID:
On 6/16/06 11:20 AM, Neil Wilson wrote:
> To do what you want do this
>
> sudo < sh -c "cd #{current_path} && mongrel_rails start"
> CMD
Thanks. This still has the same problem with sudo not applying to the
mongrel_rails start command that mongrel_rails restart sends after sending
the USR2 signal.
I'm having other difficulties with Apache and file uploads. I'm gonna try
mongrel_cluster to see how that works.
Thanks to everyone for the suggestions. At least I learned something!
Tom
From zedshaw at zedshaw.com Fri Jun 16 17:40:00 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Fri, 16 Jun 2006 17:40:00 -0400
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
References:
Message-ID: <1150494000.6336.9.camel@localhost.localdomain>
On Fri, 2006-06-16 at 16:20 -0500, Tom Brice wrote:
> On 6/16/06 11:20 AM, Neil Wilson wrote:
>
> > To do what you want do this
> >
> > sudo < > sh -c "cd #{current_path} && mongrel_rails start"
> > CMD
>
> Thanks. This still has the same problem with sudo not applying to the
> mongrel_rails start command that mongrel_rails restart sends after sending
> the USR2 signal.
>
> I'm having other difficulties with Apache and file uploads. I'm gonna try
> mongrel_cluster to see how that works.
>
> Thanks to everyone for the suggestions. At least I learned something!
Tom, mongrel_cluster is the way to go for deployments with capistrano.
If you can post the stack dump you get in your mongrel.log after you do
this restart then I can probably see why it's failing.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From tom at onidle.com Fri Jun 16 18:48:22 2006
From: tom at onidle.com (Tom Brice)
Date: Fri, 16 Jun 2006 17:48:22 -0500
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To: <1150494000.6336.9.camel@localhost.localdomain>
Message-ID:
On 6/16/06 4:40 PM, Zed Shaw wrote:
> Tom, mongrel_cluster is the way to go for deployments with capistrano.
> If you can post the stack dump you get in your mongrel.log after you do
> this restart then I can probably see why it's failing.
Here's what I get:
** USR2 signal received.
** Restarting with arguments: ruby
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails start -e
production -p 81 -d -c /Library/WebServer/rails/kd/current
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:158:in
`exec': Operation not supported - ruby
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails start -e
production -p 81 -d -c /Library/WebServer/rails/kd/current
(Errno::EOPNOTSUPP)
from
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:158:in
`run'
from
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel/command.rb:188:
in `run'
from
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:247
from /opt/local/bin/mongrel_rails:18
I'm gonna try to do mongrel_cluster right now.
Thanks,
Tom
From zedshaw at zedshaw.com Fri Jun 16 21:03:47 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Fri, 16 Jun 2006 21:03:47 -0400
Subject: [Mongrel] [ANN] Mongrel Web Server 0.3.13 OFFICIAL Release
Message-ID: <1150506227.6336.34.camel@localhost.localdomain>
Finally! I've released Mongrel 0.3.13 OFFICIALLY to the public for
better or worse. This release is pretty huge compared to previous
releases. It's got oodles of fixes, design improvements, hosting
enhancements, win32 changes, and the release even works with the latest
cygwin.
Read all about it at http://mongrel.rubyforge.org/news.html
GETTING 0.3.13
Most people do this:
$ gem install mongrel
And then go to town. It is 0.3.13 so you shouldn't run this right on
your production site, but instead test it with your app before going
production.
WIN32
Things have changed for the win32 world, but hopefully for the better.
The only annoyance is you install one more thing to get the service
support:
$ gem install mongrel
$ gem install mongrel_service
This release fixes the problem where upgrading moves the service runner
script, so future upgrades will be much smoother.
The other big change is that you'll have to re-install your services and
learn to use mongrel_rails service:: commands. Read
http://mongrel.rubyforge.org/docs/win32.html for complete information.
** There is a bug in win32-service that prevents us from shutting down
properly. Just ignore the exception complaint.**
As a side note, this release also works well with cygwin, and you can
even run your mongrel servers in daemon mode just like on Unix. It's
slower but might mean you can do capistrano and mongrel_cluster support
in the future. Very hot.
DOCUMENTATION
The list of stuff in this release is pretty big, so read through this
documentation to get an idea of what's changed:
* News -- http://mongrel.rubyforge.org/news.html
* Documentation -- http://mongrel.rubyforge.org/docs/index.html
There's currently documentation for deploying under Pound, Lighttpd,
Litespeed, and other goodies. Documentation is in the works for lots of
other stuff, but if you see a blank page then feel free to volunteer.
BUGS
Report the bugs at
http://rubyforge.org/tracker/?atid=5145&group_id=1306&func=browse and
feel free to join the mailing list at
http://rubyforge.org/mailman/listinfo/mongrel-users if you want to get
announcements or ask questions.
Enjoy the weekend! And thanks to all the people who wrote
documentation, tested pre-releases, and begged me to release earlier.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From neil at aldur.co.uk Sat Jun 17 02:30:22 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Sat, 17 Jun 2006 07:30:22 +0100
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
References: <1150494000.6336.9.camel@localhost.localdomain>
Message-ID:
I don't get the same problem on Ubuntu linux using the same commands. Are
you using Solaris?
Looks to me like exec is not holding root identity, which may mean that sudo
is only setting the Effective UID and not the real one.
Can you try this
sudo ruby -e 'puts Process.euid; puts Process.uid'
and see if you get two zeroes.
NeilW
On 16/06/06, Tom Brice wrote:
>
> On 6/16/06 4:40 PM, Zed Shaw wrote:
>
> > Tom, mongrel_cluster is the way to go for deployments with capistrano.
> > If you can post the stack dump you get in your mongrel.log after you do
> > this restart then I can probably see why it's failing.
>
> Here's what I get:
>
--
Neil Wilson (neil at aldur.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060617/ebc3245b/attachment.htm
From neil at aldur.co.uk Sat Jun 17 02:35:48 2006
From: neil at aldur.co.uk (Neil Wilson)
Date: Sat, 17 Jun 2006 07:35:48 +0100
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
References: <1150494000.6336.9.camel@localhost.localdomain>
Message-ID:
And while you're at it try this as well.
sudo ruby -e 'exec "ruby -e \"puts Process.euid; puts Process.uid\""'
NeilW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060617/3b292928/attachment.htm
From etlund at gmail.com Sat Jun 17 18:39:33 2006
From: etlund at gmail.com (Eric Lund)
Date: Sat, 17 Jun 2006 16:39:33 -0600
Subject: [Mongrel] Win32 issues with 0.3.13
Message-ID: <003101c6925e$e88fd800$6501a8c0@denali>
Hey,
I have just a few observations to report about the new version of Mongrel
(0.3.13) on Win32.
1. When installing a new service, I have to use -N instead of -n to set the
name of my app. The help file (-h option) has this right but the examples
and such on the website all use -n.
2. The website documentation on the Win32 howto lists service::delete as a
command but it should be service::remove
3. When installing my app as a service, I have to point to the \public
directory in order for everything (scripts and stylesheets) to work right:
mongrel_rails service::install -N myapp -r c:\path\to\myapp\public -p
4000
FWIW,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060617/e522dde1/attachment.htm
From luislavena at gmail.com Sat Jun 17 19:06:00 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Sat, 17 Jun 2006 20:06:00 -0300
Subject: [Mongrel] Win32 issues with 0.3.13
In-Reply-To: <003101c6925e$e88fd800$6501a8c0@denali>
References: <003101c6925e$e88fd800$6501a8c0@denali>
Message-ID: <71166b3b0606171606u60005e9aief39e6409c5da2ae@mail.gmail.com>
On 6/17/06, Eric Lund wrote:
>
>
> Hey,
>
> I have just a few observations to report about the new version of Mongrel
> (0.3.13) on Win32.
>
> 1. When installing a new service, I have to use -N instead of -n to set the
> name of my app. The help file (-h option) has this right but the examples
> and such on the website all use -n.
>
That, and other new options was discussed past weeks in this list. The
-n is now used for "num-processors" option, and clash with the new
gem_plugin schema (because service:: should *extend* what
mongrel_rails do, not overwrite.
We opted for -N, but guess the docs, as usual, never get updated...
will work on that now.
> 2. The website documentation on the Win32 howto lists service::delete as a
> command but it should be service::remove
Previously, you installed/uninstalled a mongrel service, but to follow
naming conventions, when you install/add, you later remove, not
delete. (AFAIK, the same with exit/quit differences between win and
mac).
I'll update that when Zed do the commit for the changes he made (the
docs mostly, cannot see the new info on my checkout).
>
> 3. When installing my app as a service, I have to point to the \public
> directory in order for everything (scripts and stylesheets) to work right:
>
> mongrel_rails service::install -N myapp -r c:\path\to\myapp\public -p
> 4000
>
THAT don't sound right, 'll check that out now and see...
If you're registering the service outside your application folder, you
sould try to use -c option instead of -r
mongrel_rails service::install -N myapp -c c:\path\to\myapp -p 4000
The service chdir to that root and resolve 'public' inside of it.
Let me know if that work for you.
Regards,
> FWIW,
>
> Eric
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
--
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
From zedshaw at zedshaw.com Sat Jun 17 19:06:50 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sat, 17 Jun 2006 19:06:50 -0400
Subject: [Mongrel] Win32 issues with 0.3.13
In-Reply-To: <003101c6925e$e88fd800$6501a8c0@denali>
References: <003101c6925e$e88fd800$6501a8c0@denali>
Message-ID: <1150585610.5813.4.camel@localhost.localdomain>
On Sat, 2006-06-17 at 16:39 -0600, Eric Lund wrote:
> Hey,
>
> I have just a few observations to report about the new version of
> Mongrel (0.3.13) on Win32.
>
> 1. When installing a new service, I have to use -N instead of -n to
> set the name of my app. The help file (-h option) has this right but
> the examples and such on the website all use -n.
>
> 2. The website documentation on the Win32 howto lists service::delete
> as a command but it should be service::remove
>
> 3. When installing my app as a service, I have to point to the \public
> directory in order for everything (scripts and stylesheets) to work
> right:
>
> mongrel_rails service::install -N myapp -r c:\path\to\myapp
> \public -p 4000
Thanks Eric, those changes will be up on the site shortly. Not sure why
the public dir is needed though. I'll look at that.
Zed
From tom at onidle.com Sat Jun 17 21:03:40 2006
From: tom at onidle.com (Tom Brice)
Date: Sat, 17 Jun 2006 20:03:40 -0500
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
Message-ID:
On 6/17/06 1:30 AM, Neil Wilson wrote:
> Can you try this
>
> sudo ruby -e 'puts Process.euid; puts Process.uid'
>
> and see if you get two zeroes.
SSH'd into my server I get this:
% sudo ruby -e 'puts Process.euid; puts Process.uid'
Password:
0
0
On 6/17/06 1:35 AM, Neil Wilson wrote:
> And while you're at it try this as well.
>
> sudo ruby -e 'exec "ruby -e \"puts Process.euid; puts Process.uid\""'
>
> NeilW
I get:
% sudo ruby -e 'exec "ruby -e \"puts Process.euid; puts Process.uid\""'
0
0
I'm now using mongrel_cluster and it's cap tasks are starting the server as
my user (thus not requiring sudo). The mongrel_cluster restart seems to
work as well.
I'm still a bit baffled about the sudo on this machine. I had to set
:use_sudo, FALSE for cap -a configure_mongrel_cluster. The server is a
Xserve running OS X Server 10.4.5.
Tom
From etlund at gmail.com Sat Jun 17 21:05:02 2006
From: etlund at gmail.com (Eric Lund)
Date: Sat, 17 Jun 2006 19:05:02 -0600
Subject: [Mongrel] Win32 issues with 0.3.13
In-Reply-To: <71166b3b0606171606u60005e9aief39e6409c5da2ae@mail.gmail.com>
Message-ID: <000301c69273$3b6c85a0$6501a8c0@denali>
> If you're registering the service outside your application
> folder, you should try to use -c option instead of -r
>
> mongrel_rails service::install -N myapp -c c:\path\to\myapp -p 4000
>
> The service chdir to that root and resolve 'public' inside of it.
>
> Let me know if that work for you.
>
Cool, thanks for that info.
I reinstalled the service with the -c option and the \public was not
required (as expected). I tried again using -r, just to make sure, and
again I had to add \public to the path to get it all to work.
Thanks,
Eric
From tom at onidle.com Sat Jun 17 22:18:06 2006
From: tom at onidle.com (Tom Brice)
Date: Sat, 17 Jun 2006 21:18:06 -0500
Subject: [Mongrel] [slightly OT] Apache 2.2.2 proxy config
Message-ID:
Apologies, this may be off-topic.
I've been wrestling with upload issues and Apache 2.2.2 /
mod_proxy_balanacer / mongrel_cluster / Mongrel on Mac OS X Server 10.4.5.
Typically the first upload would be fine but the next would make the mongrel
instance remain running (ps state = "R") essentially locking up that
instance. Apache would then eventually do:
[Fri Jun 16 16:45:54 2006] [error] ap_proxy_connect_backend disabling worker
for (mydomain.com)
[Fri Jun 16 16:45:54 2006] [error] proxy: HTTP: disabled connection for
(mydomain.com)
Requiring me to kill -9 the locked mongrel to get it to die. I'm testing on
Safari under OS X 10.4 and my user base is 90%+ Safari (it's an intranet).
I finally started the mongrels with debugging on and that made me remember
the same issue with Apache/FastCGI and Lighttpd. So for Apache with FastCGI
this [1] is offered:
FastCgiServer /var/web/typo/public/dispatch.fcgi -idle-timeout 120 \
-initial-env RAILS_ENV=production -processes 2
And this for lighttpd:
# Making sure file uploads above 64k always work when using IE or Safari
# For more information, see http://trac.lighttpd.net/trac/ticket/360
$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
server.max-keep-alive-requests = 0
}
I'm using Brady's recipe [2] for my virtual host. So I tried adding:
KeepAlive Off
to the top of it. Apache squaks in my error_log:
[Sat Jun 17 16:47:46 2006] [crit] (70023)This function has not been
implemented on this platform: DBD: failed to initialise
About 15 times, but the server remains up. And uploads work.
The error_log entry above make me think that my fix is not kosher. Googling
seems to indicate that "KeepAlive Off" can slow things down marginally, but
if it fixes it I don't really care.
Is there another, better way to do this in my Apache conf?
Thanks,
Tom
[1]
http://scottstuff.net/blog/articles/2005/07/20/apache-tuning-for-rails-and-f
astcgi
[2]
http://fluxura.com/articles/2006/05/19/apache-for-static-and-mongrel-for-rai
ls-with-mod_deflate-and-capistrano-support
From zedshaw at zedshaw.com Sun Jun 18 01:01:43 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sun, 18 Jun 2006 01:01:43 -0400
Subject: [Mongrel] [slightly OT] Apache 2.2.2 proxy config
In-Reply-To:
References:
Message-ID: <1150606903.6042.2.camel@localhost.localdomain>
On Sat, 2006-06-17 at 21:18 -0500, Tom Brice wrote:
> Apologies, this may be off-topic.
>
Nope, not off-topic.
> I've been wrestling with upload issues and Apache 2.2.2 /
> mod_proxy_balanacer / mongrel_cluster / Mongrel on Mac OS X Server 10.4.5.
Ok, I can test this out, but first I need:
* Version of apache.
* Version of Mongrel (you got 0.3.13 right?)
* How are you doing the upload? Maybe a simple controller code and form
snippet.
There's new upload code in the 0.3.13 version of mongrel, but you're the
first to complain. And you say it's only with safari right?
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Sun Jun 18 04:14:23 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sun, 18 Jun 2006 04:14:23 -0400
Subject: [Mongrel] [ANN] MongrelDay Documentation -- Memoirs Of A Web Server
Message-ID: <1150618463.7631.15.camel@localhost.localdomain>
Happy RailsDay!
While everyone else was out having fun with RailsDay I spent my time
wisely and wrote up tons of documentation for Mongrel and cleaned out
some of the docs I'll never write anyway. I also took the time to apply
some nice patches from Jonas Pfenniger for easily setting up redirects
in Mongrel.
Some of the highlighted documents people will be interested in are:
* http://mongrel.rubyforge.org/docs/ -- The main documentation listing.
* http://mongrel.rubyforge.org/adoption.html -- People who've adopted
Mongrel. E-mail me if you want a mention.
* http://mongrel.rubyforge.org/not_mongrel.html -- Required reading for
greedy people.
* http://mongrel.rubyforge.org/docs/litespeed.html -- Litespeed
documentation from Alison Rowland.
* http://mongrel.rubyforge.org/docs/pen_balance.html -- Pen and Balance
documentation (might not work right).
* http://mongrel.rubyforge.org/docs/security.html -- Short notes on web
application security and Mongrel.
* http://mongrel.rubyforge.org/docs/distributed_worker.html --
Offloading work to a "Distributed Worker". More to come on this topic.
There's lots more that were cleaned up, but if you find any errors feel
free to shoot me the corrections.
SUGGESTING AND WRITING
If you think there's some documentation that needs to be written then
shoot me an e-mail and read:
http://mongrel.rubyforge.org/docs/contrib.html
That tells you all the stuff you need to do to write a documentation
page. I know one person who got a job from his documentation for
Mongrel, so it's a money maker too! I'm starting pyramid schemes this
week!
MONGREL IS #2!
I'm not a competitive person, but *in your face One-Click*! Mongrel
finally beat it out. Now to just take down RubyGems. I think it
shouldn't count since everyone needs it. What do you think?
BTW, if anyone wonders why I support win32, just ask yourself why the
Ruby One-Click installer is consistently in the top three projects on
RubyForge. Yeah, windows doesn't matter at all.
Enjoy the rest of the weekend. Apache docs and 0.3.13.1 up next!
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From luislavena at gmail.com Sun Jun 18 05:43:28 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Sun, 18 Jun 2006 06:43:28 -0300
Subject: [Mongrel] Win32 issues with 0.3.13
In-Reply-To: <000301c69273$3b6c85a0$6501a8c0@denali>
References: <71166b3b0606171606u60005e9aief39e6409c5da2ae@mail.gmail.com>
<000301c69273$3b6c85a0$6501a8c0@denali>
Message-ID: <71166b3b0606180243y22df38c5pd07a4f9079e76495@mail.gmail.com>
On 6/17/06, Eric Lund wrote:
> > If you're registering the service outside your application
> > folder, you should try to use -c option instead of -r
> >
> > mongrel_rails service::install -N myapp -c c:\path\to\myapp -p 4000
> >
> > The service chdir to that root and resolve 'public' inside of it.
> >
> > Let me know if that work for you.
> >
>
> Cool, thanks for that info.
>
> I reinstalled the service with the -c option and the \public was not
> required (as expected). I tried again using -r, just to make sure, and
> again I had to add \public to the path to get it all to work.
>
-c option is for the chdir that will be made prior starting rails. -r,
on the contrary, just point to the docroot (or known as public in
rails).
Lets say my application is located in c:\myapp\A\
I chdir into it, and create a rails service. the root (-c) used will
be 'c:\myapp\A' and the docroot will be just 'public'.
if for some reason I want to serve the static content from a folder
named "dummy", I need to pass that to the service install command:
(inside c:\myapp\A\)
mongrel_rails service::install -N myapp -r dummy
Take note I didn't use the expanded path of dummy, because it is
resolved relatively from -c option, which in this case, assume current
dir.
Sounds weird, and with my poor english worse... but hope I make this clear.
Regards,
--
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
> Thanks,
>
> Eric
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
From maarten.hendrikx at gmail.com Sun Jun 18 09:17:24 2006
From: maarten.hendrikx at gmail.com (Maarten Hendrikx)
Date: Sun, 18 Jun 2006 15:17:24 +0200
Subject: [Mongrel] Hosting multiple Rails applications with Mongrel
Message-ID:
Hi,
I run a small web hosting company. We host a few Rails applications using
Apache 2.2 and mod_fcgid.
I have been experimenting with Mongrel and mod_proxy. But I can't seem to
figure out how to host multiple
Rails - apps with mongrel. Do I have to start a new Mongrel process for
every virtual host on a different port?
Any help would be great.
MJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060618/c78c3dd6/attachment.htm
From tom at onidle.com Sun Jun 18 11:16:04 2006
From: tom at onidle.com (Tom Brice)
Date: Sun, 18 Jun 2006 10:16:04 -0500
Subject: [Mongrel] [slightly OT] Apache 2.2.2 proxy config
In-Reply-To: <1150606903.6042.2.camel@localhost.localdomain>
Message-ID:
On 6/18/06 12:01 AM, Zed Shaw wrote:
> Ok, I can test this out, but first I need:
>
> * Version of apache.
> * Version of Mongrel (you got 0.3.13 right?)
> * How are you doing the upload? Maybe a simple controller code and form
> snippet.
Apache 2.2.2
mongrel (0.3.13)
The upload is a little tricky. I'm using a plugin that does it via a hidden
iframe so that I can have an upload form on the same page as an edit form
(its a CMS-y type application). This certainly complicates things.
I will try to get a simplified app running that exhibits the same behaviour
and send the pertinent bits to you. Might take a day or two. Other
deadlines...
>
> There's new upload code in the 0.3.13 version of mongrel, but you're the
> first to complain. And you say it's only with safari right?
I have only done extensive testing with Safari 2 (Tiger), but it did seem to
hang with Firefox 1.5 (Mac) too. I can try to get a Windows machine to test
(don't have a fancy intel mac available).
After changing KeepAlive to fix this I assumed that this was an Apache thing
and not really related to Mongrel. So this may be Mongrel not releasing the
connection?
Thanks,
Tom
From zedshaw at zedshaw.com Sun Jun 18 13:40:33 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sun, 18 Jun 2006 13:40:33 -0400
Subject: [Mongrel] Hosting multiple Rails applications with Mongrel
In-Reply-To:
References:
Message-ID: <1150652433.5734.3.camel@localhost.localdomain>
On Sun, 2006-06-18 at 15:17 +0200, Maarten Hendrikx wrote:
> Hi,
>
> I run a small web hosting company. We host a few Rails applications
> using Apache 2.2 and mod_fcgid.
> I have been experimenting with Mongrel and mod_proxy. But I can't seem
> to figure out how to host multiple
> Rails - apps with mongrel. Do I have to start a new Mongrel process
> for every virtual host on a different port?
> Any help would be great.
Yes that's pretty much what you have to do. And then you configure a
different vhost configuration in apache for each.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From aldursys at gmail.com Sun Jun 18 14:22:36 2006
From: aldursys at gmail.com (Neil Wilson)
Date: Sun, 18 Jun 2006 19:22:36 +0100
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
Message-ID:
Looks like its not permissions then. Thinking about it I'd have expected
EPERM rather than EOPNOTSUPP.
Are you still getting the mongrel cluster to use port 81, or are the ports
now above 1024?
NeilW
From tom at onidle.com Sun Jun 18 14:38:25 2006
From: tom at onidle.com (Tom Brice)
Date: Sun, 18 Jun 2006 13:38:25 -0500
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
Message-ID:
On 6/18/06 1:22 PM, Neil Wilson wrote:
> Are you still getting the mongrel cluster to use port 81, or are the ports
> now above 1024?
I'm using 4 mongrels starting at 8000 for the cluster. The errors I had
previously were one mongrel (mongrel_rails start ... No mongrel_cluster)
which required sudo. Now that I'm using mongrel_cluster the mongrels start
under my user and do not require sudo.
Seems like :use_sudo defaulting to TRUE in Capistrano did not work for some
commands on my server. Particularly anything that involved more than one
command. One-liners execute sudo as expected, mulitple commands do not.
Let me know if you have any suggestions as I'm keen to understand the
system. That said, for now I'm running.
Thanks for your help,
Tom
From aldursys at gmail.com Sun Jun 18 14:48:36 2006
From: aldursys at gmail.com (Neil Wilson)
Date: Sun, 18 Jun 2006 19:48:36 +0100
Subject: [Mongrel] Mongrel_rails restart and sudo
In-Reply-To:
Message-ID:
Does the one mongrel work if you use -p 8000 rather than -p 81 and 'run'
rather than sudo (or setting use_sudo to false which has the same effect)?
Port 81 is a privileged port, and port 8000 isn't you see.
NeilW
From maarten.hendrikx at gmail.com Sun Jun 18 16:06:45 2006
From: maarten.hendrikx at gmail.com (Maarten Hendrikx)
Date: Sun, 18 Jun 2006 22:06:45 +0200
Subject: [Mongrel] Hosting multiple Rails applications with Mongrel
In-Reply-To: <1150652433.5734.3.camel@localhost.localdomain>
References:
<1150652433.5734.3.camel@localhost.localdomain>
Message-ID:
Yes, I tried different setups this afternoon and this is indeed the way to
go :-)
We're thinking about offering both setups to our customers, so mod_fcgid for
the smaller applications. The bigger ones can use the balancing feature of
Apache
together with Mongrel.
I must say the I really like the fact that Mongrel starts up really quickly
and keeps running.
With mod_fcgid you always have to pay a startup cost.
Thanks,
MJ
On 6/18/06, Zed Shaw wrote:
>
> On Sun, 2006-06-18 at 15:17 +0200, Maarten Hendrikx wrote:
> > Hi,
> >
> > I run a small web hosting company. We host a few Rails applications
> > using Apache 2.2 and mod_fcgid.
> > I have been experimenting with Mongrel and mod_proxy. But I can't seem
> > to figure out how to host multiple
> > Rails - apps with mongrel. Do I have to start a new Mongrel process
> > for every virtual host on a different port?
> > Any help would be great.
>
> Yes that's pretty much what you have to do. And then you configure a
> different vhost configuration in apache for each.
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060618/1ad593b2/attachment.htm
From zedshaw at zedshaw.com Mon Jun 19 16:39:39 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 19 Jun 2006 16:39:39 -0400
Subject: [Mongrel] [ANN] mongrel_cluster 0.2.0 -- Mongrel 0.3.13 Compliant
Message-ID: <1150749579.8593.8.camel@localhost.localdomain>
Bradley couldn't make it so I'm filling in for him.
This is a short announcement to tell everyone using the mongrel_cluster
gem to manage their Mongrels that there's a new official version out.
Version 0.2.0 is sporting the following features:
* Added support for specifying user to run
* Added script, mongrel_cluster_ctl for starting/stopping all clusters on a server.
* Added example init.d script in gem_path/resources
* Changed license to LGPL
You should update your RubyGem with:
gem update
Or, reinstall with:
gem uninstall mongrel_cluster
gem install mongrel_cluster
The mongrel_cluster instructions have been updated:
http://mongrel.rubyforge.org/docs/mongrel_cluster.html
Try it out and send me your results.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.railsmachine.com/
From todd.fisher at gmail.com Mon Jun 19 16:51:01 2006
From: todd.fisher at gmail.com (Todd Fisher)
Date: Mon, 19 Jun 2006 16:51:01 -0400
Subject: [Mongrel] server crash log
Message-ID:
Hi, I'm new to mongrel and so far have liked it a lot during development. I
just tried to stand up a production server following the guide here:
http://blog.innerewut.de/articles/2006/04/21/scaling-rails-with-apache-2-2-mod_proxy_balancer-and-mongrel
This was working well for a few days, until this weekend it crashed with the
following stack trace. It's running on redhat enterprise linux 4. ruby
1.8.4
(from the mongrel log)
Thread # is too old, killing.
Error calling Dispatcher.dispatch #
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:472:in `lock'
/usr/lib/ruby/1.8/thread.rb:133:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:64:in`process'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:425:in`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:424:in`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:495:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:494:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:483:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:774:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:772:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:97:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/command.rb:163:in`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:194
/usr/bin/mongrel_rails:18
Thread # is too old, killing.
brandcode: A1, typecode: A
(From the production log)
Processing Base#index (for 10.1.0.119 at 2006-06-19 15:40:07) [GET]
Session ID: d1b4e8b6a073c9bd89c75a52563a017a
Parameters: {}
Mongrel::StopServer (Timed out thread.):
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:472:in`write'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/vendor/mysql.rb:517:in
`write'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/vendor/mysql.rb:491:in
`command'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/vendor/mysql.rb:223:in
`close'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:169:in
`disconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:164:in
`reconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:85:in
`verify!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:99:in
`verify_active_connections!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:98:in
`verify_active_connections!'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:70:in
`prepare_application'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:37:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:66:in`process'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:64:in`process'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:425:in`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:424:in`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:495:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:494:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:483:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:774:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:772:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:97:in`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-
0.3.12.4/lib/mongrel/command.rb:163:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:194
/usr/bin/mongrel_rails:18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060619/545a6ba5/attachment-0001.htm
From zedshaw at zedshaw.com Mon Jun 19 17:02:09 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 19 Jun 2006 17:02:09 -0400
Subject: [Mongrel] server crash log
In-Reply-To:
References:
Message-ID: <1150750929.8593.10.camel@localhost.localdomain>
Hey Toddy, upgrade your stuff to the new 0.3.13 release. It's the
official release everyone should be running from and it fixes lots of
bugs like this.
Report back to me if that don't fix it.
Zed
On Mon, 2006-06-19 at 16:51 -0400, Todd Fisher wrote:
> Hi, I'm new to mongrel and so far have liked it a lot during
> development. I just tried to stand up a production server following
> the guide here:
> http://blog.innerewut.de/articles/2006/04/21/scaling-rails-with-apache-2-2-mod_proxy_balancer-and-mongrel
>
> This was working well for a few days, until this weekend it crashed
> with the following stack trace. It's running on redhat enterprise
> linux 4. ruby 1.8.4
>
> (from the mongrel log)
>
> Thread # is too old, killing.
> Error calling Dispatcher.dispatch # thread.>
> /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:472:in
> `lock'
From tx_scottwalter at yahoo.com Mon Jun 19 21:30:49 2006
From: tx_scottwalter at yahoo.com (Scott Walter)
Date: Mon, 19 Jun 2006 18:30:49 -0700 (PDT)
Subject: [Mongrel] Mongrel+Mint
Message-ID: <20060620013049.38579.qmail@web50913.mail.yahoo.com>
Hi,
I'm attempting to migrate an app from Apache+FCGI to Apache+Mongrel. I'm using Apache 2.0 with the latest Mongrel release. I'm having an issue with the Mint stats package and Mongrel not picking up the following url: /mint/?js
Basically inside the /mint folder there is an index.php, so the url /mint/?js should really be going to /mint/index.php?js
When I had my Apache+FCGI setup I had to add the following code to the .htaccess file under my Rails public directory to get it to work:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/mint.*
RewriteRule .* - [L]
Is somehow the translation being lost in the proxying of the requests
from Apache to Mongrel?
Here is my virtual host I have setup in Apache:
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
ServerName beta.perficient.com
ServerAdmin "support at perficient.com"
CustomLog "/u/apps/snippets/current/log/access_log" "combined"
ErrorLog "/u/apps/snippets/current/log/error_log"
Any ideas?
Thanks in advance.
----------------------------------------------------------------------------------------------------
What's an Intel chip doing in a Mac? A whole lor more that it's ever done in a PC.
My Digital Life - http://scottwalter.com/blog
Pro:Blog - http://scottwalter.com/problog
Snippets - http://snippets.scottwalter.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060619/657cf4c5/attachment.htm
From zedshaw at zedshaw.com Mon Jun 19 21:46:33 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 19 Jun 2006 21:46:33 -0400
Subject: [Mongrel] Mongrel+Mint
In-Reply-To: <20060620013049.38579.qmail@web50913.mail.yahoo.com>
References: <20060620013049.38579.qmail@web50913.mail.yahoo.com>
Message-ID: <1150767993.6036.4.camel@localhost.localdomain>
On Mon, 2006-06-19 at 18:30 -0700, Scott Walter wrote:
> Hi,
> Basically inside the /mint folder there is an index.php, so the
> url /mint/?js should really be going to /mint/index.php?js
>
I'd first see if there's a way to stop doing that. That's just nasty
looking and in general bad form since it isn't identifying a specific
resource to accept the query parameters (and that parameter smells bogus
too).
> When I had my Apache+FCGI setup I had to add the following code to
> the .htaccess file under my Rails public directory to get it to work:
>
> RewriteEngine On
> RewriteCond %{REQUEST_URI} ^/mint.*
> RewriteRule .* - [L]
>
This should work, but double check that you put this in with the mongrel
rewrite rules and that these are first. Also, turn on your rewrite logs
extra high so you can trace what apache thinks the request is. This
helps a lot.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From curio at free.fr Tue Jun 20 03:39:10 2006
From: curio at free.fr (=?ISO-8859-1?Q?Fran=E7ois_SIMOND?=)
Date: Tue, 20 Jun 2006 09:39:10 +0200
Subject: [Mongrel] Performance tweak when local files are not served by
mongrel
Message-ID: <4497A61E.2080109@free.fr>
Hello Zed !
I've experimented a simple but limited performance tweak in the mongrel
rails loader.
With the following apache 2.2 mod proxy loadbalancer setup :
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
We can assume that mongrel is called only when the local file does not
exist.
I've tried to comment out code in rails loader that check if the local
file, or the local file . ".html" exists
Here are the benchmark on a simple action : (ab -n 5000 on mongrel itself)
Ignoring local files : 254 pages/s
Checking local files : 245 pages/s
That's an approx. 3.7% performance improvement.
What would you think of a new command line option : --ignore-local-files ?
--
Francois Simond
From tx_scottwalter at yahoo.com Tue Jun 20 08:56:44 2006
From: tx_scottwalter at yahoo.com (Scott Walter)
Date: Tue, 20 Jun 2006 05:56:44 -0700 (PDT)
Subject: [Mongrel] Basic Architecture Questions
Message-ID: <20060620125644.2960.qmail@web50903.mail.yahoo.com>
Hi,
First of all I love Mongrel and I want to say thanks!
My questions are related to how things work compared to Apache+FCGI background
1. With FCGI I would normally setup multiple FGI processes do I need to setup multiple Mongrel processes? Or is Mongrel thread based? Does the --num-procs flag work the same way?
2. Is there one database connection per process?
Thanks in advance.
scott.
----------------------------------------------------------------------------------------------------
What's an Intel chip doing in a Mac? A whole lor more that it's ever done in a PC.
My Digital Life - http://scottwalter.com/blog
Pro:Blog - http://scottwalter.com/problog
Snippets - http://snippets.scottwalter.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060620/d12db099/attachment.htm
From kevwil at gmail.com Tue Jun 20 09:57:12 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Tue, 20 Jun 2006 07:57:12 -0600
Subject: [Mongrel] secure downloads
Message-ID: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
Has anyone had any success with the mongrel_secure_download gem? I
keep getting "connection reset" errors.
--
Cheers,
Kevin
From josh at besquared.net Tue Jun 20 10:04:06 2006
From: josh at besquared.net (Josh Ferguson)
Date: Tue, 20 Jun 2006 10:04:06 -0400
Subject: [Mongrel] secure downloads
In-Reply-To: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
Message-ID: <44980056.1090300@besquared.net>
What OS? The gem is super early beta so it could use a lot of work. I've
only tested it on win32 which means there could be a whole host of
errors and bad coding practices for other systems..:)
Josh Ferguson
Kevin Williams wrote:
> Has anyone had any success with the mongrel_secure_download gem? I
> keep getting "connection reset" errors.
>
>
From punteney at gmail.com Tue Jun 20 13:45:39 2006
From: punteney at gmail.com (James Punteney)
Date: Tue, 20 Jun 2006 13:45:39 -0400
Subject: [Mongrel] Running Mongrel Cluster on boot
Message-ID: <3cc1a0190606201045t63f7850fl3d388bd5b70ca91f@mail.gmail.com>
I've installed pen and mongrel with mongrel_cluster (as gems) on
Debian sarge. I can run everything from the command line fine
including starting from the /etc/init.d/mongrel_cluster script
On boot though mongrel_cluster fails with this msg:
/usr/local/lib/site_ruby/1.8/rubygems.rb:204:in
`report_activate_error': Could not find RubyGem mongrel_cluster (> 0)
(Gem::LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems.rb:141:in `activate'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:37:in
`require_gem_with_options'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:31:in `require_gem'
from /usr/bin/mongrel_cluster_ctl:17
This may be more of a ruby gems question, but any thoughts/help would
be appreciated.
Thanks,
--James
From kevwil at gmail.com Tue Jun 20 10:34:51 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Tue, 20 Jun 2006 08:34:51 -0600
Subject: [Mongrel] secure downloads
In-Reply-To: <44980056.1090300@besquared.net>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
<44980056.1090300@besquared.net>
Message-ID: <683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com>
I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
I'll go back and test again and try to give you some useful info.
On 6/20/06, Josh Ferguson wrote:
> What OS? The gem is super early beta so it could use a lot of work. I've
> only tested it on win32 which means there could be a whole host of
> errors and bad coding practices for other systems..:)
>
> Josh Ferguson
>
> Kevin Williams wrote:
> > Has anyone had any success with the mongrel_secure_download gem? I
> > keep getting "connection reset" errors.
> >
> >
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Cheers,
Kevin
From zedshaw at zedshaw.com Tue Jun 20 10:31:16 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Tue, 20 Jun 2006 10:31:16 -0400
Subject: [Mongrel] Basic Architecture Questions
In-Reply-To: <20060620125644.2960.qmail@web50903.mail.yahoo.com>
References: <20060620125644.2960.qmail@web50903.mail.yahoo.com>
Message-ID: <1150813876.6553.3.camel@localhost.localdomain>
On Tue, 2006-06-20 at 05:56 -0700, Scott Walter wrote:
> Hi,
>
> First of all I love Mongrel and I want to say thanks!
>
No problem, be sure to tell us what you're using it for the Adoption
page:
http://mongrel.rubyforge.org/adoption.html
> My questions are related to how things work compared to Apache+FCGI
> background
>
> 1. With FCGI I would normally setup multiple FGI processes do I need
> to setup multiple Mongrel processes? Or is Mongrel thread based?
> Does the --num-procs flag work the same way?
>
Yes, you run multiple backends just like with fastcgi:
http://mongrel.rubyforge.org/docs/mongrel_cluster.html
> 2. Is there one database connection per process?
>
Yes, unless you turn on allow_concurrency, but this can be
ultra-dangerous so use with caution (and I won't tell you how to do
it :-).
From zedshaw at zedshaw.com Tue Jun 20 10:45:45 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Tue, 20 Jun 2006 10:45:45 -0400
Subject: [Mongrel] Performance tweak when local files are not served
by mongrel
In-Reply-To: <4497A61E.2080109@free.fr>
References: <4497A61E.2080109@free.fr>
Message-ID: <1150814745.6553.18.camel@localhost.localdomain>
On Tue, 2006-06-20 at 09:39 +0200, Fran?ois SIMOND wrote:
> Hello Zed !
>
> I've experimented a simple but limited performance tweak in the mongrel
> rails loader.
> With the following apache 2.2 mod proxy loadbalancer setup :
>
> # Redirect all non-static requests to cluster
> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
> RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
>
Can you explain how this set of statements differs from other
documentation people have posted for apache? I'm currently writing the
docs for apache so I'm curious about alternatives.
> We can assume that mongrel is called only when the local file does not
> exist.
> I've tried to comment out code in rails loader that check if the local
> file, or the local file . ".html" exists
> Here are the benchmark on a simple action : (ab -n 5000 on mongrel itself)
>
> Ignoring local files : 254 pages/s
> Checking local files : 245 pages/s
Ah, first if you can handle the cussing read:
http://www.zedshaw.com/blog/programming/programmer_stats.html
> That's an approx. 3.7% performance improvement.
>
So you have a hypothesis that your changes produce a statistically
significant difference when compared with the previous version. what
you need to do now is develop some evidence to find out if your
hypothesis is correct. Re-run your tests with the following changes:
1) Stop using ab. It's crap. It's not clear how it measures most of
the activity. Try httperf instead.
2) Don't run httperf on the same machine as you run mongrel. Grab a
little laptop and hit mongrel over ethernet.
3) Make sure you use the same exact network, web app, machine,
everything, just change the version between your's and mine. If you
can, don't even use rails, just test against the DirHandler in a little
test.
4) Run your test with very large runs (each one should take longer than
about 2 minutes) and repeat the runs many times (10 should do for now),
keeping results of each run. We're interested in the requests/second,
but the test is a failure if you see any errors reported at the bottom
so re-run any failures.
5) Post the results as two csv files and I'll show you how I do the
statistics to find out if there's a statistical difference. Results
just being a simple list of run#,req/sec but include other measurements
if you think they matter.
What you're trying to do with the above is to remove all possible
confounding elements (rails, apache, httperf/ab overload, network, etc.)
and then repeat your test multiple times just in case the one time you
ran it was a fluke. Once you've gathered data your goal is to use stats
to figure out if there really was a difference.
> What would you think of a new command line option : --ignore-local-files ?
>
What I'd rather do instead--and plan to do pretty soon--is break out the
DirHandler, RailsHandler, and "page caching" into three separate
chainable handlers and filters. The Rails/DirHandlers were written
before I had chained handlers implemented, so simply writing them so
that they are chainable would mean people could just turn off whatever
they didn't need. If apache is handling all files, then you'd just use
a RailsHandler.
But, do the experiment I describe above. It'll be fun and you'll get a
glimpse at how I do things.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From jason.young at eXtension.org Tue Jun 20 12:04:58 2006
From: jason.young at eXtension.org (Jason Young)
Date: Tue, 20 Jun 2006 12:04:58 -0400
Subject: [Mongrel] cluster::restart vs. stop/start
Message-ID: <412A5C77-6CD9-4F8F-BE1E-F9A43565DA42@eXtension.org>
What's the difference, architecturally between cluster::restart and
cluster::stop/start (I haven't looked at the code, which is kinda
lazy of me to ask the question I know)
If they aren't very different actually, can I put a plug in for
having cluster::restart do a "start" if something's happened and
mongrel is stopped for that configuration? It appears
that ::restart doesn't start a stopped configuration, and logically
to me, (or at least consistently with most process restart commands)
it should.
Jason
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jason Young -- Systems Engineer, eXtension
http://about.extension.org/wiki/Jason_Young
______________________________________
From zedshaw at zedshaw.com Tue Jun 20 19:22:27 2006
From: zedshaw at zedshaw.com (zedshaw at zedshaw.com)
Date: Tue, 20 Jun 2006 16:22:27 -0700 (PDT)
Subject: [Mongrel] Bug in Mongrel, wait for 0.3.13.1
Message-ID: <48728.66.92.127.190.1150845747.squirrel@webmail.zedshaw.com>
Hey folks,
There's a dumb bug in Mongrel 0.3.13 that prevents you from using config
files. I'll have a 0.3.13.1 release out in about 30 minutes that fixes
it.
People using mongrel_cluster shouldn't be impacted.
Zed
From zedshaw at zedshaw.com Tue Jun 20 20:45:54 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Tue, 20 Jun 2006 20:45:54 -0400
Subject: [Mongrel] Running Mongrel Cluster on boot
In-Reply-To: <3cc1a0190606201045t63f7850fl3d388bd5b70ca91f@mail.gmail.com>
References: <3cc1a0190606201045t63f7850fl3d388bd5b70ca91f@mail.gmail.com>
Message-ID: <1150850754.5929.0.camel@localhost.localdomain>
On Tue, 2006-06-20 at 13:45 -0400, James Punteney wrote:
> I've installed pen and mongrel with mongrel_cluster (as gems) on
> Debian sarge. I can run everything from the command line fine
> including starting from the /etc/init.d/mongrel_cluster script
>
> On boot though mongrel_cluster fails with this msg:
> /usr/local/lib/site_ruby/1.8/rubygems.rb:204:in
> `report_activate_error': Could not find RubyGem mongrel_cluster (> 0)
> (Gem::LoadError)
> from /usr/local/lib/site_ruby/1.8/rubygems.rb:141:in `activate'
> from /usr/local/lib/site_ruby/1.8/rubygems.rb:37:in
> `require_gem_with_options'
> from /usr/local/lib/site_ruby/1.8/rubygems.rb:31:in `require_gem'
> from /usr/bin/mongrel_cluster_ctl:17
>
>
> This may be more of a ruby gems question, but any thoughts/help would
> be appreciated.
Depending how you set things up, you may need to install mongrel_cluster
again:
gem install mongrel_cluster
If that don't work then try removing it and installing it again.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Tue Jun 20 21:03:54 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Tue, 20 Jun 2006 21:03:54 -0400
Subject: [Mongrel] cluster::restart vs. stop/start
In-Reply-To: <412A5C77-6CD9-4F8F-BE1E-F9A43565DA42@eXtension.org>
References: <412A5C77-6CD9-4F8F-BE1E-F9A43565DA42@eXtension.org>
Message-ID: <1150851834.5929.9.camel@localhost.localdomain>
On Tue, 2006-06-20 at 12:04 -0400, Jason Young wrote:
> What's the difference, architecturally between cluster::restart and
> cluster::stop/start (I haven't looked at the code, which is kinda
> lazy of me to ask the question I know)
>
> If they aren't very different actually, can I put a plug in for
> having cluster::restart do a "start" if something's happened and
> mongrel is stopped for that configuration? It appears
> that ::restart doesn't start a stopped configuration, and logically
> to me, (or at least consistently with most process restart commands)
> it should.
I'll shoot this suggestion to Bradley and see what he thinks. For
mongrel a restart is actually re-runs mongrel from a inside the same
ruby interpreter, forks and then exits. This gives you a fast restart
and makes sure all the current requests are done.
In the case of mongrel_cluster this might get complicated. It might
involve checking for PIDs and compare with what's running, or maybe
checking ports. Ruby doesn't have good facilities for listing PIDs so
it might take some shell hackery. :-)
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From kevwil at gmail.com Wed Jun 21 00:01:44 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Tue, 20 Jun 2006 22:01:44 -0600
Subject: [Mongrel] secure downloads
In-Reply-To: <683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
<44980056.1090300@besquared.net>
<683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com>
Message-ID: <683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com>
OK, on WinXP / Ruby 1.8.4 I get an HTTP connection reset error. The
download link looks like this:
http://localhost:3000/dl/?token=4c927cdb55be0efd4480298659a5e48306aca2c8&relative-path=foo.zip&timestamp=4498c369
I get the same error on the Mac.
On 6/20/06, Kevin Williams wrote:
> I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
> I'll go back and test again and try to give you some useful info.
>
> On 6/20/06, Josh Ferguson wrote:
> > What OS? The gem is super early beta so it could use a lot of work. I've
> > only tested it on win32 which means there could be a whole host of
> > errors and bad coding practices for other systems..:)
> >
> > Josh Ferguson
> >
> > Kevin Williams wrote:
> > > Has anyone had any success with the mongrel_secure_download gem? I
> > > keep getting "connection reset" errors.
> > >
> > >
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
>
>
> --
> Cheers,
>
> Kevin
>
--
Cheers,
Kevin
From zedshaw at zedshaw.com Wed Jun 21 01:57:08 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Wed, 21 Jun 2006 01:57:08 -0400
Subject: [Mongrel] [ANN] Mongrel 0.3.13.1 -- Quick Small Fixes
Message-ID: <1150869428.5972.7.camel@localhost.localdomain>
Hi Everyone,
This is a small release that fixes a little bug, some of the
documentation, and adds the new RedirectHandler code and a @redirect@
call for the mongrel.conf files. It's fresh so don't rely on it.
Everyone should upgrade with the usual *gem update* command (which tells
you it's "Upgrading...") and tell me how it works.
This release fixes:
* The -C configure file option was busted because of an errant line
move.
* Adds RedirectHandler thanks to Jonas Pfenniger and a new redirect call
to Configurator.
* Fixes mongrel_servic documentation which was referring to -r instead
of -c and -C instead of -u.
USING RedirectHandler
Redirects are pretty simple. You simply have either a new
RedirectHandler class you can use or you can put this in a mongrel.conf
and pass that to -S:
redirect "/from", "/to"
It also accepts regex for the @from@ parameter and can take a block.
Play with it if you're interested.
DEFLATE AND SAFARI
It looks like Safari does not honor the @Content-Encoding: deflate@
response, so avoid using DeflateFilter until I can find out why. *This*
is why you don't hand code network protocol parsers.
RAILSCONF (-1 DAY)
I'm actually an idiot and scheduled my RailsConf trip a day early. I've
gotta work that day so I'm going to be at the Radisson near the
conference hotel if people want to meet me.
Here's my face:
http://facebook.railsconf.org/users/122
Anyone interested in having a Mongrel get together either tomorrow or
during the conference should put their picture in the facebook, tag it
with mongrel, and I'll work out something based on interest. Mike Clark
is interested in doing a BOF too. Should be fun.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From josh at besquared.net Wed Jun 21 02:14:15 2006
From: josh at besquared.net (Josh Ferguson)
Date: Wed, 21 Jun 2006 02:14:15 -0400
Subject: [Mongrel] secure downloads
In-Reply-To: <683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com> <44980056.1090300@besquared.net> <683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com>
<683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com>
Message-ID: <4498E3B7.5080602@besquared.net>
That time stamp doesn't look quite right. Can you paste the code used to
generate the URL?
Josh
Kevin Williams wrote:
> OK, on WinXP / Ruby 1.8.4 I get an HTTP connection reset error. The
> download link looks like this:
>
> http://localhost:3000/dl/?token=4c927cdb55be0efd4480298659a5e48306aca2c8&relative-path=foo.zip&timestamp=4498c369
>
> I get the same error on the Mac.
>
>
> On 6/20/06, Kevin Williams wrote:
>
>> I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
>> I'll go back and test again and try to give you some useful info.
>>
>> On 6/20/06, Josh Ferguson wrote:
>>
>>> What OS? The gem is super early beta so it could use a lot of work. I've
>>> only tested it on win32 which means there could be a whole host of
>>> errors and bad coding practices for other systems..:)
>>>
>>> Josh Ferguson
>>>
>>> Kevin Williams wrote:
>>>
>>>> Has anyone had any success with the mongrel_secure_download gem? I
>>>> keep getting "connection reset" errors.
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Mongrel-users mailing list
>>> Mongrel-users at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/mongrel-users
>>>
>>>
>> --
>> Cheers,
>>
>> Kevin
>>
>>
>
>
>
From godber at uberhip.com Tue Jun 20 17:42:57 2006
From: godber at uberhip.com (Austin Godber)
Date: Tue, 20 Jun 2006 14:42:57 -0700
Subject: [Mongrel] Running Mongrel Cluster on boot
In-Reply-To: <3cc1a0190606201045t63f7850fl3d388bd5b70ca91f@mail.gmail.com>
References: <3cc1a0190606201045t63f7850fl3d388bd5b70ca91f@mail.gmail.com>
Message-ID: <44986BE1.8020408@uberhip.com>
James Punteney wrote:
> I've installed pen and mongrel with mongrel_cluster (as gems) on
> Debian sarge. I can run everything from the command line fine
> including starting from the /etc/init.d/mongrel_cluster script
>
> On boot though mongrel_cluster fails with this msg:
> /usr/local/lib/site_ruby/1.8/rubygems.rb:204:in
> `report_activate_error': Could not find RubyGem mongrel_cluster (> 0)
> (Gem::LoadError)
> from /usr/local/lib/site_ruby/1.8/rubygems.rb:141:in `activate'
> from /usr/local/lib/site_ruby/1.8/rubygems.rb:37:in
> `require_gem_with_options'
> from /usr/local/lib/site_ruby/1.8/rubygems.rb:31:in `require_gem'
> from /usr/bin/mongrel_cluster_ctl:17
Are you using the debian package of ruby or did you build it yourself in
/usr/local?
Can you manually go around and look to see where the gem is installed?
/usr/lib/ruby/gems
/usr/local/lib/ruby/gems
/usr/local/lib/site_ruby/gems
do you have some weird combined installation of the deb and build from
source?
Austin
From phil at unimedia.org Wed Jun 21 06:29:19 2006
From: phil at unimedia.org (Phillip Kast)
Date: Wed, 21 Jun 2006 03:29:19 -0700
Subject: [Mongrel] [Rails] [ANN] Mongrel 0.3.13.1 -- Quick Small Fixes
In-Reply-To: <54d675690606210027k4ade7f29ub35a2496f0e8c37f@mail.gmail.com>
References: <1150869428.5972.7.camel@localhost.localdomain>
<54d675690606210027k4ade7f29ub35a2496f0e8c37f@mail.gmail.com>
Message-ID: <44991F7F.6070806@unimedia.org>
I get similar errors: a 404 when I tried to gem upgrade, and a 300 after
I uninstall mongrel and then try to install 0.3.13.1 (0.3.13 installs fine).
Looks like maybe 0.3.13.1 didn't quite make it to the server?
-phil
Stoyan Zhekov wrote:
> On 6/21/06, Zed Shaw wrote:
>
>> Everyone should upgrade with the usual *gem update* command (which tells
>> you it's "Upgrading...") and tell me how it works.
>
> Select which gem to install for your platform (i686-linux)
> 1. mongrel 0.3.13.1 (ruby)
> 2. mongrel 0.3.13.1 (mswin32)
> ....
>> 1
> ERROR: While executing gem ... (OpenURI::HTTPError)
> 300 Multiple Choices
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Phillip Kast
(909)630-9562
phil at unimedia.org
From zedshaw at zedshaw.com Wed Jun 21 09:46:57 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Wed, 21 Jun 2006 09:46:57 -0400
Subject: [Mongrel] [Rails] [ANN] Mongrel 0.3.13.1 -- Quick Small Fixes
In-Reply-To: <44991F7F.6070806@unimedia.org>
References: <1150869428.5972.7.camel@localhost.localdomain>
<54d675690606210027k4ade7f29ub35a2496f0e8c37f@mail.gmail.com>
<44991F7F.6070806@unimedia.org>
Message-ID: <1150897617.5969.0.camel@localhost.localdomain>
On Wed, 2006-06-21 at 03:29 -0700, Phillip Kast wrote:
> I get similar errors: a 404 when I tried to gem upgrade, and a 300 after
> I uninstall mongrel and then try to install 0.3.13.1 (0.3.13 installs fine).
> Looks like maybe 0.3.13.1 didn't quite make it to the server?
Nope, it's up there but the gems have to migrate out to the various
mirror servers. Try back in a little while.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From jamie at dangosaur.us Wed Jun 21 09:54:47 2006
From: jamie at dangosaur.us (Jamie Orchard-Hays)
Date: Wed, 21 Jun 2006 09:54:47 -0400
Subject: [Mongrel] [Rails] [ANN] Mongrel 0.3.13.1 -- Quick Small Fixes
In-Reply-To: <44991F7F.6070806@unimedia.org>
References: <1150869428.5972.7.camel@localhost.localdomain>
<54d675690606210027k4ade7f29ub35a2496f0e8c37f@mail.gmail.com>
<44991F7F.6070806@unimedia.org>
Message-ID: <2A548798-F651-45AE-9125-8834AFD8FF6C@dangosaur.us>
I just gem installed it with no problem.
On Jun 21, 2006, at 6:29 AM, Phillip Kast wrote:
> I get similar errors: a 404 when I tried to gem upgrade, and a 300
> after
> I uninstall mongrel and then try to install 0.3.13.1 (0.3.13
> installs fine).
> Looks like maybe 0.3.13.1 didn't quite make it to the server?
>
> -phil
>
>
> Stoyan Zhekov wrote:
>> On 6/21/06, Zed Shaw wrote:
>>
>>> Everyone should upgrade with the usual *gem update* command
>>> (which tells
>>> you it's "Upgrading...") and tell me how it works.
>>
>> Select which gem to install for your platform (i686-linux)
>> 1. mongrel 0.3.13.1 (ruby)
>> 2. mongrel 0.3.13.1 (mswin32)
>> ....
>>> 1
>> ERROR: While executing gem ... (OpenURI::HTTPError)
>> 300 Multiple Choices
>> _______________________________________________
>> Rails mailing list
>> Rails at lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
> --
> Phillip Kast
> (909)630-9562
> phil at unimedia.org
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
From punteney at gmail.com Wed Jun 21 10:53:44 2006
From: punteney at gmail.com (James Punteney)
Date: Wed, 21 Jun 2006 10:53:44 -0400
Subject: [Mongrel] Running Mongrel Cluster on boot
In-Reply-To: <44986BE1.8020408@uberhip.com>
References: <3cc1a0190606201045t63f7850fl3d388bd5b70ca91f@mail.gmail.com>
<44986BE1.8020408@uberhip.com>
Message-ID: <3cc1a0190606210753g68fb8dbi1248421623a9f7cb@mail.gmail.com>
It turns out it is an issue with the path. Exporting the path:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
just below the CONF_DIR fixed the problem, and now mongrel starts on boot.
Thanks for the help,
--James
On 6/20/06, Austin Godber wrote:
> James Punteney wrote:
> > I've installed pen and mongrel with mongrel_cluster (as gems) on
> > Debian sarge. I can run everything from the command line fine
> > including starting from the /etc/init.d/mongrel_cluster script
> >
> > On boot though mongrel_cluster fails with this msg:
> > /usr/local/lib/site_ruby/1.8/rubygems.rb:204:in
> > `report_activate_error': Could not find RubyGem mongrel_cluster (> 0)
> > (Gem::LoadError)
> > from /usr/local/lib/site_ruby/1.8/rubygems.rb:141:in `activate'
> > from /usr/local/lib/site_ruby/1.8/rubygems.rb:37:in
> > `require_gem_with_options'
> > from /usr/local/lib/site_ruby/1.8/rubygems.rb:31:in `require_gem'
> > from /usr/bin/mongrel_cluster_ctl:17
>
> Are you using the debian package of ruby or did you build it yourself in
> /usr/local?
>
> Can you manually go around and look to see where the gem is installed?
>
> /usr/lib/ruby/gems
> /usr/local/lib/ruby/gems
> /usr/local/lib/site_ruby/gems
>
> do you have some weird combined installation of the deb and build from
> source?
>
> Austin
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
From kevwil at gmail.com Wed Jun 21 12:14:31 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Wed, 21 Jun 2006 10:14:31 -0600
Subject: [Mongrel] secure downloads
In-Reply-To: <4498E3B7.5080602@besquared.net>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
<44980056.1090300@besquared.net>
<683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com>
<683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com>
<4498E3B7.5080602@besquared.net>
Message-ID: <683a886f0606210914h33ffbf52if582ae46b922cb64@mail.gmail.com>
module ApplicationHelper
def lighttpd_download_url( file )
secret = 'foobar'
uri_prefix = '/dl/'
t = Time.now.to_i.to_s( base=16 )
hash = Digest::MD5.new( "#{secret}/#{file}#{t}" )
"#{uri_prefix}#{hash}/#{t}/#{file}"
end
def mongrel_download_url( file )
require 'digest/sha1'
secret = 'foobar'
uri_prefix = '/dl'
timestamp = 1.minute.from_now.to_i.to_s( base=16 ) # throws "can't
convert Bignum into String" without the 'to_s'
token = Digest::SHA1.hexdigest( secret + file + timestamp )
uri = "#{uri_prefix}/?token=#{token}&relative-path=#{file}&timestamp=#{timestamp}"
end
end
On 6/21/06, Josh Ferguson wrote:
> That time stamp doesn't look quite right. Can you paste the code used to
> generate the URL?
>
> Josh
>
> Kevin Williams wrote:
> > OK, on WinXP / Ruby 1.8.4 I get an HTTP connection reset error. The
> > download link looks like this:
> >
> > http://localhost:3000/dl/?token=4c927cdb55be0efd4480298659a5e48306aca2c8&relative-path=foo.zip&timestamp=4498c369
> >
> > I get the same error on the Mac.
> >
> >
> > On 6/20/06, Kevin Williams wrote:
> >
> >> I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
> >> I'll go back and test again and try to give you some useful info.
> >>
> >> On 6/20/06, Josh Ferguson wrote:
> >>
> >>> What OS? The gem is super early beta so it could use a lot of work. I've
> >>> only tested it on win32 which means there could be a whole host of
> >>> errors and bad coding practices for other systems..:)
> >>>
> >>> Josh Ferguson
> >>>
> >>> Kevin Williams wrote:
> >>>
> >>>> Has anyone had any success with the mongrel_secure_download gem? I
> >>>> keep getting "connection reset" errors.
> >>>>
> >>>>
> >>>>
> >>> _______________________________________________
> >>> Mongrel-users mailing list
> >>> Mongrel-users at rubyforge.org
> >>> http://rubyforge.org/mailman/listinfo/mongrel-users
> >>>
> >>>
> >> --
> >> Cheers,
> >>
> >> Kevin
> >>
> >>
> >
> >
> >
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Cheers,
Kevin
From bradley at railsmachine.com Wed Jun 21 13:46:42 2006
From: bradley at railsmachine.com (bradley taylor)
Date: Wed, 21 Jun 2006 13:46:42 -0400
Subject: [Mongrel] cluster::restart vs. stop/start
In-Reply-To: <412A5C77-6CD9-4F8F-BE1E-F9A43565DA42@eXtension.org>
References: <412A5C77-6CD9-4F8F-BE1E-F9A43565DA42@eXtension.org>
Message-ID: <042B972B-1223-4816-839F-5A8EBFFF4480@railsmachine.com>
Hi Jason:
On Jun 20, 2006, at 12:04 PM, Jason Young wrote:
> What's the difference, architecturally between cluster::restart and
> cluster::stop/start (I haven't looked at the code, which is kinda
> lazy of me to ask the question I know)
> If they aren't very different actually, can I put a plug in for
> having cluster::restart do a "start" if something's happened and
> mongrel is stopped for that configuration? It appears
> that ::restart doesn't start a stopped configuration, and logically
> to me, (or at least consistently with most process restart commands)
> it should.
cluster::restart just calls "mongrel_rails restart" for each process
in the cluster. However, the mongrel_cluster capistrano tasks and
mongrel_cluster_ctl call cluster::stop then cluster::start. There are
subtle issues with using cluster::restart depending on if you've
modified your mongrel_cluster conf file (changing port, etc). I tend
to favor the behavior of stop/start as its more inline with other
services and avoids issues with configuration changes. I plan on
digging into this a bit more next week.
Thanks,
Bradley Taylor
------
Rails Machine
Simplified Ruby on Rails deployment
http://railsmachine.com
From josh at besquared.net Wed Jun 21 14:00:53 2006
From: josh at besquared.net (Josh Ferguson)
Date: Wed, 21 Jun 2006 14:00:53 -0400
Subject: [Mongrel] secure downloads
In-Reply-To: <683a886f0606210914h33ffbf52if582ae46b922cb64@mail.gmail.com>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com> <44980056.1090300@besquared.net> <683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com> <683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com> <4498E3B7.5080602@besquared.net>
<683a886f0606210914h33ffbf52if582ae46b922cb64@mail.gmail.com>
Message-ID: <44998955.3040800@besquared.net>
try not to_s with base 16 and just leaving it as a big integer.
Josh
Kevin Williams wrote:
> module ApplicationHelper
>
> def lighttpd_download_url( file )
> secret = 'foobar'
> uri_prefix = '/dl/'
> t = Time.now.to_i.to_s( base=16 )
> hash = Digest::MD5.new( "#{secret}/#{file}#{t}" )
> "#{uri_prefix}#{hash}/#{t}/#{file}"
> end
>
> def mongrel_download_url( file )
> require 'digest/sha1'
> secret = 'foobar'
> uri_prefix = '/dl'
> timestamp = 1.minute.from_now.to_i.to_s( base=16 ) # throws "can't
> convert Bignum into String" without the 'to_s'
> token = Digest::SHA1.hexdigest( secret + file + timestamp )
> uri = "#{uri_prefix}/?token=#{token}&relative-path=#{file}&timestamp=#{timestamp}"
> end
>
> end
>
> On 6/21/06, Josh Ferguson wrote:
>
>> That time stamp doesn't look quite right. Can you paste the code used to
>> generate the URL?
>>
>> Josh
>>
>> Kevin Williams wrote:
>>
>>> OK, on WinXP / Ruby 1.8.4 I get an HTTP connection reset error. The
>>> download link looks like this:
>>>
>>> http://localhost:3000/dl/?token=4c927cdb55be0efd4480298659a5e48306aca2c8&relative-path=foo.zip&timestamp=4498c369
>>>
>>> I get the same error on the Mac.
>>>
>>>
>>> On 6/20/06, Kevin Williams wrote:
>>>
>>>
>>>> I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
>>>> I'll go back and test again and try to give you some useful info.
>>>>
>>>> On 6/20/06, Josh Ferguson wrote:
>>>>
>>>>
>>>>> What OS? The gem is super early beta so it could use a lot of work. I've
>>>>> only tested it on win32 which means there could be a whole host of
>>>>> errors and bad coding practices for other systems..:)
>>>>>
>>>>> Josh Ferguson
>>>>>
>>>>> Kevin Williams wrote:
>>>>>
>>>>>
>>>>>> Has anyone had any success with the mongrel_secure_download gem? I
>>>>>> keep getting "connection reset" errors.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> Mongrel-users mailing list
>>>>> Mongrel-users at rubyforge.org
>>>>> http://rubyforge.org/mailman/listinfo/mongrel-users
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Cheers,
>>>>
>>>> Kevin
>>>>
>>>>
>>>>
>>>
>>>
>> _______________________________________________
>> Mongrel-users mailing list
>> Mongrel-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/mongrel-users
>>
>>
>
>
>
From kevwil at gmail.com Wed Jun 21 14:40:39 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Wed, 21 Jun 2006 12:40:39 -0600
Subject: [Mongrel] secure downloads
In-Reply-To: <44998955.3040800@besquared.net>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
<44980056.1090300@besquared.net>
<683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com>
<683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com>
<4498E3B7.5080602@besquared.net>
<683a886f0606210914h33ffbf52if582ae46b922cb64@mail.gmail.com>
<44998955.3040800@besquared.net>
Message-ID: <683a886f0606211140i731ea152o75296b85145b7bb4@mail.gmail.com>
It throws an error, as I commented in the code.
Perhaps using the Bignum in the digest and the to_s in the uri?
On 6/21/06, Josh Ferguson wrote:
> try not to_s with base 16 and just leaving it as a big integer.
>
> Josh
>
> Kevin Williams wrote:
> > module ApplicationHelper
> >
> > def lighttpd_download_url( file )
> > secret = 'foobar'
> > uri_prefix = '/dl/'
> > t = Time.now.to_i.to_s( base=16 )
> > hash = Digest::MD5.new( "#{secret}/#{file}#{t}" )
> > "#{uri_prefix}#{hash}/#{t}/#{file}"
> > end
> >
> > def mongrel_download_url( file )
> > require 'digest/sha1'
> > secret = 'foobar'
> > uri_prefix = '/dl'
> > timestamp = 1.minute.from_now.to_i.to_s( base=16 ) # throws "can't
> > convert Bignum into String" without the 'to_s'
> > token = Digest::SHA1.hexdigest( secret + file + timestamp )
> > uri = "#{uri_prefix}/?token=#{token}&relative-path=#{file}&timestamp=#{timestamp}"
> > end
> >
> > end
> >
> > On 6/21/06, Josh Ferguson wrote:
> >
> >> That time stamp doesn't look quite right. Can you paste the code used to
> >> generate the URL?
> >>
> >> Josh
> >>
> >> Kevin Williams wrote:
> >>
> >>> OK, on WinXP / Ruby 1.8.4 I get an HTTP connection reset error. The
> >>> download link looks like this:
> >>>
> >>> http://localhost:3000/dl/?token=4c927cdb55be0efd4480298659a5e48306aca2c8&relative-path=foo.zip&timestamp=4498c369
> >>>
> >>> I get the same error on the Mac.
> >>>
> >>>
> >>> On 6/20/06, Kevin Williams wrote:
> >>>
> >>>
> >>>> I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
> >>>> I'll go back and test again and try to give you some useful info.
> >>>>
> >>>> On 6/20/06, Josh Ferguson wrote:
> >>>>
> >>>>
> >>>>> What OS? The gem is super early beta so it could use a lot of work. I've
> >>>>> only tested it on win32 which means there could be a whole host of
> >>>>> errors and bad coding practices for other systems..:)
> >>>>>
> >>>>> Josh Ferguson
> >>>>>
> >>>>> Kevin Williams wrote:
> >>>>>
> >>>>>
> >>>>>> Has anyone had any success with the mongrel_secure_download gem? I
> >>>>>> keep getting "connection reset" errors.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> _______________________________________________
> >>>>> Mongrel-users mailing list
> >>>>> Mongrel-users at rubyforge.org
> >>>>> http://rubyforge.org/mailman/listinfo/mongrel-users
> >>>>>
> >>>>>
> >>>>>
> >>>> --
> >>>> Cheers,
> >>>>
> >>>> Kevin
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >> _______________________________________________
> >> Mongrel-users mailing list
> >> Mongrel-users at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/mongrel-users
> >>
> >>
> >
> >
> >
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Cheers,
Kevin
From bradley at railsmachine.com Wed Jun 21 14:49:20 2006
From: bradley at railsmachine.com (bradley taylor)
Date: Wed, 21 Jun 2006 14:49:20 -0400
Subject: [Mongrel] [ADV] Rails Machine Simplifies Application Deployment
Message-ID: <26841774-A092-4C48-A0D6-CEDD51E1AC64@railsmachine.com>
Rails Machine is proud to announce the immediate availability of
our full line of Rails deployment products and services, including
VPS-based hosting accounts, dedicated servers, software and
support offerings. Designed for professional Ruby on Rails
programmers and teams, our offerings focus on making Rails
application deployments easier, cheaper and more successful.
Our current offerings include:
The Rails Machine Gem
Deploy your Rails application in five minutes with our open source
configuration toolset. From server setup to Capistrano to
database access -- everything can be configured from the root
directory of your rails application. This includes Apache,
Mongrel, Rails, and MySQL. It all just works. Simple and painless.
VPS-based Hosting Accounts
The days of painful shared hosting are over. All applications
should have their own isolated environments. Grow and thrive?
Development or production? Crash and burn? No one cares but you,
and you have full root access to do as you please.
Consulting and Support Services
Want to keep your focus on the application? Let us complement your
team with Rails deployment experts. Custom installations,
plug-ins, Capistrano tasks, Xen-based server virtualization,
performance evaluations, server management and monitoring... these
are just some of the services our team excels at. We've even
hired Zed Shaw to run our commercial support offering for people
running Rails under Mongrel. Make sure your project succeeds and
thrives!
Visit RailsMachine.com for more information. You can access
information, documentation, and our Rails Deployment Campfire. We
hope you visit soon!
And thanks, from the entire Rails Machine team!
http://railsmachine.com
Sincerely,
Bradley Taylor
PS. Look for us at RailsConf on Thursday!
------
Rails Machine
Simplified Ruby on Rails deployment
http://railsmachine.com
From amiroff at gmail.com Wed Jun 21 16:34:16 2006
From: amiroff at gmail.com (Metin Amiroff)
Date: Wed, 21 Jun 2006 23:34:16 +0300
Subject: [Mongrel] [Rails] [ANN] Mongrel 0.3.13.1 -- Quick Small Fixes
In-Reply-To: <2A548798-F651-45AE-9125-8834AFD8FF6C@dangosaur.us>
References: <1150869428.5972.7.camel@localhost.localdomain>
<54d675690606210027k4ade7f29ub35a2496f0e8c37f@mail.gmail.com>
<44991F7F.6070806@unimedia.org>
<2A548798-F651-45AE-9125-8834AFD8FF6C@dangosaur.us>
Message-ID: <9328906b0606211334idcc8194xb8c69f7fe86c6501@mail.gmail.com>
Gem updated, no problems here.
On 6/21/06, Jamie Orchard-Hays wrote:
>
> I just gem installed it with no problem.
>
>
> On Jun 21, 2006, at 6:29 AM, Phillip Kast wrote:
>
> > I get similar errors: a 404 when I tried to gem upgrade, and a 300
> > after
> > I uninstall mongrel and then try to install 0.3.13.1 (0.3.13
> > installs fine).
> > Looks like maybe 0.3.13.1 didn't quite make it to the server?
> >
> > -phil
> >
> >
> > Stoyan Zhekov wrote:
> >> On 6/21/06, Zed Shaw wrote:
> >>
> >>> Everyone should upgrade with the usual *gem update* command
> >>> (which tells
> >>> you it's "Upgrading...") and tell me how it works.
> >>
> >> Select which gem to install for your platform (i686-linux)
> >> 1. mongrel 0.3.13.1 (ruby)
> >> 2. mongrel 0.3.13.1 (mswin32)
> >> ....
> >>> 1
> >> ERROR: While executing gem ... (OpenURI::HTTPError)
> >> 300 Multiple Choices
> >> _______________________________________________
> >> Rails mailing list
> >> Rails at lists.rubyonrails.org
> >> http://lists.rubyonrails.org/mailman/listinfo/rails
> >>
> >
> >
> > --
> > Phillip Kast
> > (909)630-9562
> > phil at unimedia.org
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Pace Peace Paix Paz Frieden Pax Pok?j Fri?ur Fred B?ke
Hasiti Lap? Hetep Malu M?? Wolakota Santiphap Irini Peoch
Shanti Vrede Bar?? R?j M?r Taika Rongo S?lh Py'guapy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060621/80d1788a/attachment-0001.html
From todd.fisher at gmail.com Wed Jun 21 17:13:26 2006
From: todd.fisher at gmail.com (Todd Fisher)
Date: Wed, 21 Jun 2006 17:13:26 -0400
Subject: [Mongrel] mongrel lock ups
Message-ID:
Thread # is too old, killing.
Error calling Dispatcher.dispatch #
I'm getting lockups
I've seen this too:
Shutdown waited 1 for 9 requests, could take 10 seconds.^MThread
# is too old, killing.
Error calling Dispatcher.dispatch #
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:594:in `lock'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel/rails.rb:83:in
`process'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:549:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:548:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:617:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:616:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:605:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:935:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel.rb:934:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:119:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel/command.rb:211:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:227
/usr/bin/mongrel_rails:18
Any ideas?
Thanks,
Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060621/9a961eef/attachment.html
From phil at unimedia.org Wed Jun 21 17:56:51 2006
From: phil at unimedia.org (Phillip Kast)
Date: Wed, 21 Jun 2006 14:56:51 -0700
Subject: [Mongrel] [Bulk] Re: [Rails] [ANN] Mongrel 0.3.13.1 -- Quick
Small Fixes
In-Reply-To: <9328906b0606211334idcc8194xb8c69f7fe86c6501@mail.gmail.com>
References: <1150869428.5972.7.camel@localhost.localdomain> <54d675690606210027k4ade7f29ub35a2496f0e8c37f@mail.gmail.com> <44991F7F.6070806@unimedia.org> <2A548798-F651-45AE-9125-8834AFD8FF6C@dangosaur.us>
<9328906b0606211334idcc8194xb8c69f7fe86c6501@mail.gmail.com>
Message-ID: <4499C0A3.3090105@unimedia.org>
Metin Amiroff wrote:
> Gem updated, no problems here.
>
> On 6/21/06, *Jamie Orchard-Hays* > wrote:
>
> I just gem installed it with no problem.
>
> On Jun 21, 2006, at 6:29 AM, Phillip Kast wrote:
> > I get similar errors: a 404 when I tried to gem upgrade, and a 300
>
Works for me now too without specifying the source. Guess the mirrors
got it now.
PS thanks again Zed for the rapid fixes and active dev on Mongrel. It
rocks the house.
phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060621/f996d40a/attachment.html
From josh at besquared.net Wed Jun 21 19:37:48 2006
From: josh at besquared.net (Josh Ferguson)
Date: Wed, 21 Jun 2006 19:37:48 -0400
Subject: [Mongrel] secure downloads
In-Reply-To: <683a886f0606211140i731ea152o75296b85145b7bb4@mail.gmail.com>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com> <44980056.1090300@besquared.net> <683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com> <683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com> <4498E3B7.5080602@besquared.net> <683a886f0606210914h33ffbf52if582ae46b922cb64@mail.gmail.com> <44998955.3040800@besquared.net>
<683a886f0606211140i731ea152o75296b85145b7bb4@mail.gmail.com>
Message-ID: <4499D84C.3010502@besquared.net>
Keep the to_s drop the (base=16).
Josh
Kevin Williams wrote:
> It throws an error, as I commented in the code.
>
> Perhaps using the Bignum in the digest and the to_s in the uri?
>
>
> On 6/21/06, Josh Ferguson wrote:
>
>> try not to_s with base 16 and just leaving it as a big integer.
>>
>> Josh
>>
>> Kevin Williams wrote:
>>
>>> module ApplicationHelper
>>>
>>> def lighttpd_download_url( file )
>>> secret = 'foobar'
>>> uri_prefix = '/dl/'
>>> t = Time.now.to_i.to_s( base=16 )
>>> hash = Digest::MD5.new( "#{secret}/#{file}#{t}" )
>>> "#{uri_prefix}#{hash}/#{t}/#{file}"
>>> end
>>>
>>> def mongrel_download_url( file )
>>> require 'digest/sha1'
>>> secret = 'foobar'
>>> uri_prefix = '/dl'
>>> timestamp = 1.minute.from_now.to_i.to_s( base=16 ) # throws "can't
>>> convert Bignum into String" without the 'to_s'
>>> token = Digest::SHA1.hexdigest( secret + file + timestamp )
>>> uri = "#{uri_prefix}/?token=#{token}&relative-path=#{file}&timestamp=#{timestamp}"
>>> end
>>>
>>> end
>>>
>>> On 6/21/06, Josh Ferguson wrote:
>>>
>>>
>>>> That time stamp doesn't look quite right. Can you paste the code used to
>>>> generate the URL?
>>>>
>>>> Josh
>>>>
>>>> Kevin Williams wrote:
>>>>
>>>>
>>>>> OK, on WinXP / Ruby 1.8.4 I get an HTTP connection reset error. The
>>>>> download link looks like this:
>>>>>
>>>>> http://localhost:3000/dl/?token=4c927cdb55be0efd4480298659a5e48306aca2c8&relative-path=foo.zip&timestamp=4498c369
>>>>>
>>>>> I get the same error on the Mac.
>>>>>
>>>>>
>>>>> On 6/20/06, Kevin Williams wrote:
>>>>>
>>>>>
>>>>>
>>>>>> I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
>>>>>> I'll go back and test again and try to give you some useful info.
>>>>>>
>>>>>> On 6/20/06, Josh Ferguson wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> What OS? The gem is super early beta so it could use a lot of work. I've
>>>>>>> only tested it on win32 which means there could be a whole host of
>>>>>>> errors and bad coding practices for other systems..:)
>>>>>>>
>>>>>>> Josh Ferguson
>>>>>>>
>>>>>>> Kevin Williams wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Has anyone had any success with the mongrel_secure_download gem? I
>>>>>>>> keep getting "connection reset" errors.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mongrel-users mailing list
>>>>>>> Mongrel-users at rubyforge.org
>>>>>>> http://rubyforge.org/mailman/listinfo/mongrel-users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Cheers,
>>>>>>
>>>>>> Kevin
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>> _______________________________________________
>>>> Mongrel-users mailing list
>>>> Mongrel-users at rubyforge.org
>>>> http://rubyforge.org/mailman/listinfo/mongrel-users
>>>>
>>>>
>>>>
>>>
>>>
>> _______________________________________________
>> Mongrel-users mailing list
>> Mongrel-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/mongrel-users
>>
>>
>
>
>
From kevwil at gmail.com Wed Jun 21 21:13:26 2006
From: kevwil at gmail.com (Kevin Williams)
Date: Wed, 21 Jun 2006 19:13:26 -0600
Subject: [Mongrel] secure downloads
In-Reply-To: <4499D84C.3010502@besquared.net>
References: <683a886f0606200657x3f8e770ar6b41d7745bb8764a@mail.gmail.com>
<44980056.1090300@besquared.net>
<683a886f0606200734y6b4ea4e1k2c82ceb224f1c2b7@mail.gmail.com>
<683a886f0606202101k286ca7abo45334a483f04ea37@mail.gmail.com>
<4498E3B7.5080602@besquared.net>
<683a886f0606210914h33ffbf52if582ae46b922cb64@mail.gmail.com>
<44998955.3040800@besquared.net>
<683a886f0606211140i731ea152o75296b85145b7bb4@mail.gmail.com>
<4499D84C.3010502@besquared.net>
Message-ID: <683a886f0606211813h172f5e6focab6bd022830146f@mail.gmail.com>
OK, that did it - Thanks!
My test file was a zip file. The download window had a text file icon,
so I assume the mime type was not identified. The downloaded file
didn't work as a zip file, either. Just so you know.
Thanks for helping me get it working so far.
On 6/21/06, Josh Ferguson wrote:
> Keep the to_s drop the (base=16).
>
> Josh
>
> Kevin Williams wrote:
> > It throws an error, as I commented in the code.
> >
> > Perhaps using the Bignum in the digest and the to_s in the uri?
> >
> >
> > On 6/21/06, Josh Ferguson wrote:
> >
> >> try not to_s with base 16 and just leaving it as a big integer.
> >>
> >> Josh
> >>
> >> Kevin Williams wrote:
> >>
> >>> module ApplicationHelper
> >>>
> >>> def lighttpd_download_url( file )
> >>> secret = 'foobar'
> >>> uri_prefix = '/dl/'
> >>> t = Time.now.to_i.to_s( base=16 )
> >>> hash = Digest::MD5.new( "#{secret}/#{file}#{t}" )
> >>> "#{uri_prefix}#{hash}/#{t}/#{file}"
> >>> end
> >>>
> >>> def mongrel_download_url( file )
> >>> require 'digest/sha1'
> >>> secret = 'foobar'
> >>> uri_prefix = '/dl'
> >>> timestamp = 1.minute.from_now.to_i.to_s( base=16 ) # throws "can't
> >>> convert Bignum into String" without the 'to_s'
> >>> token = Digest::SHA1.hexdigest( secret + file + timestamp )
> >>> uri = "#{uri_prefix}/?token=#{token}&relative-path=#{file}&timestamp=#{timestamp}"
> >>> end
> >>>
> >>> end
> >>>
> >>> On 6/21/06, Josh Ferguson wrote:
> >>>
> >>>
> >>>> That time stamp doesn't look quite right. Can you paste the code used to
> >>>> generate the URL?
> >>>>
> >>>> Josh
> >>>>
> >>>> Kevin Williams wrote:
> >>>>
> >>>>
> >>>>> OK, on WinXP / Ruby 1.8.4 I get an HTTP connection reset error. The
> >>>>> download link looks like this:
> >>>>>
> >>>>> http://localhost:3000/dl/?token=4c927cdb55be0efd4480298659a5e48306aca2c8&relative-path=foo.zip&timestamp=4498c369
> >>>>>
> >>>>> I get the same error on the Mac.
> >>>>>
> >>>>>
> >>>>> On 6/20/06, Kevin Williams wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> I've got Win32, Linux, & Mac - I don't remember which OS to be honest.
> >>>>>> I'll go back and test again and try to give you some useful info.
> >>>>>>
> >>>>>> On 6/20/06, Josh Ferguson wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> What OS? The gem is super early beta so it could use a lot of work. I've
> >>>>>>> only tested it on win32 which means there could be a whole host of
> >>>>>>> errors and bad coding practices for other systems..:)
> >>>>>>>
> >>>>>>> Josh Ferguson
> >>>>>>>
> >>>>>>> Kevin Williams wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> Has anyone had any success with the mongrel_secure_download gem? I
> >>>>>>>> keep getting "connection reset" errors.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> _______________________________________________
> >>>>>>> Mongrel-users mailing list
> >>>>>>> Mongrel-users at rubyforge.org
> >>>>>>> http://rubyforge.org/mailman/listinfo/mongrel-users
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> --
> >>>>>> Cheers,
> >>>>>>
> >>>>>> Kevin
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>> _______________________________________________
> >>>> Mongrel-users mailing list
> >>>> Mongrel-users at rubyforge.org
> >>>> http://rubyforge.org/mailman/listinfo/mongrel-users
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >> _______________________________________________
> >> Mongrel-users mailing list
> >> Mongrel-users at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/mongrel-users
> >>
> >>
> >
> >
> >
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Cheers,
Kevin
From zedshaw at zedshaw.com Wed Jun 21 22:38:13 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Wed, 21 Jun 2006 22:38:13 -0400
Subject: [Mongrel] mongrel lock ups
In-Reply-To:
References:
Message-ID: <1150943893.6020.4.camel@localhost.localdomain>
On Wed, 2006-06-21 at 17:13 -0400, Todd Fisher wrote:
> Thread # is too old, killing.
> Error calling Dispatcher.dispatch # thread.>
>
> I'm getting lockups
>
> I've seen this too:
> Shutdown waited 1 for 9 requests, could take 10 seconds.^MThread
> # is too old, killing.
> Error calling Dispatcher.dispatch # thread.>
This used to happen when the client closed the socket, but those should
all be gone. I might put in an additional debug for this in the dump
you have.
Take a look at your actions first and see if you're blocking on
something. This happens when you do network requests to other servers
(DNS isn't async), open files and block on them, using IO.popen or
similar process forking.
Let me know what you find. If you're at railsconf and got your code
handy I'd love to look at it. E-mail me offlist.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From dselph at gmail.com Thu Jun 22 14:04:33 2006
From: dselph at gmail.com (Doug Selph)
Date: Thu, 22 Jun 2006 13:04:33 -0500
Subject: [Mongrel] changing user/group on port 80
Message-ID:
I'm trying to run mongrel on port 80 and switch to a different
user/group from root. As root, this works:
mongrel_rails start -p 3000 -u rails --group rails
This:
mongrel_rails start -p 80 -u rails --group rails
dies with:
---------------------------
** Changing group to rails.
** Changing user to rails.
** Starting Mongrel listening at 0.0.0.0:80
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/lib/mongrel/tcphack.rb:24:in
`initialize_without_backlog': Permission denied - bind(2)
(Errno::EACCES) from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/lib/mongrel/tcphack.rb:24:in
`initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/lib/mongrel.rb:500:in
`initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/lib/mongrel.rb:822:in
`listener'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/bin/mongrel_rails:91:in
`cloaker_'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/lib/mongrel.rb:752:in
`initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/bin/mongrel_rails:78:in
`run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/lib/mongrel/command.rb:211:in
`run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1/bin/mongrel_rails:227
from /usr/local/bin/mongrel_rails:18
---------------------------
It appears that the mongrel process changes privilege before binding
to port 80, which of course is not allowed for non-root process. Is
there a workaround here?
From Will_Green at URSCorp.com Thu Jun 22 14:14:57 2006
From: Will_Green at URSCorp.com (Will_Green at URSCorp.com)
Date: Thu, 22 Jun 2006 14:14:57 -0400
Subject: [Mongrel] changing user/group on port 80
In-Reply-To:
Message-ID:
Port 80 is a privileged port, meaning only processes running as root can
bind to that port. Even though you are initiating the command as root, you
are telling mongrel it should run as user rails. Since rails != root,
mongrel will not run on port 80 as with any -u value other than root.
==
Will Green
Web Developer & IT Coordinator, URS Creative Imaging
http://www.urscreativeimaging.com/
This e-mail and any attachments are confidential. If you receive this
message in error or are not the intended recipient, you should not retain,
distribute, disclose or use any of this information and you should destroy
the e-mail and any attachments or copies.
"Doug Selph"
To
Sent by: mongrel-users at rubyforge.org
mongrel-users-bou cc
nces at rubyforge.or
g Subject
[Mongrel] changing user/group on
port 80
06/22/2006 02:04
PM
Please respond to
doug at dougselph.co
m; Please respond
to
mongrel-users at rub
yforge.org
I'm trying to run mongrel on port 80 and switch to a different
user/group from root. As root, this works:
mongrel_rails start -p 3000 -u rails --group rails
This:
mongrel_rails start -p 80 -u rails --group rails
dies with:
---------------------------
** Changing group to rails.
** Changing user to rails.
** Starting Mongrel listening at 0.0.0.0:80
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/lib/mongrel/tcphack.rb:24:in
`initialize_without_backlog': Permission denied - bind(2)
(Errno::EACCES) from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/lib/mongrel/tcphack.rb:24:in
`initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/lib/mongrel.rb:500:in
`initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/lib/mongrel.rb:822:in
`listener'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/bin/mongrel_rails:91:in
`cloaker_'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/lib/mongrel.rb:752:in
`initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/bin/mongrel_rails:78:in
`run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/lib/mongrel/command.rb:211:in
`run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.1
/bin/mongrel_rails:227
from /usr/local/bin/mongrel_rails:18
---------------------------
It appears that the mongrel process changes privilege before binding
to port 80, which of course is not allowed for non-root process. Is
there a workaround here?
_______________________________________________
Mongrel-users mailing list
Mongrel-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users
From jan.svitok at gmail.com Thu Jun 22 17:00:55 2006
From: jan.svitok at gmail.com (Jan Svitok)
Date: Thu, 22 Jun 2006 23:00:55 +0200
Subject: [Mongrel] changing user/group on port 80
In-Reply-To:
References:
Message-ID: <8d9b3d920606221400o36cadd2am9e1b4ea9adb5e7d7@mail.gmail.com>
Right. If you want to run under another user *and* on privileged port,
you must start mongrel as root, a and when the port is bound you can
have mongrel drop it's privileges by Process.uid= or
Process::UID.change_privilege.
Mongrel does this dropping (lib/mongrel.rb:725, in
Configurator#initialize) before the ports are bound (the block gets
executed right after the privileges drop). If these two were
exchanged, it might do what you want, although it may have other
implications, that I'm not able to tell now.
Jano
On 6/22/06, Will_Green at urscorp.com wrote:
> Port 80 is a privileged port, meaning only processes running as root can
> bind to that port. Even though you are initiating the command as root, you
> are telling mongrel it should run as user rails. Since rails != root,
> mongrel will not run on port 80 as with any -u value other than root.
From dselph at gmail.com Thu Jun 22 18:26:28 2006
From: dselph at gmail.com (Doug Selph)
Date: Thu, 22 Jun 2006 17:26:28 -0500
Subject: [Mongrel] changing user/group on port 80
In-Reply-To: <8d9b3d920606221400o36cadd2am9e1b4ea9adb5e7d7@mail.gmail.com>
References:
<8d9b3d920606221400o36cadd2am9e1b4ea9adb5e7d7@mail.gmail.com>
Message-ID:
Jan,
I had actually tried what you suggest (reversing the sequence of
change_privilege and port binding) prior to emailing the list. It did
allow me to get mongrel up as a non-root process listening on port 80,
but every request to my rails app got a http response of 500. I don't
know mongrel well enough to understand the reason for that, but as you
said, there were other implications. :)
Thanks for taking time to hunt it down and respond.
Doug
On 6/22/06, Jan Svitok wrote:
> Right. If you want to run under another user *and* on privileged port,
> you must start mongrel as root, a and when the port is bound you can
> have mongrel drop it's privileges by Process.uid= or
> Process::UID.change_privilege.
>
> Mongrel does this dropping (lib/mongrel.rb:725, in
> Configurator#initialize) before the ports are bound (the block gets
> executed right after the privileges drop). If these two were
> exchanged, it might do what you want, although it may have other
> implications, that I'm not able to tell now.
>
> Jano
>
> On 6/22/06, Will_Green at urscorp.com wrote:
> > Port 80 is a privileged port, meaning only processes running as root can
> > bind to that port. Even though you are initiating the command as root, you
> > are telling mongrel it should run as user rails. Since rails != root,
> > mongrel will not run on port 80 as with any -u value other than root.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
From jesuswasapurebreed.5.pistos at geoshell.com Thu Jun 22 16:49:41 2006
From: jesuswasapurebreed.5.pistos at geoshell.com (jesuswasapurebreed.5.pistos at geoshell.com)
Date: Thu, 22 Jun 2006 16:49:41 -0400
Subject: [Mongrel] eRuby/erb
Message-ID: <6c9d9ef0606221349r6dfc5df0i3b9a7177d289fbaf@mail.gmail.com>
Hello. Prospective Mongrel user here.
Can Mongrel act as a server for eruby or erb files?
Example:

The time is

Pistos
From dselph at gmail.com Fri Jun 23 18:56:00 2006
From: dselph at gmail.com (Doug Selph)
Date: Fri, 23 Jun 2006 22:56:00 +0000
Subject: [Mongrel] mongrel start oddities
Message-ID:
I am running mongrel-0.3.13.1. Have used lighty and fcgi in the past, and I
must say that apache-2.0.x proxying to mongrel is much nicer to deal with! I
am having this problem, however.
If I am in root's homedirectory, and start mongrel with this command:
---------
mongrel_rails start -a 127.0.0.1 -e production -c /home/www/rails/myapp -l
log/mongrel.log --user mongrel --group mongrel -p 8080 -d
---------
everybody is happy. Mongrel's happy. I'm happy.
However, if I am in the same location and issue this command (when no
mongrel is running, obviously):
---------
mongrel_rails start -C /etc/mongrel/mongrel_myapp.conf
---------
I get this error:
---------
!!! Path to log file not valid: log/mongrel.log
---------
Here are the contents of the YAML config file (which I generated from the
command line at the top of this message with a -G):
---------
---
:daemon: true
:cwd: /home/www/rails/myapp
:includes:
- mongrel
:log_file: log/mongrel.log
:config_script:
:pid_file: log/mongrel.pid
:group: rails
:num_processors: 1024
:environment: production
:timeout: 0
:docroot: public
:user: rails
:host: 127.0.0.1
:mime_map:
:debug: false
:port: "8080"
---------
It is as though options on the command line get parsed before the log file
path gets validated, but options in the config file are parsed *after* the
log file path is validated. Even fully qualifying the path to the log file
in the config file fails to eliminate the above error. Am I missing
something here? Or is this a bug in config file parsing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060623/2337623a/attachment.html
From dselph at gmail.com Fri Jun 23 19:06:10 2006
From: dselph at gmail.com (Doug Selph)
Date: Fri, 23 Jun 2006 18:06:10 -0500
Subject: [Mongrel] changing user/group on port 80
In-Reply-To: <8d9b3d920606221400o36cadd2am9e1b4ea9adb5e7d7@mail.gmail.com>
References:
<8d9b3d920606221400o36cadd2am9e1b4ea9adb5e7d7@mail.gmail.com>
Message-ID:
Jan,
An update here: I am now running mongrel behind an apache2 daemon that
is listening on port 80 and proxying to mongrel. However, I was
curious if something I encountered today would resolve the problem I
had after reversing the sequence of dropping privs and binding
privileged port, so I repeated that change on my dev box and tried it.
It turns out that the error I got when I tried that was a result of
the user specified with --user not owning the session files in
RAILS_ROOT/tmp/sessions. Once I corrected that condition, the change
in lib/mongrel.rb did the trick. Thought you might want to know that.
Thanks again for your response yesterday.
Doug
On 6/22/06, Jan Svitok wrote:
> Right. If you want to run under another user *and* on privileged port,
> you must start mongrel as root, a and when the port is bound you can
> have mongrel drop it's privileges by Process.uid= or
> Process::UID.change_privilege.
>
> Mongrel does this dropping (lib/mongrel.rb:725, in
> Configurator#initialize) before the ports are bound (the block gets
> executed right after the privileges drop). If these two were
> exchanged, it might do what you want, although it may have other
> implications, that I'm not able to tell now.
>
> Jano
>
> On 6/22/06, Will_Green at urscorp.com wrote:
> > Port 80 is a privileged port, meaning only processes running as root can
> > bind to that port. Even though you are initiating the command as root, you
> > are telling mongrel it should run as user rails. Since rails != root,
> > mongrel will not run on port 80 as with any -u value other than root.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
From zedshaw at zedshaw.com Sat Jun 24 13:24:33 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sat, 24 Jun 2006 13:24:33 -0400
Subject: [Mongrel] changing user/group on port 80
In-Reply-To:
References:
Message-ID: <1151169873.6166.12.camel@localhost.localdomain>
On Thu, 2006-06-22 at 13:04 -0500, Doug Selph wrote:
> I'm trying to run mongrel on port 80 and switch to a different
> user/group from root. As root, this works:
>
Hey Doug, make sure to try out the pre-release today and let me know if
it works for you.
Also, when you start to get into running Mongrel more as a real server,
I'm going to probably push back on feature requests. Mongrel was
specifically designed to be run as a non-privileged user on a higher
port in order to avoid these kinds of things. In reality if you're
running Mongrel you should put it behind another web server and let that
web server defend port 80 for you.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Sun Jun 25 10:46:54 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sun, 25 Jun 2006 10:46:54 -0400
Subject: [Mongrel] [ANN] Mongrel 0.3.13.2 -- RailsConf 2006 Release
Message-ID: <1151246814.6849.7.camel@localhost.localdomain>
Hello folks,
Another release going out based on the very limited work done at
RailsConf. Despite all the fun and the talks I did manage to squeeze in
some more defensive maneuvers for everyone's favorite canine ninja, and
sit down with Why and Rick Olsen to hook up the mongrel_upload_progress
plugin. They quickly working to get Rails and Camping gear to do nice
upload progress notifiers.
This release sports the following additions:
* Mongrel now defends against file starvation better by killing off
any threads that take longer than 60 seconds, but *only* if it has run
out of files.
* Small parts have extra functionality to allow you to add a
"notification filter". This filter is a handler that will get notified
about the entire HTTP process rather than just receive the final
request. Check out the mongrel_upload_progress gem to see how that
works.
* A few small fixes, mostly in the errors that are printed out.
* The new mongrel_upload_progress plugin by Why and Rick that gives
you the goodies.
INSTALLING
As usual you can install with any of the following commands:
gem install mongrel
--
gem update
--
gem update mongrel
--
gem install mongrel --source=http://mongrel.rubyforge.org/releases
If one doesn't work, try the others, try uninstalling first, and try
reading the RubyGems documentation.
Finally, you might have to wait a bit while the mirrors get updated and
while I flip over to win32 to actually post their build. Should by up
by 10:30am CDT.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Sat Jun 24 13:15:35 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Sat, 24 Jun 2006 13:15:35 -0400
Subject: [Mongrel] [ANN] Mongrel 0.3.13.2 Pre-Release -- RailsConf
Message-ID: <1151169335.6166.5.camel@localhost.localdomain>
Hey Folks,
I've been meeting lots of great folks at RailsConf and in my spare time
hacking up this latest pre-release of Mongrel. It features the
following new goodies:
* Change to user:group is done *after* the socket is bound, but still as
early as possible.
* Mongrel will try to reap dead threads as soon as possible, especially
when it gets overloaded with too many open files.
* Minor tweaks to documentation.
I'm not making this release official until after RailsConf because I
want to see folks use it. It should help prevent more situations where
Mongrel can go into a state where it's not listening anymore. Next
thing to come is the ability to set how long a thread has to be active
before it's considered old.
INSTALLING
As usual:
gem install mongrel --source=http://mongrel.rubyforge.org/
No win32 on this one since I'm going to release it officially right
away.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From cj at syntheticplayground.com Mon Jun 26 18:22:12 2006
From: cj at syntheticplayground.com (Corey Jewett)
Date: Mon, 26 Jun 2006 15:22:12 -0700
Subject: [Mongrel] eRuby/erb
In-Reply-To: <6c9d9ef0606221349r6dfc5df0i3b9a7177d289fbaf@mail.gmail.com>
References: <6c9d9ef0606221349r6dfc5df0i3b9a7177d289fbaf@mail.gmail.com>
Message-ID: <5A871A2B-59EA-43AF-93B2-410819D0BFDE@syntheticplayground.com>
I imagine you could hack DirHandler (in handlers.rb) in about 10
minutes to have this functionality.
Corey
On Jun 22, 2006, at 1:49 PM, jesuswasapurebreed.5.pistos at geoshell.com
wrote:
> Hello. Prospective Mongrel user here.
>
> Can Mongrel act as a server for eruby or erb files?
>
> Example:
>
>
>
>

The time is

>
>
>
> Pistos
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
Corey
From zedshaw at zedshaw.com Mon Jun 26 19:26:10 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 26 Jun 2006 19:26:10 -0400
Subject: [Mongrel] eRuby/erb
In-Reply-To: <6c9d9ef0606221349r6dfc5df0i3b9a7177d289fbaf@mail.gmail.com>
References: <6c9d9ef0606221349r6dfc5df0i3b9a7177d289fbaf@mail.gmail.com>
Message-ID: <1151364370.6118.11.camel@localhost.localdomain>
On Thu, 2006-06-22 at 16:49 -0400,
jesuswasapurebreed.5.pistos at geoshell.com wrote:
> Hello. Prospective Mongrel user here.
>
> Can Mongrel act as a server for eruby or erb files?
>
Yep, but it'd be difficult since you'd be working right at the bare
metal of HTTP protocol. Rails is much much better unless you have a
specific need to make a small part faster and can't get rails to go.
If you want to do this, check out the code from svn (or browse it) and
take a look at all of the handlers in the lib/mongrel/handlers.rb file.
The ones there run the range of simple status handlers to gzip output
filters. There's also the mongrel_upload_progress gem which gives you a
handler done as a ruby gem.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From zedshaw at zedshaw.com Mon Jun 26 19:27:38 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Mon, 26 Jun 2006 19:27:38 -0400
Subject: [Mongrel] mongrel start oddities
In-Reply-To:
References:
Message-ID: <1151364458.6118.13.camel@localhost.localdomain>
On Fri, 2006-06-23 at 22:56 +0000, Doug Selph wrote:
> I am running mongrel-0.3.13.1. Have used lighty and fcgi in the past,
> and I must say that apache-2.0.x proxying to mongrel is much nicer to
> deal with! I am having this problem, however.
>
> However, if I am in the same location and issue this command (when no
> mongrel is running, obviously):
>
> ---------
> mongrel_rails start -C /etc/mongrel/mongrel_myapp.conf
> ---------
Hey Doug, that's something I have to change soon. For now just specify
the full path to the log and pid file manually and the problem will go
away.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From paul.vudmaska at gmail.com Tue Jun 27 11:24:28 2006
From: paul.vudmaska at gmail.com (paul.vudmaska at gmail.com)
Date: Tue, 27 Jun 2006 10:24:28 -0500
Subject: [Mongrel] Bare naked server
Message-ID:
Thanks, Zed, for mongrel :!)
I've been on TextDrive for some time running my sites behind apache
w/lighttpd. Once it got running it was cool enough. When it ran. And
there was still the webmin dance and all.
So I decided to set things up on my little dedicated redhat server -
since I'd had so much success locally w/mongrel. Fast. Simple. It has
been great and I managed to move all my sites into it and off TD.
Smooth as glass thus far. So, I decided I did not need no stinking
apache ;-)
Zed said :
>Mongrel was
>specifically designed to be run as a non-privileged user on a higher
>port in order to avoid these kinds of things. In reality if you're
>running Mongrel you should put it behind another web server and let that
>web server defend port 80 for you.
Doh. My understanding was that running a server in front of apache was
primarily because apache(other) was good/better at serving static
files. But since my performance thus far has been good(much faster now
than apache/mod_ruby) I've not sweat it.(thinking in the future I'd
serve images from another server if nec.)
Are there other reasons, besides load, that I might be stupid for
leaving mongrel running bare on port 80? Are the mongrel police going
to come get me?
I did have one interesting error that was being thrown because I was
unable to grab the host name for a request. For some reason
http:///w00tw00t.at.ISC.SANS.DFind: was landing on my port. I'm
sending :status => 404 now(rather than dieing, which is caught by
exception notifier) Are these the type of things I should be worried
about?
http://www.atlink.it/~conti/2006/03/04/w00tw00tatiscsansdfind-update/
From luislavena at gmail.com Tue Jun 27 13:02:03 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Tue, 27 Jun 2006 14:02:03 -0300
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
Message-ID: <71166b3b0606271002p622cbc2bkb45e22b2644f5acd@mail.gmail.com>
Oh well, needed a good subject, sounds funny enough?
http://dev.rubyonrails.org/ticket/5475
Add "automatic" mongrel support to script/server
Status: closed, commited in rev #4486.
That is good news, right?
Ok, back to work, enoguh relax for me ;-)
--
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
From banshee at banshee.com Tue Jun 27 14:02:21 2006
From: banshee at banshee.com (James Moore)
Date: Tue, 27 Jun 2006 11:02:21 -0700
Subject: [Mongrel] Bare naked server
In-Reply-To:
Message-ID: <01e501c69a13$d639b4c0$6401a8c0@BansheeSoftware.local>
Multiple incoming requests? Mongrel (or, more specifically, Rails itself)
can only handle a single request at a time, right?
- James Moore
From zedshaw at zedshaw.com Tue Jun 27 14:08:37 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Tue, 27 Jun 2006 14:08:37 -0400
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
In-Reply-To: <71166b3b0606271002p622cbc2bkb45e22b2644f5acd@mail.gmail.com>
References: <71166b3b0606271002p622cbc2bkb45e22b2644f5acd@mail.gmail.com>
Message-ID: <1151431717.7791.37.camel@localhost.localdomain>
On Tue, 2006-06-27 at 14:02 -0300, Luis Lavena wrote:
> Oh well, needed a good subject, sounds funny enough?
>
> http://dev.rubyonrails.org/ticket/5475
>
> Add "automatic" mongrel support to script/server
>
> Status: closed, commited in rev #4486.
>
> That is good news, right?
>
> Ok, back to work, enoguh relax for me ;-)
>
Yeah man, it's very cool. If people have mongrel installed then they
can do script/server mongrel and it'll start right up. Should make lots
of folks happy.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
From amiroff at gmail.com Tue Jun 27 14:14:29 2006
From: amiroff at gmail.com (Metin Amiroff)
Date: Tue, 27 Jun 2006 21:14:29 +0300
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
In-Reply-To: <1151431717.7791.37.camel@localhost.localdomain>
References: <71166b3b0606271002p622cbc2bkb45e22b2644f5acd@mail.gmail.com>
<1151431717.7791.37.camel@localhost.localdomain>
Message-ID: <9328906b0606271114l7d053007vc3f792053dec5b43@mail.gmail.com>
Is there any reason for not including Mongrel as a default RoR application
server besides that "Made with %100 Ruby" argument?
Now, _that_ would make even more folks happy...
On 6/27/06, Zed Shaw wrote:
>
> On Tue, 2006-06-27 at 14:02 -0300, Luis Lavena wrote:
> > Oh well, needed a good subject, sounds funny enough?
> >
> > http://dev.rubyonrails.org/ticket/5475
> >
> > Add "automatic" mongrel support to script/server
> >
> > Status: closed, commited in rev #4486.
> >
> > That is good news, right?
> >
> > Ok, back to work, enoguh relax for me ;-)
> >
>
> Yeah man, it's very cool. If people have mongrel installed then they
> can do script/server mongrel and it'll start right up. Should make lots
> of folks happy.
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
--
Pace Peace Paix Paz Frieden Pax Pok?j Fri?ur Fred B?ke
Hasiti Lap? Hetep Malu M?? Wolakota Santiphap Irini Peoch
Shanti Vrede Bar?? R?j M?r Taika Rongo S?lh Py'guapy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060627/95100586/attachment.html
From paul.vudmaska at gmail.com Tue Jun 27 14:36:45 2006
From: paul.vudmaska at gmail.com (paul.vudmaska at gmail.com)
Date: Tue, 27 Jun 2006 13:36:45 -0500
Subject: [Mongrel] Bare naked server
In-Reply-To: <01e501c69a13$d639b4c0$6401a8c0@BansheeSoftware.local>
References:
<01e501c69a13$d639b4c0$6401a8c0@BansheeSoftware.local>
Message-ID:
Hmm, I did not know - that would be a good reason :) So, apache,
lighty and all divvy up the requests so mongrel does not have to?
On TD, I figured we were using apache/lighty so multiple ports could
be used - and therefor use a shared ip, with a lot of instances of
lighty(which I was thinking played a role in the server dying so
much). I thought that was the main reason.
From Daniel.Berger at qwest.com Tue Jun 27 15:04:53 2006
From: Daniel.Berger at qwest.com (Berger, Daniel)
Date: Tue, 27 Jun 2006 14:04:53 -0500
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
Message-ID: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
>-----Original Message-----
>From: mongrel-users-bounces at rubyforge.org
[mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
>Sent: Tuesday, June 27, 2006 12:14 PM
>To: mongrel-users at rubyforge.org
>Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
>Is there any reason for not including Mongrel as a default RoR
application server besides that "Made with %100 Ruby" argument?
That would require making Mongrel a required dependency for RoR. I
dunno that they want to do that.
Regards,
Dan
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
From mrueckert at suse.de Tue Jun 27 15:09:21 2006
From: mrueckert at suse.de (Marcus Rueckert)
Date: Tue, 27 Jun 2006 21:09:21 +0200
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
In-Reply-To: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
References: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
Message-ID: <20060627190921.GH5504@suse.de>
On 2006-06-27 14:04:53 -0500, Berger, Daniel wrote:
> >-----Original Message-----
> >From: mongrel-users-bounces at rubyforge.org
> [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
> >Sent: Tuesday, June 27, 2006 12:14 PM
> >To: mongrel-users at rubyforge.org
> >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
>
> >Is there any reason for not including Mongrel as a default RoR
> application server besides that "Made with %100 Ruby" argument?
>
> That would require making Mongrel a required dependency for RoR. I
> dunno that they want to do that.
why?
lighttpd isnt an hard requirement and preferred if found aswell.
so you could do the same with mongrel.
a simple:
begin
require "mongrel"
rescue
should do it no?:)
darix
--
openSUSE - SUSE Linux is my linux
openSUSE is good for you
www.opensuse.org
From luislavena at gmail.com Tue Jun 27 15:13:42 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Tue, 27 Jun 2006 16:13:42 -0300
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
In-Reply-To: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
References: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
Message-ID: <71166b3b0606271213u7fc7e483y337433ecb3410280@mail.gmail.com>
On 6/27/06, Berger, Daniel wrote:
> >-----Original Message-----
> >From: mongrel-users-bounces at rubyforge.org
> [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
> >Sent: Tuesday, June 27, 2006 12:14 PM
> >To: mongrel-users at rubyforge.org
> >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
>
> >Is there any reason for not including Mongrel as a default RoR
> application server besides that "Made with %100 Ruby" argument?
>
> That would require making Mongrel a required dependency for RoR. I
> dunno that they want to do that.
>
Actually if mongrel is installed, will run with it, if not, will
default to webrick (like was doing with lighty, now plus mongrel). Is
up to the developer to install mongrel or not, anyway your rails
applications will work.
http://dev.rubyonrails.org/changeset/4486
--
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
From luislavena at gmail.com Tue Jun 27 15:15:11 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Tue, 27 Jun 2006 16:15:11 -0300
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
In-Reply-To: <20060627190921.GH5504@suse.de>
References: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
<20060627190921.GH5504@suse.de>
Message-ID: <71166b3b0606271215r671e4195o650364db8510ed58@mail.gmail.com>
On 6/27/06, Marcus Rueckert wrote:
> On 2006-06-27 14:04:53 -0500, Berger, Daniel wrote:
> > >-----Original Message-----
> > >From: mongrel-users-bounces at rubyforge.org
> > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
> > >Sent: Tuesday, June 27, 2006 12:14 PM
> > >To: mongrel-users at rubyforge.org
> > >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> >
> > >Is there any reason for not including Mongrel as a default RoR
> > application server besides that "Made with %100 Ruby" argument?
> >
> > That would require making Mongrel a required dependency for RoR. I
> > dunno that they want to do that.
>
> why?
> lighttpd isnt an hard requirement and preferred if found aswell.
> so you could do the same with mongrel.
>
> a simple:
>
> begin
> require "mongrel"
> rescue
>
> should do it no?:)
>
yeah, it does:
http://rails.techno-weenie.net/question/2006/6/23/starting-mongrel-with-script-server
I replaced my script/server with the one I proposed on that page, long time ago.
--
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
From Daniel.Berger at qwest.com Tue Jun 27 15:15:08 2006
From: Daniel.Berger at qwest.com (Berger, Daniel)
Date: Tue, 27 Jun 2006 14:15:08 -0500
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
Message-ID: <39AA6550E5AA554AB1456707D6E5563D0259E6EB@QTOMAE2K3M01.AD.QINTRA.COM>
> -----Original Message-----
> From: mongrel-users-bounces at rubyforge.org
> [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Luis Lavena
> Sent: Tuesday, June 27, 2006 1:14 PM
> To: mongrel-users at rubyforge.org
> Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
>
>
> On 6/27/06, Berger, Daniel wrote:
> > >-----Original Message-----
> > >From: mongrel-users-bounces at rubyforge.org
> > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin
> > Amiroff
> > >Sent: Tuesday, June 27, 2006 12:14 PM
> > >To: mongrel-users at rubyforge.org
> > >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> >
> > >Is there any reason for not including Mongrel as a default RoR
> > application server besides that "Made with %100 Ruby" argument?
> >
> > That would require making Mongrel a required dependency for RoR. I
> > dunno that they want to do that.
> >
>
> Actually if mongrel is installed, will run with it, if not,
> will default to webrick (like was doing with lighty, now plus
> mongrel). Is up to the developer to install mongrel or not,
> anyway your rails applications will work.
>
> http://dev.rubyonrails.org/changeset/4486
Ah, ok. Thanks for the correction Luis.
Dan
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
From jamie at dangosaur.us Tue Jun 27 15:18:41 2006
From: jamie at dangosaur.us (Jamie Orchard-Hays)
Date: Tue, 27 Jun 2006 15:18:41 -0400
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
In-Reply-To: <71166b3b0606271213u7fc7e483y337433ecb3410280@mail.gmail.com>
References: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
<71166b3b0606271213u7fc7e483y337433ecb3410280@mail.gmail.com>
Message-ID: <19F909C2-FB6E-4CE7-8B7C-0CAC1E141D1C@dangosaur.us>
Interesting that LightTPD supersedes mongrel. I'd thing it'd be the
other way. Perhaps b/c mongrel doesn't yet output sql statements like
LightTPD?
On Jun 27, 2006, at 3:13 PM, Luis Lavena wrote:
>
> Actually if mongrel is installed, will run with it, if not, will
> default to webrick (like was doing with lighty, now plus mongrel). Is
> up to the developer to install mongrel or not, anyway your rails
> applications will work.
>
> http://dev.rubyonrails.org/changeset/4486
From paul.vudmaska at gmail.com Tue Jun 27 15:37:21 2006
From: paul.vudmaska at gmail.com (paul.vudmaska at gmail.com)
Date: Tue, 27 Jun 2006 14:37:21 -0500
Subject: [Mongrel] using mongrel on port 80
Message-ID:
Just so you know, I've read the manual :)
http://mongrel.rubyforge.org/docs/choosing_deployment.html
No php or ssl needed - that is me - simple. So I should be good to go
but thought I'd ask. BTW, sorry about the stupid subject. Listening to
BNL, you know ;)
On 6/27/06, mongrel-users-request at rubyforge.org
wrote:
> Send Mongrel-users mailing list submissions to
> mongrel-users at rubyforge.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://rubyforge.org/mailman/listinfo/mongrel-users
> or, via email, send a message with subject or body 'help' to
> mongrel-users-request at rubyforge.org
>
> You can reach the person managing the list at
> mongrel-users-owner at rubyforge.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Mongrel-users digest..."
>
>
> Today's Topics:
>
> 1. Re: mongrel start oddities (Zed Shaw)
> 2. Bare naked server (paul.vudmaska at gmail.com)
> 3. Mongrel, sit!, good god! -- said Rails core. (Luis Lavena)
> 4. Re: Bare naked server (James Moore)
> 5. Re: Mongrel, sit!, good god! -- said Rails core. (Zed Shaw)
> 6. Re: Mongrel, sit!, good god! -- said Rails core. (Metin Amiroff)
> 7. Re: Bare naked server (paul.vudmaska at gmail.com)
> 8. Re: Mongrel, sit!, good god! -- said Rails core. (Berger, Daniel)
> 9. Re: Mongrel, sit!, good god! -- said Rails core. (Marcus Rueckert)
> 10. Re: Mongrel, sit!, good god! -- said Rails core. (Luis Lavena)
> 11. Re: Mongrel, sit!, good god! -- said Rails core. (Luis Lavena)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 26 Jun 2006 19:27:38 -0400
> From: Zed Shaw
> Subject: Re: [Mongrel] mongrel start oddities
> To: doug at dougselph.com, mongrel-users at rubyforge.org
> Message-ID: <1151364458.6118.13.camel at localhost.localdomain>
> Content-Type: text/plain
>
> On Fri, 2006-06-23 at 22:56 +0000, Doug Selph wrote:
> > I am running mongrel-0.3.13.1. Have used lighty and fcgi in the past,
> > and I must say that apache-2.0.x proxying to mongrel is much nicer to
> > deal with! I am having this problem, however.
> >
>
> > However, if I am in the same location and issue this command (when no
> > mongrel is running, obviously):
> >
> > ---------
> > mongrel_rails start -C /etc/mongrel/mongrel_myapp.conf
> > ---------
>
> Hey Doug, that's something I have to change soon. For now just specify
> the full path to the log and pid file manually and the problem will go
> away.
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 27 Jun 2006 10:24:28 -0500
> From: paul.vudmaska at gmail.com
> Subject: [Mongrel] Bare naked server
> To: mongrel-users at rubyforge.org
> Message-ID:
>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Thanks, Zed, for mongrel :!)
>
> I've been on TextDrive for some time running my sites behind apache
> w/lighttpd. Once it got running it was cool enough. When it ran. And
> there was still the webmin dance and all.
>
> So I decided to set things up on my little dedicated redhat server -
> since I'd had so much success locally w/mongrel. Fast. Simple. It has
> been great and I managed to move all my sites into it and off TD.
> Smooth as glass thus far. So, I decided I did not need no stinking
> apache ;-)
>
> Zed said :
> >Mongrel was
> >specifically designed to be run as a non-privileged user on a higher
> >port in order to avoid these kinds of things. In reality if you're
> >running Mongrel you should put it behind another web server and let that
> >web server defend port 80 for you.
>
> Doh. My understanding was that running a server in front of apache was
> primarily because apache(other) was good/better at serving static
> files. But since my performance thus far has been good(much faster now
> than apache/mod_ruby) I've not sweat it.(thinking in the future I'd
> serve images from another server if nec.)
>
> Are there other reasons, besides load, that I might be stupid for
> leaving mongrel running bare on port 80? Are the mongrel police going
> to come get me?
>
> I did have one interesting error that was being thrown because I was
> unable to grab the host name for a request. For some reason
> http:///w00tw00t.at.ISC.SANS.DFind: was landing on my port. I'm
> sending :status => 404 now(rather than dieing, which is caught by
> exception notifier) Are these the type of things I should be worried
> about?
>
> http://www.atlink.it/~conti/2006/03/04/w00tw00tatiscsansdfind-update/
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 27 Jun 2006 14:02:03 -0300
> From: "Luis Lavena"
> Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> To: mongrel-users at rubyforge.org
> Message-ID:
> <71166b3b0606271002p622cbc2bkb45e22b2644f5acd at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Oh well, needed a good subject, sounds funny enough?
>
> http://dev.rubyonrails.org/ticket/5475
>
> Add "automatic" mongrel support to script/server
>
> Status: closed, commited in rev #4486.
>
> That is good news, right?
>
> Ok, back to work, enoguh relax for me ;-)
>
> --
> 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
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 27 Jun 2006 11:02:21 -0700
> From: "James Moore"
> Subject: Re: [Mongrel] Bare naked server
> To: ,
> Message-ID: <01e501c69a13$d639b4c0$6401a8c0 at BansheeSoftware.local>
> Content-Type: text/plain; charset="us-ascii"
>
> Multiple incoming requests? Mongrel (or, more specifically, Rails itself)
> can only handle a single request at a time, right?
>
> - James Moore
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 27 Jun 2006 14:08:37 -0400
> From: Zed Shaw
> Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> To: mongrel-users at rubyforge.org
> Message-ID: <1151431717.7791.37.camel at localhost.localdomain>
> Content-Type: text/plain
>
> On Tue, 2006-06-27 at 14:02 -0300, Luis Lavena wrote:
> > Oh well, needed a good subject, sounds funny enough?
> >
> > http://dev.rubyonrails.org/ticket/5475
> >
> > Add "automatic" mongrel support to script/server
> >
> > Status: closed, commited in rev #4486.
> >
> > That is good news, right?
> >
> > Ok, back to work, enoguh relax for me ;-)
> >
>
> Yeah man, it's very cool. If people have mongrel installed then they
> can do script/server mongrel and it'll start right up. Should make lots
> of folks happy.
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 27 Jun 2006 21:14:29 +0300
> From: "Metin Amiroff"
> Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> To: mongrel-users at rubyforge.org
> Message-ID:
> <9328906b0606271114l7d053007vc3f792053dec5b43 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Is there any reason for not including Mongrel as a default RoR application
> server besides that "Made with %100 Ruby" argument?
>
> Now, _that_ would make even more folks happy...
>
> On 6/27/06, Zed Shaw wrote:
> >
> > On Tue, 2006-06-27 at 14:02 -0300, Luis Lavena wrote:
> > > Oh well, needed a good subject, sounds funny enough?
> > >
> > > http://dev.rubyonrails.org/ticket/5475
> > >
> > > Add "automatic" mongrel support to script/server
> > >
> > > Status: closed, commited in rev #4486.
> > >
> > > That is good news, right?
> > >
> > > Ok, back to work, enoguh relax for me ;-)
> > >
> >
> > Yeah man, it's very cool. If people have mongrel installed then they
> > can do script/server mongrel and it'll start right up. Should make lots
> > of folks happy.
> >
> >
> > --
> > Zed A. Shaw
> > http://www.zedshaw.com/
> > http://mongrel.rubyforge.org/
> >
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
>
>
>
> --
> Pace Peace Paix Paz Frieden Pax Pok?j Fri?ur Fred B?ke
> Hasiti Lap? Hetep Malu M?? Wolakota Santiphap Irini Peoch
> Shanti Vrede Bar?? R?j M?r Taika Rongo S?lh Py'guapy
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060627/95100586/attachment-0001.html
>
> ------------------------------
>
> Message: 7
> Date: Tue, 27 Jun 2006 13:36:45 -0500
> From: paul.vudmaska at gmail.com
> Subject: Re: [Mongrel] Bare naked server
> To: "James Moore" , mongrel-users at rubyforge.org
> Message-ID:
>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hmm, I did not know - that would be a good reason :) So, apache,
> lighty and all divvy up the requests so mongrel does not have to?
>
> On TD, I figured we were using apache/lighty so multiple ports could
> be used - and therefor use a shared ip, with a lot of instances of
> lighty(which I was thinking played a role in the server dying so
> much). I thought that was the main reason.
>
>
> ------------------------------
>
> Message: 8
> Date: Tue, 27 Jun 2006 14:04:53 -0500
> From: "Berger, Daniel"
> Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> To:
> Message-ID:
> <39AA6550E5AA554AB1456707D6E5563D0259E6E9 at QTOMAE2K3M01.AD.QINTRA.COM>
> Content-Type: text/plain; charset="us-ascii"
>
> >-----Original Message-----
> >From: mongrel-users-bounces at rubyforge.org
> [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
> >Sent: Tuesday, June 27, 2006 12:14 PM
> >To: mongrel-users at rubyforge.org
> >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
>
> >Is there any reason for not including Mongrel as a default RoR
> application server besides that "Made with %100 Ruby" argument?
>
> That would require making Mongrel a required dependency for RoR. I
> dunno that they want to do that.
>
> Regards,
>
> Dan
>
>
> This communication is the property of Qwest and may contain confidential or
> privileged information. Unauthorized use of this communication is strictly
> prohibited and may be unlawful. If you have received this communication
> in error, please immediately notify the sender by reply e-mail and destroy
> all copies of the communication and any attachments.
>
>
> ------------------------------
>
> Message: 9
> Date: Tue, 27 Jun 2006 21:09:21 +0200
> From: Marcus Rueckert
> Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> To: mongrel-users at rubyforge.org
> Message-ID: <20060627190921.GH5504 at suse.de>
> Content-Type: text/plain; charset=us-ascii
>
> On 2006-06-27 14:04:53 -0500, Berger, Daniel wrote:
> > >-----Original Message-----
> > >From: mongrel-users-bounces at rubyforge.org
> > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
> > >Sent: Tuesday, June 27, 2006 12:14 PM
> > >To: mongrel-users at rubyforge.org
> > >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> >
> > >Is there any reason for not including Mongrel as a default RoR
> > application server besides that "Made with %100 Ruby" argument?
> >
> > That would require making Mongrel a required dependency for RoR. I
> > dunno that they want to do that.
>
> why?
> lighttpd isnt an hard requirement and preferred if found aswell.
> so you could do the same with mongrel.
>
> a simple:
>
> begin
> require "mongrel"
> rescue
>
> should do it no?:)
>
> darix
>
> --
> openSUSE - SUSE Linux is my linux
> openSUSE is good for you
> www.opensuse.org
>
>
> ------------------------------
>
> Message: 10
> Date: Tue, 27 Jun 2006 16:13:42 -0300
> From: "Luis Lavena"
> Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> To: mongrel-users at rubyforge.org
> Message-ID:
> <71166b3b0606271213u7fc7e483y337433ecb3410280 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 6/27/06, Berger, Daniel wrote:
> > >-----Original Message-----
> > >From: mongrel-users-bounces at rubyforge.org
> > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
> > >Sent: Tuesday, June 27, 2006 12:14 PM
> > >To: mongrel-users at rubyforge.org
> > >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> >
> > >Is there any reason for not including Mongrel as a default RoR
> > application server besides that "Made with %100 Ruby" argument?
> >
> > That would require making Mongrel a required dependency for RoR. I
> > dunno that they want to do that.
> >
>
> Actually if mongrel is installed, will run with it, if not, will
> default to webrick (like was doing with lighty, now plus mongrel). Is
> up to the developer to install mongrel or not, anyway your rails
> applications will work.
>
> http://dev.rubyonrails.org/changeset/4486
>
>
> --
> 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
>
>
> ------------------------------
>
> Message: 11
> Date: Tue, 27 Jun 2006 16:15:11 -0300
> From: "Luis Lavena"
> Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> To: mongrel-users at rubyforge.org
> Message-ID:
> <71166b3b0606271215r671e4195o650364db8510ed58 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 6/27/06, Marcus Rueckert wrote:
> > On 2006-06-27 14:04:53 -0500, Berger, Daniel wrote:
> > > >-----Original Message-----
> > > >From: mongrel-users-bounces at rubyforge.org
> > > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Metin Amiroff
> > > >Sent: Tuesday, June 27, 2006 12:14 PM
> > > >To: mongrel-users at rubyforge.org
> > > >Subject: Re: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
> > >
> > > >Is there any reason for not including Mongrel as a default RoR
> > > application server besides that "Made with %100 Ruby" argument?
> > >
> > > That would require making Mongrel a required dependency for RoR. I
> > > dunno that they want to do that.
> >
> > why?
> > lighttpd isnt an hard requirement and preferred if found aswell.
> > so you could do the same with mongrel.
> >
> > a simple:
> >
> > begin
> > require "mongrel"
> > rescue
> >
> > should do it no?:)
> >
>
> yeah, it does:
>
> http://rails.techno-weenie.net/question/2006/6/23/starting-mongrel-with-script-server
>
> I replaced my script/server with the one I proposed on that page, long time ago.
>
> --
> 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
>
>
> ------------------------------
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
> End of Mongrel-users Digest, Vol 5, Issue 17
> ********************************************
>
From brianm at apache.org Tue Jun 27 19:19:45 2006
From: brianm at apache.org (Brian McCallister)
Date: Wed, 28 Jun 2006 01:19:45 +0200
Subject: [Mongrel] Mongrel, sit!, good god! -- said Rails core.
In-Reply-To: <19F909C2-FB6E-4CE7-8B7C-0CAC1E141D1C@dangosaur.us>
References: <39AA6550E5AA554AB1456707D6E5563D0259E6E9@QTOMAE2K3M01.AD.QINTRA.COM>
<71166b3b0606271213u7fc7e483y337433ecb3410280@mail.gmail.com>
<19F909C2-FB6E-4CE7-8B7C-0CAC1E141D1C@dangosaur.us>
Message-ID: <09778727-5779-4132-B459-ECEBD22E5743@apache.org>
Perhaps the crippling lack of keep-alive?
-Brian
On Jun 27, 2006, at 9:18 PM, Jamie Orchard-Hays wrote:
> Interesting that LightTPD supersedes mongrel. I'd thing it'd be the
> other way. Perhaps b/c mongrel doesn't yet output sql statements like
> LightTPD?
>
>
> On Jun 27, 2006, at 3:13 PM, Luis Lavena wrote:
>
>>
>> Actually if mongrel is installed, will run with it, if not, will
>> default to webrick (like was doing with lighty, now plus mongrel). Is
>> up to the developer to install mongrel or not, anyway your rails
>> applications will work.
>>
>> http://dev.rubyonrails.org/changeset/4486
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
From zedshaw at zedshaw.com Wed Jun 28 21:04:37 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Wed, 28 Jun 2006 21:04:37 -0400
Subject: [Mongrel] [ANN] Mongrel 0.3.13.3 Needs Debuggers
Message-ID: <1151543077.6672.6.camel@localhost.localdomain>
Hi Everyone,
I have a small pre-release for Mongrel that will eventually be the
0.3.13.3 release, but it needs some quick testing before I make it
official. There's a bug for only some folks and I need to find out
what's causing it.
The bug is that the object_id method gets the signature:
def object_id(param)
end
Which is incredibly evil. Normally this does nothing to Mongrel, but
when people turn on the debug logging (-B option) it causes problems.
HOW TO TEST
All you need to do is install Mongrel *in a safe place* (like not
production) using:
gem install mongrel --source=http://mongrel.rubyforge.org/releases/
And run your rails application with the -B option:
mongrel_rails start -B
Run any Selenium/Watir tests or other ways to touch key parts of the
app, and then send me any "TELL ZED" messages printed out.
OTHER CHANGES
Otherwise, the only change was Mongrel will now print out the "access
log" when you run it in the console. Let me know if people like or hate
this.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.railsmachine.com/ -- Need Mongrel support?
From talk2sunder at gmail.com Wed Jun 28 22:27:12 2006
From: talk2sunder at gmail.com (Sunder )
Date: Wed, 28 Jun 2006 19:27:12 -0700
Subject: [Mongrel] [ANN] Mongrel 0.3.13.3 Needs Debuggers
In-Reply-To: <1151543077.6672.6.camel@localhost.localdomain>
References: <1151543077.6672.6.camel@localhost.localdomain>
Message-ID:
Nothing in my first round of tests. Would the message be in the
objects.log? I did a grep on all my log files and found nothing. I
will leave it
running and see if anything shows up.
Sunder
On 6/28/06, Zed Shaw wrote:
>
> Hi Everyone,
>
> I have a small pre-release for Mongrel that will eventually be the
> 0.3.13.3 release, but it needs some quick testing before I make it
> official. There's a bug for only some folks and I need to find out
> what's causing it.
>
> The bug is that the object_id method gets the signature:
>
> def object_id(param)
> end
>
> Which is incredibly evil. Normally this does nothing to Mongrel, but
> when people turn on the debug logging (-B option) it causes problems.
>
> HOW TO TEST
>
> All you need to do is install Mongrel *in a safe place* (like not
> production) using:
>
> gem install mongrel --source=http://mongrel.rubyforge.org/releases/
>
> And run your rails application with the -B option:
>
> mongrel_rails start -B
>
> Run any Selenium/Watir tests or other ways to touch key parts of the
> app, and then send me any "TELL ZED" messages printed out.
>
>
> OTHER CHANGES
>
> Otherwise, the only change was Mongrel will now print out the "access
> log" when you run it in the console. Let me know if people like or hate
> this.
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
> http://www.railsmachine.com/ -- Need Mongrel support?
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060628/da2066e8/attachment-0001.html
From zedshaw at zedshaw.com Wed Jun 28 22:50:41 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Wed, 28 Jun 2006 22:50:41 -0400
Subject: [Mongrel] [ANN] Mongrel 0.3.13.3 Needs Debuggers
In-Reply-To:
References: <1151543077.6672.6.camel@localhost.localdomain>
Message-ID: <1151549441.8541.0.camel@localhost.localdomain>
On Wed, 2006-06-28 at 19:27 -0700, Sunder wrote:
> Nothing in my first round of tests. Would the message be in the
> objects.log ? I did a grep on all my log files and found nothing. I
> will leave it running and see if anything shows up.
Nope, just right to your console. Trust me, you'll know when/if it
happens.
You probably don't have the problem. Thanks for testing it, and try a
couple other apps if you get a chance.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.railsmachine.com/ -- Need Mongrel support?
From jburks725 at gmail.com Thu Jun 29 08:14:00 2006
From: jburks725 at gmail.com (Jason Burks)
Date: Thu, 29 Jun 2006 08:14:00 -0400
Subject: [Mongrel] Memory usage issues
Message-ID: <9bbab4e0606290514o6130f012qeac67b1a4a2e099b@mail.gmail.com>
Hello all,
I'm new to Mongrel and am very impressed with what I see so far. This
thing beats FastCGI hands down, and is even simpler to use than SCGI.
Great job Zed! Thanks for all the hard work.
I am a bit surprised at the memory usage patterns though. I'm not
sure if I'm doing something wrong (most likely I am), or if this is a
problem with the app I'm running (Typo trunk), but after the initial
mongrel_rails startup, each server uses about 22MB of memory.
However, after serving pages for a day or so, that memory usage will
have increased from 22MB to ~40MB. If I leave the server running, it
just keeps climbing. My memory usage with FastCGI was pretty stable
at about 22-24MB per dispatcher, regardless of how long they'd been
running. I'm far from a high-traffic site, so this is a bit
unexpected.
I've tried this both in a single-server setup and using
mongrel_cluster, and the results are similar. I'm running on Debian
testing behind LiteSpeed web server. I keep up to date with Typo
trunk, and am using the latest gems for mongrel, mongrel_cluster, and
sendfile. I tried removing sendfile, and that slowed things down, but
didn't improve the memory consumption, so I put it back in.
I've used both httperf and ab to test the app server, and they both
show the memory consumption problem. I've done the testing both
through LiteSpeed as the proxy and by connecting directly to the
port(s) mongrel is running on. When starting mongrel_rails, I use -e
production, and the cluster setup also specifies production for the
environment. Just to be doubly sure, I also set RAILS_ENV to
production on the command line and force it to production in
config/environment.rb as well. None of these things seems to help.
Some system information:
burks at cracked:~$ uname -a
Linux www.jasonburks.com 2.6.16.13-xenU #1 SMP Sat May 13 14:18:58 EDT
2006 i686 GNU/Linux
burks at cracked:~$ ruby -v
ruby 1.8.4 (2005-12-24) [i486-linux]
burks at cracked:~$ gem list
*** LOCAL GEMS ***
actionmailer (1.2.1, 1.2.0, 1.1.5, 1.1.3)
Service layer for easy email delivery and testing.
actionpack (1.12.1, 1.12.0, 1.11.2, 1.11.0)
Web-flow and rendering framework putting the VC in MVC.
actionwebservice (1.1.2, 1.1.0, 1.0.0, 0.9.3)
Web service support for Action Pack.
activerecord (1.14.2, 1.14.0, 1.13.2, 1.13.0)
Implements the ActiveRecord pattern for ORM.
activesupport (1.3.1, 1.3.0, 1.2.5, 1.2.3)
Support and utility classes used by the Rails framework.
cmdparse (2.0.2, 2.0.0)
Advanced command line parser supporting commands
daemons (0.4.4)
A toolkit to create and control daemons in different ways
fcgi (0.8.6.1)
FastCGI ruby binding.
gem_plugin (0.2.1)
A plugin system based only on rubygems that uses dependencies only
highline (1.2.1, 1.2.0, 1.0.1)
HighLine is a high-level command-line IO library.
mongrel (0.3.13.2, 0.3.13.1, 0.3.13)
A small fast HTTP library and server that runs Rails, Camping, and
Nitro apps.
mongrel_cluster (0.2.0)
Mongrel plugin that provides commands and Capistrano tasks for
managing multiple Mongrel processes.
rails (1.1.2, 1.1.0, 1.0.0, 0.14.3)
Web-application framework with template engine, control-flow layer,
and ORM.
rake (0.7.1, 0.6.2)
Ruby based make-like utility.
sendfile (0.9.2)
Ruby interface to sendfile(2) system call
sources (0.0.1)
This package provides download sources for remote gem installation
Now, if I'm not mistaken, Typo trunk uses it's own version of Rails as
an external resource. I checked, and I'm at svn 4511 of Rails in
vendor/rails in my Typo install. My cluster config looks like this:
burks at cracked:/var/www/typo/htdocs$ cat config/mongrel_cluster.yml
---
user: nobody
port: "8000"
environment: production
group: www-edit
address: 127.0.0.1
pid_file: log/mongrel.pid
servers: 2
I'm really not sure what else I should be looking at to try to solve
the memory issues. I can certainly set up a cron job to restart the
service every day, but I shouldn't think this is necessary. The
following message (with different action names) shows up a few times
in log/production.log:
ActionController::UnknownAction (No action responded to 2005):
/vendor/rails/actionpack/lib/action_controller/filters.rb:368:in
`perform_action_without_benchmark'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in
`perform_action'
/vendor/rails/actionpack/lib/action_controller/base.rb:381:in
`process_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'
/vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in
`process'
/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel/rails.rb:85:in
`process'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel.rb:563:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel.rb:562:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel.rb:648:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel.rb:648:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel.rb:637:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel.rb:969:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel.rb:968:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/bin/mongrel_rails:119:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel/command.rb:211:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/bin/mongrel_rails:227
/usr/bin/mongrel_rails:18
log/mongrel.log shows the following a whole bunch (94,000+ times in
the last week):
Thu Jun 29 02:53:07 EDT 2006: BAD CLIENT (127.0.0.1): Invalid HTTP
format, parsing fails.
I haven't turned on debug mode yet because I wasn't sure what sort of
info might be helpful for troubleshooting this. Google didn't seem to
yield much in the way of similar problems, and I'm far from a Ruby or
Rails expert, so I'm not really sure how to proceed. Any guidance or
suggestions or requests for additional debugging information to assist
me in stabilizing my memory usage would be greatly appreciated.
Again, Zed and others, great work! I'm really impressed with Mongrel
so far. Please help me to keep my doggie lean and happy...
Regards,
Jason Burks
From nicholas.stuart at gmail.com Thu Jun 29 08:50:43 2006
From: nicholas.stuart at gmail.com (Nick Stuart)
Date: Thu, 29 Jun 2006 08:50:43 -0400
Subject: [Mongrel] Mongrel Console..
Message-ID:
Hello all, new convert to Mongrel here and am trying to get things going.
Right now I can start mongrel up just fine and it seems to work great, but
I'm trying to use the nifty console I heard about and can't seem to get it
going.
`mongrel_rails console`
Cannot run the console script: unititialized constant RailsConfigurator
Any ideas? I just installed everything yesterday (6/28) with gems 0.9 and
have rails 1.1.3 installed. I'm working off of Kubuntu 6 if that makes a
difference.
Thanks for the help!
-Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060629/693657c4/attachment.html
From schwuk at gmail.com Thu Jun 29 11:20:49 2006
From: schwuk at gmail.com (Dave Murphy)
Date: Thu, 29 Jun 2006 16:20:49 +0100
Subject: [Mongrel] Daemonizing Mongrel
Message-ID: <2e60a9e60606290820q27349fd8rbdeb70fab0ebaac6@mail.gmail.com>
I've written a post covering how to turn your Rails app into a system
service with Mongrel. you can read it here:
http://schwuk.com/articles/2006/06/29/daemonizing-mongrel
Cheers,
--
Dave Murphy (Schwuk)
http://schwuk.com
From zedshaw at zedshaw.com Thu Jun 29 11:15:59 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Thu, 29 Jun 2006 11:15:59 -0400
Subject: [Mongrel] Mongrel Console..
In-Reply-To:
References:
Message-ID: <1151594159.6074.3.camel@localhost.localdomain>
On Thu, 2006-06-29 at 08:50 -0400, Nick Stuart wrote:
> Hello all, new convert to Mongrel here and am trying to get things
> going. Right now I can start mongrel up just fine and it seems to work
> great, but I'm trying to use the nifty console I heard about and can't
> seem to get it going.
> `mongrel_rails console`
> Cannot run the console script: unititialized constant
> RailsConfigurator
>
> Any ideas? I just installed everything yesterday (6/28) with gems 0.9
> and have rails 1.1.3 installed. I'm working off of Kubuntu 6 if that
> makes a difference.
Ah yeah, the console. It has some issues, mainly that when you turn it
on Mongrel gets very very slow. I am in the process of cleaning up
Mongrel and I'll get to fixing up console so that people can use it
shortly. Wait for the 0.3.13.3 release where it will be fixed (probably
by this weekend).
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.railsmachine.com/ -- Need Mongrel support?
From zedshaw at zedshaw.com Thu Jun 29 11:22:07 2006
From: zedshaw at zedshaw.com (Zed Shaw)
Date: Thu, 29 Jun 2006 11:22:07 -0400
Subject: [Mongrel] Memory usage issues
In-Reply-To: <9bbab4e0606290514o6130f012qeac67b1a4a2e099b@mail.gmail.com>
References: <9bbab4e0606290514o6130f012qeac67b1a4a2e099b@mail.gmail.com>
Message-ID: <1151594527.6074.11.camel@localhost.localdomain>
On Thu, 2006-06-29 at 08:14 -0400, Jason Burks wrote:
> Hello all,
>
> I'm new to Mongrel and am very impressed with what I see so far. This
> thing beats FastCGI hands down, and is even simpler to use than SCGI.
> Great job Zed! Thanks for all the hard work.
>
Thanks Jason, don't forget that Luis did a lot of work too and other
folks like _why, Rick Olsen, and many others contributed code or
documentation. Just wanted to throw that in since many times people say
I rock, but really it's all the people helping out that make Mongrel
rock.
> I am a bit surprised at the memory usage patterns though. I'm not
> sure if I'm doing something wrong (most likely I am), or if this is a
> problem with the app I'm running (Typo trunk), but after the initial
> mongrel_rails startup, each server uses about 22MB of memory.
> However, after serving pages for a day or so, that memory usage will
> have increased from 22MB to ~40MB. If I leave the server running, it
> just keeps climbing. My memory usage with FastCGI was pretty stable
> at about 22-24MB per dispatcher, regardless of how long they'd been
> running. I'm far from a high-traffic site, so this is a bit
> unexpected.
So, with memory usage you've got a few things potentially going on:
1) Ruby's GC just isn't all that great. With FastCGI they actually had
this lame "run the GC after X requests" thing, but Mongrel's just Ruby
(mostly) so having that just seems wrong.
2) Typo actually does have a leak. This is pretty unlikely since you
say it ran under fastcgi. I'm still betting on #1.
3) Mongrel has a leak. Probably not, there's not a lot in Mongrel to
leak, and many people use it without any problems.
So, what I'd recommend is actually installing Monit and configuring it
to watch your Mongrel processes for memory and CPU usage. Monit will
actually e-mail you when they reach certain limits and can even restart
them. Let this run for a while and keep the e-mails that monit sends so
you can get a sense of how long before your application start to use too
much ram.
I'm thinking your issue is #1 (GC) so the ram will increase and then
just go down, which is normal.
Finally, try just throwing in a call to force the GC to run after
certain requests and that might help you prove/disprove the above.
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.railsmachine.com/ -- Need Mongrel support?
From baswilbers at gmail.com Thu Jun 29 12:53:37 2006
From: baswilbers at gmail.com (basaah)
Date: Thu, 29 Jun 2006 18:53:37 +0200
Subject: [Mongrel] [mongrel] Mongrel says it works, but it doesn't
Message-ID: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
Hello, I came to know of mongrel by pure chance, it interrested me cause
webrick never worked and instantrails for rails was very slow. the problem
with webrick is/was is that it says just this:
>ruby script/server
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196: warning: regexp has `]'
without escape
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2006-06-29 18:46:04] INFO WEBrick 1.3.1
[2006-06-29 18:46:04] INFO ruby 1.8.4 (2005-12-24) [i386-mswin32]
[2006-06-29 18:46:04] INFO WEBrick::HTTPServer#start: pid=1748 port=3000
but when I point my browser to http://0.0.0.0:3000 I get that firefox cannot
make connection etc.
this is realy shit cause now rails (nitro or any other webrock server has
the very same problem)
just won't work.
So when I heard of mongrel I thought, jahoee, maby I still can enjoy my own
webserver made in ruby.
but quess what? this is mongrel's message
>mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment ...
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196: warning: regexp has `]'
without escape
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. INT => stop (no restart).
** Mongrel available at 0.0.0.0:3000
** Use CTRL-C to stop.
and when I point my browwser to 0.0.0.0:3000 it had accatly the same problem
as with webrick it looks like mongrel only prints these messaged and then...
nothing.
does anybody know what causes these very enoying frustadeble(is that a word)
thing and leaves me with empty hands and no rails or nitro(more important
exactly)
--
<>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060629/57d64822/attachment.html
From luislavena at gmail.com Thu Jun 29 13:03:16 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Thu, 29 Jun 2006 14:03:16 -0300
Subject: [Mongrel] [mongrel] Mongrel says it works, but it doesn't
In-Reply-To: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
References: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
Message-ID: <71166b3b0606291003x45d0297by99d8f1cde62fc06d@mail.gmail.com>
On 6/29/06, basaah wrote:
> Hello, I came to know of mongrel by pure chance, it interrested me cause
> webrick never worked and instantrails for rails was very slow. the problem
> with webrick is/was is that it says just this:
>
> >ruby script/server
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has `-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has `-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has `-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has `-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196:
> warning: regexp has `]' without escape
> => Booting WEBrick...
> => Rails application started on http://0.0.0.0:3000
> => Ctrl-C to shutdown server; call with --help for options
> [2006-06-29 18:46:04] INFO WEBrick 1.3.1
> [2006-06-29 18:46:04] INFO ruby 1.8.4 (2005-12-24) [i386-mswin32]
> [2006-06-29 18:46:04] INFO WEBrick::HTTPServer#start: pid=1748 port=3000
>
> but when I point my browser to http://0.0.0.0:3000 I get that firefox cannot
> make connection etc.
> this is realy shit cause now rails (nitro or any other webrock server has
> the very same problem)
> just won't work.
>
For that info, is not rails/webrick fault but looks like your ruby
installation is hosed.
On both cases rexml show the warnings and errors about escaping characters.
You're using the One Click Installer? which version?
What OS are you trying to run it?
> So when I heard of mongrel I thought, jahoee, maby I still can enjoy my own
> webserver made in ruby.
> but quess what? this is mongrel's message
> >mongrel_rails start
> ** Starting Mongrel listening at 0.0.0.0:3000
> ** Starting Rails with development environment ...
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has`-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has`-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has`-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> character class has`-' without escape
> c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196:
> warning: regexp has `]' without escape
> ** Rails loaded.
> ** Loading any Rails specific GemPlugins
> ** Signals ready. INT => stop (no restart).
> ** Mongrel available at 0.0.0.0:3000
> ** Use CTRL-C to stop.
>
> and when I point my browwser to 0.0.0.0:3000 it had accatly the same problem
> as with webrick it looks like mongrel only prints these messaged and then...
> nothing.
>
> does anybody know what causes these very enoying frustadeble(is that a word)
> thing and leaves me with empty hands and no rails or nitro(more important
> exactly)
>
>
> --
> <>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
--
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
From philippe.lachaise at gmail.com Thu Jun 29 13:04:42 2006
From: philippe.lachaise at gmail.com (philippe lachaise)
Date: Thu, 29 Jun 2006 19:04:42 +0200
Subject: [Mongrel] [mongrel] Mongrel says it works, but it doesn't
In-Reply-To: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
References: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
Message-ID:
Does http://0.0.0.0:3000 has any chance to run at all ? (actually I don't
know for sure)
But shouldn't you point your browser at
http://127.0.0.1:3000
(WEBricks) or simply http://localhost: ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060629/f3e7e11b/attachment.html
From Will_Green at URSCorp.com Thu Jun 29 13:04:44 2006
From: Will_Green at URSCorp.com (Will_Green at URSCorp.com)
Date: Thu, 29 Jun 2006 13:04:44 -0400
Subject: [Mongrel] [mongrel] Mongrel says it works, but it doesn't
In-Reply-To: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
Message-ID:
Try http://127.0.0.1:3000
0.0.0.0 is an invalid IP address, and just means it (Mongrel or Webrick) is
listening on every IP address that is available on your system.
==
Will Green
Web Developer & IT Coordinator, URS Creative Imaging
http://www.urscreativeimaging.com/
7650 West Courtney Campbell Causeway
Suite 700
Tampa, FL 33607
813.675.6849 (direct)
813.286.1711 (main)
This e-mail and any attachments are confidential. If you receive this
message in error or are not the intended recipient, you should not retain,
distribute, disclose or use any of this information and you should destroy
the e-mail and any attachments or copies.
basaah
To
Sent by: mongrel-users at rubyforge.org
mongrel-users-bou cc
nces at rubyforge.or
g Subject
[Mongrel] [mongrel] Mongrel says it
works, but it doesn't
06/29/2006 12:53
PM
Please respond to
mongrel-users at rub
yforge.org
Hello, I came to know of mongrel by pure chance, it interrested me cause
webrick never worked and instantrails for rails was very slow. the problem
with webrick is/was is that it says just this:
>ruby script/server
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196: warning: regexp has
`]' without escape
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2006-06-29 18:46:04] INFO WEBrick 1.3.1
[2006-06-29 18:46:04] INFO ruby 1.8.4 (2005-12-24) [i386-mswin32]
[2006-06-29 18:46:04] INFO WEBrick::HTTPServer#start: pid=1748 port=3000
but when I point my browser to http://0.0.0.0:3000 I get that firefox
cannot make connection etc.
this is realy shit cause now rails (nitro or any other webrock server has
the very same problem)
just won't work.
So when I heard of mongrel I thought, jahoee, maby I still can enjoy my own
webserver made in ruby.
but quess what? this is mongrel's message
>mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment ...
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has`-' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196: warning: regexp has
`]' without escape
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. INT => stop (no restart).
** Mongrel available at 0.0.0.0:3000
** Use CTRL-C to stop.
and when I point my browwser to 0.0.0.0:3000 it had accatly the same
problem as with webrick it looks like mongrel only prints these messaged
and then... nothing.
does anybody know what causes these very enoying frustadeble(is that a
word) thing and leaves me with empty hands and no rails or nitro(more
important exactly)
--
<>
_______________________________________________
Mongrel-users mailing list
Mongrel-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users
From baswilbers at gmail.com Thu Jun 29 13:21:35 2006
From: baswilbers at gmail.com (basaah)
Date: Thu, 29 Jun 2006 19:21:35 +0200
Subject: [Mongrel] [mongrel] Mongrel says it works, but it doesn't
In-Reply-To: <71166b3b0606291003x45d0297by99d8f1cde62fc06d@mail.gmail.com>
References: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
<71166b3b0606291003x45d0297by99d8f1cde62fc06d@mail.gmail.com>
Message-ID: <6d0e137b0606291021y5d987503i7716779dbc8ee5e@mail.gmail.com>
On 6/29/06, Luis Lavena wrote:
>
> On 6/29/06, basaah wrote:
> > Hello, I came to know of mongrel by pure chance, it interrested me cause
> > webrick never worked and instantrails for rails was very slow. the
> problem
> > with webrick is/was is that it says just this:
> >
> > >ruby script/server
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has `-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has `-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has `-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has `-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196:
> > warning: regexp has `]' without escape
> > => Booting WEBrick...
> > => Rails application started on http://0.0.0.0:3000
> > => Ctrl-C to shutdown server; call with --help for options
> > [2006-06-29 18:46:04] INFO WEBrick 1.3.1
> > [2006-06-29 18:46:04] INFO ruby 1.8.4 (2005-12-24) [i386-mswin32]
> > [2006-06-29 18:46:04] INFO WEBrick::HTTPServer#start: pid=1748
> port=3000
> >
> > but when I point my browser to http://0.0.0.0:3000 I get that firefox
> cannot
> > make connection etc.
> > this is realy shit cause now rails (nitro or any other webrock server
> has
> > the very same problem)
> > just won't work.
> >
>
> For that info, is not rails/webrick fault but looks like your ruby
> installation is hosed.
>
> On both cases rexml show the warnings and errors about escaping
> characters.
is that a problem then?
You're using the One Click Installer? which version?
1.8.4 but 1.8.2 did the very same thing
What OS are you trying to run it?
microsoft windows xp proffesional
I have Suse linux on my comp as well but by linux knowledge is just to low
to install mongrel
I tried but rubygems sais it needed 1.8.4 of ruby, so I managed to instal
that version, but then rubygems was gone and I didn't manage to install a
new rubygems.
> So when I heard of mongrel I thought, jahoee, maby I still can enjoy my
> own
> > webserver made in ruby.
> > but quess what? this is mongrel's message
> > >mongrel_rails start
> > ** Starting Mongrel listening at 0.0.0.0:3000
> > ** Starting Rails with development environment ...
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has`-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has`-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has`-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning:
> > character class has`-' without escape
> > c:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196:
> > warning: regexp has `]' without escape
> > ** Rails loaded.
> > ** Loading any Rails specific GemPlugins
> > ** Signals ready. INT => stop (no restart).
> > ** Mongrel available at 0.0.0.0:3000
> > ** Use CTRL-C to stop.
> >
> > and when I point my browwser to 0.0.0.0:3000 it had accatly the same
> problem
> > as with webrick it looks like mongrel only prints these messaged and
> then...
> > nothing.
> >
> > does anybody know what causes these very enoying frustadeble(is that a
> word)
> > thing and leaves me with empty hands and no rails or nitro(more
> important
> > exactly)
> >
> >
> > --
> > <>
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
> >
>
>
> --
> 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
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
thank you for your relpy
--
<>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060629/93d037bb/attachment.html
From nicholas.stuart at gmail.com Thu Jun 29 13:29:08 2006
From: nicholas.stuart at gmail.com (Nick Stuart)
Date: Thu, 29 Jun 2006 13:29:08 -0400
Subject: [Mongrel] Mongrel Console..
In-Reply-To: <1151594159.6074.3.camel@localhost.localdomain>
References:
<1151594159.6074.3.camel@localhost.localdomain>
Message-ID:
Cool, thanks Zed.
On 6/29/06, Zed Shaw wrote:
>
> On Thu, 2006-06-29 at 08:50 -0400, Nick Stuart wrote:
> > Hello all, new convert to Mongrel here and am trying to get things
> > going. Right now I can start mongrel up just fine and it seems to work
> > great, but I'm trying to use the nifty console I heard about and can't
> > seem to get it going.
> > `mongrel_rails console`
> > Cannot run the console script: unititialized constant
> > RailsConfigurator
> >
> > Any ideas? I just installed everything yesterday (6/28) with gems 0.9
> > and have rails 1.1.3 installed. I'm working off of Kubuntu 6 if that
> > makes a difference.
>
> Ah yeah, the console. It has some issues, mainly that when you turn it
> on Mongrel gets very very slow. I am in the process of cleaning up
> Mongrel and I'll get to fixing up console so that people can use it
> shortly. Wait for the 0.3.13.3 release where it will be fixed (probably
> by this weekend).
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
> http://www.railsmachine.com/ -- Need Mongrel support?
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060629/85376c1d/attachment.html
From jburks725 at gmail.com Thu Jun 29 13:54:08 2006
From: jburks725 at gmail.com (Jason Burks)
Date: Thu, 29 Jun 2006 13:54:08 -0400
Subject: [Mongrel] Memory usage issues
In-Reply-To: <1151594527.6074.11.camel@localhost.localdomain>
References: <9bbab4e0606290514o6130f012qeac67b1a4a2e099b@mail.gmail.com>
<1151594527.6074.11.camel@localhost.localdomain>
Message-ID: <9bbab4e0606291054n3e0c1828n8aa687dae8af3600@mail.gmail.com>
Zed,
Thanks for the feedback, I'll give it a try and report results. I'm
on vacation all of next week and may not be able to send anything
until I return.
Also, thanks for the correction on Mongrel contributors, and thanks to
all of your for a great little app server.
-Jason
On 6/29/06, Zed Shaw wrote:
> On Thu, 2006-06-29 at 08:14 -0400, Jason Burks wrote:
> > Hello all,
> >
> > I'm new to Mongrel and am very impressed with what I see so far. This
> > thing beats FastCGI hands down, and is even simpler to use than SCGI.
> > Great job Zed! Thanks for all the hard work.
> >
> Thanks Jason, don't forget that Luis did a lot of work too and other
> folks like _why, Rick Olsen, and many others contributed code or
> documentation. Just wanted to throw that in since many times people say
> I rock, but really it's all the people helping out that make Mongrel
> rock.
>
> > I am a bit surprised at the memory usage patterns though. I'm not
> > sure if I'm doing something wrong (most likely I am), or if this is a
> > problem with the app I'm running (Typo trunk), but after the initial
> > mongrel_rails startup, each server uses about 22MB of memory.
> > However, after serving pages for a day or so, that memory usage will
> > have increased from 22MB to ~40MB. If I leave the server running, it
> > just keeps climbing. My memory usage with FastCGI was pretty stable
> > at about 22-24MB per dispatcher, regardless of how long they'd been
> > running. I'm far from a high-traffic site, so this is a bit
> > unexpected.
>
> So, with memory usage you've got a few things potentially going on:
>
> 1) Ruby's GC just isn't all that great. With FastCGI they actually had
> this lame "run the GC after X requests" thing, but Mongrel's just Ruby
> (mostly) so having that just seems wrong.
> 2) Typo actually does have a leak. This is pretty unlikely since you
> say it ran under fastcgi. I'm still betting on #1.
> 3) Mongrel has a leak. Probably not, there's not a lot in Mongrel to
> leak, and many people use it without any problems.
>
> So, what I'd recommend is actually installing Monit and configuring it
> to watch your Mongrel processes for memory and CPU usage. Monit will
> actually e-mail you when they reach certain limits and can even restart
> them. Let this run for a while and keep the e-mails that monit sends so
> you can get a sense of how long before your application start to use too
> much ram.
>
> I'm thinking your issue is #1 (GC) so the ram will increase and then
> just go down, which is normal.
>
> Finally, try just throwing in a call to force the GC to run after
> certain requests and that might help you prove/disprove the above.
>
>
> --
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
> http://www.railsmachine.com/ -- Need Mongrel support?
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
From luislavena at gmail.com Thu Jun 29 14:09:56 2006
From: luislavena at gmail.com (Luis Lavena)
Date: Thu, 29 Jun 2006 15:09:56 -0300
Subject: [Mongrel] [mongrel] Mongrel says it works, but it doesn't
In-Reply-To: <6d0e137b0606291021y5d987503i7716779dbc8ee5e@mail.gmail.com>
References: <6d0e137b0606290953m1017b8bfo58c14545dd09e01e@mail.gmail.com>
<71166b3b0606291003x45d0297by99d8f1cde62fc06d@mail.gmail.com>
<6d0e137b0606291021y5d987503i7716779dbc8ee5e@mail.gmail.com>
Message-ID: <71166b3b0606291109y759515e2ka5412f709b260e93@mail.gmail.com>
On 6/29/06, basaah