From luislavena at gmail.com Sat Jul 1 03:07:13 2006 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 1 Jul 2006 04:07:13 -0300 Subject: [Mongrel] Fun with Mongrel and cygwin. Message-ID: <71166b3b0607010007w37844bfbkdc1fa5ebca1bea9a@mail.gmail.com> On the Mongrel FAQ forum, Josh Wehner was having problems with cygwin (don't know if he fixed it). http://rubyforge.org/forum/forum.php?thread_id=6978&forum_id=5450 Due that, I manage to install cygwin, ruby and rails on my humble little computer, it compiled worked ok (taste like *nix, so I felt a bit off-road running this). Anyway, tried to pass test for mongrel, and still get 1 failure: 1) Failure: test_header_is_too_long(WebServerTest) [./test/test_ws.rb:81:in `test_header_is_too_long' ./test/testhelp.rb:14:in `redirect_test_io' ./test/test_ws.rb:79:in `test_header_is_too_long']: <[Errno::ECONNRESET, Errno::EPIPE, Errno::ECONNABORTED, Errno::EINVAL]> exception expected but none was thrown. Because cygwin IS windows, the sockets works the same way like mswin32 platform. adding /mingw|cygwin|mswin/ regex to do_test solved the problem. Now Mongrel compiles and works with cygwin. Don't know who else would like do that, but there you go. -- 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 k.wong at laposte.net Sat Jul 1 08:21:00 2006 From: k.wong at laposte.net (Katarina WONG) Date: Sat, 01 Jul 2006 14:21:00 +0200 Subject: [Mongrel] Time To Pick the Mongrel BUGS Mascot! In-Reply-To: <1151648798.7843.2.camel@localhost.localdomain> References: <1151648798.7843.2.camel@localhost.localdomain> Message-ID: Munchkin +1 On Fri, 30 Jun 2006 08:26:38 +0200, Zed Shaw wrote: > Bradley Taylor shot me this *goldmine* of ugly ugly ugly dogs: > > http://www.sonoma-marinfair.org/uglydogvote.shtml > > I *have* to use one of these for the Mongrel BUGS Mascot. He'll go on > our bug list page and replace the little beetles on the left. > > Pick the dog you think best represents a lovable but defective pooch and > reply to this with your +1. > > Let the voting begin! > > -- Katarina From random49k at gmail.com Sun Jul 2 16:27:05 2006 From: random49k at gmail.com (Mike Garey) Date: Sun, 2 Jul 2006 16:27:05 -0400 Subject: [Mongrel] how to use upload progress? Message-ID: <16a8b9140607021327qf087691i3cbd045807be0fae@mail.gmail.com> I'm a bit confused about how to get upload progress to work with mongrel.. I've installed the mongrel_upload_progress (0.1) gem, but have no idea what to do with it. According to the following page: http://technoweenie.backpackit.com/pub/602283 there's a patch (mup.diff) which seems like it patches the mongrel_upload_progress plugin The following blog entry makes it seem as though the upload_progress gem plugin is unfinished: http://weblog.techno-weenie.net/2006/6/18/rails-deployment And on the following site: http://redhanded.hobix.com/cult/mongrel0313WithLargeFileUploadsConditionalHttpUploadProgressPatchAllAreGoodThings.html it links to a patch (http://rubyforge.org/pipermail/mongrel-users/attachments/20060511/8ba26353/attachment.obj) which looks like it patches the mongrel code directly (not using a plugin) so there seems to be two patches and a plugin. I'm not sure which is the correct method to use for implementing upload progress, so I was hoping someone here could give me some direction, since I'd really like to be able to get thi working. Unfortunately, under the documentation section of the mongrel site, there's nothing written for the mongrel upload progress plugin, so that seems to be a dead end for now as well. Thanks, Mike From zedshaw at zedshaw.com Sun Jul 2 20:56:53 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 02 Jul 2006 20:56:53 -0400 Subject: [Mongrel] how to use upload progress? In-Reply-To: <16a8b9140607021327qf087691i3cbd045807be0fae@mail.gmail.com> References: <16a8b9140607021327qf087691i3cbd045807be0fae@mail.gmail.com> Message-ID: <1151888213.9998.4.camel@localhost.localdomain> On Sun, 2006-07-02 at 16:27 -0400, Mike Garey wrote: > I'm a bit confused about how to get upload progress to work with > mongrel.. I've installed the mongrel_upload_progress (0.1) gem, but > have no idea what to do with it. > Hey Mike, it's sort of a work in progress right now. I'll try to write up some documentation shortly. We're doing a pre-release of 0.4 very soon which will make upload progress work much better. The gist of it, if you're feeling adventurous, is to install the mongrel_upload_progress gem: gem install mongrel_upload_progress Then create a mongrel config script with called mongrel.conf with: uri "/", :handler => Upload.new("/upload"), :in_front => true And then make sure you have a Rails handler which can handle requests for /upload and which can answer requests for /progress with status. The status comes from the Mongrel::Uploads singleton which keeps track of what's going on. But don't waste too much time on this, it's still pretty rough. Rick should have a Rails plugin for this out soon once we get it working better. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Sun Jul 2 21:15:40 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 02 Jul 2006 21:15:40 -0400 Subject: [Mongrel] [UPDATE] Pound Docs Wrong Message-ID: <1151889340.14871.2.camel@localhost.localdomain> Hi Folks, There was an error in the Pound documentation at: http://mongrel.rubyforge.org/docs/pound.html Basically the documentation has a sample config that only configures one backend for one service, which isn't what people want. You actually want *three* backends in *one* service. Please go check that your configuration looks like the current documentation. Thanks. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From jro at codegrinder.com Sun Jul 2 22:56:49 2006 From: jro at codegrinder.com (jro at codegrinder.com) Date: Sun, 2 Jul 2006 21:56:49 -0500 Subject: [Mongrel] problem starting mongrel Message-ID: <20060703025649.GX11066@codegrinder.com> Apologies for the formatting, but this is the error I get when I try to start up mongrel. The app does work under webrick, so I'm not real sure what's going on here. Thanks for any insight into what's going on. -j ** Starting Mongrel listening at 0.0.0.0:3000 /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:666:in `register': undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:850:in `uri' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1018:in `debug' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1016:in `debug'r -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060702/4ca78b63/attachment.bin From why at ruby-lang.org Mon Jul 3 01:57:23 2006 From: why at ruby-lang.org (why the lucky stiff) Date: Mon, 3 Jul 2006 00:57:23 -0500 Subject: [Mongrel] how to use upload progress? In-Reply-To: <1151888213.9998.4.camel@localhost.localdomain> References: <16a8b9140607021327qf087691i3cbd045807be0fae@mail.gmail.com> <1151888213.9998.4.camel@localhost.localdomain> Message-ID: <20060703055723.GB17264@lstsv-3264.layeredtech.com> On Sun, Jul 02, 2006 at 08:56:53PM -0400, Zed Shaw wrote: > The gist of it, if you're feeling adventurous, is to install the > mongrel_upload_progress gem: > > gem install mongrel_upload_progress > > Then create a mongrel config script with called mongrel.conf with: > > uri "/", :handler => Upload.new("/upload"), :in_front => true > If you're running 0.3.13.3, you'll also need to supply the PATH_INFO to the exact URL using the upload meter. uri "/", :handler => Upload.new(:path_info => "/upload"), :in_front => true If you're using the Mongrel 0.4 branch, you can just mount the handler anywhere in the path above or on your upload pages. And it doesn't need to be in front, it'll get notifications regardless of its placement. GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE uri "/upload", :handler => plugin("/handlers/upload") _why From mail at flydown.org Mon Jul 3 05:29:32 2006 From: mail at flydown.org (Michele) Date: Mon, 3 Jul 2006 11:29:32 +0200 Subject: [Mongrel] Charset issue Message-ID: I was playing a bit with Mongrel to test it out before using it in production, but I have an issue with Latin accented letters being all messed up. I've included the right content-type in the HTML and both Lighty +Fastcgi and Webrick have no problem with them. Any tips? Thanks, - michele From mrueckert at suse.de Mon Jul 3 05:46:01 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Mon, 3 Jul 2006 11:46:01 +0200 Subject: [Mongrel] Charset issue In-Reply-To: References: Message-ID: <20060703094601.GY5504@suse.de> On 2006-07-03 11:29:32 +0200, Michele wrote: > I've included the right content-type in the HTML and both Lighty > +Fastcgi and Webrick have no problem with them. set the correct HTTP header. the http header overrules the HTML header. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From mail at flydown.org Mon Jul 3 06:07:42 2006 From: mail at flydown.org (Michele) Date: Mon, 3 Jul 2006 12:07:42 +0200 Subject: [Mongrel] Charset issue In-Reply-To: <20060703094601.GY5504@suse.de> References: <20060703094601.GY5504@suse.de> Message-ID: <082942B9-C091-4809-B6E8-668BA0D0E61B@flydown.org> Now, it's serving the right content-type (both HTML and HTTP), but still not working. - michele On Jul 3, 2006, at 11:46 , Marcus Rueckert wrote: > On 2006-07-03 11:29:32 +0200, Michele wrote: >> I've included the right content-type in the HTML and both Lighty >> +Fastcgi and Webrick have no problem with them. > > set the correct HTTP header. > the http header overrules the HTML header. > > darix > > From riley.ross at gmail.com Mon Jul 3 06:37:18 2006 From: riley.ross at gmail.com (Ross Riley) Date: Mon, 3 Jul 2006 11:37:18 +0100 Subject: [Mongrel] Apache mod_proxy to mongrel Message-ID: <15365f130607030337v3a4228d9o9d50fac13e0b6f04@mail.gmail.com> Hi Guys, I know this is slightly off topic, but it'd be great to get some feedback from anyone who's using mod_proxy on Apache 2.2 to redircet to a rails app on mongrel. Everything has been running fine generally but a few days back we started getting a gap in the performance between the Apache port and the mongrel port. accessing through port 80 was averaging ten times longer to serve 1000 requests compared to accessing mongrel directly throught port 8000. This is weird because essentially nothing had changed configuration wise and the number of requests being handled was fairly stable. So I gave Apache and then the server a reboot, but the problem still persisted. Came back after the weekend and everything seems ok but I'm very suspicious of problems that magically fix themselves. If anyone has any ideas of possible causes I'd be grateful or If you could share your Apache configuration for performance (I'm using pretty close to the defaults) as I wouldn't mind squashing this before it resurfaces. Thanks -- Ross Riley riley.ross at gmail.com From jro at codegrinder.com Mon Jul 3 11:47:38 2006 From: jro at codegrinder.com (jro at codegrinder.com) Date: Mon, 3 Jul 2006 10:47:38 -0500 Subject: [Mongrel] problem starting mongrel In-Reply-To: <20060703025649.GX11066@codegrinder.com> References: <20060703025649.GX11066@codegrinder.com> Message-ID: <20060703154738.GY11066@codegrinder.com> I probably should have mentioned that I'm using ruby 1.8.4 on Ubuntu linux with rails 1.1 installed via rubygem. -j On Sun, Jul 02, 2006 at 09:56:49PM -0500, jro at codegrinder.com wrote: > > Apologies for the formatting, but this is the error I get when I try to start > up mongrel. The app does work under webrick, so I'm not real sure what's > going on here. Thanks for any insight into what's going on. > > -j > > ** Starting Mongrel listening at 0.0.0.0:3000 > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:666:in `register': > undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:850:in -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060703/e4dcffe3/attachment.bin From coda.hale at gmail.com Mon Jul 3 16:28:28 2006 From: coda.hale at gmail.com (Coda Hale) Date: Mon, 3 Jul 2006 13:28:28 -0700 Subject: [Mongrel] Strange local requests with Apache 2.2, mod_proxy_balancer, and Mongrel 0.3.13.2 Message-ID: Hello all, My Rails app is logging some rather strange requests: Processing StoreController#index (for ::1 at 2006-07-03 13:18:48) [GET] Session ID: ed5e2a0e5b4b9290835a969cdd749e6e Parameters: {"action"=>"index", "controller"=>"store"} Completed in 0.08174 (12 reqs/sec) | Rendering: 0.07951 (97%) | DB: 0.00000 (0%) | 200 OK [http://127.0.0.1/] These are only for the default route, and they don't seem to be related to any actual requests. There's about a 2:1 ratio between actual requests and these weird local requests. Has anyone seen anything like this before? -- Coda Hale http://blog.codahale.com From sebastian at feldpost.com Mon Jul 3 18:02:07 2006 From: sebastian at feldpost.com (Sebastian Friedrich) Date: Mon, 3 Jul 2006 17:02:07 -0500 Subject: [Mongrel] problem starting mongrel In-Reply-To: <20060703154738.GY11066@codegrinder.com> References: <20060703025649.GX11066@codegrinder.com> <20060703154738.GY11066@codegrinder.com> Message-ID: <0C992116-25BA-4C29-BEBD-9F0BEA6A5417@feldpost.com> On Jul 3, 2006, at 10:47 AM, jro at codegrinder.com wrote: > > I probably should have mentioned that I'm using ruby 1.8.4 on > Ubuntu linux > with rails 1.1 installed via rubygem. i think the standard Ubuntu Ruby package is inexplicably lacking... This may not be the problem, but make sure you also have the ruby1.8- dev package (via universe). sebastian From zedshaw at zedshaw.com Mon Jul 3 19:18:00 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 03 Jul 2006 19:18:00 -0400 Subject: [Mongrel] problem starting mongrel In-Reply-To: <20060703154738.GY11066@codegrinder.com> References: <20060703025649.GX11066@codegrinder.com> <20060703154738.GY11066@codegrinder.com> Message-ID: <1151968680.8845.1.camel@localhost.localdomain> Hey, Whenever you are on a Debian based system and you get errors saying that functions are missing, it means you don't have any of the build tools installed. You'll need to install all ruby related items, not just "apt-get install ruby". There's ri, irb, ruby1.8-dev, and lots of other packages. Once you get all that installed, install mongrel again and it should work. On Mon, 2006-07-03 at 10:47 -0500, jro at codegrinder.com wrote: > I probably should have mentioned that I'm using ruby 1.8.4 on Ubuntu linux > with rails 1.1 installed via rubygem. > > -j -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Jul 3 19:19:46 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 03 Jul 2006 19:19:46 -0400 Subject: [Mongrel] Strange local requests with Apache 2.2, mod_proxy_balancer, and Mongrel 0.3.13.2 In-Reply-To: References: Message-ID: <1151968786.8845.4.camel@localhost.localdomain> Most likely you have something on that page which is a static resource and isn't being referenced correctly. Turn on debugging: mongrel_rails start -B And run this request, then check the log/mongrel_debug/files.log and rails.log. It'll tell you all you need to know. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? On Mon, 2006-07-03 at 13:28 -0700, Coda Hale wrote: > Hello all, > > My Rails app is logging some rather strange requests: > > Processing StoreController#index (for ::1 at 2006-07-03 13:18:48) [GET] > Session ID: ed5e2a0e5b4b9290835a969cdd749e6e > Parameters: {"action"=>"index", "controller"=>"store"} > Completed in 0.08174 (12 reqs/sec) | Rendering: 0.07951 (97%) | DB: > 0.00000 (0%) | 200 OK [http://127.0.0.1/] > > These are only for the default route, and they don't seem to be > related to any actual requests. There's about a 2:1 ratio between > actual requests and these weird local requests. > > Has anyone seen anything like this before? > From jro at codegrinder.com Mon Jul 3 21:11:01 2006 From: jro at codegrinder.com (jro at codegrinder.com) Date: Mon, 3 Jul 2006 20:11:01 -0500 Subject: [Mongrel] problem starting mongrel In-Reply-To: <1151968680.8845.1.camel@localhost.localdomain> References: <20060703025649.GX11066@codegrinder.com> <20060703154738.GY11066@codegrinder.com> <1151968680.8845.1.camel@localhost.localdomain> Message-ID: <20060704011101.GD11066@codegrinder.com> Thanks guys. make wasn't installed.. whoops. I have no idea how I got that far w/o it being there. Go ubuntu. -j On Mon, Jul 03, 2006 at 07:18:00PM -0400, Zed Shaw wrote: > Hey, > > Whenever you are on a Debian based system and you get errors saying that > functions are missing, it means you don't have any of the build tools > installed. You'll need to install all ruby related items, not just > "apt-get install ruby". There's ri, irb, ruby1.8-dev, and lots of other > packages. > > Once you get all that installed, install mongrel again and it should > work. > > > > On Mon, 2006-07-03 at 10:47 -0500, jro at codegrinder.com wrote: > > I probably should have mentioned that I'm using ruby 1.8.4 on Ubuntu linux > > with rails 1.1 installed via rubygem. > > > > -j > > -- > 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 -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060703/c3fdae1c/attachment-0001.bin From coda.hale at gmail.com Mon Jul 3 23:18:17 2006 From: coda.hale at gmail.com (Coda Hale) Date: Mon, 3 Jul 2006 20:18:17 -0700 Subject: [Mongrel] Strange local requests with Apache 2.2, mod_proxy_balancer, and Mongrel 0.3.13.2 In-Reply-To: <1151968786.8845.4.camel@localhost.localdomain> References: <1151968786.8845.4.camel@localhost.localdomain> Message-ID: On 7/3/06, Zed Shaw wrote: > Most likely you have something on that page which is a static resource > and isn't being referenced correctly. > > Turn on debugging: > > mongrel_rails start -B > > And run this request, then check the log/mongrel_debug/files.log and > rails.log. It'll tell you all you need to know. Nailed it in one. Thanks for the help, Zed, and more importantly, thanks for sharing such an awesome piece of software with the rest of us. -- Coda Hale http://blog.codahale.com From schwuk at gmail.com Tue Jul 4 07:19:55 2006 From: schwuk at gmail.com (Dave Murphy) Date: Tue, 4 Jul 2006 12:19:55 +0100 Subject: [Mongrel] Apache mod_proxy to mongrel In-Reply-To: <15365f130607030337v3a4228d9o9d50fac13e0b6f04@mail.gmail.com> References: <15365f130607030337v3a4228d9o9d50fac13e0b6f04@mail.gmail.com> Message-ID: <2e60a9e60607040419v34038318waea70b6f2eca84c6@mail.gmail.com> On 03/07/06, Ross Riley wrote: > Hi Guys, > I know this is slightly off topic, but it'd be great to get some > feedback from anyone who's using mod_proxy on Apache 2.2 to redircet > to a rails app on mongrel. I'm happily using mod_proxy (not balancer) with Apache 2.0 to serve a couple of Rails apps with Mongrel, and not noticed any performance issues like those you describe, however I'm not particularly stressing my apps either. Mine is a fairly stock configuration as well, although I'm using mod_rewrite and mod_deflate in addition to mod_proxy. From random49k at gmail.com Tue Jul 4 08:37:33 2006 From: random49k at gmail.com (Mike Garey) Date: Tue, 4 Jul 2006 08:37:33 -0400 Subject: [Mongrel] how to use upload progress? In-Reply-To: <1151888213.9998.4.camel@localhost.localdomain> References: <16a8b9140607021327qf087691i3cbd045807be0fae@mail.gmail.com> <1151888213.9998.4.camel@localhost.localdomain> Message-ID: <16a8b9140607040537x69110f25t219040c681dd498b@mail.gmail.com> On 7/2/06, Zed Shaw wrote: > > Then create a mongrel config script with called mongrel.conf with: > > uri "/", :handler => Upload.new("/upload"), :in_front => true > > And then make sure you have a Rails handler which can handle requests > for /upload and which can answer requests for /progress with status. > The status comes from the Mongrel::Uploads singleton which keeps track > of what's going on. thanks for the reply Zed, but I'm still a bit confused.. I've added the mongrel.conf file with the line you suggested, and then added a route from /upload to an action method called "upload" in my site_controller, but I'm not sure what the upload method (or progress method) is supposed to do. Is the upload method supposed to be the action that's called from my file upload form? Am I supposed to call Mongrel::Uploads.initialize and then interact with the uploads singleton myself? Does anybody have a working upload form that I can take a look at to see how it should be done? I realize that this is still in a pretty rough form, but I was hoping I'd be able to test this out, since I had previously been using the rails upload progress plugin with apache 1.3 and mod_fastcgi, and it would work intermittently.. I wanted to see how the mongrel version compares as far as reliability. Thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060704/d097073f/attachment.html From zedshaw at zedshaw.com Tue Jul 4 11:59:45 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 04 Jul 2006 11:59:45 -0400 Subject: [Mongrel] how to use upload progress? In-Reply-To: <16a8b9140607040537x69110f25t219040c681dd498b@mail.gmail.com> References: <16a8b9140607021327qf087691i3cbd045807be0fae@mail.gmail.com> <1151888213.9998.4.camel@localhost.localdomain> <16a8b9140607040537x69110f25t219040c681dd498b@mail.gmail.com> Message-ID: <1152028785.6514.3.camel@localhost.localdomain> On Tue, 2006-07-04 at 08:37 -0400, Mike Garey wrote: > On 7/2/06, Zed Shaw wrote: > Then create a mongrel config script with called mongrel.conf > with: > I realize that this is still in a pretty rough form, but I was hoping > I'd be able to test this out, since I had previously been using the > rails upload progress plugin with apache 1.3 and mod_fastcgi, and it > would work intermittently.. I wanted to see how the mongrel version > compares as far as reliability. Thanks, Yeah, it might be way too early to mess with it just yet. It's not difficult, but there's some documentation that needs to be written before people could really get down and use it. If you're still desperate to mess with it, hop onto irc.freenode org sometime and msg me. I'm zedas and usually hang out in #rubyonrails. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From mail at flydown.org Wed Jul 5 05:06:25 2006 From: mail at flydown.org (Michele) Date: Wed, 5 Jul 2006 11:06:25 +0200 Subject: [Mongrel] mongrel_cluster and pound configuration Message-ID: <9D14346B-045E-4699-AA2E-5356A235264E@flydown.org> Hi, I've noticed an issue (or what I think is an issue) with mongrel_cluster: in the config file, I tell it to store pid files in / tmp/ and when I start it they get saved there, but when I run restart or stop, it says it can't find pid files. Problem being: it looks for pid files in /path/to/my/app/tmp/. Is anyone else aware of this? I have lighty forwarding to pound which is then loadbalancing, an issue I'm experiencing is that pound overrides the original remote ip (thus every request is from 127.0.0.1) and Rails uses pound's port for link_to and url_for, instead of 80. I was wondering if it was something to do with duplicate headers added by both lighty and pound, or maybe if I can change pound's config to trick mongrel into thinking the request was coming from lighty (thus from port 80). - Michele From bryan at osesm.com Wed Jul 5 19:59:21 2006 From: bryan at osesm.com (Bryan Liles) Date: Wed, 5 Jul 2006 19:59:21 -0400 Subject: [Mongrel] multiple mongrel clusters Message-ID: If this was in the docs, I've missed it. How can I have multiple mongrel clusters on a server? All the documentation that I am seeing seems to assume that I am only running one cluster. From jason at joyent.com Wed Jul 5 20:40:53 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Wed, 5 Jul 2006 17:40:53 -0700 Subject: [Mongrel] multiple mongrel clusters In-Reply-To: References: Message-ID: <370D49C0-8CBE-4461-BF58-721C9604DFE3@joyent.com> On Jul 5, 2006, at 4:59 PM, Bryan Liles wrote: > If this was in the docs, I've missed it. How can I have multiple > mongrel clusters on a server? All the documentation that I am seeing > seems to assume that I am only running one cluster. For different applications? You just run the "mongrel_rails cluster::configure" command in the root of each rails application and then edit config/ mongrel_cluster.yml to start at different port numbers, and make sure that the number of processes doesn't overlap any of the ranges. - Jason From bryan at osesm.com Wed Jul 5 20:45:25 2006 From: bryan at osesm.com (Bryan Liles) Date: Wed, 5 Jul 2006 20:45:25 -0400 Subject: [Mongrel] multiple mongrel clusters In-Reply-To: <370D49C0-8CBE-4461-BF58-721C9604DFE3@joyent.com> References: <370D49C0-8CBE-4461-BF58-721C9604DFE3@joyent.com> Message-ID: <7FE7C516-3A6B-4555-AECA-2C0F9071B2B4@osesm.com> On Jul 5, 2006, at 8:40 PM, Jason A. Hoffman wrote: > On Jul 5, 2006, at 4:59 PM, Bryan Liles wrote: > >> If this was in the docs, I've missed it. How can I have multiple >> mongrel clusters on a server? All the documentation that I am seeing >> seems to assume that I am only running one cluster. > > For different applications? > > You just run the "mongrel_rails cluster::configure" command in the > root of each rails application and then edit config/ > mongrel_cluster.yml to start at different port numbers, and make sure > that the number of processes doesn't overlap any of the ranges. I understand that part. I'm more interesting the apache proxy balancer integration. From jason at joyent.com Wed Jul 5 20:53:58 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Wed, 5 Jul 2006 17:53:58 -0700 Subject: [Mongrel] multiple mongrel clusters In-Reply-To: <7FE7C516-3A6B-4555-AECA-2C0F9071B2B4@osesm.com> References: <370D49C0-8CBE-4461-BF58-721C9604DFE3@joyent.com> <7FE7C516-3A6B-4555-AECA-2C0F9071B2B4@osesm.com> Message-ID: <4DBFB876-851E-47ED-9966-E0BA794DF6AC@joyent.com> On Jul 5, 2006, at 5:45 PM, Bryan Liles wrote: > On Jul 5, 2006, at 8:40 PM, Jason A. Hoffman wrote: >> On Jul 5, 2006, at 4:59 PM, Bryan Liles wrote: >> >>> If this was in the docs, I've missed it. How can I have multiple >>> mongrel clusters on a server? All the documentation that I am >>> seeing >>> seems to assume that I am only running one cluster. >> >> For different applications? >> >> You just run the "mongrel_rails cluster::configure" command in the >> root of each rails application and then edit config/ >> mongrel_cluster.yml to start at different port numbers, and make sure >> that the number of processes doesn't overlap any of the ranges. > > I understand that part. I'm more interesting the apache proxy > balancer integration. Everything with mod_proxy and mod_proxy_balancer can be in virtual hosts. We tend to define them in a directory (as single files so they can be managed and distributed from one location). So in a simple setup, you would define multiple proxy balancers like BalancerMember http://10.7.108.15:8000 BalancerMember http://10.7.108.15:8001 BalancerMember http://10.7.108.15:8002 BalancerMember http://10.7.108.15:8003 BalancerMember http://10.7.108.15:8004 BalancerMember http://10.7.108.15:8005 BalancerMember http://10.7.108.15:8006 BalancerMember http://10.7.108.15:8007 BalancerMember http://10.7.108.15:8008 BalancerMember http://10.7.108.15:8009 BalancerMember http://10.7.108.15:9000 BalancerMember http://10.7.108.15:9001 BalancerMember http://10.7.108.15:9002 BalancerMember http://10.7.108.15:9003 BalancerMember http://10.7.108.15:9004 BalancerMember http://10.7.108.15:9005 BalancerMember http://10.7.108.15:9006 BalancerMember http://10.7.108.15:9007 BalancerMember http://10.7.108.15:9008 BalancerMember http://10.7.108.15:9009 And then have different virtual hosts point to different balancers. ServerName connector1.joyent.com ProxyPass /logs ! ProxyPass /icons ! ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! ProxyPass / balancer://joyent-mongrel/ ProxyPreserveHost On ServerName connector2.joyent.com ProxyPass /logs ! ProxyPass /icons ! ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! ProxyPass / balancer://zonekoz-mongrel/ ProxyPreserveHost On From bradley at railsmachine.com Wed Jul 5 21:28:47 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Wed, 5 Jul 2006 21:28:47 -0400 Subject: [Mongrel] multiple mongrel clusters In-Reply-To: References: Message-ID: On Jul 5, 2006, at 7:59 PM, Bryan Liles wrote: > If this was in the docs, I've missed it. How can I have multiple > mongrel clusters on a server? All the documentation that I am seeing > seems to assume that I am only running one cluster. Hi Bryan: Take a look at the railsmachine gem. It will create Apache vhost configurations for you via Capistrano. I'm working on better doc, but this should get you going. Note: These instructions assume CentOS/RedHat with Apache 2.2, mongrel_cluster, and MySQL installed. You may need to adjust for your server environment. 1. Create a directory to hold the Apache conf for each application. For example: sudo mkdir /etc/httpd/conf/apps/ 2. Add includes for a default virtual host and additional vhosts to your Apache conf: sudo vi /etc/httpd/conf/httpd.conf Append the following: NameVirtualHost *:80 Include conf/default.conf Include conf/apps/*.conf 3. Create a mongrel_cluster configuration dir: mkdir /etc/mongrel_cluster 4. Install railsmachine and Capistrano gems on your development box: sudo gem install railsmachine --include-dependencies 5. Check out deployment instructions and modify any paths for your system in config/deploy.rb: https://support.railsmachine.com/index.php?pg=kb.page&id=12 Hope this helps! Dig around in the gem source to see how to modify the process for your needs. Good luck, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060705/d80c8630/attachment-0001.html From kevwil at gmail.com Wed Jul 5 21:38:28 2006 From: kevwil at gmail.com (Kevin Williams) Date: Wed, 5 Jul 2006 19:38:28 -0600 Subject: [Mongrel] multiple mongrel clusters In-Reply-To: References: Message-ID: <683a886f0607051838s139302f4q865a4d66275138f@mail.gmail.com> Isn't that gem for railsmachine users only? On 7/5/06, Bradley Taylor wrote: > > > On Jul 5, 2006, at 7:59 PM, Bryan Liles wrote: > > If this was in the docs, I've missed it. How can I have multiple > mongrel clusters on a server? All the documentation that I am seeing > seems to assume that I am only running one cluster. > > Hi Bryan: > > Take a look at the railsmachine gem. It will create Apache vhost > configurations for you via Capistrano. I'm working on better doc, but this > should get you going. > > Note: These instructions assume CentOS/RedHat with Apache 2.2, > mongrel_cluster, and MySQL installed. You may need to adjust for your server > environment. > > 1. Create a directory to hold the Apache conf for each application. For > example: > sudo mkdir /etc/httpd/conf/apps/ > > 2. Add includes for a default virtual host and additional vhosts to your > Apache conf: > sudo vi /etc/httpd/conf/httpd.conf > > Append the following: > > NameVirtualHost *:80 > Include conf/default.conf > Include conf/apps/*.conf > > 3. Create a mongrel_cluster configuration dir: > mkdir /etc/mongrel_cluster > > 4. Install railsmachine and Capistrano gems on your development box: > sudo gem install railsmachine --include-dependencies > > 5. Check out deployment instructions and modify any paths for your system in > config/deploy.rb: > https://support.railsmachine.com/index.php?pg=kb.page&id=12 > > Hope this helps! Dig around in the gem source to see how to modify the > process for your needs. > > Good luck, > Bradley Taylor > > ------ > Rails Optimized Hosting ~ VPS and Dedicated Servers > Simplified Deployment ~ Services and Software > http://railsmachine.com > > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Cheers, Kevin From bradley at railsmachine.com Wed Jul 5 22:34:21 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Wed, 5 Jul 2006 22:34:21 -0400 Subject: [Mongrel] multiple mongrel clusters In-Reply-To: <683a886f0607051838s139302f4q865a4d66275138f@mail.gmail.com> References: <683a886f0607051838s139302f4q865a4d66275138f@mail.gmail.com> Message-ID: <2F1920EF-A35F-4E43-8456-8D5982CF603A@railsmachine.com> On Jul 5, 2006, at 9:38 PM, Kevin Williams wrote: > Isn't that gem for railsmachine users only? No, the gem is open source licensed and available from Ruby Forge. In theory, you can use it with any server or host. However, you might need to tweak the deploy.rb variables to match your paths, etc. When configuring multiple clusters, be sure to change the apache_proxy_port variable for each app in its 'config/deploy.rb'. Please let me know how it works for you. Thanks, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060705/6431e534/attachment.html From johnkie at pacbell.net Wed Jul 5 22:57:13 2006 From: johnkie at pacbell.net (John Kienitz) Date: Wed, 5 Jul 2006 19:57:13 -0700 Subject: [Mongrel] Apache 2.0 proxy Message-ID: <200607051957.19373.johnkie@pacbell.net> This is the configuration I use with Apache v2.0. I don't use virtual hosts. This configuration lets Apache serve the images, javascripts, and stylesheets. ? This means that the application needs to be installed on the Apache server as wheel as the mongrel server(s) in multiple server environments. ? If i wanted to flatten the resource directories I could avoid the rewrite rules, but Apache and Mongrel are currently using the same directorys and it is easier to deploy this way. This all seems to work so far. ?There is probably a better way to write the rewrite rules for the static files directories. I don't do any caching in my app, so I don't know if that would cause any problems. ruby changes: ------------------------------------------------------------------------------------------- This is a configuration for a rails application "myrailsapp". # At the top of config/routes.rb add the following line ActionController::AbstractRequest.relative_url_root = "/myrailsapp " Apache configuration: --------------------------------------------------------------------------------------------- # johnk 4/5/06 - rails myrailsapp application # Proxy ProxyRequests Off RewriteEngine On RewriteRule ^/myrailsapp/images(.*) /myrailsapp/public/images$1 RewriteRule ^/myrailsapp/javascripts(.*) /myrailsapp/public/javascripts$1 RewriteRule ^/myrailsapp/stylesheets(.*) /myrailsapp/public/stylesheets$1 ProxyPass /myrailsapp/images ! ProxyPass /myrailsapp/javascrripts ! ProxyPass /myrailsapp/stylesheets ! ProxyPass /myrailsapp http://localhost:3000/myrailsapp ProxyPassReverse /myrailsapp http://localhost:3000/myrailsapp -- John E. Kienitz Jr. GPG-FP: 4992 D6E9 774B BA0A CE13 3E2B D6B3 827E 5736 D958 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060705/15c7a60d/attachment.bin From kevwil at gmail.com Wed Jul 5 23:15:45 2006 From: kevwil at gmail.com (Kevin Williams) Date: Wed, 5 Jul 2006 21:15:45 -0600 Subject: [Mongrel] multiple mongrel clusters In-Reply-To: <2F1920EF-A35F-4E43-8456-8D5982CF603A@railsmachine.com> References: <683a886f0607051838s139302f4q865a4d66275138f@mail.gmail.com> <2F1920EF-A35F-4E43-8456-8D5982CF603A@railsmachine.com> Message-ID: <683a886f0607052015r70305141h67c86655495f3d14@mail.gmail.com> Interesting. I knew it was available to everyone, but I didn't really expect it to work for anyone other than railsmachine users. If there were a 'textdrive' or a 'rimuhosting' gem, I would also expect them to be specific to their respective environments as well. Maybe it's just me. :) I will give it a shot. I'm trying to determine whether to host myself at home on an old box (Arch Linux) or go with the vpsland account I just opened (Ubuntu 6.06). (Sorry - I looked at RailsMachine but I need something really cheap but above shared hosting - we'll see if I get what I pay for.) It sounds like this is just the functionality I need because I'm having trouble manually getting Apache 2.2 + Mongrel + Capistrano + svn all in sync on my home server. On 7/5/06, Bradley Taylor wrote: > > > On Jul 5, 2006, at 9:38 PM, Kevin Williams wrote: > > Isn't that gem for railsmachine users only? > > No, the gem is open source licensed and available from Ruby Forge. In > theory, you can use it with any server or host. However, you might need to > tweak the deploy.rb variables to match your paths, etc. > > When configuring multiple clusters, be sure to change the apache_proxy_port > variable for each app in its 'config/deploy.rb'. > > Please let me know how it works for you. > > Thanks, > > Bradley Taylor > > > ------ > Rails Optimized Hosting ~ VPS and Dedicated Servers > Simplified Deployment ~ Services and Software > http://railsmachine.com > > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Cheers, Kevin From maillist at steelskies.com Fri Jul 7 08:16:09 2006 From: maillist at steelskies.com (Jonathan del Strother) Date: Fri, 7 Jul 2006 13:16:09 +0100 Subject: [Mongrel] Mongrel & irbrc Message-ID: <4B87B1D0-B8CB-4EC5-8B86-05B606127156@steelskies.com> Why does mongrel_rails insist on loading ~/.irbrc with each request? a) I'm curious why it loads it at all (I assume there's no way of getting an inline breakpointer??) b) Why re-load it? It causes problems with any constants that are used in .irbrc... (alternatively, how do I avoid re-assigning to a constant?) Jon -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2114 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060707/3d05d7b4/attachment.bin From jason at joyent.com Fri Jul 7 10:27:11 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Fri, 7 Jul 2006 07:27:11 -0700 Subject: [Mongrel] Mongrel & irbrc In-Reply-To: <4B87B1D0-B8CB-4EC5-8B86-05B606127156@steelskies.com> References: <4B87B1D0-B8CB-4EC5-8B86-05B606127156@steelskies.com> Message-ID: On Jul 7, 2006, at 5:16 AM, Jonathan del Strother wrote: > Why does mongrel_rails insist on loading ~/.irbrc with each request? > a) I'm curious why it loads it at all (I assume there's no way of > getting an inline breakpointer??) > b) Why re-load it? It causes problems with any constants that are > used in .irbrc... (alternatively, how do I avoid re-assigning to a > constant?) > > Jon_______________________________________________ Are you starting it in development mode? - Jason From maillist at steelskies.com Fri Jul 7 10:55:10 2006 From: maillist at steelskies.com (Jonathan del Strother) Date: Fri, 7 Jul 2006 15:55:10 +0100 Subject: [Mongrel] Mongrel & irbrc In-Reply-To: References: <4B87B1D0-B8CB-4EC5-8B86-05B606127156@steelskies.com> Message-ID: <8EA16B36-232E-45CA-AE76-D9B205598C8A@steelskies.com> On 7 Jul 2006, at 15:27, Jason A. Hoffman wrote: > On Jul 7, 2006, at 5:16 AM, Jonathan del Strother wrote: > >> Why does mongrel_rails insist on loading ~/.irbrc with each request? >> a) I'm curious why it loads it at all (I assume there's no way of >> getting an inline breakpointer??) >> b) Why re-load it? It causes problems with any constants that are >> used in .irbrc... (alternatively, how do I avoid re-assigning to a >> constant?) >> >> Jon_______________________________________________ > > > Are you starting it in development mode? Yep. And no, it doesn't load irb in production mode. I'm just curious why it loads it at all. It does seem to be Mongrel (rather than Rails) that's loading it - it doesn't get loaded when I run my server off of lighty, for instance. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2114 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060707/9004b4fa/attachment-0001.bin From jason at joyent.com Fri Jul 7 12:34:01 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Fri, 7 Jul 2006 09:34:01 -0700 Subject: [Mongrel] Mongrel & irbrc In-Reply-To: <8EA16B36-232E-45CA-AE76-D9B205598C8A@steelskies.com> References: <4B87B1D0-B8CB-4EC5-8B86-05B606127156@steelskies.com> <8EA16B36-232E-45CA-AE76-D9B205598C8A@steelskies.com> Message-ID: <2C38E7D4-D162-41E4-95FE-A8085A48C1D1@joyent.com> On Jul 7, 2006, at 7:55 AM, Jonathan del Strother wrote: > On 7 Jul 2006, at 15:27, Jason A. Hoffman wrote: >> On Jul 7, 2006, at 5:16 AM, Jonathan del Strother wrote: >> Why does mongrel_rails insist on loading ~/.irbrc with each request? >>> a) I'm curious why it loads it at all (I assume there's no way of >>> getting an inline breakpointer??) >>> b) Why re-load it? It causes problems with any constants that are >>> used in .irbrc... (alternatively, how do I avoid re-assigning to a >>> constant?) >>> >>> Jon_______________________________________________ >> >> >> Are you starting it in development mode? > > Yep. And no, it doesn't load irb in production mode. I'm just > curious why it loads it at all. It does seem to be Mongrel (rather > than Rails) that's loading it - it doesn't get loaded when I run my > server off of lighty, for instance. When you drill through a mongrel, webrick or a FCGI when in development mode you'll see stat64 calls and then that they're coming from irb (you don't usually see it with lighttpd because it hides all that from you). Like the table from http://blogs.sun.com/roller/page/bmc? entry=dtrace_on_rails Top ten system calls per URI serviced: -----------------------------------------------------------------------+ ------ setcontext | 15 fcntl | 16 fstat64 | 16 open64 | 21 close | 25 llseek | 27 lwp_sigmask | 30 read | 62 pollsys | 80 stat64 | 340 - Jason From random49k at gmail.com Fri Jul 7 13:55:13 2006 From: random49k at gmail.com (Mike Garey) Date: Fri, 7 Jul 2006 13:55:13 -0400 Subject: [Mongrel] problem serving pdf files Message-ID: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> I'm using the instructions from http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/to configure mongrel_cluster with apache mod_proxy_balancer. Everything works fine, except when I try to link to a pdf file to be opened in a new window, it displays the contents of the pdf as text instead of opening it as a pdf document through Acrobat. If I try adding a link to a pdf file in a regular html file (as in under ~/public_html) which is served directly by apache (and not by mongrel), it works properly.. I'm not sure exactly how to configure mongrel/apache to play nicely with pdf files.. Is this happening because I haven't told apache that pdf files are static content and should be handled by it rather than mongrel? If anyone has any suggestions on how to get this to work, please let me know. Thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060707/a9621f26/attachment.html From kraemer at webit.de Fri Jul 7 17:08:55 2006 From: kraemer at webit.de (Jens Kraemer) Date: Fri, 7 Jul 2006 23:08:55 +0200 Subject: [Mongrel] Mongrel Debian packages Message-ID: <20060707210855.GB16634@cordoba.webit.de> Hi all, I just wanted to let you know that I built some Debian (Sarge) packages to allow an apt-get only installation of Mongrel, Ruby and friends. Also contained is an init script that is capable of managing multiple applications. Support for the Pen load balancer is also included. More info can be found there: http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge any feedback would be great. Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From ezmobius at gmail.com Fri Jul 7 17:26:43 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 7 Jul 2006 14:26:43 -0700 Subject: [Mongrel] Mongrel Debian packages In-Reply-To: <20060707210855.GB16634@cordoba.webit.de> References: <20060707210855.GB16634@cordoba.webit.de> Message-ID: <88CBBB4C-1F38-4BA2-802B-C6ED436A44C0@brainspl.at> On Jul 7, 2006, at 2:08 PM, Jens Kraemer wrote: > Hi all, > > I just wanted to let you know that I built some Debian (Sarge) > packages to allow an apt-get only installation of Mongrel, Ruby and > friends. > > Also contained is an init script that is capable of managing > multiple applications. Support for the Pen load balancer is also > included. > > More info can be found there: > http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and- > rails-on-debian-sarge > > any feedback would be great. > > Jens Sweet man! THanks -Ezra From random49k at gmail.com Fri Jul 7 17:42:56 2006 From: random49k at gmail.com (Mike Garey) Date: Fri, 7 Jul 2006 17:42:56 -0400 Subject: [Mongrel] problem serving pdf files In-Reply-To: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> Message-ID: <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> okay, I managed to solve the problem by creating a mime.types file with ".pdf: application/pdf" and referencing it using ":mime_map config/mime.types". The problem is, this means that the pdf file is being served by mongrel, whereas it should be served as a static file via apache. In my rewrite log, I see the following: (3) applying pattern '^/$' to uri '/pdfs/instructions.pdf' (3) applying pattern '^([^.]+)$' to uri '/pdfs/instructions.pdf' (3) applying pattern '^/(.*)$' to uri '/pdfs/instructions.pdf' (4) RewriteCond: (3) input='/usr/local/www/data/vhosts/www.mydomain.com/current/public/pdfs/instructions.pdf' (3) pattern='!-f' => not-matched (1) pass through /pdfs/instructions.pdf and I'm using the following rewrite rules: # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mls%{REQUEST_URI} [P,QSA,L] so doesn't "pass through" mean that the file is being passed through to apache to be served statically? I have sendfile installed, so does that mean that it's using sendfile to give apache a reference to the file, and so that may be why it's having trouble with mime type (since maybe apache doesn't use it's own mime type when being passed a reference via sendfile)? I just want to make sure that I'm doing this the correct way and that my static files are being served statically. Am I doing the right thing by adding the mime type to the mongrel mime_map file? Thanks, Mike On 7/7/06, Mike Garey wrote: > > I'm using the instructions from http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ > to configure mongrel_cluster with apache mod_proxy_balancer. Everything > works fine, except when I try to link to a pdf file to be opened in a new > window, it displays the contents of the pdf as text instead of opening it as > a pdf document through Acrobat. If I try adding a link to a pdf file in a > regular html file (as in under ~/public_html) which is served directly by > apache (and not by mongrel), it works properly.. I'm not sure exactly how to > configure mongrel/apache to play nicely with pdf files.. Is this happening > because I haven't told apache that pdf files are static content and should > be handled by it rather than mongrel? If anyone has any suggestions on how > to get this to work, please let me know. Thanks, > > Mike > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060707/a57dad56/attachment.html From kraemer at webit.de Fri Jul 7 18:01:49 2006 From: kraemer at webit.de (Jens Kraemer) Date: Sat, 8 Jul 2006 00:01:49 +0200 Subject: [Mongrel] problem serving pdf files In-Reply-To: <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> Message-ID: <20060707220149.GC16634@cordoba.webit.de> On Fri, Jul 07, 2006 at 05:42:56PM -0400, Mike Garey wrote: > okay, I managed to solve the problem by creating a mime.types file with > ".pdf: application/pdf" and referencing it using ":mime_map > config/mime.types". The problem is, this means that the pdf file is being > served by mongrel, whereas it should be served as a static file via apache. > In my rewrite log, I see the following: > > (3) applying pattern '^/$' to uri '/pdfs/instructions.pdf' > (3) applying pattern '^([^.]+)$' to uri '/pdfs/instructions.pdf' > (3) applying pattern '^/(.*)$' to uri '/pdfs/instructions.pdf' > (4) RewriteCond: > (3) > input='/usr/local/www/data/vhosts/www.mydomain.com/current/public/pdfs/instructions.pdf' > (3) pattern='!-f' => not-matched > (1) pass through /pdfs/instructions.pdf imho this means that Apache is serving the file itself. Just to be sure you could stop mongrel and hit the same URL again. If you get the file, it is clearly served by Apache. Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From random49k at gmail.com Fri Jul 7 18:30:42 2006 From: random49k at gmail.com (Mike Garey) Date: Fri, 7 Jul 2006 18:30:42 -0400 Subject: [Mongrel] problem serving pdf files In-Reply-To: <20060707220149.GC16634@cordoba.webit.de> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> <20060707220149.GC16634@cordoba.webit.de> Message-ID: <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> if I shut down mongrel, I get the following: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. so it looks like it _is_ being served through mongrel.. I guess this means my rewrite rules aren't actually serving the static files through apache.. Any ideas? Mike On 7/7/06, Jens Kraemer wrote: > On Fri, Jul 07, 2006 at 05:42:56PM -0400, Mike Garey wrote: > > okay, I managed to solve the problem by creating a mime.types file with > > ".pdf: application/pdf" and referencing it using ":mime_map > > config/mime.types". The problem is, this means that the pdf file is being > > served by mongrel, whereas it should be served as a static file via apache. > > In my rewrite log, I see the following: > > > > (3) applying pattern '^/$' to uri '/pdfs/instructions.pdf' > > (3) applying pattern '^([^.]+)$' to uri '/pdfs/instructions.pdf' > > (3) applying pattern '^/(.*)$' to uri '/pdfs/instructions.pdf' > > (4) RewriteCond: > > (3) > > input='/usr/local/www/data/vhosts/www.mydomain.com/current/public/pdfs/instructions.pdf' > > (3) pattern='!-f' => not-matched > > (1) pass through /pdfs/instructions.pdf > > imho this means that Apache is serving the file itself. > > Just to be sure you could stop mongrel and hit the same URL > again. If you get the file, it is clearly served by Apache. > > Jens > > > -- > webit! Gesellschaft f?r neue Medien mbH www.webit.de > Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de > Schnorrstra?e 76 Tel +49 351 46766 0 > D-01069 Dresden Fax +49 351 46766 66 > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Fri Jul 7 21:28:10 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 07 Jul 2006 21:28:10 -0400 Subject: [Mongrel] Mongrel Debian packages In-Reply-To: <20060707210855.GB16634@cordoba.webit.de> References: <20060707210855.GB16634@cordoba.webit.de> Message-ID: <1152322090.6667.1.camel@localhost.localdomain> On Fri, 2006-07-07 at 23:08 +0200, Jens Kraemer wrote: > Hi all, > > I just wanted to let you know that I built some Debian (Sarge) > packages to allow an apt-get only installation of Mongrel, Ruby and > friends. > > Also contained is an init script that is capable of managing > multiple applications. Support for the Pen load balancer is also > included. > > More info can be found there: > http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge > Nice job, although I haven't tried it yet. I'm glad someone is tackling the debian problem because having to install billions of packages really is an issue for folks who try to build Mongrel. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Jul 7 21:30:55 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 07 Jul 2006 21:30:55 -0400 Subject: [Mongrel] problem serving pdf files In-Reply-To: <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> Message-ID: <1152322255.6667.4.camel@localhost.localdomain> On Fri, 2006-07-07 at 17:42 -0400, Mike Garey wrote: > so doesn't "pass through" mean that the file is being passed through > to apache to be served statically? I have sendfile installed, so does > that mean that it's using sendfile to give apache a reference to the > file, and so that may be why it's having trouble with mime type (since > maybe apache doesn't use it's own mime type when being passed a > reference via sendfile)? I believe you've got it backwards, but the mod_rewrite stuff is so dense I could never remember what directive did was exactly. The only thing I do is I setup a stock set of instructions (Bradley Taylor had some) and then turn on insane mod_rewrite debugging. No matter what the docs say, if the debug output says that it's not serving the file statically then you don't have your config right. I'll dig into some of my other configs and see if you've got a simple "one-char-fix" problem. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From schwuk at gmail.com Fri Jul 7 21:40:06 2006 From: schwuk at gmail.com (Dave Murphy) Date: Sat, 8 Jul 2006 02:40:06 +0100 Subject: [Mongrel] Mongrel Debian packages In-Reply-To: <1152322090.6667.1.camel@localhost.localdomain> References: <20060707210855.GB16634@cordoba.webit.de> <1152322090.6667.1.camel@localhost.localdomain> Message-ID: <2e60a9e60607071840p355618acw8d4260a5e18c2d6f@mail.gmail.com> On 08/07/06, Zed Shaw wrote: > Nice job, although I haven't tried it yet. I'm glad someone is tackling > the debian problem because having to install billions of packages really > is an issue for folks who try to build Mongrel. Bit of an exaggeration there - besides Ruby I only needed to apt-get build-essential to install Mongrel via RubyGems. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From johnkie at pacbell.net Fri Jul 7 22:03:08 2006 From: johnkie at pacbell.net (John Kienitz) Date: Fri, 7 Jul 2006 19:03:08 -0700 Subject: [Mongrel] problem serving pdf files In-Reply-To: <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <20060707220149.GC16634@cordoba.webit.de> <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> Message-ID: <200607071903.13268.johnkie@pacbell.net> On Friday 07 July 2006 15:30, Mike Garey wrote: > if I shut down mongrel, I get the following: > > Service Temporarily Unavailable > > The server is temporarily unable to service your request due to > maintenance downtime or capacity problems. Please try again later. > > so it looks like it _is_ being served through mongrel.. I guess this > means my rewrite rules aren't actually serving the static files > through apache.. Any ideas? > > Mike > What are your proxy rules? Unless you have excluded these directories, and after rewriting they still fit one of your proxy rules, (from what you have shown so far, it looks like it will), it will be proxied with the rewritten url. -- John E. Kienitz Jr. GPG-FP: 4992 D6E9 774B BA0A CE13 3E2B D6B3 827E 5736 D958 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060707/a4c4505b/attachment.bin From zedshaw at zedshaw.com Sat Jul 8 02:54:37 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 08 Jul 2006 02:54:37 -0400 Subject: [Mongrel] Mongrel Debian packages In-Reply-To: <2e60a9e60607071840p355618acw8d4260a5e18c2d6f@mail.gmail.com> References: <20060707210855.GB16634@cordoba.webit.de> <1152322090.6667.1.camel@localhost.localdomain> <2e60a9e60607071840p355618acw8d4260a5e18c2d6f@mail.gmail.com> Message-ID: <1152341677.7033.22.camel@localhost.localdomain> On Sat, 2006-07-08 at 02:40 +0100, Dave Murphy wrote: > On 08/07/06, Zed Shaw wrote: > > Nice job, although I haven't tried it yet. I'm glad someone is tackling > > the debian problem because having to install billions of packages really > > is an issue for folks who try to build Mongrel. > > Bit of an exaggeration there - besides Ruby I only needed to apt-get > build-essential to install Mongrel via RubyGems. I run Ubuntu, so let's just see what I had to install to get even close to comfortable developing Rails applications with mongrel: ruby -- don't forget, this is actually named ruby1.8, lots of fun there. build-essential -- oh, and kernel headers, oh, and gcc, oh and... irb -- no, i don't need script/console ri -- nope, don't need documentation either rdoc -- nice to be able to build documentation libruby -- oh yeah, nobody needs this libdrb-ruby -- man, BackgrounDRB is sure nice, too bad libgdbm-ruby -- It's one of the session stores, and pretty much expected to be there by packages that use it. libiconv-ruby -- If you store utf-8 you need this, actually it's another expected library. libnet-ssh-ruby1.8 -- what? no ruby only version? damn, no capistrano then. libopenssl-ruby -- even though it is OpenSSL, some systems like to have it. libreadline-ruby -- man, script/console is so much nicer with this. libtest-unit-ruby -- these are nice too libwebrick-ruby -- well you might not need this with mongrel, but you've gotta get it for comparison libzlib-ruby -- DeflateFilter is quite nice really. libyaml-ruby -- As well as storing things in YAML. ruby1.8-elisp -- For the emacs crew. And I'm sure I'm missing a few of the pieces that get installed as I run into things which are missing. Yeah, no, that's a pretty small number of packages. Sure, I'm really exaggerating here. Frankly I found today that Fedora Core 5 isn't much better in this respect, but they didn't have nearly this much chopping. This lack of understanding of developer's needs by the Debian packagers has always irked me. It's fine for you to like an OS, but when you say all you had to do was install two packages and then I end up installing 17 to get even basic Ruby development comfort--not including databases, editors, libraries to support them, kernel headers, compilers, compiler support libraries--then I can't really put up with claims that I'm "exaggerating". And yes, none of this was installed by default, and this also doesn't include turning on the stupid "Universe" setting in the apt-get config so Ubuntu will find all this crap to begin with. Sorry, but Debian is my #1 OS for support problems with Mongrel, and I run Debian. Even Windows gives me less trouble. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From lars at pinds.com Sat Jul 8 05:28:09 2006 From: lars at pinds.com (Lars Pind) Date: Sat, 8 Jul 2006 11:28:09 +0200 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip Message-ID: Is anyone using the setup described at the Rails blog? http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and-mongrel- play-nice I'm using it in production, and the only problem I have is the same as people have described in the comments over there, namely that Rails thinks all requests come from localhost. See http://isabont.com/requestinfo for the headers. Any suggestions on what to try? Should I just replace lighty+pound with Apache? /Lars From jason at joyent.com Sat Jul 8 12:20:34 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Sat, 8 Jul 2006 09:20:34 -0700 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip In-Reply-To: References: Message-ID: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> On Jul 8, 2006, at 2:28 AM, Lars Pind wrote: > Is anyone using the setup described at the Rails blog? > > http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and-mongrel- > play-nice > > I'm using it in production, and the only problem I have is the same > as people have described in the comments over there, namely that > Rails thinks all requests come from localhost. > > See http://isabont.com/requestinfo for the headers. > > Any suggestions on what to try? Should I just replace lighty+pound > with Apache? > > /Lars http://www.apsis.ch/pound "REQUEST LOGGING As a general rule, Pound passes all headers as they arrive from the client browser to the back-end server(s). There are two exceptions to this rule: Pound may add information about the SSL client certificate (as described below), and it will add an X-Forwarded-For header. The general format is: X-Forwarded-for: client-IP-address The back-end server(s) may use this extra information in order to create their log-files with the real client address (otherwise all requests will appear to originate from Pound itself, which is rather useless)." - Jason From schwuk at gmail.com Sun Jul 9 04:33:56 2006 From: schwuk at gmail.com (Dave Murphy) Date: Sun, 9 Jul 2006 09:33:56 +0100 Subject: [Mongrel] Mongrel Debian packages In-Reply-To: <1152341677.7033.22.camel@localhost.localdomain> References: <20060707210855.GB16634@cordoba.webit.de> <1152322090.6667.1.camel@localhost.localdomain> <2e60a9e60607071840p355618acw8d4260a5e18c2d6f@mail.gmail.com> <1152341677.7033.22.camel@localhost.localdomain> Message-ID: <2e60a9e60607090133p526f40bbl86cfb4f9d9683ca5@mail.gmail.com> On 08/07/06, Zed Shaw wrote: > It's fine for you to like an OS, but when you say all you had to do was > install two packages and then I end up installing 17 to get even basic > Ruby development comfort--not including databases, editors, libraries to > support them, kernel headers, compilers, compiler support > libraries--then I can't really put up with claims that I'm > "exaggerating". Apples and oranges. I said: > besides Ruby I only needed to apt-get > build-essential to install Mongrel via RubyGems I deliberately excluded Ruby, and I said nothing about developing Mongrel. Of course you're going to have to install other packages if you want to use other features of Ruby. Personally however I prefer to install all non-core libraries like rake and rails via Rubygems so I just apt-get install: * ruby (which actually installs ruby1.8) * irb (again, actually irb1.8) * ri (ditto) * rdoc (likewise) ...and to save issues with some gems I also throw ruby1.8-dev into the mix. However if you just want an easy life then you only need to apt-get install rails. Before you say it, of course these packages install others but that is what package management is for. In total I might be installing a similar number of packages to you, but as far as I'm concerned it's only a handful (or even just one). Moving on, you are quite right that Debian and it's kin make life difficult for developers by breaking all the packages into chunks and then further by seperating the headers, but it's (just about) an acceptable overhead for me. For the sake of a stable production environment I want to see Mongrel turned into a .deb and included with distributions. I'd also like to see Rubygems packaged, but I can understand why it hasn't been. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From lars at pinds.com Sun Jul 9 09:14:46 2006 From: lars at pinds.com (Lars Pind) Date: Sun, 9 Jul 2006 15:14:46 +0200 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip In-Reply-To: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> References: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> Message-ID: <67681EFD-A2FE-4017-B18A-273BD17D4B43@pinds.com> Right, but how does that help fix the problem? The problem is that Pound overrides the X-Forwarded-For header already being added by lighty. Is there a way to get Pound to not mess with that header? I've looked at the source, and there doesn't appear to be any. Alternatively, one could get Pound to read the current X-Forwarded- For header when it exists and use the same IP address in the X- Forwarded-For header it itself adds, that should solve it, too. But again, I don't see a way to do that, either. I guess I'll just have to switch to Apache until lighty sorts out the proxying. /Lars On Jul 8, 2006, at 6:20 PM, Jason A. Hoffman wrote: > On Jul 8, 2006, at 2:28 AM, Lars Pind wrote: > >> Is anyone using the setup described at the Rails blog? >> >> http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and- >> mongrel- >> play-nice >> >> I'm using it in production, and the only problem I have is the same >> as people have described in the comments over there, namely that >> Rails thinks all requests come from localhost. >> >> See http://isabont.com/requestinfo for the headers. >> >> Any suggestions on what to try? Should I just replace lighty+pound >> with Apache? >> >> /Lars > > http://www.apsis.ch/pound > > "REQUEST LOGGING > > As a general rule, Pound passes all headers as they arrive from the > client browser to the back-end server(s). There are two exceptions to > this rule: Pound may add information about the SSL client certificate > (as described below), and it will add an X-Forwarded-For header. The > general format is: > > X-Forwarded-for: client-IP-address > > The back-end server(s) may use this extra information in order to > create their log-files with the real client address (otherwise all > requests will appear to originate from Pound itself, which is rather > useless)." > > > - Jason > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From lars at pinds.com Sun Jul 9 09:29:19 2006 From: lars at pinds.com (Lars Pind) Date: Sun, 9 Jul 2006 15:29:19 +0200 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip In-Reply-To: <67681EFD-A2FE-4017-B18A-273BD17D4B43@pinds.com> References: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> <67681EFD-A2FE-4017-B18A-273BD17D4B43@pinds.com> Message-ID: FYI, I've found that pen lets you disable the X-Forwarded-For header, so I'm using that instead, and Rails picks up the right IP address. I also noticed that pen.c has code to not add an X-Forwarded-For header if one is already present, but it didn't seem to be working for me. /Lars On Jul 9, 2006, at 3:14 PM, Lars Pind wrote: > Right, but how does that help fix the problem? > > The problem is that Pound overrides the X-Forwarded-For header > already being added by lighty. > > Is there a way to get Pound to not mess with that header? I've looked > at the source, and there doesn't appear to be any. > > Alternatively, one could get Pound to read the current X-Forwarded- > For header when it exists and use the same IP address in the X- > Forwarded-For header it itself adds, that should solve it, too. But > again, I don't see a way to do that, either. > > I guess I'll just have to switch to Apache until lighty sorts out the > proxying. > > /Lars > > On Jul 8, 2006, at 6:20 PM, Jason A. Hoffman wrote: > >> On Jul 8, 2006, at 2:28 AM, Lars Pind wrote: >> >>> Is anyone using the setup described at the Rails blog? >>> >>> http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and- >>> mongrel- >>> play-nice >>> >>> I'm using it in production, and the only problem I have is the same >>> as people have described in the comments over there, namely that >>> Rails thinks all requests come from localhost. >>> >>> See http://isabont.com/requestinfo for the headers. >>> >>> Any suggestions on what to try? Should I just replace lighty+pound >>> with Apache? >>> >>> /Lars >> >> http://www.apsis.ch/pound >> >> "REQUEST LOGGING >> >> As a general rule, Pound passes all headers as they arrive from the >> client browser to the back-end server(s). There are two exceptions to >> this rule: Pound may add information about the SSL client certificate >> (as described below), and it will add an X-Forwarded-For header. The >> general format is: >> >> X-Forwarded-for: client-IP-address >> >> The back-end server(s) may use this extra information in order to >> create their log-files with the real client address (otherwise all >> requests will appear to originate from Pound itself, which is rather >> useless)." >> >> >> - Jason >> >> >> _______________________________________________ >> 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 Sun Jul 9 19:51:00 2006 From: kevwil at gmail.com (Kevin Williams) Date: Sun, 9 Jul 2006 17:51:00 -0600 Subject: [Mongrel] [Slightly OT] server headers Message-ID: <683a886f0607091651u2191a870g28477e6fa49c26b8@mail.gmail.com> I finally got my blog running on Apache 2.2.2 & Mongrel 0.3.13.3 (clustered). Whew! Two whole flippin' days trying to get virtual hosts and proxies and permissions (& svn) to work together. Anyway, I've got the little server header thingy extension in Firefox. When I browse my blog, it shows the mongrel headers. Is there a quick fix for this? -- Cheers, Kevin From jason at joyent.com Sun Jul 9 20:14:02 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Sun, 9 Jul 2006 17:14:02 -0700 Subject: [Mongrel] [Slightly OT] server headers In-Reply-To: <683a886f0607091651u2191a870g28477e6fa49c26b8@mail.gmail.com> References: <683a886f0607091651u2191a870g28477e6fa49c26b8@mail.gmail.com> Message-ID: On Jul 9, 2006, at 4:51 PM, Kevin Williams wrote: > I finally got my blog running on Apache 2.2.2 & Mongrel 0.3.13.3 > (clustered). Whew! Two whole flippin' days trying to get virtual hosts > and proxies and permissions (& svn) to work together. > > Anyway, I've got the little server header thingy extension in Firefox. > When I browse my blog, it shows > the mongrel headers. Is there a quick fix for this? > -- > Cheers, > > Kevin > You need the mod_headers enabled (http://httpd.apache.org/docs/2.2/ mod/mod_headers.html), and you can set|append|add|unset|echo any existing or non-existent (add) headers Header unset Server will strip the Server header. Header set Server "Whatever" will replace any value what "Whatever" Header add Served-By "Me" will add a new header. - Jason From kevwil at gmail.com Sun Jul 9 23:16:30 2006 From: kevwil at gmail.com (Kevin Williams) Date: Sun, 9 Jul 2006 21:16:30 -0600 Subject: [Mongrel] [Slightly OT] server headers In-Reply-To: References: <683a886f0607091651u2191a870g28477e6fa49c26b8@mail.gmail.com> Message-ID: <683a886f0607092016g753c8eb0m2e6a6c93b2fbdcce@mail.gmail.com> Thank you! On 7/9/06, Jason A. Hoffman wrote: > On Jul 9, 2006, at 4:51 PM, Kevin Williams wrote: > > I finally got my blog running on Apache 2.2.2 & Mongrel 0.3.13.3 > > (clustered). Whew! Two whole flippin' days trying to get virtual hosts > > and proxies and permissions (& svn) to work together. > > > > Anyway, I've got the little server header thingy extension in Firefox. > > When I browse my blog, it shows > > the mongrel headers. Is there a quick fix for this? > > -- > > Cheers, > > > > Kevin > > > > You need the mod_headers enabled (http://httpd.apache.org/docs/2.2/ > mod/mod_headers.html), and you can set|append|add|unset|echo any > existing or non-existent (add) headers > > Header unset Server > > will strip the Server header. > > Header set Server "Whatever" > > will replace any value what "Whatever" > > Header add Served-By "Me" > > will add a new header. > > - Jason > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Cheers, Kevin From talk2sunder at gmail.com Sun Jul 9 23:29:20 2006 From: talk2sunder at gmail.com (Sunder ) Date: Sun, 9 Jul 2006 20:29:20 -0700 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip In-Reply-To: References: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> <67681EFD-A2FE-4017-B18A-273BD17D4B43@pinds.com> Message-ID: Lars, How did you get pen to disable the x-forwarded-for header. I didnt see an option in the pen man page. I only see the below option -H Adds X-Forwarded-For header to http requests.Thanks! Sunder On 7/9/06, Lars Pind wrote: > > FYI, I've found that pen lets you disable the X-Forwarded-For header, > so I'm using that instead, and Rails picks up the right IP address. > > I also noticed that pen.c has code to not add an X-Forwarded-For > header if one is already present, but it didn't seem to be working > for me. > > /Lars > > On Jul 9, 2006, at 3:14 PM, Lars Pind wrote: > > > Right, but how does that help fix the problem? > > > > The problem is that Pound overrides the X-Forwarded-For header > > already being added by lighty. > > > > Is there a way to get Pound to not mess with that header? I've looked > > at the source, and there doesn't appear to be any. > > > > Alternatively, one could get Pound to read the current X-Forwarded- > > For header when it exists and use the same IP address in the X- > > Forwarded-For header it itself adds, that should solve it, too. But > > again, I don't see a way to do that, either. > > > > I guess I'll just have to switch to Apache until lighty sorts out the > > proxying. > > > > /Lars > > > > On Jul 8, 2006, at 6:20 PM, Jason A. Hoffman wrote: > > > >> On Jul 8, 2006, at 2:28 AM, Lars Pind wrote: > >> > >>> Is anyone using the setup described at the Rails blog? > >>> > >>> http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and- > >>> mongrel- > >>> play-nice > >>> > >>> I'm using it in production, and the only problem I have is the same > >>> as people have described in the comments over there, namely that > >>> Rails thinks all requests come from localhost. > >>> > >>> See http://isabont.com/requestinfo for the headers. > >>> > >>> Any suggestions on what to try? Should I just replace lighty+pound > >>> with Apache? > >>> > >>> /Lars > >> > >> http://www.apsis.ch/pound > >> > >> "REQUEST LOGGING > >> > >> As a general rule, Pound passes all headers as they arrive from the > >> client browser to the back-end server(s). There are two exceptions to > >> this rule: Pound may add information about the SSL client certificate > >> (as described below), and it will add an X-Forwarded-For header. The > >> general format is: > >> > >> X-Forwarded-for: client-IP-address > >> > >> The back-end server(s) may use this extra information in order to > >> create their log-files with the real client address (otherwise all > >> requests will appear to originate from Pound itself, which is rather > >> useless)." > >> > >> > >> - Jason > >> > >> > >> _______________________________________________ > >> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060709/d7c09396/attachment.html From kraemer at webit.de Mon Jul 10 03:54:01 2006 From: kraemer at webit.de (Jens Kraemer) Date: Mon, 10 Jul 2006 09:54:01 +0200 Subject: [Mongrel] problem serving pdf files In-Reply-To: <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> <20060707220149.GC16634@cordoba.webit.de> <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> Message-ID: <20060710075401.GF17139@cordoba.webit.de> On Fri, Jul 07, 2006 at 06:30:42PM -0400, Mike Garey wrote: > if I shut down mongrel, I get the following: > > Service Temporarily Unavailable > > The server is temporarily unable to service your request due to > maintenance downtime or capacity problems. Please try again later. > > so it looks like it _is_ being served through mongrel.. I guess this > means my rewrite rules aren't actually serving the static files > through apache.. Any ideas? how is your mod_proxy configured ? Do you use ProxyPass or do you Proxy by using [P] with a rewrite rule ? Posting your virtual host's apache configuration might help. Jens > > Mike > > On 7/7/06, Jens Kraemer wrote: > > On Fri, Jul 07, 2006 at 05:42:56PM -0400, Mike Garey wrote: > > > okay, I managed to solve the problem by creating a mime.types file with > > > ".pdf: application/pdf" and referencing it using ":mime_map > > > config/mime.types". The problem is, this means that the pdf file is being > > > served by mongrel, whereas it should be served as a static file via apache. > > > In my rewrite log, I see the following: > > > > > > (3) applying pattern '^/$' to uri '/pdfs/instructions.pdf' > > > (3) applying pattern '^([^.]+)$' to uri '/pdfs/instructions.pdf' > > > (3) applying pattern '^/(.*)$' to uri '/pdfs/instructions.pdf' > > > (4) RewriteCond: > > > (3) > > > input='/usr/local/www/data/vhosts/www.mydomain.com/current/public/pdfs/instructions.pdf' > > > (3) pattern='!-f' => not-matched > > > (1) pass through /pdfs/instructions.pdf > > > > imho this means that Apache is serving the file itself. > > > > Just to be sure you could stop mongrel and hit the same URL > > again. If you get the file, it is clearly served by Apache. > > > > Jens > > > > > > -- > > webit! Gesellschaft f?r neue Medien mbH www.webit.de > > Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de > > Schnorrstra?e 76 Tel +49 351 46766 0 > > D-01069 Dresden Fax +49 351 46766 66 > > _______________________________________________ > > 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 -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From lars at pinds.com Mon Jul 10 04:36:40 2006 From: lars at pinds.com (Lars Pind) Date: Mon, 10 Jul 2006 10:36:40 +0200 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip In-Reply-To: References: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> <67681EFD-A2FE-4017-B18A-273BD17D4B43@pinds.com> Message-ID: <3D9CB878-5E1D-4C4D-BE0B-E3A530930119@pinds.com> > How did you get pen to disable the x-forwarded-for header. I didnt > see an option in the pen man page. I only see the below option > > -H Adds X-Forwarded-For header to http requests.Thanks! > Sunder Yes, just don't specify the -H switch, and it won't add the header, hence it'll let the one put in there by lighttpd stay there. pen 7999 localhost:8000 localhost:8001 localhost:8002 is roughly what my pen command looks like. /Lars From random49k at gmail.com Mon Jul 10 09:14:01 2006 From: random49k at gmail.com (Mike Garey) Date: Mon, 10 Jul 2006 09:14:01 -0400 Subject: [Mongrel] problem serving pdf files In-Reply-To: <20060710075401.GF17139@cordoba.webit.de> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> <20060707220149.GC16634@cordoba.webit.de> <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> <20060710075401.GF17139@cordoba.webit.de> Message-ID: <16a8b9140607100614v40d1aad5yd26ca0c0b17074f2@mail.gmail.com> On 7/10/06, Jens Kraemer wrote: > On Fri, Jul 07, 2006 at 06:30:42PM -0400, Mike Garey wrote: > > if I shut down mongrel, I get the following: > > > > Service Temporarily Unavailable > > > > The server is temporarily unable to service your request due to > > maintenance downtime or capacity problems. Please try again later. > > > > so it looks like it _is_ being served through mongrel.. I guess this > > means my rewrite rules aren't actually serving the static files > > through apache.. Any ideas? > > how is your mod_proxy configured ? Do you use ProxyPass or do you Proxy > by using [P] with a rewrite rule ? > > Posting your virtual host's apache configuration might help. I'm using pretty much the exact same configuration as outlined in the site ServerName myapp.mydomain.com DocumentRoot /usr/local/www/data/vhosts/www.mydomain.com/current/public Options FollowSymLinks AllowOverride None Order allow,deny Allow from all ProxyPass / balancer://myapp/ ProxyPassReverse / balancer://myapp/ RewriteEngine On # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://myapp%{REQUEST_URI} [P,QSA,L] ErrorLog /var/log/apache22/myapp_errors_log CustomLog /var/log/apache22/myapp_log combined now, I don't know much about url rewriting, but it looks like it only sends a request through the balancer if a file with the requeted name doesn't exist.. So I can't understand why static files will no longer work if I shutdown mongrel.. In theory, I should be able to stop mongrel and have _all_ my static files served directly through apache Does anyone have any other rewrite rules I should be looking at? John Kienitz posted the following proxypass/rewrite rules in a message entitled "Apache 2.0 proxy" sent to the list a few days ago: RewriteRule ^/myrailsapp/images(.*) /myrailsapp/public/images$1 RewriteRule ^/myrailsapp/javascripts(.*) /myrailsapp/public/javascripts$1 RewriteRule ^/myrailsapp/stylesheets(.*) /myrailsapp/public/stylesheets$1 ProxyPass /myrailsapp/images ! ProxyPass /myrailsapp/javascrripts ! ProxyPass /myrailsapp/stylesheets ! which looks like it may explicitly tell apache not to send any requests for files in images, javascripts or stylesheets through the proxy balancer (although shouldn't I get the same results by telling apache to only pass requests through the balancer if a file with the requested name doesn't exist?). It seems I'm a bit confused about configuring the proxy balancer and using rewrite rules (I was hoping that this would *just work* and I could avoid having to spend too much time learning about either of these options, you know, the whole "convention over configuration" thing ;) I'm scheduled to deploy my app pretty soon, so hopefully I can get this all sorted out before tthen. Thanks for your help, Mike From kraemer at webit.de Mon Jul 10 09:35:09 2006 From: kraemer at webit.de (Jens Kraemer) Date: Mon, 10 Jul 2006 15:35:09 +0200 Subject: [Mongrel] problem serving pdf files In-Reply-To: <16a8b9140607100614v40d1aad5yd26ca0c0b17074f2@mail.gmail.com> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> <20060707220149.GC16634@cordoba.webit.de> <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> <20060710075401.GF17139@cordoba.webit.de> <16a8b9140607100614v40d1aad5yd26ca0c0b17074f2@mail.gmail.com> Message-ID: <20060710133509.GJ17139@cordoba.webit.de> On Mon, Jul 10, 2006 at 09:14:01AM -0400, Mike Garey wrote: > On 7/10/06, Jens Kraemer wrote: > > On Fri, Jul 07, 2006 at 06:30:42PM -0400, Mike Garey wrote: [..] > > > > ServerName myapp.mydomain.com > DocumentRoot /usr/local/www/data/vhosts/www.mydomain.com/current/public > > > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > > > ProxyPass / balancer://myapp/ > ProxyPassReverse / balancer://myapp/ ^^^ These two lines will make Apache pass *all* requests below / to the balancer. try commenting them out, the [P] rewrite rule should be enough. Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From cjharrelson at gmail.com Mon Jul 10 12:09:59 2006 From: cjharrelson at gmail.com (Jason Harrelson) Date: Mon, 10 Jul 2006 11:09:59 -0500 Subject: [Mongrel] Mongrel caching Message-ID: <1ac1d9dc0607100909n67d6c58fkb17dd3b41a7781c4@mail.gmail.com> I am using mongrel to serve static as well as dynamic pages. The static page's controller contains the following line of code: after_filter {|c| c.cache_page} This code caches that page as a static html page that does not have to be rendered form multiple files (the view and layout). I got the idea to do this form the rails recipes book. It definitely cached the pages. Wen I make changes now, I do not get an updated page. I have commented out the after_filter form above and I am still having the same issue. I checked the tmp/cache directory and there are no files there. I have stopped and restarted mongrel and my machine. None of these actions have resulted in an updated page displaying. Does anyone know how to delete mongrel's cache or another way to resolve this situation? Thank you in advance! -- Jason Harrelson cjharrelson at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060710/94e9b949/attachment-0001.html From paul.vudmaska at gmail.com Mon Jul 10 12:19:03 2006 From: paul.vudmaska at gmail.com (paul.vudmaska at gmail.com) Date: Mon, 10 Jul 2006 11:19:03 -0500 Subject: [Mongrel] Mongrel caching Message-ID: Subject: [Mongrel] Mongrel caching From: Jason Harrelson > > I am using mongrel to serve static as well as dynamic pages. > > The static page's controller contains the following line of code: > after_filter {|c| c.cache_page} Look in $RAILS_ROOT/public, that is where the files are being cached, (for page caching) , I think. From zedshaw at zedshaw.com Mon Jul 10 12:54:25 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 10 Jul 2006 12:54:25 -0400 Subject: [Mongrel] Mongrel caching In-Reply-To: References: Message-ID: <1152550465.7268.0.camel@localhost.localdomain> On Mon, 2006-07-10 at 11:19 -0500, paul.vudmaska at gmail.com wrote: > Subject: [Mongrel] Mongrel caching > From: Jason Harrelson > > > > I am using mongrel to serve static as well as dynamic pages. > > > > The static page's controller contains the following line of code: > > after_filter {|c| c.cache_page} > > Look in $RAILS_ROOT/public, that is where the files are being cached, > (for page caching) , I think. And you have to run your application in production mode: mongrel_rails start -e production -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From random49k at gmail.com Mon Jul 10 13:04:59 2006 From: random49k at gmail.com (Mike Garey) Date: Mon, 10 Jul 2006 13:04:59 -0400 Subject: [Mongrel] problem serving pdf files In-Reply-To: <20060710133509.GJ17139@cordoba.webit.de> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> <20060707220149.GC16634@cordoba.webit.de> <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> <20060710075401.GF17139@cordoba.webit.de> <16a8b9140607100614v40d1aad5yd26ca0c0b17074f2@mail.gmail.com> <20060710133509.GJ17139@cordoba.webit.de> Message-ID: <16a8b9140607101004p79bc0aaat63700cea96560260@mail.gmail.com> On 7/10/06, Jens Kraemer wrote: > On Mon, Jul 10, 2006 at 09:14:01AM -0400, Mike Garey wrote: > > On 7/10/06, Jens Kraemer wrote: > > > On Fri, Jul 07, 2006 at 06:30:42PM -0400, Mike Garey wrote: > [..] > > > > > > > > ServerName myapp.mydomain.com > > DocumentRoot /usr/local/www/data/vhosts/www.mydomain.com/current/public > > > > > > Options FollowSymLinks > > AllowOverride None > > Order allow,deny > > Allow from all > > > > > > ProxyPass / balancer://myapp/ > > ProxyPassReverse / balancer://myapp/ > > ^^^ > > These two lines will make Apache pass *all* requests below / to the > balancer. try commenting them out, the [P] rewrite rule should be > enough. I commented out those two lines and sure enough, apache will serve static content even when mongrel is stopped.. What I don't understand though is that regardless of whether the two lines are enabled/disabled, my rewrite log shows the same thing: (2) init rewrite engine with requested uri /images/common/learn_more.gif (3) applying pattern '^.*$' to uri '/images/common/learn_more.gif' (4) RewriteCond: input='/usr/local/www/data/vhosts/www.mydomain.com/current/public/system/maintenance.html' pattern='-f' => not-matched (3) applying pattern '^/$' to uri '/images/common/learn_more.gif' (3) applying pattern '^([^.]+)$' to uri '/images/common/learn_more.gif' (3) applying pattern '^/(.*)$' to uri '/images/common/learn_more.gif' (4) RewriteCond: input='/usr/local/www/data/vhosts/www.mydomain.com/current/public//images/common/learn_more.gif' pattern='!-f' => not-matched (1) pass through /images/common/learn_more.gif so it looks like it's passing the files directly through apache in both cases, yet it will only work if mongrel is started when the ProxyPass lines are enabled.. (otherwise I get the service temporarily unavailable message). So to break it down, I have the following 3 scenarios: 1) mongrel_cluster is runnning, 'ProxyPass / balancer://myapp/' and 'ProxyPassReverse / balancer://myapp/' are enabled -> both static content and dynamic content is served 2) mongrel_cluster is stopped 'ProxyPass / balancer://myapp/' and 'ProxyPassReverse / balancer://myapp/' are enabled -> neither static nor dynamic content is served 3) mongrel_cluster is stopped 'ProxyPass / balancer://myapp/' and 'ProxyPassReverse / balancer://myapp/' are disabled-> static content is served, dynamic content isn't So this all makes sense, the only thing that's confusing is: A) the rewrite log contains the same thing in all 3 scenarios (you'd think in scenario 1 that it would show that the requests for static content are actually being sent through the balancer, rather than showing "pass through", which seems to indicate that it's being served directly by apache) B) The fact that none of the comments on the original tutorial site mention anything about these 'ProxyPass /' lines preventing any static content being served by apache. This is of course not to say that I should take the instructions on that website as 100% accurate, but it just makes me want to double check that I'm indeed doing the right thing. Anyway, thanks for the help guys, so far everything seems to be working the way I want. Mike From zedshaw at zedshaw.com Mon Jul 10 13:25:50 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 10 Jul 2006 13:25:50 -0400 Subject: [Mongrel] [ANN] Test Mongrel 0.3.13.4 Please Message-ID: <1152552350.7268.18.camel@localhost.localdomain> Hey Folks, There's a nasty little bug in 0.3.13.3 when running in development mode which could cause all sorts of problems. Please grab the pre-release of 0.3.13.4 and tell me if it works for you: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Thanks! -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From orsini at oreilly.com Mon Jul 10 13:59:03 2006 From: orsini at oreilly.com (Rob Orsini) Date: Mon, 10 Jul 2006 10:59:03 -0700 Subject: [Mongrel] [ANN] Deploying Rails with Pound in Front of Mongrel, Lighttpd, and Apache Message-ID: Fyi, here's a write-up I just posted on deploying Rails with Mongrel(s) behind Pound: http://blog.tupleshop.com/articles/2006/07/08/deploying-rails-with- pound-in-front-of-mongrel-lighttpd-and-apache Rob From ben.e.moore at gmail.com Mon Jul 10 14:57:55 2006 From: ben.e.moore at gmail.com (Ben Moore) Date: Mon, 10 Jul 2006 13:57:55 -0500 Subject: [Mongrel] crashing mongrel Message-ID: Newbie question here: I'm hitting my rails app and killing mongrel. Any ideas? Here's the error: /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:628:in `accept': Software caused connection abort (Errno::ECONNABORTED) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:136:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 from /usr/local/bin/mongrel_rails:18 From jamie at dangosaur.us Mon Jul 10 15:07:15 2006 From: jamie at dangosaur.us (Jamie Orchard-Hays) Date: Mon, 10 Jul 2006 15:07:15 -0400 Subject: [Mongrel] ubuntu & mongrel Message-ID: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> I'm getting the following error. Which apt-get install do I need to run? looks like some build tools. Building native extensions. This could take a while... extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:1 ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3 for inspection. ruby extconf.rb install mongrel\n Thanks, Jamie From josh at besquared.net Mon Jul 10 16:11:04 2006 From: josh at besquared.net (Josh Ferguson) Date: Mon, 10 Jul 2006 15:11:04 -0500 Subject: [Mongrel] ubuntu & mongrel In-Reply-To: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> References: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> Message-ID: <44B2B458.1060803@besquared.net> A quick google search of this error brings up the solution in the first result: http://mentalized.net/journal/2006/01/24/no_such_file_to_load_mkmf/ Josh Jamie Orchard-Hays wrote: > I'm getting the following error. Which apt-get install package> do I need to run? looks like some build tools. > > Building native extensions. This could take a while... > extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) > from extconf.rb:1 > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ > mongrel-0.3.13.3 for inspection. ruby extconf.rb install mongrel\n > > Thanks, > > Jamie > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From jamie at dangosaur.us Mon Jul 10 15:21:05 2006 From: jamie at dangosaur.us (Jamie Orchard-Hays) Date: Mon, 10 Jul 2006 15:21:05 -0400 Subject: [Mongrel] ubuntu & mongrel In-Reply-To: <44B2B458.1060803@besquared.net> References: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> <44B2B458.1060803@besquared.net> Message-ID: <018AF05B-1DC9-4404-96BA-036D9830883D@dangosaur.us> Thanks. I had actually tried to install dev and got a dependency error and then when I checked, the dependency is installed. Circles. Guess I need to figure out why: The following packages have unmet dependencies: ruby1.8-dev: Depends: libruby1.8 (= 1.8.4-1ubuntu1~zajac1) but 1.8.4-1ubuntu1 is to be installed E: Broken packages On Jul 10, 2006, at 4:11 PM, Josh Ferguson wrote: > A quick google search of this error brings up the solution in the > first > result: > > http://mentalized.net/journal/2006/01/24/no_such_file_to_load_mkmf/ > > Josh > > Jamie Orchard-Hays wrote: >> I'm getting the following error. Which apt-get install > package> do I need to run? looks like some build tools. >> >> Building native extensions. This could take a while... >> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) >> from extconf.rb:1 >> ERROR: While executing gem ... (RuntimeError) >> ERROR: Failed to build gem native extension. >> Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ >> mongrel-0.3.13.3 for inspection. ruby extconf.rb install mongrel\n >> >> Thanks, >> >> Jamie >> >> _______________________________________________ >> 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 scott at sigkill.org Mon Jul 10 15:38:27 2006 From: scott at sigkill.org (Scott Laird) Date: Mon, 10 Jul 2006 12:38:27 -0700 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: <14b7e5ef0607101224q12d68dc7ud3be48df17a1e78b@mail.gmail.com> References: <14b7e5ef0607101224q12d68dc7ud3be48df17a1e78b@mail.gmail.com> Message-ID: <14b7e5ef0607101238w24d95b88n6f5cb40f7451e50f@mail.gmail.com> I'm trying to make Mongrel the default web server for Typo, but I'm running into a problem. Is there an easy way to run a Rails app in a subdirectory ( http://foo/blog instead of http://foo/) with Mongrel? For most apps, I'd just change routes.rb to include the prefix that I wanted, but that won't really work with Typo--I'd rather not require a few hundred users to modify Typo's source code if I can avoid it. I'd rather handle this via Mongrel. I tried changing the 'uri "/", :handler => rails(:mime => mime)' line in mongrel_rails (both directly and via a -S config script) and that doesn't quite do the job--the Rails app still thinks it's running in '/', so routes are broken. Is there an easy way to handle this? If not, would a patch that adds a --prefix command-line flag for mongrel_rails (along with a few lines of plumbing) be accepted? Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060710/fe23e39e/attachment.html From aldursys at gmail.com Mon Jul 10 16:08:38 2006 From: aldursys at gmail.com (Neil Wilson) Date: Mon, 10 Jul 2006 21:08:38 +0100 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: <14b7e5ef0607101238w24d95b88n6f5cb40f7451e50f@mail.gmail.com> Message-ID: Rails apps like to run absolutely on root, and mongrel follows that. The default mongrel application is built as an application server serving one rails application sitting on its own root, viz: http://127.0.0.1/controller/action To handle anything else you need to rewrite the path so that it proxies to root. This appears to be a rails restriction rather than mongrel. So http://some.web.address/app1/controller/action gets mapped by a web server to http://app1.mongrel.ip.address/controller/action The only way to get more than one rails application running under a single web address is to use proxy mappings and URL rewrites through some tool that does that (Apache, lighttpd, pound, etc). -- NeilW -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060710/7426e42f/attachment-0001.html From scott at sigkill.org Mon Jul 10 16:42:17 2006 From: scott at sigkill.org (Scott Laird) Date: Mon, 10 Jul 2006 13:42:17 -0700 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: References: <14b7e5ef0607101238w24d95b88n6f5cb40f7451e50f@mail.gmail.com> Message-ID: <14b7e5ef0607101342s3c73ba40s4844fa40bd5c6c1c@mail.gmail.com> Er, okay. The thing is, this is *trivial* with Apache and fcgi--just add 'RewriteBase /blog/' to your usual rewrite config and it Just Works. Routes work correctly in both directions. A lot of users are using this with Typo. Until we added it to our default config (commented out), it was probably our #1 support question. I've already started getting "how do I do this with Mongrel" questions. Now, it's certainly possible to edit routes.rb and prefix everything with '/blog/'. I could move the static stylesheets and images in public/ around, too. But that's kind of a pain when we're dealing with thousands of users, quite a few of whom have never dealt with Rails before. I'd really like a solution that is http proxy-agnostic--it doesn't matter if they're using Apache, Lighttpd, Lightspeed, or whatever. I'd love the directions to say "just proxy /(base) through to http://backend:port/(base)". I'll spend a couple hours trying to wrap my head around Rails's dispatch process, Mongrel, and mod_rewrite and see if I can figure out what I need to hand to Rails to make this work right. Scott On 7/10/06, Neil Wilson wrote: > > Rails apps like to run absolutely on root, and mongrel follows that. > > The default mongrel application is built as an application server serving > one rails application sitting on its own root, viz: > > http://127.0.0.1/controller/action > > To handle anything else you need to rewrite the path so that it proxies to > root. This appears to be a rails restriction rather than mongrel. > > So > > http://some.web.address/app1/controller/action > > gets mapped by a web server to > > http://app1.mongrel.ip.address/controller/action > > The only way to get more than one rails application running under a single > web address is to use proxy mappings and URL rewrites through some tool that > does that (Apache, lighttpd, pound, etc). > > -- > NeilW > > > > > > > > > > > _______________________________________________ > 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/20060710/0a692723/attachment.html From kraemer at webit.de Mon Jul 10 17:13:11 2006 From: kraemer at webit.de (Jens Kraemer) Date: Mon, 10 Jul 2006 23:13:11 +0200 Subject: [Mongrel] problem serving pdf files In-Reply-To: <16a8b9140607101004p79bc0aaat63700cea96560260@mail.gmail.com> References: <16a8b9140607071055s5b5c284cse623e50d1dc3a3fc@mail.gmail.com> <16a8b9140607071442i27e5d7f4g657a7e703bac4d80@mail.gmail.com> <20060707220149.GC16634@cordoba.webit.de> <16a8b9140607071530g18383000o228a185110e41321@mail.gmail.com> <20060710075401.GF17139@cordoba.webit.de> <16a8b9140607100614v40d1aad5yd26ca0c0b17074f2@mail.gmail.com> <20060710133509.GJ17139@cordoba.webit.de> <16a8b9140607101004p79bc0aaat63700cea96560260@mail.gmail.com> Message-ID: <20060710211311.GA10427@cordoba.webit.de> On Mon, Jul 10, 2006 at 01:04:59PM -0400, Mike Garey wrote: > On 7/10/06, Jens Kraemer wrote: > > On Mon, Jul 10, 2006 at 09:14:01AM -0400, Mike Garey wrote: > > > On 7/10/06, Jens Kraemer wrote: > > > > On Fri, Jul 07, 2006 at 06:30:42PM -0400, Mike Garey wrote: [..] > > > > > > ProxyPass / balancer://myapp/ > > > ProxyPassReverse / balancer://myapp/ > > > > ^^^ > > > > These two lines will make Apache pass *all* requests below / to the > > balancer. try commenting them out, the [P] rewrite rule should be > > enough. > > I commented out those two lines and sure enough, apache will serve > static content even when mongrel is stopped.. What I don't understand > though is that regardless of whether the two lines are > enabled/disabled, my rewrite log shows the same thing: > [..] > so it looks like it's passing the files directly through apache in > both cases, yet it will only work if mongrel is started when the > ProxyPass lines are enabled.. (otherwise I get the service temporarily > unavailable message). > > So to break it down, I have the following 3 scenarios: > > 1) mongrel_cluster is runnning, 'ProxyPass / balancer://myapp/' and > 'ProxyPassReverse / balancer://myapp/' are enabled -> both static > content and dynamic content is served > > 2) mongrel_cluster is stopped 'ProxyPass / balancer://myapp/' and > 'ProxyPassReverse / balancer://myapp/' are enabled -> neither static > nor dynamic content is served > > 3) mongrel_cluster is stopped 'ProxyPass / balancer://myapp/' and > 'ProxyPassReverse / balancer://myapp/' are disabled-> static content > is served, dynamic content isn't > > So this all makes sense, the only thing that's confusing is: > > A) the rewrite log contains the same thing in all 3 scenarios (you'd > think in scenario 1 that it would show that the requests for static > content are actually being sent through the balancer, rather than > showing "pass through", which seems to indicate that it's being served > directly by apache) actually, the rewrite rules are always executed, that's why the rewrite log is the same in any case. ProxyPass, if present, will then step in after the 'pass through', forwarding your request to mongrel, regardless of any rewriting done before, since the / pattern always matches. > B) The fact that none of the comments on the original tutorial site > > mention anything about these 'ProxyPass /' lines preventing any static > content being served by apache. This is of course not to say that I > should take the instructions on that website as 100% accurate, but it > just makes me want to double check that I'm indeed doing the right > thing. that may be because it's an issue one doesn't notice in the first place, as everything appears to be working fine. > Anyway, thanks for the help guys, so far everything seems to be > working the way I want. glad to help :) Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From aldursys at gmail.com Mon Jul 10 17:24:20 2006 From: aldursys at gmail.com (Neil Wilson) Date: Mon, 10 Jul 2006 22:24:20 +0100 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: <14b7e5ef0607101342s3c73ba40s4844fa40bd5c6c1c@mail.gmail.com> Message-ID: -----Original Message----- From: mongrel-users-bounces at rubyforge.org [mailto:mongrel-users-bounces at rubyforge.org]On Behalf Of Scott Laird Sent: 10 July 2006 21:42 To: mongrel-users at rubyforge.org Subject: Re: [Mongrel] Rails app in a subdirectory via Mongrel Er, okay. The thing is, this is *trivial* with Apache and fcgi--just add 'RewriteBase /blog/' to your usual rewrite config and it Just Works. Routes work correctly in both directions. So can you not do the same with the proxy? Mongrel is a replacement for FCGI, not the Apache/FCGI pair. If Rails knew which prefix it lived on and could generate all its refer and redirect URLs relative to that prefix rather than just root, then you wouldn't need a rewriter proxy - Mongrel could just pass the URL in and out unadulterated. Should Rails know where it lives in the URL tree though? Is that the job of the application or the web server? Perhaps the solution to the 'loads of http proxy front ends' is to consider that none of them are fit for *our* purposes - much as FCGI wasn't fit for the application server purpose. Anybody got to the stage where that itch is worth scratching? NeilW -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060710/693bc815/attachment.html From scott at sigkill.org Mon Jul 10 17:55:17 2006 From: scott at sigkill.org (Scott Laird) Date: Mon, 10 Jul 2006 14:55:17 -0700 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: References: <14b7e5ef0607101342s3c73ba40s4844fa40bd5c6c1c@mail.gmail.com> Message-ID: <14b7e5ef0607101455h4dda64edu84fce147ec038eea@mail.gmail.com> This still doesn't seem quite right--how does url_for work right if the back end doesn't know where it actually lives? Does the proxy have to rewrite all HTML passing through it? I know that there's a module for that for Apache (mod_proxy_html), but it requires a lot more work then normal proxying. It'd be a lot cleaner if we could generate the right HTML in the first place. >From http://dev.rubyonrails.org/ticket/2602, it looks like request.relative_url_root is the method that I was looking for inside of Rails. It has special-case support for Apache--it spots dispatch.fcgi in the request path and calculates the correct root on its own. I'll take a look at patching mongrel_rails to add a --prefix flag and then pass the path onto the Mongrel::Rails. Scott On 7/10/06, Neil Wilson wrote: > -----Original Message----- > From: mongrel-users-bounces at rubyforge.org [mailto:mongrel-users-bounces at rubyforge.org]On Behalf Of Scott Laird > Sent: 10 July 2006 21:42 > To: mongrel-users at rubyforge.org > Subject: Re: [Mongrel] Rails app in a subdirectory via Mongrel > > > Er, okay. The thing is, this is *trivial* with Apache and fcgi--just add 'RewriteBase /blog/' to your usual rewrite config and it Just Works. Routes work correctly in both directions. > > > > So can you not do the same with the proxy? Mongrel is a replacement for FCGI, not the Apache/FCGI pair. > > If Rails knew which prefix it lived on and could generate all its refer and redirect URLs relative to that prefix rather than just root, then you wouldn't need a rewriter proxy - Mongrel could just pass the URL in and out unadulterated. Should Rails know where it lives in the URL tree though? Is that the job of the application or the web server? > > Perhaps the solution to the 'loads of http proxy front ends' is to consider that none of them are fit for *our* purposes - much as FCGI wasn't fit for the application server purpose. Anybody got to the stage where that itch is worth scratching? > > NeilW > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From ml at syntheticplayground.com Mon Jul 10 18:02:49 2006 From: ml at syntheticplayground.com (Corey Jewett) Date: Mon, 10 Jul 2006 15:02:49 -0700 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip In-Reply-To: References: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> <67681EFD-A2FE-4017-B18A-273BD17D4B43@pinds.com> Message-ID: <6FB55D16-D07B-49D9-9FA0-DC654E52ED4E@syntheticplayground.com> Since we're talking about load balancing... Has anybody used HAProxy? http://haproxy.1wt.eu/ Corey On Jul 9, 2006, at 6:29 AM, Lars Pind wrote: > FYI, I've found that pen lets you disable the X-Forwarded-For header, > so I'm using that instead, and Rails picks up the right IP address. > > I also noticed that pen.c has code to not add an X-Forwarded-For > header if one is already present, but it didn't seem to be working > for me. > > /Lars > > On Jul 9, 2006, at 3:14 PM, Lars Pind wrote: > >> Right, but how does that help fix the problem? >> >> The problem is that Pound overrides the X-Forwarded-For header >> already being added by lighty. >> >> Is there a way to get Pound to not mess with that header? I've looked >> at the source, and there doesn't appear to be any. >> >> Alternatively, one could get Pound to read the current X-Forwarded- >> For header when it exists and use the same IP address in the X- >> Forwarded-For header it itself adds, that should solve it, too. But >> again, I don't see a way to do that, either. >> >> I guess I'll just have to switch to Apache until lighty sorts out the >> proxying. >> >> /Lars >> >> On Jul 8, 2006, at 6:20 PM, Jason A. Hoffman wrote: >> >>> On Jul 8, 2006, at 2:28 AM, Lars Pind wrote: >>> >>>> Is anyone using the setup described at the Rails blog? >>>> >>>> http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and- >>>> mongrel- >>>> play-nice >>>> >>>> I'm using it in production, and the only problem I have is the same >>>> as people have described in the comments over there, namely that >>>> Rails thinks all requests come from localhost. >>>> >>>> See http://isabont.com/requestinfo for the headers. >>>> >>>> Any suggestions on what to try? Should I just replace lighty+pound >>>> with Apache? >>>> >>>> /Lars >>> >>> http://www.apsis.ch/pound >>> >>> "REQUEST LOGGING >>> >>> As a general rule, Pound passes all headers as they arrive from the >>> client browser to the back-end server(s). There are two >>> exceptions to >>> this rule: Pound may add information about the SSL client >>> certificate >>> (as described below), and it will add an X-Forwarded-For header. The >>> general format is: >>> >>> X-Forwarded-for: client-IP-address >>> >>> The back-end server(s) may use this extra information in order to >>> create their log-files with the real client address (otherwise all >>> requests will appear to originate from Pound itself, which is rather >>> useless)." >>> >>> >>> - Jason >>> >>> >>> _______________________________________________ >>> 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 From zedshaw at zedshaw.com Mon Jul 10 18:51:37 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 10 Jul 2006 18:51:37 -0400 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: <14b7e5ef0607101238w24d95b88n6f5cb40f7451e50f@mail.gmail.com> References: <14b7e5ef0607101224q12d68dc7ud3be48df17a1e78b@mail.gmail.com> <14b7e5ef0607101238w24d95b88n6f5cb40f7451e50f@mail.gmail.com> Message-ID: <1152571897.7268.43.camel@localhost.localdomain> On Mon, 2006-07-10 at 12:38 -0700, Scott Laird wrote: > I'm trying to make Mongrel the default web server for Typo, but I'm > running into a problem. Is there an easy way to run a Rails app in a > subdirectory (http://foo/blog instead of http://foo/) with Mongrel? > For most apps, I'd just change routes.rb to include the prefix that I > wanted, but that won't really work with Typo--I'd rather not require a > few hundred users to modify Typo's source code if I can avoid it. I'd > rather handle this via Mongrel. > Nope, you need to have Rails handle it. > I tried changing the 'uri "/", :handler => rails(:mime => mime)' line > in mongrel_rails (both directly and via a -S config script) and that > doesn't quite do the job--the Rails app still thinks it's running in > '/', so routes are broken. Is there an easy way to handle this? > Nope that won't work since the HTML that rails generates would then have all the wrong URIs. You'd request /myappliveshere/users/dostuff, and then all the links, redirects, everything would point to /users/dostuff. You have to tell rails that it lives at /myappliveshere. I could swear that there was a config option you can put in your environment.rb which tells Rails it's at a different base URI. > If not, would a patch that adds a --prefix command-line flag for > mongrel_rails (along with a few lines of plumbing) be accepted? Mongrel *can not* help you with this. The problem is that in order for you to put an app at a different URI base the app needs to rewrite all URIs to include this base. If you don't get rails to do it then the web server has to do it and I flat out refuse to troll through html changing links. :-) I imagine previously that's what your apache config with fastcgi was doing. There just isn't any other way to do it outside of rails. This also means that your previous config was horribly inefficient. Snoop around on the interwebs and google for this magic config. I'm pretty sure I'm not crazy, but it's something like: config.action_controller.rails_root = "/myappliveshere" Or maybe it was a routes.rb setting. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Jul 10 18:53:05 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 10 Jul 2006 18:53:05 -0400 Subject: [Mongrel] crashing mongrel In-Reply-To: References: Message-ID: <1152571985.7268.48.camel@localhost.localdomain> What the hell is that? :-) I think you're the winner of weirdest bug so far. Can you describe what the app does, what OS, what web server, and what you did to make this happen? This is basically saying that RIGHT when mongrel goes to accept the client connection the OS is aborting it. It's pretty nasty. On Mon, 2006-07-10 at 13:57 -0500, Ben Moore wrote: > Newbie question here: I'm hitting my rails app and killing mongrel. Any ideas? > > Here's the error: > > /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:628:in > `accept': Software caused connection abort (Errno::ECONNABORTED) > -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From scott at sigkill.org Mon Jul 10 19:11:43 2006 From: scott at sigkill.org (Scott Laird) Date: Mon, 10 Jul 2006 16:11:43 -0700 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: <1152571897.7268.43.camel@localhost.localdomain> References: <14b7e5ef0607101224q12d68dc7ud3be48df17a1e78b@mail.gmail.com> <14b7e5ef0607101238w24d95b88n6f5cb40f7451e50f@mail.gmail.com> <1152571897.7268.43.camel@localhost.localdomain> Message-ID: <14b7e5ef0607101611k48fbd60cm3b8627879ef896ed@mail.gmail.com> On 7/10/06, Zed Shaw wrote: > > > I imagine previously that's what your apache config with fastcgi was > doing. There just isn't any other way to do it outside of rails. This > also means that your previous config was horribly inefficient. > > Snoop around on the interwebs and google for this magic config. I'm > pretty sure I'm not crazy, but it's something like: ActionController::AbstractRequest.relative_url_root = "/myappliveshere". Amazingly enough, it's special-cased for Apache with FastCGI--if it spots dispatch.[f]cgi in the right environment variable, then it sets relative_url_root automatically. That's why it works with Apache most of the time :-). That's the magic I was missing this morning. So, if you add relative_url_root to environment.rb (or $RELATIVE_URL_ROOT to the environment) to '/blog', then you can proxy from http://real-server:80/blog to http://localhost:4123/ (running Mongrel) and all of the generated URLs work. But, you won't be able to access the backend directly for debugging, because it'll be expecting urls that start at / and generating urls that start with /blog/. I have a little patch that adds a --prefix flag to Mongrel that sets the Rails handler URI as well as relative_url_root. As I mentioned above, it's not strictly needed, but it'll make life a bit easier for people. Would this be something that you'd be interested in applying, or should I go tweak the Typo docs to explain it away? Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060710/5deade88/attachment.html From zedshaw at zedshaw.com Mon Jul 10 20:34:29 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 10 Jul 2006 20:34:29 -0400 Subject: [Mongrel] Rails app in a subdirectory via Mongrel In-Reply-To: <14b7e5ef0607101611k48fbd60cm3b8627879ef896ed@mail.gmail.com> References: <14b7e5ef0607101224q12d68dc7ud3be48df17a1e78b@mail.gmail.com> <14b7e5ef0607101238w24d95b88n6f5cb40f7451e50f@mail.gmail.com> <1152571897.7268.43.camel@localhost.localdomain> <14b7e5ef0607101611k48fbd60cm3b8627879ef896ed@mail.gmail.com> Message-ID: <1152578069.6303.3.camel@localhost.localdomain> On Mon, 2006-07-10 at 16:11 -0700, Scott Laird wrote: > > > On 7/10/06, Zed Shaw wrote: > > ActionController::AbstractRequest.relative_url_root = > "/myappliveshere". Amazingly enough, it's special-cased for Apache > with FastCGI--if it spots dispatch.[f]cgi in the right environment > variable, then it sets relative_url_root automatically. That's why it > works with Apache most of the time :-). That's the magic I was > missing this morning. That's it! But, uh that's retarded that it only works with fcgi. I'll talk to rails core and have them shore this up for the next release since they're going Mongrel with it. > I have a little patch that adds a --prefix flag to Mongrel that sets > the Rails handler URI as well as relative_url_root. As I mentioned > above, it's not strictly needed, but it'll make life a bit easier for > people. Would this be something that you'd be interested in applying, > or should I go tweak the Typo docs to explain it away? Sure, shoot me the patch offline and I'll look at how to work it in. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From schwuk at gmail.com Tue Jul 11 04:05:08 2006 From: schwuk at gmail.com (Dave Murphy) Date: Tue, 11 Jul 2006 09:05:08 +0100 Subject: [Mongrel] ubuntu & mongrel In-Reply-To: <018AF05B-1DC9-4404-96BA-036D9830883D@dangosaur.us> References: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> <44B2B458.1060803@besquared.net> <018AF05B-1DC9-4404-96BA-036D9830883D@dangosaur.us> Message-ID: <2e60a9e60607110105x1a6e055dx97cf1a48e6a0b451@mail.gmail.com> On 10/07/06, Jamie Orchard-Hays wrote: > Thanks. I had actually tried to install dev and got a dependency > error and then when I checked, the dependency is installed. Circles. As you've already been worked out/been told makre sure you've got ruby1.8-dev and build-essential installed. > Guess I need to figure out why: > > The following packages have unmet dependencies: > ruby1.8-dev: Depends: libruby1.8 (= 1.8.4-1ubuntu1~zajac1) but > 1.8.4-1ubuntu1 is to be installed > E: Broken packages To me that looks like a non-standard package. Do you have any non-Ubuntu repositories enabled that include Ruby? Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From ben.e.moore at gmail.com Tue Jul 11 09:15:14 2006 From: ben.e.moore at gmail.com (Ben Moore) Date: Tue, 11 Jul 2006 08:15:14 -0500 Subject: [Mongrel] crashing mongrel In-Reply-To: <1152571985.7268.48.camel@localhost.localdomain> References: <1152571985.7268.48.camel@localhost.localdomain> Message-ID: Mongrel is deployed on a shared host. I'm hitting it directly on default port 3000. The shared host is running BSD. We have couple developers who were putting data into the system, but when our account manager went to demo the app for the client, he crashed it after only a few clicks. He was using IE. Nobody else has been able to crash it from Safari or Firefox. Could it be a firewall issue? BSD issue? Browser issue? On 7/10/06, Zed Shaw wrote: > What the hell is that? :-) I think you're the winner of weirdest bug so > far. Can you describe what the app does, what OS, what web server, and > what you did to make this happen? > > This is basically saying that RIGHT when mongrel goes to accept the > client connection the OS is aborting it. It's pretty nasty. > > On Mon, 2006-07-10 at 13:57 -0500, Ben Moore wrote: > > Newbie question here: I'm hitting my rails app and killing mongrel. Any ideas? > > > > Here's the error: > > > > /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:628:in > > `accept': Software caused connection abort (Errno::ECONNABORTED) > > > > > -- > 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 jamie at dangosaur.us Tue Jul 11 10:00:55 2006 From: jamie at dangosaur.us (Jamie Orchard-Hays) Date: Tue, 11 Jul 2006 10:00:55 -0400 Subject: [Mongrel] ubuntu & mongrel In-Reply-To: <2e60a9e60607110105x1a6e055dx97cf1a48e6a0b451@mail.gmail.com> References: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> <44B2B458.1060803@besquared.net> <018AF05B-1DC9-4404-96BA-036D9830883D@dangosaur.us> <2e60a9e60607110105x1a6e055dx97cf1a48e6a0b451@mail.gmail.com> Message-ID: <8530C9A0-67A5-4B34-B9C9-D42B4CC470C9@dangosaur.us> Thanks Dave. I didn't set up the machine, and it's breezy, not dapper. It's quite possible there's some weirdness. We're going to move up to dapper soon anyway, so I'm just not going to sweat it until then. We'll just use lighty for now. Jamie On Jul 11, 2006, at 4:05 AM, Dave Murphy wrote: > On 10/07/06, Jamie Orchard-Hays wrote: >> Thanks. I had actually tried to install dev and got a dependency >> error and then when I checked, the dependency is installed. Circles. > > As you've already been worked out/been told makre sure you've got > ruby1.8-dev and build-essential installed. > >> Guess I need to figure out why: >> >> The following packages have unmet dependencies: >> ruby1.8-dev: Depends: libruby1.8 (= 1.8.4-1ubuntu1~zajac1) but >> 1.8.4-1ubuntu1 is to be installed >> E: Broken packages > > To me that looks like a non-standard package. Do you have any > non-Ubuntu repositories enabled that include Ruby? > > Cheers, > -- > Dave Murphy (Schwuk) > http://schwuk.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From jburks725 at gmail.com Tue Jul 11 11:24:43 2006 From: jburks725 at gmail.com (Jason Burks) Date: Tue, 11 Jul 2006 11:24:43 -0400 Subject: [Mongrel] Memory usage issues In-Reply-To: <9bbab4e0606291054n3e0c1828n8aa687dae8af3600@mail.gmail.com> References: <9bbab4e0606290514o6130f012qeac67b1a4a2e099b@mail.gmail.com> <1151594527.6074.11.camel@localhost.localdomain> <9bbab4e0606291054n3e0c1828n8aa687dae8af3600@mail.gmail.com> Message-ID: <9bbab4e0607110824s17795adfh76c633515f0a333@mail.gmail.com> An update on this situation. Typo has seen a great deal of development in the last two weeks. Running the latest svn as of today seems to yield *much* more stable memory usage patterns. Even after hitting my site with a few passes of ab and httperf, the memory usage per server instance is only 35-37MB. Much better than the 4X that amount that I had been seeing. It appears that Typo fixed something (or else the newer version of Rails they're including in svn did). Either way, it looks like I'm much better off now. Thanks for the suggestions and guidance, and keep up the great work. -Jason On 6/29/06, Jason Burks wrote: > 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 bradley at railsmachine.com Tue Jul 11 11:34:15 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Tue, 11 Jul 2006 11:34:15 -0400 Subject: [Mongrel] Memory usage issues In-Reply-To: <9bbab4e0607110824s17795adfh76c633515f0a333@mail.gmail.com> References: <9bbab4e0606290514o6130f012qeac67b1a4a2e099b@mail.gmail.com> <1151594527.6074.11.camel@localhost.localdomain> <9bbab4e0606291054n3e0c1828n8aa687dae8af3600@mail.gmail.com> <9bbab4e0607110824s17795adfh76c633515f0a333@mail.gmail.com> Message-ID: <78A89179-5D14-4568-9AC7-1520D2486A18@railsmachine.com> > It appears that Typo fixed something (or else the newer version of > Rails they're including in svn did). Either way, it looks like I'm > much better off now. Scott fixed the "Great Typo Memory Leak of 2006": http://scottstuff.net/blog/articles/2006/07/08/ding-dong-the-memory- leak-in-typo-is-dead I upgraded my personal blog a few days ago and my doggies are at 27mb each. Regards, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060711/80748265/attachment-0001.html From schwuk at gmail.com Tue Jul 11 11:49:11 2006 From: schwuk at gmail.com (Dave Murphy) Date: Tue, 11 Jul 2006 16:49:11 +0100 Subject: [Mongrel] ubuntu & mongrel In-Reply-To: <8530C9A0-67A5-4B34-B9C9-D42B4CC470C9@dangosaur.us> References: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> <44B2B458.1060803@besquared.net> <018AF05B-1DC9-4404-96BA-036D9830883D@dangosaur.us> <2e60a9e60607110105x1a6e055dx97cf1a48e6a0b451@mail.gmail.com> <8530C9A0-67A5-4B34-B9C9-D42B4CC470C9@dangosaur.us> Message-ID: <2e60a9e60607110849h44e90295g9e6c2c538dd043b7@mail.gmail.com> On 11/07/06, Jamie Orchard-Hays wrote: > Thanks Dave. I didn't set up the machine, and it's breezy, not > dapper. It's quite possible there's some weirdness. Re-read your previous e-mail. It looks like you've got 1.8.4 installed from Breezy Backports, but it's using another respository when you're trying to install libruby1.8-dev. Check your repository list. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Tue Jul 11 11:50:18 2006 From: schwuk at gmail.com (Dave Murphy) Date: Tue, 11 Jul 2006 16:50:18 +0100 Subject: [Mongrel] Memory usage issues In-Reply-To: <78A89179-5D14-4568-9AC7-1520D2486A18@railsmachine.com> References: <9bbab4e0606290514o6130f012qeac67b1a4a2e099b@mail.gmail.com> <1151594527.6074.11.camel@localhost.localdomain> <9bbab4e0606291054n3e0c1828n8aa687dae8af3600@mail.gmail.com> <9bbab4e0607110824s17795adfh76c633515f0a333@mail.gmail.com> <78A89179-5D14-4568-9AC7-1520D2486A18@railsmachine.com> Message-ID: <2e60a9e60607110850y77a6f25do5785d1e443975054@mail.gmail.com> On 11/07/06, Bradley Taylor wrote: > I upgraded my personal blog a few days ago and my doggies are at 27mb each. Mine are behaving much better now as well. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From wrighty at gmail.com Tue Jul 11 12:09:20 2006 From: wrighty at gmail.com (Paul Wright) Date: Tue, 11 Jul 2006 17:09:20 +0100 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip In-Reply-To: <6FB55D16-D07B-49D9-9FA0-DC654E52ED4E@syntheticplayground.com> References: <13BBB7D4-C910-455F-91B0-43F380B0BA73@joyent.com> <67681EFD-A2FE-4017-B18A-273BD17D4B43@pinds.com> <6FB55D16-D07B-49D9-9FA0-DC654E52ED4E@syntheticplayground.com> Message-ID: <282e72050607110909v6c3e3970mdf5dd5a49d5534a3@mail.gmail.com> On 10/07/06, Corey Jewett wrote: > Since we're talking about load balancing... Has anybody used HAProxy? > > http://haproxy.1wt.eu/ We're planning on setting it up in the next week or so and then running some tests against it / pen / pound with a small cluster. If anyone has tips on HAProxy config let me know. Paul. From jamie at dangosaur.us Tue Jul 11 13:59:08 2006 From: jamie at dangosaur.us (Jamie Orchard-Hays) Date: Tue, 11 Jul 2006 13:59:08 -0400 Subject: [Mongrel] ubuntu & mongrel In-Reply-To: <2e60a9e60607110849h44e90295g9e6c2c538dd043b7@mail.gmail.com> References: <2BB3EA9F-428B-48E2-938E-EAF345FF1F89@dangosaur.us> <44B2B458.1060803@besquared.net> <018AF05B-1DC9-4404-96BA-036D9830883D@dangosaur.us> <2e60a9e60607110105x1a6e055dx97cf1a48e6a0b451@mail.gmail.com> <8530C9A0-67A5-4B34-B9C9-D42B4CC470C9@dangosaur.us> <2e60a9e60607110849h44e90295g9e6c2c538dd043b7@mail.gmail.com> Message-ID: thanks, Dave. On Jul 11, 2006, at 11:49 AM, Dave Murphy wrote: > On 11/07/06, Jamie Orchard-Hays wrote: >> Thanks Dave. I didn't set up the machine, and it's breezy, not >> dapper. It's quite possible there's some weirdness. > > Re-read your previous e-mail. It looks like you've got 1.8.4 installed > from Breezy Backports, but it's using another respository when you're > trying to install libruby1.8-dev. > > Check your repository list. > > Cheers, > -- > Dave Murphy (Schwuk) > http://schwuk.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From rsl at swimcommunity.org Tue Jul 11 17:05:27 2006 From: rsl at swimcommunity.org (Russell Norris) Date: Tue, 11 Jul 2006 17:05:27 -0400 Subject: [Mongrel] Bad Client Errors Message-ID: <1d2f8d6f0607111405v110e85d2s38ee584a6aff6739@mail.gmail.com> I've gone through the mailing list archives and looked through all the docs I could find but I still can't figure out exactly what's going on with my Mongrel that it gives the following error: [Timestamp]: BAD CLIENT (127.0.0.1): Invalid HTTP format, parsing fails I'm running Cygwin 1.5.20-1, Ruby 1.8.4, and WinXP. I'd appreciate any help on getting it up and running. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060711/dd7b5271/attachment.html From zedshaw at zedshaw.com Wed Jul 12 03:15:48 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 12 Jul 2006 03:15:48 -0400 Subject: [Mongrel] Bad Client Errors In-Reply-To: <1d2f8d6f0607111405v110e85d2s38ee584a6aff6739@mail.gmail.com> References: <1d2f8d6f0607111405v110e85d2s38ee584a6aff6739@mail.gmail.com> Message-ID: <1152688548.6016.43.camel@localhost.localdomain> On Tue, 2006-07-11 at 17:05 -0400, Russell Norris wrote: > I've gone through the mailing list archives and looked through all the > docs I could find but I still can't figure out exactly what's going on > with my Mongrel that it gives the following error: > > [Timestamp]: BAD CLIENT ( 127.0.0.1): Invalid HTTP format, parsing > fails > > I'm running Cygwin 1.5.20-1, Ruby 1.8.4, and WinXP. I'd appreciate any > help on getting it up and running. Mongrel uses a very correct parser when processing HTTP 1.1 requests. If it says "BAD CLIENT" then I've found it's always right. Not saying Mongrel's perfect, it's just a bi-product of using a parser generator based on the RFC's grammar rather than hand-coding. If you're running Nagios then stop. Nagios is utter and total garbage and can barely get the TCP/IP right let alone the HTTP. If it's something else where you see these then you to reproduce it and do a protocol dump with Ethereal (it runs on windows). Once you get the dump, go to where you see these bad client errors and see if you can do Analyze->Follow TCP Stream. This'll tell you exactly what mongrel is getting and it'll show you what the error is. I'd be curious to see what's doing the connection. Let me know. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From rsl at swimcommunity.org Wed Jul 12 09:53:28 2006 From: rsl at swimcommunity.org (Russell Norris) Date: Wed, 12 Jul 2006 09:53:28 -0400 Subject: [Mongrel] Bad Client Errors In-Reply-To: <1152688548.6016.43.camel@localhost.localdomain> References: <1d2f8d6f0607111405v110e85d2s38ee584a6aff6739@mail.gmail.com> <1152688548.6016.43.camel@localhost.localdomain> Message-ID: <1d2f8d6f0607120653i3df0ef4ds6491df818a104795@mail.gmail.com> Wow. Most of what you've said was really over my head. I was just running a quick Mongrel server on my desktop to test/run a Rails app I'm working on. Good news: I don't [know how to] use Nagios. Bad news: I don't [know how to] use Ethereal either. I'm going to investigate it though. I was just running Mongrel and using Firefox to pull up the page. It usually works fine when I'm running the normal Windows Mongrel. You're too smart for me. For real. :) Hope Ethereal can give me more clues and thanks for replying so quickly. On 7/12/06, Zed Shaw wrote: > > On Tue, 2006-07-11 at 17:05 -0400, Russell Norris wrote: > > I've gone through the mailing list archives and looked through all the > > docs I could find but I still can't figure out exactly what's going on > > with my Mongrel that it gives the following error: > > > > [Timestamp]: BAD CLIENT ( 127.0.0.1): Invalid HTTP format, parsing > > fails > > > > I'm running Cygwin 1.5.20-1, Ruby 1.8.4, and WinXP. I'd appreciate any > > help on getting it up and running. > > Mongrel uses a very correct parser when processing HTTP 1.1 requests. > If it says "BAD CLIENT" then I've found it's always right. Not saying > Mongrel's perfect, it's just a bi-product of using a parser generator > based on the RFC's grammar rather than hand-coding. > > If you're running Nagios then stop. Nagios is utter and total garbage > and can barely get the TCP/IP right let alone the HTTP. > > If it's something else where you see these then you to reproduce it and > do a protocol dump with Ethereal (it runs on windows). Once you get the > dump, go to where you see these bad client errors and see if you can do > Analyze->Follow TCP Stream. This'll tell you exactly what mongrel is > getting and it'll show you what the error is. > > I'd be curious to see what's doing the connection. Let me know. > > > -- > 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/20060712/65142e3b/attachment.html From jeremydurham at gmail.com Wed Jul 12 13:35:08 2006 From: jeremydurham at gmail.com (Jeremy Durham) Date: Wed, 12 Jul 2006 13:35:08 -0400 Subject: [Mongrel] [ANN] Test Mongrel 0.3.13.4 Please In-Reply-To: <1152552350.7268.18.camel@localhost.localdomain> References: <1152552350.7268.18.camel@localhost.localdomain> Message-ID: <799079fe0607121035g140f6fb2gbaa8c63c0809bb72@mail.gmail.com> Hi, Works better for me locally. What are the symptoms of this "nasty little bug?" I seem to have weird threading issues sometimes with 0.13.3, especially after the server runs a long time in dev. mode. Jeremy On 7/10/06, Zed Shaw wrote: > > Hey Folks, > > There's a nasty little bug in 0.3.13.3 when running in development mode > which could cause all sorts of problems. > > Please grab the pre-release of 0.3.13.4 and tell me if it works for you: > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > Thanks! > > > -- > 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/20060712/c56c8bb3/attachment.html From mongrel at philip.pjkh.com Wed Jul 12 15:26:06 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Wed, 12 Jul 2006 14:26:06 -0500 (CDT) Subject: [Mongrel] Rotating mongrel.log? Message-ID: <20060712142527.M83567@bravo.pjkh.com> Hi all - I searched, but didn't see anything on this so.... Best way to rotate the mongrel.log file? Should I just restart the mongrel cluster? Or is there a better way? Thanks! -philip From tom at onidle.com Wed Jul 12 16:15:00 2006 From: tom at onidle.com (Tom Brice) Date: Wed, 12 Jul 2006 15:15:00 -0500 Subject: [Mongrel] [slightly OT] Apache 2.2.2 proxy config In-Reply-To: Message-ID: This thread dates back almost a month. At the time I was addressing issues with an app that does uploads (apache2.2/mod_proxy_balanacer/mongrel 0.3.13) by setting KeepAlive Off in my virtual host section of my httpd.conf. If Apache used KeepAlive the mongrel would hang. Not crash but simply remain running. I finally had some time to try to setup a sample app and compile apache on my dev machine. Here's what I found. I believe I'm still getting the issue when KeepAlive is on. I appears that the connection is set to timeout=5 max= 100. Here's the apache conf with KeepAlive on (based on Bradley Taylor's conf): ServerName domain.tld DocumentRoot /Library/WebServer/apps/my_domain_app/current/public # KeepAlive Off Options FollowSymLinks AllowOverride None Order allow,deny Allow from all # Configure mongrel_cluster BalancerMember http://127.0.0.1:8000 BalancerMember http://127.0.0.1:8001 BalancerMember http://127.0.0.1:8002 BalancerMember http://127.0.0.1:8003 RewriteEngine On # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html ErrorLog logs/apache_mongrel_app_error_log CustomLog logs/apache_mongrel_access_log combined I've tried to adjust the timeout to handle longer uploads: BalancerMember http://127.0.0.1:8000 timeout=120 max=150 BalancerMember http://127.0.0.1:8001 timeout=120 max=150 BalancerMember http://127.0.0.1:8002 timeout=120 max=150 BalancerMember http://127.0.0.1:8003 timeout=120 max=150 But the connection still appears to say timeout=5,max=100. I believe that if I can fix the timeout I may be able to run with KeepAlive on. Any suggestions? Thanks, Tom PS Zed if you still want an sample app I can send it to you On 6/18/06 10:16 AM, Tom Brice wrote: > 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 > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From jim.crossley at cptii.com Wed Jul 12 16:27:57 2006 From: jim.crossley at cptii.com (Jim Crossley) Date: Wed, 12 Jul 2006 16:27:57 -0400 Subject: [Mongrel] A rails app server, maybe? Message-ID: <87bqru36wi.fsf@jimtoo.cptii.net> Hi all. Like many of us, I'm currently struggling with Rails deployment. Like maybe only a few of us, I'm responsible not for one or two webapps but dozens. Currently, we deploy them as war files using JBoss' hot deployment feature, which amounts to copying a war file to a directory monitored by JBoss. Undeploying the app amounts to removing it from the directory. So with JBoss I get: 1) Simple deployment 2) Application isolation We've recently discovered that it's easier (and more fun!) to write these apps using RoR instead of J2EE. But it's not so easy to deploy them, at least not in a way that makes sense for us. Specifically, we need, in addition to the above: 3) Consolidated logs 4) Path-based app URI's. By path-based URI's, I mean 'http://host.com/app' instead of 'http://app.host.com'. Lately we've been toying with the idea of creating a Mongrel plugin that could provide this app server functionality. In particular, it could monitor a directory into which multiple RoR apps may be copied/symlinked, providing hot [un]deployment of them within a single Mongrel instance. Additionally, it could provide a centralized interface to log4r (or something compatible) that would route log messages to a single location. I ran across this comment for Mongrel::Rails::RailsConfigurator::rails and got a little worried: # Because of how Rails is designed you can only have # one installed per Ruby interpreter (talk to them # about thread safety). Because of this the first # time you call this function it does all the config # needed to get your rails working. After that # it returns the one handler you've configured. # This lets you attach Rails to any URI (and multiple) # you want, but still protects you from threads destroying # your handler. Zed, would you mind elaborating on this a bit, or at least point me to more information about this problem? Does anyone else think this kind of functionality would be useful? If so, is the approach viable? Would anyone like to help us? :-) Sorry for the long post, Jim From scott at sigkill.org Wed Jul 12 16:53:51 2006 From: scott at sigkill.org (Scott Laird) Date: Wed, 12 Jul 2006 13:53:51 -0700 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <87bqru36wi.fsf@jimtoo.cptii.net> References: <87bqru36wi.fsf@jimtoo.cptii.net> Message-ID: <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> On 7/12/06, Jim Crossley wrote: > We've recently discovered that it's easier (and more fun!) to write > these apps using RoR instead of J2EE. But it's not so easy to deploy > them, at least not in a way that makes sense for us. Specifically, we > need, in addition to the above: > > 3) Consolidated logs > 4) Path-based app URI's. Do you need consolidated access logs or consolidated debugging logs? Using something like Apache with mod_proxy (or mod_proxy_balancer) and then Mongrel with the patch that I sent to Zed a couple days ago would accomplish most of this. You could ignore Mongrel's access logs and use Apache's instead. You'd have one (or more) Mongrel back end per app. Then the front-end server (or load balancer, really) proxyies http://host.com/app1 to App1's Mogrel instance(s), http://host.com/app2 to App2's Mongrel instances, and so on. You can restart each Mongrel back end independantly for upgrades. To keep things happy, you'd need to write some sort of management front end that takes a list of apps and then builds a config file for your front-end proxy along with a set of scripts for stopping and restarting the Mongrel back ends. It's probably a couple hours' work, but it'll pay for itself almost immediately. Scott From jim.crossley at cptii.com Wed Jul 12 17:16:52 2006 From: jim.crossley at cptii.com (Jim Crossley) Date: Wed, 12 Jul 2006 17:16:52 -0400 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> (Scott Laird's message of "Wed, 12 Jul 2006 13:53:51 -0700") References: <87bqru36wi.fsf@jimtoo.cptii.net> <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> Message-ID: <877j2i34mz.fsf@jimtoo.cptii.net> Hi... "Scott Laird" writes: [...] > Do you need consolidated access logs or consolidated debugging logs? Yes. :-) Actually, I was referring to the debugging logs. We already use Apache as a reverse proxy to our app server, so its access logs work well for us. > Using something like Apache with mod_proxy (or mod_proxy_balancer) > and then Mongrel with the patch that I sent to Zed a couple days ago > would accomplish most of this. You could ignore Mongrel's access > logs and use Apache's instead. I saw that patch, however... > You'd have one (or more) Mongrel back end per app. We *really* want to avoid this, if possible. We have some pretty clever mod_rewrite voodoo in place that compares the incoming URI's path to our JBoss deployment directory to know whether to proxy the request. We would rather not introduce a path-to-port mapping layer. This is why we'd prefer a single Mongrel instance and path-based URI's. And wouldn't the port-per-app make debug log consolidation harder? > Then the front-end server (or load balancer, really) proxyies > http://host.com/app1 to App1's Mogrel instance(s), > http://host.com/app2 to App2's Mongrel instances, and so on. You > can restart each Mongrel back end independantly for upgrades. Granted that would give us app isolation, but it would complicate our Apache config by introducing the app-to-port mappings. I don't want to have to re{start,load} Apache when I add/remove an new application. > To keep things happy, you'd need to write some sort of management > front end that takes a list of apps and then builds a config file > for your front-end proxy along with a set of scripts for stopping > and restarting the Mongrel back ends. It's probably a couple hours' > work, but it'll pay for itself almost immediately. I agree that a management interface would hide some of the complexity, but I'd like to make the transition from JBoss to Rails as transparent as possible to our support staff. I'll have to give that some thought. Thanks for your quick reply, Jim From scott at sigkill.org Wed Jul 12 17:37:09 2006 From: scott at sigkill.org (Scott Laird) Date: Wed, 12 Jul 2006 14:37:09 -0700 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <877j2i34mz.fsf@jimtoo.cptii.net> References: <87bqru36wi.fsf@jimtoo.cptii.net> <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> <877j2i34mz.fsf@jimtoo.cptii.net> Message-ID: <14b7e5ef0607121437x37d59a03o74a36de6d0db2514@mail.gmail.com> On 7/12/06, Jim Crossley wrote: > > You'd have one (or more) Mongrel back end per app. > > We *really* want to avoid this, if possible. We have some pretty > clever mod_rewrite voodoo in place that compares the incoming URI's > path to our JBoss deployment directory to know whether to proxy the > request. We would rather not introduce a path-to-port mapping layer. > This is why we'd prefer a single Mongrel instance and path-based > URI's. I'd be really amazed if you could get multiple Rails apps running under a single Mongrel process working without causing big problems. You *might* be able to do this by merging all of the apps and treating it like one big app with weird namespace issues. You could probably even automate that. But you'd have to take it down and restart it to make changes, and IMHO that'd be a huge pain in most situations. At the very least, it'd break as soon as one app needs Rails 1.2 while the others require Rails 1.1. > And wouldn't the port-per-app make debug log consolidation harder? Actually, it might be *easier* if each Mongrel process has its own log directory. Since most Rails log entries are more then one line long, de-interlacing the logs to determine which lines go with which request is a pain. Actually, replacing the Rails logger with something more powerful and using it to consolidate the logs would probably be one of the *first* things that I'd do. I'm not really running any Rails apps in production right now (not counting N Typo installs), so I haven't had to deal with log-related issues. I should probably add something log-related to the installer that I'm working on. Now where'd I put that to-do list... Anyway, you do realize that Mongrel single-threads Rails requests, right? You're going to need multiple copies of Mongrel to get any parallelism out of the system, and once you do that you might as well bite the bullet and accept the one-app-per-Mongrel solution. Scott From pergesu at gmail.com Wed Jul 12 17:39:23 2006 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 12 Jul 2006 14:39:23 -0700 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <877j2i34mz.fsf@jimtoo.cptii.net> References: <87bqru36wi.fsf@jimtoo.cptii.net> <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> <877j2i34mz.fsf@jimtoo.cptii.net> Message-ID: <810a540e0607121439w1f65719aoa0ae73cc7044f516@mail.gmail.com> On 7/12/06, Jim Crossley wrote: > > You'd have one (or more) Mongrel back end per app. > > We *really* want to avoid this, if possible. We have some pretty > clever mod_rewrite voodoo in place that compares the incoming URI's > path to our JBoss deployment directory to know whether to proxy the > request. We would rather not introduce a path-to-port mapping layer. > This is why we'd prefer a single Mongrel instance and path-based > URI's. You can't have one mongrel instance power multiple applications, because each mongrel instance loads up the application environment. I think the problem is that you're trying to compare a mongrel instance with a JBoss instance. They're not the same kind of application. Mongrel is a much more specific, lightweight, fine-grained app that would be more akin to some kind of component within JBoss. The easiest way to manage deployments with Rails apps is to use Capistrano. I understand that you need a higher level management application. It certainly would be an interesting project. Just realize that such a system should manage mongrel processes, not be built into mongrel itself. Pat From pergesu at gmail.com Wed Jul 12 17:46:45 2006 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 12 Jul 2006 14:46:45 -0700 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <14b7e5ef0607121437x37d59a03o74a36de6d0db2514@mail.gmail.com> References: <87bqru36wi.fsf@jimtoo.cptii.net> <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> <877j2i34mz.fsf@jimtoo.cptii.net> <14b7e5ef0607121437x37d59a03o74a36de6d0db2514@mail.gmail.com> Message-ID: <810a540e0607121446o369e25ddt6a5cf89e07b52de0@mail.gmail.com> On 7/12/06, Scott Laird wrote: > You *might* be able to do this by merging all of the apps and treating > it like one big app with weird namespace issues. I tried this on a single site of mine that had three separate applications - a ticketing system, a billing system, and another specialized application. Managing that was a nightmare. Running separate applications gives another benefit in the form of scalability. As my site grows, I can just add mongrel processes for the specialized application, as it's the most heavily used part of the site. Also as you said, Mongrel is single-threaded so it's unrealistic to run any heavily-used application on one instance. As I mentioned in an earlier reply, the real problem at hand is mistaking JBoss and Mongrel to be equivalent systems on different platforms. Pat From jim.crossley at cptii.com Wed Jul 12 18:07:03 2006 From: jim.crossley at cptii.com (Jim Crossley) Date: Wed, 12 Jul 2006 18:07:03 -0400 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <810a540e0607121439w1f65719aoa0ae73cc7044f516@mail.gmail.com> (Pat Maddox's message of "Wed, 12 Jul 2006 14:39:23 -0700") References: <87bqru36wi.fsf@jimtoo.cptii.net> <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> <877j2i34mz.fsf@jimtoo.cptii.net> <810a540e0607121439w1f65719aoa0ae73cc7044f516@mail.gmail.com> Message-ID: <871wsq32bc.fsf@jimtoo.cptii.net> "Pat Maddox" writes: [...] > I think the problem is that you're trying to compare a mongrel > instance with a JBoss instance. They're not the same kind of > application. Mongrel is a much more specific, lightweight, > fine-grained app that would be more akin to some kind of component > within JBoss. I was worried that my original email might be construed that way. I didn't mean to start any sort of JBoss vs Mongrel or Java vs RoR flame. I'm just trying to find a way I can combine the development conveniences of one with the deployment conveniences of the other. I certainly don't want Mongrel or RoR to become the big honking pig that JBoss is. I'm merely looking for a way to achieve app isolation, hot deployment, and log file consolidation. > The easiest way to manage deployments with Rails apps is to use > Capistrano. I don't doubt that, though the docs are dated and somewhat lacking WRT Mongrel integration, aren't they? Regardless, I absolutely need to dive into Capistrano. > I understand that you need a higher level management application. > It certainly would be an interesting project. Just realize that > such a system should manage mongrel processes, not be built into > mongrel itself. Understood, thanks. Jim From mrueckert at suse.de Wed Jul 12 18:40:55 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Thu, 13 Jul 2006 00:40:55 +0200 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <87bqru36wi.fsf@jimtoo.cptii.net> References: <87bqru36wi.fsf@jimtoo.cptii.net> Message-ID: <20060712224055.GO5504@suse.de> hi, that reminds me a bit on http://mongrel.rubyforge.org/not_mongrel.html I like the idea of having it simple and small. :) darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From tom at onidle.com Wed Jul 12 20:58:29 2006 From: tom at onidle.com (Tom Brice) Date: Wed, 12 Jul 2006 19:58:29 -0500 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <87bqru36wi.fsf@jimtoo.cptii.net> Message-ID: On 7/12/06 3:27 PM, Jim Crossley wrote: > Currently, we deploy them as war files using JBoss' hot > deployment feature, which amounts to copying a war file to a directory > monitored by JBoss. Undeploying the app amounts to removing it from > the directory. At risk of being banned form the list: I would suggest that you focus your efforts on JRuby. If you have this entrenched java infrastructure maybe you can leverage rails that way. I'm not sure if you could so it today but FWIW JRuby is under very active development. Apologies if this is already known to you. From zedshaw at zedshaw.com Wed Jul 12 21:36:04 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 12 Jul 2006 21:36:04 -0400 Subject: [Mongrel] Rotating mongrel.log? In-Reply-To: <20060712142527.M83567@bravo.pjkh.com> References: <20060712142527.M83567@bravo.pjkh.com> Message-ID: <1152754564.5981.1.camel@localhost.localdomain> On Wed, 2006-07-12 at 14:26 -0500, Philip Hallstrom wrote: > Hi all - > > I searched, but didn't see anything on this so.... > > Best way to rotate the mongrel.log file? Should I just restart the > mongrel cluster? Or is there a better way? There's quite a few external packages for different linux systems. I think redhat has logrotate. Best bet is to use one of them. Be careful though, I've seen people report crashes of mongrel right when logrotate runs. In one case it was that logrotate was kicking the ram up just over the edge so Xen was killing mongrel or the DB. In another instance we didn't have a clue so we just turned logrotate off. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Wed Jul 12 21:42:05 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 12 Jul 2006 21:42:05 -0400 Subject: [Mongrel] [slightly OT] Apache 2.2.2 proxy config In-Reply-To: References: Message-ID: <1152754925.5981.8.camel@localhost.localdomain> On Wed, 2006-07-12 at 15:15 -0500, Tom Brice wrote: > This thread dates back almost a month. At the time I was addressing issues > with an app that does uploads (apache2.2/mod_proxy_balanacer/mongrel 0.3.13) > by setting KeepAlive Off in my virtual host section of my httpd.conf. If > Apache used KeepAlive the mongrel would hang. Not crash but simply remain > running. > > I finally had some time to try to setup a sample app and compile apache on > my dev machine. Here's what I found. I believe I'm still getting the issue > when KeepAlive is on. I appears that the connection is set to timeout=5 max= > 100. Here's the apache conf with KeepAlive on (based on Bradley Taylor's > conf): > But the connection still appears to say timeout=5,max=100. I believe that > if I can fix the timeout I may be able to run with KeepAlive on. Any > suggestions? > I'd say just don't do that. Or as rails people say YAGNI. Unless you have a very compelling technical reason (and I can come up with better alternatives for every one), then keepalive isn't needed. It actually doesn't improve performance for various reasons, and it really only causes you obvious pain. Just don't do it. Simpler is better. On another note, I'm not really sure why apache can't handle keepalive and why that matters for the proxy. Should be that apache can translate the keepalive and do regular requests to the backend. Seems like apache is broken. > PS Zed if you still want an sample app I can send it to you Sure, send it on. I'd be curious to see what you're doing and why you need the keepalive stuff. Uh, but off list. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From pergesu at gmail.com Wed Jul 12 21:56:57 2006 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 12 Jul 2006 18:56:57 -0700 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <871wsq32bc.fsf@jimtoo.cptii.net> References: <87bqru36wi.fsf@jimtoo.cptii.net> <14b7e5ef0607121353p3eee6bccxd4008d2b9b157cad@mail.gmail.com> <877j2i34mz.fsf@jimtoo.cptii.net> <810a540e0607121439w1f65719aoa0ae73cc7044f516@mail.gmail.com> <871wsq32bc.fsf@jimtoo.cptii.net> Message-ID: <810a540e0607121856l316cc8b7of7f3de0e2ecafda@mail.gmail.com> On 7/12/06, Jim Crossley wrote: > "Pat Maddox" writes: > > [...] > > > I think the problem is that you're trying to compare a mongrel > > instance with a JBoss instance. They're not the same kind of > > application. Mongrel is a much more specific, lightweight, > > fine-grained app that would be more akin to some kind of component > > within JBoss. > > I was worried that my original email might be construed that way. I > didn't mean to start any sort of JBoss vs Mongrel or Java vs RoR > flame. I'm just trying to find a way I can combine the development > conveniences of one with the deployment conveniences of the other. > > I certainly don't want Mongrel or RoR to become the big honking pig > that JBoss is. I'm merely looking for a way to achieve app isolation, > hot deployment, and log file consolidation. Oh I know you weren't trying to start a Rails vs Java thing. I'm just saying that Mongrel is an application server (well, HTTP server, but application server wrt Rails). JBoss is an application server platform. JBoss is intended to provide a much more comprehensive infrastructure, and you'll just give yourself a headache if you try to think of Mongrel in the same light. As far as I can tell, the "Rails way" of doing things is the same as the Unix way. Have lots of small applications and utilities that do the job well, and assemble them how you need. For application deployment that means using Capistrano. If you have to manage a number of deployments, find a way to tie it into Capistrano somehow. The Rails Machine guys have done something like that, created a new utility to "machinify" your application. It modifies deploy scripts, sets up stuff on the server, etc. Go to their site and install the gems, then you can take a look at the source and see if you could do something similar. > > The easiest way to manage deployments with Rails apps is to use > > Capistrano. > > I don't doubt that, though the docs are dated and somewhat lacking WRT > Mongrel integration, aren't they? Regardless, I absolutely need to > dive into Capistrano. Coda Hale wrote the best guide to using Mongrel that I've seen so far. It includes how to use Capistrano and Mongrel. Worked flawlessly for me on dev and production boxes. http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ hth Pat From zedshaw at zedshaw.com Wed Jul 12 21:57:20 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 12 Jul 2006 21:57:20 -0400 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: References: Message-ID: <1152755840.5981.20.camel@localhost.localdomain> On Wed, 2006-07-12 at 19:58 -0500, Tom Brice wrote: > On 7/12/06 3:27 PM, Jim Crossley wrote: > > > Currently, we deploy them as war files using JBoss' hot > > deployment feature, which amounts to copying a war file to a directory > > monitored by JBoss. Undeploying the app amounts to removing it from > > the directory. > > At risk of being banned form the list: I would suggest that you focus your > efforts on JRuby. If you have this entrenched java infrastructure maybe you > can leverage rails that way. I'm not sure if you could so it today but FWIW > JRuby is under very active development. Apologies if this is already known > to you. NO SOUP FOR YOU! Nah, you're right. I agree with Jim here. Here's an analogy. You ever have the girlfriend (or boyfriend) who has enough baggage to choke O'Hare? She's constantly complaining about how her last boyfriend did this, or her last boyfriend did that. He was a gentlemen, he was nice, he bought her flowers. She obviously left the guy for some reason, so why is she complaining to you? Why doesn't she just go back to him if he's so damn great? See, the problem is she wants to have her cake and eat it too. She wants the new nice guy and the piece of crap she used to date all rolled into one Superman. Can't have it that way. Either she has to start dating again and find that Superman, or just accept that the new guy is different and start admiring his positive qualities (or sleep with both at the same time, but that's another topic entirely off topic). So, either you have to accept that Mongrel and Rails are just different. Not worse. Different. Instead of saying, "How can I get Mongrel to be like my old JBoss (even though I hate JBoss!)?" You should be saying, "Hey, I need help making my deployment hot and smooth. Can someone help me out?" If you can't accept it, then you've gotta look at something JRuby as the possible Superman in our little analogy (but be prepared to have it not turn out like you like). I'll answer your original e-mail with a more serious response, but this is the basic philosophy. It's not better or worse, it's different. P.S. I *hate* application servers with a passion. Just so you know, I prefer one tool does one job well. If I wanted a thousand kitchen sinks I'd own a Home Hardware. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From tom at onidle.com Wed Jul 12 22:22:58 2006 From: tom at onidle.com (Tom Brice) Date: Wed, 12 Jul 2006 21:22:58 -0500 Subject: [Mongrel] [slightly OT] Apache 2.2.2 proxy config In-Reply-To: <1152754925.5981.8.camel@localhost.localdomain> Message-ID: On 7/12/06 8:42 PM, Zed Shaw wrote: > I'd say just don't do that. Or as rails people say YAGNI. Unless you > have a very compelling technical reason (and I can come up with better > alternatives for every one), then keepalive isn't needed. It actually > doesn't improve performance for various reasons, and it really only > causes you obvious pain. Just don't do it. Simpler is better. Agreed. Just to be clear: I don't _need_ KeepAlive. I'm still learning the intricacies of apache voodoo so it was dumb luck that I found the solution was to turn KeepAlive off. Off works so off it stays. I am pursuing this for the sake of clarifying it for the community at large. Anyway, noble intentions aside, thanks for the info. Tom From zedshaw at zedshaw.com Wed Jul 12 22:48:31 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 12 Jul 2006 22:48:31 -0400 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <87bqru36wi.fsf@jimtoo.cptii.net> References: <87bqru36wi.fsf@jimtoo.cptii.net> Message-ID: <1152758911.5981.63.camel@localhost.localdomain> First some answers to your questions, then a slight position "paper" at the end... On Wed, 2006-07-12 at 16:27 -0400, Jim Crossley wrote: > Hi all. > > Like many of us, I'm currently struggling with Rails deployment. Like > maybe only a few of us, I'm responsible not for one or two webapps but > dozens. Currently, we deploy them as war files using JBoss' hot > deployment feature, which amounts to copying a war file to a directory > monitored by JBoss. Undeploying the app amounts to removing it from > the directory. So with JBoss I get: > > 1) Simple deployment > 2) Application isolation > Hmm, but do you really get #2? Be honest. Do you really? C'mon. You sure? I mean *really* isolated applications? No classes mixed from competing jar versions? No ClassLoader1, ClassLoader2, ClassLoader0? No memory hogs crashing all your apps at once? Even with Java the only way to get *true* application isolation is to run them in separate processes. Java's big pitfall is that it tries to be the OS when the OS is better at being an OS. Now, the reason Java tries to do this is because a base Sun JVM takes up 128M of ram, and even simple apps can easily eat 1G on a bad day. #1 is cake with capistrano. Actually, a billion hundred million times better than any JBoss hackery you've got. Capistrano not only hot deploys your apps, but *versions* them, and allows hot undeploy to previous versions while remote managing database migrations, web servers, toasters, and alien space probes. Capistrano is what you want. > We've recently discovered that it's easier (and more fun!) to write > these apps using RoR instead of J2EE. But it's not so easy to deploy > them, at least not in a way that makes sense for us. Specifically, we > need, in addition to the above: > > 3) Consolidated logs > 4) Path-based app URI's. > #3 is done by a combination of cleverness, mongrel_cluster, and the power of ln. Basically, if you want to consolidate logs than link your log directory to a directory like /var/log/rails/app1,app2. With that it's pretty trivial to then harvest these logs as part of your log rotation. Now if you mean "consolidate logs" and actually mean "a mondo log file for all my apps", then how does this jive with your desire for app separation? Seems like counter goals. Still, you can log to a syslog on a separate server if you absolutely need this. For #4 I've got a patch I'm applying and then I'll do a pre-release of 0.3.13.4 to enable it. It'll give you what you want on this. > By path-based URI's, I mean 'http://host.com/app' instead of > 'http://app.host.com'. > Yep, wait for patch. > Lately we've been toying with the idea of creating a Mongrel plugin > that could provide this app server functionality. In particular, it > could monitor a directory into which multiple RoR apps may be > copied/symlinked, providing hot [un]deployment of them within a single > Mongrel instance. Additionally, it could provide a centralized > interface to log4r (or something compatible) that would route log > messages to a single location. > I think you're really over thinking this. Your above desire basically amounts to this single requirements statement: "Change Mongrel and Rails to be like JBoss so I don't have to change." If you seriously love the JBoss way of deploying, then you should consider JRuby. You'll be a little limited at first, but it'll give you what you want. But, I'd say, try the new way. It's a learning curve initially, but not much of one. And it has huge advantages from its simplicity and the power you get combining Apache+mongrel+capistrano is insane. I literally do "cap -a deploy" and have all my databases updated, checks run, code deployed, servers restarted, the works. And you can customize it to suite your needs. Give it a shot before you go trying to change things to your will. > I ran across this comment for Mongrel::Rails::RailsConfigurator::rails > and got a little worried: > > # Because of how Rails is designed you can only have > # one installed per Ruby interpreter (talk to them > # about thread safety). Because of this the first > # time you call this function it does all the config > # needed to get your rails working. After that > # it returns the one handler you've configured. > # This lets you attach Rails to any URI (and multiple) > # you want, but still protects you from threads destroying > # your handler. > > Zed, would you mind elaborating on this a bit, or at least point me to > more information about this problem? Yeah, basically Ruby has a namespace. Rails uses this namespace to put the applications classes in. There's no mechanism in the Ruby interpreter to have separate namespaces, so you can't put more than one app inside a Ruby interpreter. But then, you can't really do this with Java either, and for technical reasons it's kind of stupid to try. Operating systems are much better than Virtual Machines at separating processes, so in the Rails approach we just let the OS separate the apps and run one process for each app. > > Does anyone else think this kind of functionality would be useful? If > so, is the approach viable? Would anyone like to help us? :-) I wouldn't want to discourage you, since I'm sure there's someone who would probably even fund this, but I'd have to say that I'm dead against this in a violently evil way. I was doing Java deployments for years and I *hated* the way it was done. Actually, the fact that you can't integrate rails into your current setup is a symptom of the java "kitchen-sink-app-server" approach. If you think about it, it's a very clever ploy by the app server vendors since once you do it their way, you can't use anything else to manage heterogeneous systems. But let me interject a little bit of perspective on this problem. While I've been kind of teasing you, I do think that what you're expressing is not a problem with how Mongrel/Rails apps are deployed, but more a problem with how the deployments are configured. I'll explain. Deployment with capistrano is pretty much just as simple as what you're describing with JBoss. Simpler even since I can have capistrano do a bunch of other nice things, and it even copies the stuff over for you. Like I said, give me a scriptable system any day. But, the way rails does things means that it likes being at a host not a URI. Even with this patch I'm gonna put in, you'll still have some problems you'll have to adapt for. I actually don't like the URI thing, since a DNS change is all you need to setup your vhost. But, this isn't practical for people who want to cram 100 apps on one box and have to beg operations for a week to get one DNS change. So where I think you should focus your efforts is not on the "hot deployment" (which is a total lie BTW), or the "segmented apps" (another lie), but on making the configuration of a mongrel setup simpler. This is what the RailsMachine guys did and it's worked great for them. They have a consistent deployment method using capistrano that does all the stuff you're asking for, but in the rails way. As a matter of fact, if you're in a time crunch, I'll pimp them and say you should contact them for some commercial support and they can have you up and running with a sweet setup quick. In conclusion, it's not the hot deployment you want, that's just eye-candy. What you want is the simple *configuration* of your deployment, which is possible but it'll take some work initially. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From mongrel at philip.pjkh.com Thu Jul 13 01:09:23 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 13 Jul 2006 00:09:23 -0500 (CDT) Subject: [Mongrel] Rotating mongrel.log? In-Reply-To: <1152754564.5981.1.camel@localhost.localdomain> References: <20060712142527.M83567@bravo.pjkh.com> <1152754564.5981.1.camel@localhost.localdomain> Message-ID: <20060713000717.E94585@bravo.pjkh.com> >> I searched, but didn't see anything on this so.... >> >> Best way to rotate the mongrel.log file? Should I just restart the >> mongrel cluster? Or is there a better way? > > There's quite a few external packages for different linux systems. I > think redhat has logrotate. Best bet is to use one of them. Sorry, I wasn't clear in my post. I can rotate the log no problem. I was wondering what I needed to do to mongrel to get it to realize I've rotated. Similar to doing an "apachectl graceful" to get apache to close/open it's log files. It looks like my only option is to restart the cluster? -philip From jim.crossley at cptii.com Wed Jul 12 23:50:38 2006 From: jim.crossley at cptii.com (Jim Crossley) Date: Wed, 12 Jul 2006 23:50:38 -0400 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <1152755840.5981.20.camel@localhost.localdomain> (Zed Shaw's message of "Wed, 12 Jul 2006 21:57:20 -0400") References: <1152755840.5981.20.camel@localhost.localdomain> Message-ID: <87irm2duy9.fsf@crossleys.org> I wasn't making any value judgements about Mongrel, JBoss, Rails, Java, Ruby, or even JRuby or girlfriends or crappy old boyfriends or cake, and I certainly don't want "Mongrel to be like my old JBoss"! I simply "need help making my deployment hot and smooth. Can someone help me out?" ;-) Jim Zed Shaw writes: > On Wed, 2006-07-12 at 19:58 -0500, Tom Brice wrote: >> On 7/12/06 3:27 PM, Jim Crossley wrote: >> >> > Currently, we deploy them as war files using JBoss' hot >> > deployment feature, which amounts to copying a war file to a directory >> > monitored by JBoss. Undeploying the app amounts to removing it from >> > the directory. >> >> At risk of being banned form the list: I would suggest that you focus your >> efforts on JRuby. If you have this entrenched java infrastructure maybe you >> can leverage rails that way. I'm not sure if you could so it today but FWIW >> JRuby is under very active development. Apologies if this is already known >> to you. > > NO SOUP FOR YOU! > > Nah, you're right. I agree with Jim here. Here's an analogy. > > You ever have the girlfriend (or boyfriend) who has enough baggage to > choke O'Hare? She's constantly complaining about how her last boyfriend > did this, or her last boyfriend did that. He was a gentlemen, he was > nice, he bought her flowers. She obviously left the guy for some > reason, so why is she complaining to you? Why doesn't she just go back > to him if he's so damn great? > > See, the problem is she wants to have her cake and eat it too. She > wants the new nice guy and the piece of crap she used to date all rolled > into one Superman. Can't have it that way. Either she has to start > dating again and find that Superman, or just accept that the new guy is > different and start admiring his positive qualities (or sleep with both > at the same time, but that's another topic entirely off topic). > > So, either you have to accept that Mongrel and Rails are just different. > Not worse. Different. Instead of saying, "How can I get Mongrel to be > like my old JBoss (even though I hate JBoss!)?" You should be saying, > "Hey, I need help making my deployment hot and smooth. Can someone help > me out?" If you can't accept it, then you've gotta look at something > JRuby as the possible Superman in our little analogy (but be prepared to > have it not turn out like you like). > > I'll answer your original e-mail with a more serious response, but this > is the basic philosophy. It's not better or worse, it's different. > > > P.S. I *hate* application servers with a passion. Just so you know, I > prefer one tool does one job well. If I wanted a thousand kitchen sinks > I'd own a Home Hardware. > > -- > 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 zedshaw at zedshaw.com Thu Jul 13 03:11:59 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 13 Jul 2006 03:11:59 -0400 Subject: [Mongrel] A rails app server, maybe? In-Reply-To: <87irm2duy9.fsf@crossleys.org> References: <1152755840.5981.20.camel@localhost.localdomain> <87irm2duy9.fsf@crossleys.org> Message-ID: <1152774719.7453.6.camel@localhost.localdomain> On Wed, 2006-07-12 at 23:50 -0400, Jim Crossley wrote: > I wasn't making any value judgements about Mongrel, JBoss, Rails, > Java, Ruby, or even JRuby or girlfriends or crappy old boyfriends or > cake, and I certainly don't want "Mongrel to be like my old JBoss"! I > simply "need help making my deployment hot and smooth. Can someone > help me out?" ;-) Hehe, nah, I didn't think you were slagging Mongrel. Just kind of laying out my opinion on the topic. Now, what you need to do is research a few technologies: * capistrano -- does your deployment automation * mongrel_cluster -- does simple cluster configs. * puppet -- more advanced system automation. Also check out the railsmachine gem and talk with Bradley Taylor about he sets things up. He's got a good setup and the railsmachine stuff is open source, but you have to do a bit of work. Next up, check out the following documents that can you get you up and running with a nice deployment scenario: http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ Bradley's setup is an alternative but we don't have it documented quite as well yet. You could follow Coda's instructions and get a complete setup working in no time. And that should get you on the right track very well. You'll have to look at syslog logger and a few other tweaks to get the kind of logging you want, but otherwise it's the way to go. I hang out as zedas in #rubyonrails, so just private message me if you need help. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From bradley at railsmachine.com Thu Jul 13 14:38:24 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Thu, 13 Jul 2006 14:38:24 -0400 Subject: [Mongrel] [ANN] Mongrel Cluster 0.2.1 prerelease Message-ID: Hi Y'all, Just a quick note announce an update to mongrel_cluster. Changes: - 'mongrel_rails cluster::restart' now calls 'mongrel_rails stop' and 'mongrel_rails start'. 'cluster::restart' now accepts the 'force' argument instead of 'soft'. - Added '.conf' as a valid file extension for mongrel_cluster_ctl. - Added check for missing script and directory to the init.d script. (Thanks, Neil Wilson) To install: gem install mongrel_cluster --source http:// railsmachine.rubyforge.org/releases/ I'm working on documentation the next few days so if you have any burning questions or confusion, please let me know. Thanks, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060713/b0cf5e7b/attachment.html From kevwil at gmail.com Thu Jul 13 15:27:34 2006 From: kevwil at gmail.com (Kevin Williams) Date: Thu, 13 Jul 2006 13:27:34 -0600 Subject: [Mongrel] cluster vs. rails spawner Message-ID: <683a886f0607131227m6cb7b714o8b5fbacd587fd2@mail.gmail.com> It appears the spawner in Rails 1.2 will do Mongrel clustering. I'm curious what this means for mongrel_cluster. They appear to overlap in features quite a bit. I don't think the spawner uses a config, so that's one difference. Will they be different enough? I only ask because mongrel_cluster could, theoretically, be made extinct if the spawner script has all the same features (why another gem if Rails duplicates the functionality). Just a curious question from a happy cluster user. :) -- Cheers, Kevin From sebastian at feldpost.com Thu Jul 13 15:41:12 2006 From: sebastian at feldpost.com (Sebastian Friedrich) Date: Thu, 13 Jul 2006 14:41:12 -0500 Subject: [Mongrel] (OS X) Address binding still exists after terminating session Message-ID: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> [using mongrel-0.3.13.4 pre-release, OX 10.4.7] I have a slightly annoying issue under OS X: If i terminate the session that ran the mongrel process (by closing terminal window -- hey, it happens!), subsequent attempts to start mongrel give me the following error: /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ tcphack.rb:12:in `initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE) I suppose, because mongrel wasn't stopped properly, the address binding still exists somewhere. However, since the actual mongrel process has been killed, i have no idea how to unbind the address and port otherwise, so i usually have to resort to restarting the whole system (ouch!). This problem does not exist with WebBrick or lighty, so maybe this can be fixed? Otherwise, how can i manually release the address from its binding? Thanks for your help. Sebastian From scott at sigkill.org Thu Jul 13 15:47:58 2006 From: scott at sigkill.org (Scott Laird) Date: Thu, 13 Jul 2006 12:47:58 -0700 Subject: [Mongrel] (OS X) Address binding still exists after terminating session In-Reply-To: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> Message-ID: <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> On 7/13/06, Sebastian Friedrich wrote: > [using mongrel-0.3.13.4 pre-release, OX 10.4.7] > > I have a slightly annoying issue under OS X: If i terminate the > session that ran the mongrel process (by closing terminal window -- > hey, it happens!), subsequent attempts to start mongrel give me the > following error: > > /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ > tcphack.rb:12:in `initialize_without_backlog': Address already in use > - bind(2) (Errno::EADDRINUSE) That error means that an existing process is using that port on this system. It's not an issue of unclean shutown--it means that Mongrel is still running in the background. Try 'ps awwwx | grep mongrel' to find its process ID, then use 'kill' to kill it. Scott From sebastian at feldpost.com Thu Jul 13 16:00:02 2006 From: sebastian at feldpost.com (Sebastian Friedrich) Date: Thu, 13 Jul 2006 15:00:02 -0500 Subject: [Mongrel] (OS X) Address binding still exists after terminating session In-Reply-To: <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> Message-ID: <29EF080D-0A76-47B7-8F5B-7F1101418F5A@feldpost.com> On Jul 13, 2006, at 2:47 PM, Scott Laird wrote: > > That error means that an existing process is using that port on this > system. It's not an issue of unclean shutown--it means that Mongrel > is still running in the background. Try 'ps awwwx | grep mongrel' to > find its process ID, then use 'kill' to kill it. you right, the process was still running. I had actually grepped for a "mongrel" process before; it turned up empty because, in fact, i had started it as "script/server" (Doh!). Sorry for the noise (and yes, i will put down that crack pipe!). Sebastian From bradley at railsmachine.com Thu Jul 13 17:16:51 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Thu, 13 Jul 2006 17:16:51 -0400 Subject: [Mongrel] cluster vs. rails spawner In-Reply-To: <683a886f0607131227m6cb7b714o8b5fbacd587fd2@mail.gmail.com> References: <683a886f0607131227m6cb7b714o8b5fbacd587fd2@mail.gmail.com> Message-ID: <060A2AFB-3EFC-46EB-B2D1-160CCC514BD1@railsmachine.com> Hi Kevin: On Jul 13, 2006, at 3:27 PM, Kevin Williams wrote: > I'm curious what this means for mongrel_cluster. They appear to > overlap in features quite a bit. I don't think the spawner uses a > config, so that's one difference. Will they be different enough? Great question. To be honest, spawner will be fine for many people. Here are the main differences: 1. With spawner you can specify starting port, environment, and number of mongrels. That's it. If you need control over any of Mongrel's other billion start options, then you'll need mongrel_cluster. Of the options that don't overlap with fcgi options, "address", "script", "chdir" and "user" are really handy. 2. mongrel_cluster provides an init.d script for start on boot and the ability to start/stop/restart all applications with mongrel_cluster_ctl. Roll your own with spawner. 3. mongrel_cluster provides Capistrano tasks for configuring your cluster and supporting #2 above. Roll your own with spawner (example in Cap manual). 4. mongrel_cluster views itself as one part of an entire application stack and thus tries to "blend in". It defaults to storing configuration files in '/etc' , using an init.d script, and providing control over the all the clusters on the server. It leans towards the "unix way" rather than the "rails way". 5. mongrel_cluster was born out of the need to easily configure and manage multiple rails applications on on a single server. These differences reflect the different needs of the authors. The extras that mongrel_cluster provides are not mandatory for using Mongrel in clustered way, but are useful in many deployments. For myself and most of my customers, mongrel_cluster won't be obsolete, because it does work for us that we would have to do ourselves if we switched spawner. Thanks, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060713/e6379d50/attachment.html From me at seebq.com Thu Jul 13 17:24:19 2006 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 13 Jul 2006 17:24:19 -0400 Subject: [Mongrel] (OS X) Address binding still exists after terminating session In-Reply-To: <29EF080D-0A76-47B7-8F5B-7F1101418F5A@feldpost.com> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> <29EF080D-0A76-47B7-8F5B-7F1101418F5A@feldpost.com> Message-ID: <3a2de0cd0607131424g33f0e01p56383c86b1fa118e@mail.gmail.com> I have also found that my mac os x terminal windows need to be expanded really big to do: ps aux | grep blah especially for ruby proceses with paths like: /usr/bin/nice -n 3 /usr/local/bin/ruby .... I assume this is because it is really piping ps aux to the screen and then doing the grep, and if the screen is not big enough, it wont find the full path. netstat -ano should also show you what "stuff" is listening on all your ports and so you can see those 8000 ports still on. cheers, -- Charles Brian Quinn www.seebq.com On 7/13/06, Sebastian Friedrich wrote: > > > On Jul 13, 2006, at 2:47 PM, Scott Laird wrote: > > > > That error means that an existing process is using that port on this > > system. It's not an issue of unclean shutown--it means that Mongrel > > is still running in the background. Try 'ps awwwx | grep mongrel' to > > find its process ID, then use 'kill' to kill it. > > you right, the process was still running. I had actually grepped for > a "mongrel" process before; it turned up empty because, in fact, i > had started it as "script/server" (Doh!). Sorry for the noise (and > yes, i will put down that crack pipe!). > > Sebastian > _______________________________________________ > 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/20060713/143feccf/attachment-0001.html From grant at antiflux.org Thu Jul 13 17:43:26 2006 From: grant at antiflux.org (Grant Hollingworth) Date: Thu, 13 Jul 2006 15:43:26 -0600 Subject: [Mongrel] (OS X) Address binding still exists after terminating session In-Reply-To: <3a2de0cd0607131424g33f0e01p56383c86b1fa118e@mail.gmail.com> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> <29EF080D-0A76-47B7-8F5B-7F1101418F5A@feldpost.com> <3a2de0cd0607131424g33f0e01p56383c86b1fa118e@mail.gmail.com> Message-ID: <20060713214326.GA18331@okcomputer.antiflux.org> * Charles Brian Quinn [2006-07-13 15:32]: > I have also found that my mac os x terminal windows need to be expanded > really big to do: > > ps aux | grep blah If you 'ps auxww' then ps will pass everything to grep. From kevwil at gmail.com Thu Jul 13 17:51:49 2006 From: kevwil at gmail.com (Kevin Williams) Date: Thu, 13 Jul 2006 15:51:49 -0600 Subject: [Mongrel] cluster vs. rails spawner In-Reply-To: <060A2AFB-3EFC-46EB-B2D1-160CCC514BD1@railsmachine.com> References: <683a886f0607131227m6cb7b714o8b5fbacd587fd2@mail.gmail.com> <060A2AFB-3EFC-46EB-B2D1-160CCC514BD1@railsmachine.com> Message-ID: <683a886f0607131451v64063d11n704307ef7beb7118@mail.gmail.com> Excellent answer! Thanks. On 7/13/06, Bradley Taylor wrote: > > Hi Kevin: > > > On Jul 13, 2006, at 3:27 PM, Kevin Williams wrote: > > > I'm curious what this means for mongrel_cluster. They appear to > overlap in features quite a bit. I don't think the spawner uses a > config, so that's one difference. Will they be different enough? > > Great question. To be honest, spawner will be fine for many people. > > Here are the main differences: > > 1. With spawner you can specify starting port, environment, and number of > mongrels. That's it. If you need control over any of Mongrel's other billion > start options, then you'll need mongrel_cluster. Of the options that don't > overlap with fcgi options, "address", "script", "chdir" and "user" are > really handy. > > 2. mongrel_cluster provides an init.d script for start on boot and the > ability to start/stop/restart all applications with mongrel_cluster_ctl. > Roll your own with spawner. > > 3. mongrel_cluster provides Capistrano tasks for configuring your cluster > and supporting #2 above. Roll your own with spawner (example in Cap manual). > > 4. mongrel_cluster views itself as one part of an entire application stack > and thus tries to "blend in". It defaults to storing configuration files in > '/etc' , using an init.d script, and providing control over the all the > clusters on the server. It leans towards the "unix way" rather than the > "rails way". > > 5. mongrel_cluster was born out of the need to easily configure and manage > multiple rails applications on on a single server. > > These differences reflect the different needs of the authors. The extras > that mongrel_cluster provides are not mandatory for using Mongrel in > clustered way, but are useful in many deployments. For myself and most of my > customers, mongrel_cluster won't be obsolete, because it does work for us > that we would have to do ourselves if we switched spawner. > > Thanks, > Bradley Taylor > > ------ > Rails Optimized Hosting ~ VPS and Dedicated Servers > Simplified Deployment ~ Services and Software > http://railsmachine.com > > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Cheers, Kevin From random49k at gmail.com Fri Jul 14 11:20:45 2006 From: random49k at gmail.com (Mike Garey) Date: Fri, 14 Jul 2006 11:20:45 -0400 Subject: [Mongrel] [ANN] Test Mongrel 0.3.13.4 Please In-Reply-To: <799079fe0607121035g140f6fb2gbaa8c63c0809bb72@mail.gmail.com> References: <1152552350.7268.18.camel@localhost.localdomain> <799079fe0607121035g140f6fb2gbaa8c63c0809bb72@mail.gmail.com> Message-ID: <16a8b9140607140820h6b82a477t37df0aaeded1aa5f@mail.gmail.com> just tried this new version - it tends to lock up my application when attempting to perform a POST (not everytime, but right now it is) This is what gets printed to the console before it locks: REQUEST: {"SERVER_NAME"=>"mydomain.com", "PATH_INFO"=>"/site/login", "CONTENT_LENGTH"=>"61", "HTTP_CONTENT_TYPE"=>"application/x-www-form-urlencoded", "HTTP_ACCEPT_ENCODING"=>"gzip,deflate", "HTTP_USER_AGENT"=>"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4", "SCRIPT_NAME"=>"/", "SERVER_PROTOCOL"=>"HTTP/1.1", "HTTP_ACCEPT_LANGUAGE"=>"en-us,en;q=0.5", "HTTP_HOST"=>"mydomain.com:3000", "REMOTE_ADDR"=>"123.45.67.89", "SERVER_SOFTWARE"=>"Mongrel 0.3.13.4", "HTTP_CONTENT_LENGTH"=>"61", "HTTP_KEEP_ALIVE"=>"300", "CONTENT_TYPE"=>"application/x-www-form-urlencoded", "HTTP_REFERER"=>"http://mydomain.com:3000/", "HTTP_COOKIE"=>"_session_id=ee93f3f34a86a5516e660078ff8045d2", "HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.7", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_URI"=>"/site/login", "SERVER_PORT"=>"3000", "GATEWAY_INTERFACE"=>"CGI/1.2", "HTTP_ACCEPT"=>"application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", "HTTP_CONNECTION"=>"keep-alive", "REQUEST_METHOD"=>"POST"} need to read more of the body Small file, using ram regular GETs seem to work fine though. Mike On 7/12/06, Jeremy Durham wrote: > Hi, > > Works better for me locally. What are the symptoms of this "nasty little > bug?" I seem to have weird threading issues sometimes with 0.13.3, > especially after the server runs a long time in dev. mode. > > Jeremy > > > On 7/10/06, Zed Shaw wrote: > > Hey Folks, > > > > There's a nasty little bug in 0.3.13.3 when running in development mode > > which could cause all sorts of problems. > > > > Please grab the pre-release of 0.3.13.4 and tell me if it works for you: > > > > gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ > > > > Thanks! > > > > > > -- > > 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 > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From ezmobius at gmail.com Fri Jul 14 11:29:34 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 14 Jul 2006 08:29:34 -0700 Subject: [Mongrel] [ANN] Test Mongrel 0.3.13.4 Please In-Reply-To: <16a8b9140607140820h6b82a477t37df0aaeded1aa5f@mail.gmail.com> References: <1152552350.7268.18.camel@localhost.localdomain> <799079fe0607121035g140f6fb2gbaa8c63c0809bb72@mail.gmail.com> <16a8b9140607140820h6b82a477t37df0aaeded1aa5f@mail.gmail.com> Message-ID: <90F26CF4-802E-4796-A6FD-A63DD23F8E95@brainspl.at> On Jul 14, 2006, at 8:20 AM, Mike Garey wrote: > just tried this new version - it tends to lock up my application when > attempting to perform a POST (not everytime, but right now it is) > > This is what gets printed to the console before it locks: > > REQUEST: {"SERVER_NAME"=>"mydomain.com", "PATH_INFO"=>"/site/login", > "CONTENT_LENGTH"=>"61", > "HTTP_CONTENT_TYPE"=>"application/x-www-form-urlencoded", > "HTTP_ACCEPT_ENCODING"=>"gzip,deflate", > "HTTP_USER_AGENT"=>"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; > rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4", "SCRIPT_NAME"=>"/", > "SERVER_PROTOCOL"=>"HTTP/1.1", > "HTTP_ACCEPT_LANGUAGE"=>"en-us,en;q=0.5", > "HTTP_HOST"=>"mydomain.com:3000", "REMOTE_ADDR"=>"123.45.67.89", > "SERVER_SOFTWARE"=>"Mongrel 0.3.13.4", "HTTP_CONTENT_LENGTH"=>"61", > "HTTP_KEEP_ALIVE"=>"300", > "CONTENT_TYPE"=>"application/x-www-form-urlencoded", > "HTTP_REFERER"=>"http://mydomain.com:3000/", > "HTTP_COOKIE"=>"_session_id=ee93f3f34a86a5516e660078ff8045d2", > "HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.7", > "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_URI"=>"/site/login", > "SERVER_PORT"=>"3000", "GATEWAY_INTERFACE"=>"CGI/1.2", > "HTTP_ACCEPT"=>"application/x-shockwave-flash,text/xml,application/ > xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/ > png,*/*;q=0.5", > "HTTP_CONNECTION"=>"keep-alive", "REQUEST_METHOD"=>"POST"} > need to read more of the body > Small file, using ram > > regular GETs seem to work fine though. > > Mike Yup I am getting the same output in my log. Same ewrror for POST and for all XMLHTTPRequests. Heres small log dump: REQUEST: {"SERVER_NAME"=>"localhost", "HTTP_X_PROTOTYPE_VERSION"=>"1.5.0_rc0", "PATH_INFO"=>"/pods/shots/ show_open", "CONTENT_LENGTH"=>"17", "HTTP_CONTENT_TYPE"=>"application/ x-www-form-urlencoded", "HTTP_USER_AGENT"=>"Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418.8 (KHTML, like Gecko) Safari/ 419.3", "HTTP_ACCEPT_ENCODING"=>"gzip, deflate", "SCRIPT_NAME"=>"/", "SERVER_PROTOCOL"=>"HTTP/1.1", "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT_LANGUAGE"=>"en", "REMOTE_ADDR"=>"127.0.0.1", "SERVER_SOFTWARE"=>"Mongrel 0.3.13.4", "HTTP_CONTENT_LENGTH"=>"17", "CONTENT_TYPE"=>"application/x-www-form-urlencoded", "HTTP_REFERER"=>"http://localhost:3000/main?set_view_id=76", "HTTP_COOKIE"=>"_session_id=71d4d21341675ab15d89c039181c873a; style=enumclaw", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_URI"=>"/pods/ shots/show_open", "SERVER_PORT"=>"3000", "GATEWAY_INTERFACE"=>"CGI/ 1.2", "QUERY_STRING"=>"pod_id=6&set_view_id=76", "HTTP_ACCEPT"=>"text/ javascript, text/html, application/xml, text/xml, */*", "HTTP_X_REQUESTED_WITH"=>"XMLHttpRequest", "HTTP_CONNECTION"=>"keep- alive", "REQUEST_METHOD"=>"POST"} need to read more of the body Small file, using ram REQUEST: {"SERVER_NAME"=>"localhost", "HTTP_X_PROTOTYPE_VERSION"=>"1.5.0_rc0", "PATH_INFO"=>"/pods/shots/ show_open", "CONTENT_LENGTH"=>"17", "HTTP_CONTENT_TYPE"=>"application/ x-www-form-urlencoded", "HTTP_USER_AGENT"=>"Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418.8 (KHTML, like Gecko) Safari/ 419.3", "HTTP_ACCEPT_ENCODING"=>"gzip, deflate", "SCRIPT_NAME"=>"/", "SERVER_PROTOCOL"=>"HTTP/1.1", "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT_LANGUAGE"=>"en", "REMOTE_ADDR"=>"127.0.0.1", "SERVER_SOFTWARE"=>"Mongrel 0.3.13.4", "HTTP_CONTENT_LENGTH"=>"17", "CONTENT_TYPE"=>"application/x-www-form-urlencoded", "HTTP_REFERER"=>"http://localhost:3000/main?set_view_id=76", "HTTP_COOKIE"=>"_session_id=71d4d21341675ab15d89c039181c873a; style=enumclaw", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_URI"=>"/pods/ shots/show_open", "SERVER_PORT"=>"3000", "GATEWAY_INTERFACE"=>"CGI/ 1.2", "QUERY_STRING"=>"pod_id=9&set_view_id=76", "HTTP_ACCEPT"=>"text/ javascript, text/html, application/xml, text/xml, */*", "HTTP_X_REQUESTED_WITH"=>"XMLHttpRequest", "HTTP_CONNECTION"=>"keep- alive", "REQUEST_METHOD"=>"POST"} need to read more of the body Small file, using ram Cheers- -Ezra From typhoon33x at yahoo.com Fri Jul 14 17:18:55 2006 From: typhoon33x at yahoo.com (what for) Date: Fri, 14 Jul 2006 14:18:55 -0700 (PDT) Subject: [Mongrel] pid file info not working in config file Message-ID: <20060714211855.35778.qmail@web51603.mail.yahoo.com> I've been trying to store the pid file option for Mongrel and it seems that I can only set it from the command line options, not from the configuration file. I'm using Mongrel gem version 0.3.13.3. Has anyone else experiend something like this? Here's an example of a config file I generated using the -G option. The address and port options work fine but the pid file option has no effect, or at least the file is not created. If I set this pid file using the -P option then it works. --- :docroot: public :user: :timeout: 0 :host: 127.0.0.1 :mime_map: :debug: false :port: "8000" :daemon: true :cwd: /var/www/rails/web_apps/accounts :group: :includes: - mongrel :log_file: log/mongrel.log :config_script: :pid_file: /tmp/mongrel.8000.pid :num_processors: 1024 :environment: development --------------------------------- Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060714/f11f6ddc/attachment.html From zedshaw at zedshaw.com Fri Jul 14 20:06:29 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 14 Jul 2006 20:06:29 -0400 Subject: [Mongrel] [ANN] Test Mongrel 0.3.13.4 Please In-Reply-To: <16a8b9140607140820h6b82a477t37df0aaeded1aa5f@mail.gmail.com> References: <1152552350.7268.18.camel@localhost.localdomain> <799079fe0607121035g140f6fb2gbaa8c63c0809bb72@mail.gmail.com> <16a8b9140607140820h6b82a477t37df0aaeded1aa5f@mail.gmail.com> Message-ID: <1152921989.6017.2.camel@localhost.localdomain> Yep, tis hosed. Back that one out 'cause it's garbage. I fixed the bug this morning so I'll get another pre-release out. On Fri, 2006-07-14 at 11:20 -0400, Mike Garey wrote: > just tried this new version - it tends to lock up my application when > attempting to perform a POST (not everytime, but right now it is) > From zedshaw at zedshaw.com Sat Jul 15 19:08:50 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 15 Jul 2006 19:08:50 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- All Fixed Up Now Message-ID: <1153004930.6401.7.camel@localhost.localdomain> Hello Everyone, This is a short announce to get people to try the 0.3.13.4 pre-release with their applications. This release features a few things that folks have asked for, and a backport of an enhancement from the 0.4 release coming later. The features are: 1) A new --prefix command line option for people who want to mount their rails app at a different base URI. Thanks to Scott for the initial push. 2) Fixes for the upcoming upload progress support (from Rick). 3) Pound documentation changes (MUST READ if you use pound). 4) Fix for a very rare case where the GC can cause a segfault theoretically. Everyone should test this release out, and I'll be thrashing it with RFuzz this weekend to do a release tomorrow night. This will also be the last release before 0.4 Enterprise Edition 1.2. All my work from now on will go to the EE release unless there's a major security hole or bug. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From kraemer at webit.de Sun Jul 16 04:08:16 2006 From: kraemer at webit.de (Jens Kraemer) Date: Sun, 16 Jul 2006 10:08:16 +0200 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- All Fixed Up Now In-Reply-To: <1153004930.6401.7.camel@localhost.localdomain> References: <1153004930.6401.7.camel@localhost.localdomain> Message-ID: <20060716080816.GA19350@cordoba.webit.de> Hi! On Sat, Jul 15, 2006 at 07:08:50PM -0400, Zed Shaw wrote: > Hello Everyone, > > This is a short announce to get people to try the 0.3.13.4 pre-release > with their applications. This release features a few things that folks > have asked for, and a backport of an enhancement from the 0.4 release > coming later. works fine for me so far. Btw, would it be possible to create svn tags for the revisions that correspond to released versions ? Or at least state somewhere which exact revision a release is made from ? That way I could create the Debian packages off the exact same revision instead having to export trunk right after the release, hoping it's still the released revision. Regards, Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From zedshaw at zedshaw.com Sun Jul 16 04:21:50 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 16 Jul 2006 04:21:50 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- All Fixed Up Now In-Reply-To: <20060716080816.GA19350@cordoba.webit.de> References: <1153004930.6401.7.camel@localhost.localdomain> <20060716080816.GA19350@cordoba.webit.de> Message-ID: <1153038110.5931.13.camel@localhost.localdomain> On Sun, 2006-07-16 at 10:08 +0200, Jens Kraemer wrote: > Btw, would it be possible to create svn tags for the revisions that > correspond to released versions ? Or at least state somewhere which > exact revision a release is made from ? That way I could create the > Debian packages off the exact same revision instead having to export > trunk right after the release, hoping it's still the released revision. Right now (and this will change soon), it's organized this way: /mongrel/branches/mongrel-0.4 mongrel-0.4 /mongrel/trunk mongrel_stable That's off of the base svn so you should be good. So, the 0.3.13.4 stream (stable) is in trunk, and my current work is being done in the branches/mongrel-0.4 location. I'll do a tag for the next release, but god I hate svn's tags. If it weren't for svk I'd avoid it entirely. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From kraemer at webit.de Sun Jul 16 14:34:27 2006 From: kraemer at webit.de (Jens Kraemer) Date: Sun, 16 Jul 2006 20:34:27 +0200 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- All Fixed Up Now In-Reply-To: <1153038110.5931.13.camel@localhost.localdomain> References: <1153004930.6401.7.camel@localhost.localdomain> <20060716080816.GA19350@cordoba.webit.de> <1153038110.5931.13.camel@localhost.localdomain> Message-ID: <20060716183427.GA11109@cordoba.webit.de> On Sun, Jul 16, 2006 at 04:21:50AM -0400, Zed Shaw wrote: > On Sun, 2006-07-16 at 10:08 +0200, Jens Kraemer wrote: > > Btw, would it be possible to create svn tags for the revisions that > > correspond to released versions ? Or at least state somewhere which > > exact revision a release is made from ? That way I could create the > > Debian packages off the exact same revision instead having to export > > trunk right after the release, hoping it's still the released revision. > > Right now (and this will change soon), it's organized this way: > > /mongrel/branches/mongrel-0.4 mongrel-0.4 > /mongrel/trunk mongrel_stable > > That's off of the base svn so you should be good. So, the 0.3.13.4 > stream (stable) is in trunk, and my current work is being done in the > branches/mongrel-0.4 location. ah, ok :-). Seems I use svn different than you - I commit to trunk all the time between revisions of a project, so trunk usually is pretty unstable in my repositories. > I'll do a tag for the next release, but god I hate svn's tags. If it > weren't for svk I'd avoid it entirely. Thanks! Just out of curiosity - what do you think is wrong with svn tags ? Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From dburkes at infoteria.com Sun Jul 16 22:51:52 2006 From: dburkes at infoteria.com (Daniel Burkes) Date: Sun, 16 Jul 2006 19:51:52 -0700 Subject: [Mongrel] Mongrel with LocalDirector - static content? Message-ID: <53E92D62-94B4-4176-AFCC-3BC5C3ADE68E@infoteria.com> Hello everyone- I am considering using Mongrel and I have read this list pretty extensively. I know that the Apache/mod_proxy_balancer/mongrel approach is the preferred one right now, with Apache serving the static content via mod_rewrite and such. However, in my hardware arsenal, I already have an old and trusty LocalDirector, which I would be inclined to at least try first as a substitute for Apache/ mod_proxy_balancer. The biggest potential downside that I can see is that, in such a setup, mongrel would be serving static files as well as the dynamic Rails parts. My biggest question is, how recommended (or scorned) is having mongrel serve the static parts? A secondary question is, has anyone used mongrel clusters behind a LocalDirector? Thanks very much! Danny Burkes From technoweenie at gmail.com Sun Jul 16 23:01:19 2006 From: technoweenie at gmail.com (Rick Olson) Date: Sun, 16 Jul 2006 22:01:19 -0500 Subject: [Mongrel] Mongrel with LocalDirector - static content? In-Reply-To: <53E92D62-94B4-4176-AFCC-3BC5C3ADE68E@infoteria.com> References: <53E92D62-94B4-4176-AFCC-3BC5C3ADE68E@infoteria.com> Message-ID: <48fe25b0607162001gb16328dkde3d02d566f1f9e8@mail.gmail.com> > My biggest question is, how recommended (or scorned) is having > mongrel serve the static parts? A secondary question is, has anyone > used mongrel clusters behind a LocalDirector? It's fast, but no where near as fast as apache or lighttpd. -- Rick Olson http://techno-weenie.net From jason at joyent.com Sun Jul 16 23:18:29 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Sun, 16 Jul 2006 20:18:29 -0700 Subject: [Mongrel] Mongrel with LocalDirector - static content? In-Reply-To: <53E92D62-94B4-4176-AFCC-3BC5C3ADE68E@infoteria.com> References: <53E92D62-94B4-4176-AFCC-3BC5C3ADE68E@infoteria.com> Message-ID: <1F6FB77A-51A7-431E-93E6-97ACEFD5FD1A@joyent.com> On Jul 16, 2006, at 7:51 PM, Daniel Burkes wrote: > Hello everyone- > > I am considering using Mongrel and I have read this list pretty > extensively. I know that the Apache/mod_proxy_balancer/mongrel > approach is the preferred one right now, with Apache serving the > static content via mod_rewrite and such. However, in my hardware > arsenal, I already have an old and trusty LocalDirector, which I > would be inclined to at least try first as a substitute for Apache/ > mod_proxy_balancer. The biggest potential downside that I can see is > that, in such a setup, mongrel would be serving static files as well > as the dynamic Rails parts. > > My biggest question is, how recommended (or scorned) is having > mongrel serve the static parts? A secondary question is, has anyone > used mongrel clusters behind a LocalDirector? > > Thanks very much! > > Danny Burkes Hi Danny, It's fine to let mongrel do that and while I haven't run it behind a cisco localdirector (assuming that's the localdirector you're talking about), I have run mongrel directly behind BIG-IP load balancers (that's at http://flickr.com/photos/textdriveinc/179393581/). Also if you just look at hitting a single mongrel where it was the radiant CMS serving up a ~32kb page, it puts out at 3.1 MB/sec (that's about 25Mbps constant) fine. So it's more than fast enough. # httperf --hog --server 207.7.107.117 --port 8190 --num-conn 10000 -- rate 100 --timeout 5 Total: connections 10000 requests 10000 replies 10000 test-duration 100.031 s Connection rate: 100.0 conn/s (10.0 ms/conn, <=44 concurrent connections) Connection time [ms]: min 23.6 avg 49.7 max 434.2 median 38.5 stddev 41.0 Connection time [ms]: connect 6.2 Connection length [replies/conn]: 1.000 Request rate: 100.0 req/s (10.0 ms/req) Request size [B]: 64.0 Reply rate [replies/s]: min 96.8 avg 100.0 max 103.4 stddev 1.2 (20 samples) Reply time [ms]: response 21.7 transfer 21.8 Reply size [B]: header 165.0 content 31779.0 footer 0.0 (total 31944.0) Reply status: 1xx=0 2xx=10000 3xx=0 4xx=0 5xx=0 CPU time [s]: user 23.00 system 76.99 (user 23.0% system 77.0% total 100.0%) Net I/O: 3124.8 KB/s (25.6*10^6 bps) - Jason From choonkeat at gmail.com Mon Jul 17 01:18:52 2006 From: choonkeat at gmail.com (choonkeat) Date: Mon, 17 Jul 2006 13:18:52 +0800 Subject: [Mongrel] FF1.0 + Prototype Ajax not working in 0.3.13.x Message-ID: <64e1f5070607162218k68cf80cakdb27ef7a25765b84@mail.gmail.com> Hi guys, I have a funny problem that only occurs in FF1.0.x but works fine and dandy in FF1.5. I'd thought its me screwing up with the JS... but even this " What time is it " doesn't work with until I downgrade to Mongrel 0.3.12.4. I don't like/use FF1.0 too.. but too bad for me ... Apparently stuff like Rails' link_to_remote or plain new Ajax.requestdoesn't work when running with Mongrel 0.3.13.x. Luckily helpful error messages introduced in 0.3.13.4 solved my mystery: BAD CLIENT (127.0.0.1): Sent body size 2 but declared Content-Length: 0 > Anyways, to have a (Firefox 1.0+Prototype)-friendly Mongrel, just change line 203 to: if remain == 0 || remain < 0 > In case anyone else has problems. Hopefully other parts of the sky don't fall due to this. -- choonkeat http://blog.yanime.org/ http://www.rssfwd.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060717/680a3fde/attachment.html From mrueckert at suse.de Mon Jul 17 05:43:43 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Mon, 17 Jul 2006 11:43:43 +0200 Subject: [Mongrel] Mongrel with LocalDirector - static content? In-Reply-To: <53E92D62-94B4-4176-AFCC-3BC5C3ADE68E@infoteria.com> References: <53E92D62-94B4-4176-AFCC-3BC5C3ADE68E@infoteria.com> Message-ID: <20060717094343.GS5504@suse.de> On 2006-07-16 19:51:52 -0700, Daniel Burkes wrote: > I am considering using Mongrel and I have read this list pretty > extensively. I know that the Apache/mod_proxy_balancer/mongrel > approach is the preferred one right now, with Apache serving the > static content via mod_rewrite and such. However, in my hardware > arsenal, I already have an old and trusty LocalDirector, which I > would be inclined to at least try first as a substitute for Apache/ > mod_proxy_balancer. The biggest potential downside that I can see is > that, in such a setup, mongrel would be serving static files as well > as the dynamic Rails parts. > > My biggest question is, how recommended (or scorned) is having > mongrel serve the static parts? A secondary question is, has anyone > used mongrel clusters behind a LocalDirector? you could define an asset host in your environment and make this asset host a lighttpd or apache. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From uberkorp at gmail.com Mon Jul 17 10:22:37 2006 From: uberkorp at gmail.com (Scott Mathieson) Date: Mon, 17 Jul 2006 15:22:37 +0100 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- All Fixed Up Now In-Reply-To: <1153004930.6401.7.camel@localhost.localdomain> References: <1153004930.6401.7.camel@localhost.localdomain> Message-ID: <200607171522.37332.uberkorp@gmail.com> ok, i give up, i cannot find these changes - if it's just to advise of the x-forwarded issues then that's ok, but if it's a solution/anything else can you please point me in the right direction! cheers On Sunday 16 July 2006 00:08, Zed Shaw wrote: > 3) Pound documentation changes (MUST READ if you use pound). From zedshaw at zedshaw.com Mon Jul 17 10:30:13 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 17 Jul 2006 10:30:13 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- All Fixed Up Now In-Reply-To: <200607171522.37332.uberkorp@gmail.com> References: <1153004930.6401.7.camel@localhost.localdomain> <200607171522.37332.uberkorp@gmail.com> Message-ID: <1153146613.6817.5.camel@localhost.localdomain> On Mon, 2006-07-17 at 15:22 +0100, Scott Mathieson wrote: > ok, i give up, i cannot find these changes - if it's just to advise of the > x-forwarded issues then that's ok, but if it's a solution/anything else can > you please point me in the right direction! > > cheers > > On Sunday 16 July 2006 00:08, Zed Shaw wrote: > > 3) Pound documentation changes (MUST READ if you use pound). Sorry, the configuration used to read like: Service BackEnd Address 127.0.0.1 Port 8000 End End Service BackEnd Address 127.0.0.1 Port 8001 End End Service BackEnd Address 127.0.0.1 Port 8002 End End Which meant there was no failover. There was also an old copy on last night but I put the right ones up. Just make sure you follow the new docs (which have all three Backends inside one Service). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From jan.svitok at gmail.com Mon Jul 17 14:33:32 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Mon, 17 Jul 2006 20:33:32 +0200 Subject: [Mongrel] Port of --prefix to mongrel-service Message-ID: <8d9b3d920607171133q253defe9m4e39a6ccc4297d37@mail.gmail.com> This patch: - adds --prefix option to service::install in mongrel-service plugin - fixes bug with config values merging in the service - enables gemplugins in the service. Questions: - why the load_plugins command was commented out? It seems working for me. - why bin/mongrel_rails_service and bin/mongrel_rails_svc still in the main package? - a lot of code is duplicated in both versions (standalone mongrel and service) - a bit of refactoring could help Anyway, this --prefix option is scratching my itch - I did by overwriting the mongrel itself and this is much cleaner. Thanks a lot! J. -------------- next part -------------- A non-text attachment was scrubbed... Name: diff Type: application/octet-stream Size: 3981 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060717/d09d19d1/attachment-0001.obj From zedshaw at zedshaw.com Mon Jul 17 17:29:48 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 17 Jul 2006 17:29:48 -0400 Subject: [Mongrel] Port of --prefix to mongrel-service In-Reply-To: <8d9b3d920607171133q253defe9m4e39a6ccc4297d37@mail.gmail.com> References: <8d9b3d920607171133q253defe9m4e39a6ccc4297d37@mail.gmail.com> Message-ID: <1153171788.5978.10.camel@localhost.localdomain> On Mon, 2006-07-17 at 20:33 +0200, Jan Svitok wrote: > This patch: > > - adds --prefix option to service::install in mongrel-service plugin > - fixes bug with config values merging in the service > - enables gemplugins in the service. > Thanks, I hadn't hit the win32 side of things yet. I usually do those before I make a release official. > Questions: > > - why the load_plugins command was commented out? It seems working for me. Not sure. > - why bin/mongrel_rails_service and bin/mongrel_rails_svc still in the > main package? Some people still had these. I'll be deprecating them in 0.4. > - a lot of code is duplicated in both versions (standalone mongrel and > service) - a bit of refactoring could help > All of that goes away with the new 0.3.13.x releases which you don't even use those. There's just a plugin that adds the service commands. > Anyway, this --prefix option is scratching my itch - I did by > overwriting the mongrel itself and this is much cleaner. Thanks a lot! Thanks again. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From luislavena at gmail.com Mon Jul 17 21:52:40 2006 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 17 Jul 2006 22:52:40 -0300 Subject: [Mongrel] Port of --prefix to mongrel-service In-Reply-To: <8d9b3d920607171133q253defe9m4e39a6ccc4297d37@mail.gmail.com> References: <8d9b3d920607171133q253defe9m4e39a6ccc4297d37@mail.gmail.com> Message-ID: <71166b3b0607171852j78b3cf6bvf4d68e1043dd5682@mail.gmail.com> On 7/17/06, Jan Svitok wrote: [snip] > > - why the load_plugins command was commented out? It seems working for me. Was commented because load_plugins raised problems with win32-service, making rials halt and crash sometimes (not always). > - why bin/mongrel_rails_service and bin/mongrel_rails_svc still in the > main package? > - a lot of code is duplicated in both versions (standalone mongrel and > service) - a bit of refactoring could help mongrel_service was made to replace mongrel_rails_* files, as Zed said, these will go away with the upcoming 0.4 release. -- 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 uberkorp at gmail.com Mon Jul 17 12:20:29 2006 From: uberkorp at gmail.com (Scott Mathieson) Date: Mon, 17 Jul 2006 17:20:29 +0100 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- All Fixed Up Now In-Reply-To: <1153146613.6817.5.camel@localhost.localdomain> References: <1153004930.6401.7.camel@localhost.localdomain> <200607171522.37332.uberkorp@gmail.com> <1153146613.6817.5.camel@localhost.localdomain> Message-ID: <200607171720.29290.uberkorp@gmail.com> cheers Jan/Zed, thought i'd missed something new On Monday 17 July 2006 15:30, you wrote: > > On Sunday 16 July 2006 00:08, Zed Shaw wrote: > > > 3) Pound documentation changes (MUST READ if you use pound). > > Sorry, the configuration used to read like: > > Service > BackEnd > Address 127.0.0.1 > Port 8000 > End > End > Service > BackEnd > Address 127.0.0.1 > Port 8001 > End > End > Service > BackEnd > Address 127.0.0.1 > Port 8002 > End > End > > Which meant there was no failover. > > There was also an old copy on last night but I put the right ones up. > Just make sure you follow the new docs (which have all three > Backends inside one Service). From orsini at oreilly.com Tue Jul 18 02:25:28 2006 From: orsini at oreilly.com (Rob Orsini) Date: Mon, 17 Jul 2006 23:25:28 -0700 Subject: [Mongrel] Rotating mongrel.log? In-Reply-To: <20060713000717.E94585@bravo.pjkh.com> References: <20060712142527.M83567@bravo.pjkh.com> <1152754564.5981.1.camel@localhost.localdomain> <20060713000717.E94585@bravo.pjkh.com> Message-ID: <7043ad0524c99a029d1d6146cafffcde@oreilly.com> On Jul 12, 2006, at 10:09 PM, Philip Hallstrom wrote: >>> I searched, but didn't see anything on this so.... >>> >>> Best way to rotate the mongrel.log file? Should I just restart the >>> mongrel cluster? Or is there a better way? >> >> There's quite a few external packages for different linux systems. I >> think redhat has logrotate. Best bet is to use one of them. > > Sorry, I wasn't clear in my post. I can rotate the log no problem. I > was > wondering what I needed to do to mongrel to get it to realize I've > rotated. Similar to doing an "apachectl graceful" to get apache to > close/open it's log files. > > It looks like my only option is to restart the cluster? > Hi Philip, I know this isn't exactly what you're looking for, but it might help in some way: http://blog.tupleshop.com/2006/7/16/customize-pounds-logging-with- cronolog Rob From dallas.devries at gmail.com Tue Jul 18 12:08:35 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Tue, 18 Jul 2006 12:08:35 -0400 Subject: [Mongrel] Mongrel process unexpectedly dying Message-ID: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> We tried to give Mongrel a go running our application which has moderate traffic. We got mongrel up and running easy enough but 3 times in a short period(2hours) mongrel just died with the following error when we went live to production with it. As you can see we are running mongrel-0.3.13.3. /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:576:in`peeraddr': Transport endpoint is not connected - getpeername(2) (Errno::ENOTCONN) Is this a bug or a configuration problem of some sort on our end? I did some googling on the error and did not find anything. We also get a large number of not fatal messages that maybe someone can enlighten me on. What would cause this message, and what does that client that caused this warning see? Tue Jul 18 01:15:00 EDT 2006: BAD CLIENT (65.34.163.249): Invalid HTTP format, parsing fails Thanks for your time. -Dallas sportspyder.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060718/e94a5ce5/attachment.html From defeated2k4 at gmail.com Tue Jul 18 13:38:20 2006 From: defeated2k4 at gmail.com (Ed C.) Date: Tue, 18 Jul 2006 13:38:20 -0400 Subject: [Mongrel] Mongrel process unexpectedly dying In-Reply-To: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> References: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> Message-ID: <736593a0607181038m415b804bqa11dedc9048fa7@mail.gmail.com> I saw this error came up on the Rails list, but regarding WEBrick. Could be unrelated, but here's that user's solution: "map.connect ':controller/service.wsdl', :action => 'wsdl' One of the default routes. If I comment it out, all works fine. Left in and WEBrick crashes!" On 7/18/06, Dallas DeVries wrote: > > We tried to give Mongrel a go running our application which has moderate > traffic. We got mongrel up and running easy enough but 3 times in a short > period(2hours) mongrel just died with the following error when we went live > to production with it. As you can see we are running mongrel-0.3.13.3. > > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:576:in`peeraddr': Transport endpoint is not connected - getpeername(2) > (Errno::ENOTCONN) > > Is this a bug or a configuration problem of some sort on our end? I did > some googling on the error and did not find anything. > > We also get a large number of not fatal messages that maybe someone can > enlighten me on. What would cause this message, and what does that client > that caused this warning see? > > Tue Jul 18 01:15:00 EDT 2006: BAD CLIENT (65.34.163.249): Invalid HTTP > format, parsing fails > > Thanks for your time. > > -Dallas > sportspyder.com > > _______________________________________________ > 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/20060718/b018aba5/attachment.html From dallas.devries at gmail.com Tue Jul 18 13:58:13 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Tue, 18 Jul 2006 13:58:13 -0400 Subject: [Mongrel] Mongrel process unexpectedly dying In-Reply-To: <736593a0607181038m415b804bqa11dedc9048fa7@mail.gmail.com> References: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> <736593a0607181038m415b804bqa11dedc9048fa7@mail.gmail.com> Message-ID: <1200dbac0607181058v6c092ea2k6815d47fcd7df1a3@mail.gmail.com> Hey Ed, I found that rails thread and I can't see a reference to the error I reported http://lists.rubyonrails.org/pipermail/rails/2006-March/027919.html It doesn't seem related to me anyways. My Mongrel process does run fine for a period of time then unexpectedly dies after 10 to 50 min. I am running ruby 1.8.4 and latest version of rails on Debian Sarge. Cheers, Dallas On 7/18/06, Ed C. wrote: > > I saw this error came up on the Rails list, but regarding WEBrick. Could > be unrelated, but here's that user's solution: > > "map.connect ':controller/service.wsdl', :action => 'wsdl' > One of the default routes. > If I comment it out, all works fine. > Left in and WEBrick crashes!" > > > On 7/18/06, Dallas DeVries wrote: > > > We tried to give Mongrel a go running our application which has moderate > traffic. We got mongrel up and running easy enough but 3 times in a short > period(2hours) mongrel just died with the following error when we went live > to production with it. As you can see we are running mongrel-0.3.13.3. > > /usr/lib/ruby/gems/1.8/gems/mongrel- 0.3.13.3/lib/mongrel.rb:576:in`peeraddr': Transport endpoint is not connected - getpeername(2) > (Errno::ENOTCONN) > > Is this a bug or a configuration problem of some sort on our end? I did > some googling on the error and did not find anything. > > We also get a large number of not fatal messages that maybe someone can > enlighten me on. What would cause this message, and what does that client > that caused this warning see? > > Tue Jul 18 01:15:00 EDT 2006: BAD CLIENT ( 65.34.163.249): Invalid HTTP > format, parsing fails > > Thanks for your time. > > -Dallas > sportspyder.com > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060718/7aa8542f/attachment.html From zedshaw at zedshaw.com Wed Jul 19 02:42:51 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 19 Jul 2006 02:42:51 -0400 Subject: [Mongrel] Mongrel process unexpectedly dying In-Reply-To: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> References: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> Message-ID: <1153291371.6460.27.camel@localhost.localdomain> On Tue, 2006-07-18 at 12:08 -0400, Dallas DeVries wrote: > We tried to give Mongrel a go running our application which has > moderate traffic. We got mongrel up and running easy enough but 3 > times in a short period(2hours) mongrel just died with the following > error when we went live to production with it. As you can see we are > running mongrel-0.3.13.3. > > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:576:in > `peeraddr': Transport endpoint is not connected - getpeername(2) > (Errno::ENOTCONN) > That don't make any sense since that entire chunk of code is wrapped in a begin/rescue block. Actually several. Are you using anything strange for your configuration? A different load balancer or something unreliable? Putting mongrel directly on the internet? If you can do it, see if you can temporarily run with 0.3.13.4 from the pre-release: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And then send me the stack trace it gives you. That release is more chatty about stuff but it has a bunch of fixes for edge cases. Maybe you're hitting them somehow. Oh, and you get this error at that line because Mongrel doesn't find an X-Forwarded-For header so it tries to get the client's remote IP address. The client seems to have disconnected, so apparently that Socket#peeraddr call throws an exception in this case. WHY it throws an exception is beyond me. WHY it isn't caught is also beyond me. > Is this a bug or a configuration problem of some sort on our end? I > did some googling on the error and did not find anything. > > We also get a large number of not fatal messages that maybe someone > can enlighten me on. What would cause this message, and what does that > client that caused this warning see? > > Tue Jul 18 01:15:00 EDT 2006: BAD CLIENT (65.34.163.249): Invalid HTTP > format, parsing fails This happens because someone is using a client that's most likely not written correctly. If you're running Nagios then this would be the most likely source since Nagios is horribly written junk. Other things that cause this are people attacking your server (not kidding). Mongrel's parser is pretty lax, but in the instances where I've found it blocked someone I've also found that Mongrel really did need to block that client for mis-behavior. I'm debating whether I should indicate what causes the error, but generally it's better for you to use the time-stamp and a protocol sniffer to check out the traffic. Otherwise mongrel wastes a lot of time reporting the bad http content. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Wed Jul 19 03:31:37 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 19 Jul 2006 03:31:37 -0400 Subject: [Mongrel] Please Use The Bug Tracker Message-ID: <1153294297.6460.38.camel@localhost.localdomain> Hi Everyone, Just a friendly reminder that if you hit something you think is a bug, please use the bug tracker for it. http://rubyforge.org/tracker/index.php?group_id=1306&atid=5145 I have a hard time wading through the Forums, mailing list, and my personal e-mail box pulling out the bugs I need to fix. I just finished doing it for this last round and there was about 7 bugs and 5 feature requests that I could have potentially missed. If you file them as a bug I will close them or explain what's wrong. It's a good idea to ask the list for help in case you're not sure it's a bug, but once it's confirmed, please put it in the tracker. Also, someone sent me this great bug report about full scheme URIs and how if a web server receives these then it should ignore the Host header and...it's gone. I can't find it. It even mentioned the section of the RFC I need to read. Please, if you know who you are, file that as a bug. I need that. Thanks again folks, and please, keep testing 0.3.13.4 with: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ and reporting failures to me. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From aidan at infurious.com Wed Jul 19 04:42:55 2006 From: aidan at infurious.com (Aidan Rogers) Date: Wed, 19 Jul 2006 09:42:55 +0100 Subject: [Mongrel] Cluster in Nitro? Message-ID: I want to run a mongrel cluster for a Nitro app but can't find any documentation on how to do this. Has anyone done it before? Can anyone give me some pointers? Thanks in advance, Aidan From al-mongrelusers at none.at Wed Jul 19 09:28:44 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Wed, 19 Jul 2006 15:28:44 +0200 Subject: [Mongrel] Mongrel, lighty, pound, and request.remote_ip Message-ID: <20060719132844.GA28045@none.at> Hi, i'am very new to ruby and mongrel but i have some experience with haproxy ;-)) With what 'tips' can i help you ;-) BTW: Have anybody experience with the *select* limitation in ruby, is there any?! Regards Alex From dallas.devries at gmail.com Wed Jul 19 11:57:44 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Wed, 19 Jul 2006 11:57:44 -0400 Subject: [Mongrel] Mongrel process unexpectedly dying In-Reply-To: <1153291371.6460.27.camel@localhost.localdomain> References: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> <1153291371.6460.27.camel@localhost.localdomain> Message-ID: <1200dbac0607190857w6a399641j6625998a2b4a7b59@mail.gmail.com> Hi Zed, Thanks for the response. We were not using anything strange in our configuration. No Nagios just a minimal release on debian sarge with the web server running mongrel and ssh. We had Mongrel behind a router that forwarded port 80 to the web server. Last night we installed mongrel based off this article (debian package instead of gem install) http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge We used Pen as our proxy with 3 mongrel processes. So far things are running MUCH better using this method and it has been up for 9 hours without receiving that error again and no mongrel processes have died. Also perhaps because of pen we are not receiving the BAD CLIENT message any longer either. I will see if its feasible to try to use the prerelease and repro it the old way so you can deal with the bug. Cheers, Dallas On 7/19/06, Zed Shaw wrote: > > On Tue, 2006-07-18 at 12:08 -0400, Dallas DeVries wrote: > > We tried to give Mongrel a go running our application which has > > moderate traffic. We got mongrel up and running easy enough but 3 > > times in a short period(2hours) mongrel just died with the following > > error when we went live to production with it. As you can see we are > > running mongrel-0.3.13.3. > > > > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:576:in > > `peeraddr': Transport endpoint is not connected - getpeername(2) > > (Errno::ENOTCONN) > > > > That don't make any sense since that entire chunk of code is wrapped in > a begin/rescue block. Actually several. Are you using anything strange > for your configuration? A different load balancer or something > unreliable? Putting mongrel directly on the internet? > > If you can do it, see if you can temporarily run with 0.3.13.4 from the > pre-release: > > sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ > > And then send me the stack trace it gives you. That release is more > chatty about stuff but it has a bunch of fixes for edge cases. Maybe > you're hitting them somehow. > > Oh, and you get this error at that line because Mongrel doesn't find an > X-Forwarded-For header so it tries to get the client's remote IP > address. The client seems to have disconnected, so apparently that > Socket#peeraddr call throws an exception in this case. WHY it throws an > exception is beyond me. WHY it isn't caught is also beyond me. > > > Is this a bug or a configuration problem of some sort on our end? I > > did some googling on the error and did not find anything. > > > > We also get a large number of not fatal messages that maybe someone > > can enlighten me on. What would cause this message, and what does that > > client that caused this warning see? > > > > Tue Jul 18 01:15:00 EDT 2006: BAD CLIENT (65.34.163.249): Invalid HTTP > > format, parsing fails > > This happens because someone is using a client that's most likely not > written correctly. If you're running Nagios then this would be the most > likely source since Nagios is horribly written junk. Other things that > cause this are people attacking your server (not kidding). Mongrel's > parser is pretty lax, but in the instances where I've found it blocked > someone I've also found that Mongrel really did need to block that > client for mis-behavior. > > I'm debating whether I should indicate what causes the error, but > generally it's better for you to use the time-stamp and a protocol > sniffer to check out the traffic. Otherwise mongrel wastes a lot of > time reporting the bad http content. > > -- > 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/20060719/41c34595/attachment.html From steve at beyertribe.com Wed Jul 19 12:57:35 2006 From: steve at beyertribe.com (Steve Beyer) Date: Wed, 19 Jul 2006 12:57:35 -0400 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system Message-ID: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> I would like first to introduce my self to the community. I am Steve Beyer and I am interested in learning Ruby, ROR, and how to set up a production server. I am going to use OSX for my client/developement system but I would like to get some advice on what operating system you would recommend for a production server. I want to use Mongrel to start and then move up the ladder as my skill and confidence increase. I would appreciate your 2 cents. I have looked at Debian, Ubuntu, Fedora, Suse, etc and all seem to have backers. Should I just pick one and run with it or are there advantages that I should consider. I am not trying to start a religious war or any fights but I have an honest curiosity on what to use and I would rather not spin my wheels on the operating system.... I will have plenty of time on that for learning all of the other stuff. :-) Thanks for your help and input. Steve From kevwil at gmail.com Wed Jul 19 13:43:47 2006 From: kevwil at gmail.com (Kevin Williams) Date: Wed, 19 Jul 2006 11:43:47 -0600 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> Message-ID: <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> Those are all fine distros. The choice is a personal preference, as all are capable. The best thing to do is try them all and pick the one that suits your personality. If you don't have time for that, just pick one. No matter which you pick, each has strengths and weaknesses. Personally, I use both Ubuntu and Fedora. SuSE is gorgeous but slow. Ubuntu - the bagillion packages you need to get RoR up and running is a real hassle. After that, it's fine. I use Fedora on my VPS where my sites are hosted, mostly for the SELinux security and Apache 2.2. I also use Windows and OS X, so I am not offended if you disagree with my choices. Hope that helps, and welcome to the Ruby on Rails community! On 7/19/06, Steve Beyer wrote: > I would like first to introduce my self to the community. I am Steve > Beyer and I am interested in learning Ruby, ROR, and how to set up a > production server. I am going to use OSX for my client/developement > system but I would like to get some advice on what operating system > you would recommend for a production server. I want to use Mongrel > to start and then move up the ladder as my skill and confidence > increase. I would appreciate your 2 cents. I have looked at Debian, > Ubuntu, Fedora, Suse, etc and all seem to have backers. Should I > just pick one and run with it or are there advantages that I should > consider. I am not trying to start a religious war or any fights but > I have an honest curiosity on what to use and I would rather not spin > my wheels on the operating system.... I will have plenty of time on > that for learning all of the other stuff. :-) Thanks for your help > and input. > > > Steve > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Cheers, Kevin From mrueckert at suse.de Wed Jul 19 13:45:03 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Wed, 19 Jul 2006 19:45:03 +0200 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> Message-ID: <20060719174503.GB5504@suse.de> On 2006-07-19 12:57:35 -0400, Steve Beyer wrote: > I would like first to introduce my self to the community. I am Steve > Beyer and I am interested in learning Ruby, ROR, and how to set up a > production server. I am going to use OSX for my client/developement > system but I would like to get some advice on what operating system > you would recommend for a production server. I want to use Mongrel > to start and then move up the ladder as my skill and confidence > increase. I would appreciate your 2 cents. I have looked at Debian, > Ubuntu, Fedora, Suse, etc and all seem to have backers. Should I > just pick one and run with it or are there advantages that I should > consider. I am not trying to start a religious war or any fights but > I have an honest curiosity on what to use and I would rather not spin > my wheels on the operating system.... I will have plenty of time on > that for learning all of the other stuff. :-) Thanks for your help > and input. http://en.opensuse.org/Ruby of course it includes rails, mongrel and friends. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From anjan.bacchu at Summit.Fiserv.com Wed Jul 19 13:52:39 2006 From: anjan.bacchu at Summit.Fiserv.com (Bacchu, Anjan) Date: Wed, 19 Jul 2006 10:52:39 -0700 Subject: [Mongrel] I am a newbie and I would like some help deciding w hat operating system Message-ID: Hi Kevin/All, I'm a rails/ruby noob. Have put a rails app in production on Windows :-) We have put our java apps in production using SUSE. If you can throw some light On "SUSE is gorgeous but slow" -- it will help us. Is only ruby/rails slow on Suse OR is it considered to be generally slow distro for all apps ? If slow for most apps, how much Performance hit is that ? Thank you, BR, ~A -----Original Message----- From: Kevin Williams [mailto:kevwil at gmail.com] Sent: Wednesday, July 19, 2006 10:44 AM To: mongrel-users at rubyforge.org Subject: Re: [Mongrel] I am a newbie and I would like some help deciding what operating system Those are all fine distros. The choice is a personal preference, as all are capable. The best thing to do is try them all and pick the one that suits your personality. If you don't have time for that, just pick one. No matter which you pick, each has strengths and weaknesses. Personally, I use both Ubuntu and Fedora. SuSE is gorgeous but slow. Ubuntu - the bagillion packages you need to get RoR up and running is a real hassle. After that, it's fine. I use Fedora on my VPS where my sites are hosted, mostly for the SELinux security and Apache 2.2. I also use Windows and OS X, so I am not offended if you disagree with my choices. Hope that helps, and welcome to the Ruby on Rails community! From wyhaines at gmail.com Wed Jul 19 13:54:25 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Wed, 19 Jul 2006 11:54:25 -0600 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> Message-ID: On 7/19/06, Kevin Williams wrote: > Those are all fine distros. The choice is a personal preference, as > all are capable. The best thing to do is try them all and pick the one > that suits your personality. If you don't have time for that, just > pick one. No matter which you pick, each has strengths and weaknesses. I would also suggest that it may depend a bit on who your client(s) may be. I have a lot of financial market clients, and being able to point at RedHat and their documentation for RedHat Enterprise Linux (along with that magic "Enterprise" word, there), has been helpful with a recent security audit. Kirk Haines From wyhaines at gmail.com Wed Jul 19 14:00:05 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Wed, 19 Jul 2006 12:00:05 -0600 Subject: [Mongrel] Recommended testing approaches for new Mongrel handlers? Message-ID: Okay, I got off my duff this week and have been finishing Mongrel support for IOWA. I now have two handlers that I need to test. One is similar to the Rails handler, passing request handling to IOWA threads in the same process, and the other allows one or more Mongrel processes to pass requests to one or more separate IOWA processes, with session affinity. Is there any set of standard sorts of things that have been devised to test the other handlers that I could apply to my new handlers? Thanks, Kirk Haines From manuel.legault at cgi.com Wed Jul 19 14:04:15 2006 From: manuel.legault at cgi.com (Legault, Manuel) Date: Wed, 19 Jul 2006 14:04:15 -0400 Subject: [Mongrel] I am a newbie and I would like some help decidingwhat operating system Message-ID: For a fast, lightweight and fun to use distro try ZenWalk, based on slackware. You can download the 'core' version to build the server with just the packages you need... www.zenwalk.org Have fun! Manuel -----Original Message----- From: mongrel-users-bounces at rubyforge.org [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Kevin Williams Sent: Wednesday, July 19, 2006 1:44 PM To: mongrel-users at rubyforge.org Subject: Re: [Mongrel] I am a newbie and I would like some help decidingwhat operating system Those are all fine distros. The choice is a personal preference, as all are capable. The best thing to do is try them all and pick the one that suits your personality. If you don't have time for that, just pick one. No matter which you pick, each has strengths and weaknesses. Personally, I use both Ubuntu and Fedora. SuSE is gorgeous but slow. Ubuntu - the bagillion packages you need to get RoR up and running is a real hassle. After that, it's fine. I use Fedora on my VPS where my sites are hosted, mostly for the SELinux security and Apache 2.2. I also use Windows and OS X, so I am not offended if you disagree with my choices. Hope that helps, and welcome to the Ruby on Rails community! On 7/19/06, Steve Beyer wrote: > I would like first to introduce my self to the community. I am Steve > Beyer and I am interested in learning Ruby, ROR, and how to set up a > production server. I am going to use OSX for my client/developement > system but I would like to get some advice on what operating system > you would recommend for a production server. I want to use Mongrel to > start and then move up the ladder as my skill and confidence increase. > I would appreciate your 2 cents. I have looked at Debian, Ubuntu, > Fedora, Suse, etc and all seem to have backers. Should I just pick > one and run with it or are there advantages that I should consider. I > am not trying to start a religious war or any fights but I have an > honest curiosity on what to use and I would rather not spin my wheels > on the operating system.... I will have plenty of time on that for > learning all of the other stuff. :-) Thanks for your help and input. > > > Steve > _______________________________________________ > 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 talk2sunder at gmail.com Wed Jul 19 14:05:05 2006 From: talk2sunder at gmail.com (Sunder ) Date: Wed, 19 Jul 2006 11:05:05 -0700 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> Message-ID: I have all my mongrel servers running on Freebsd and never had a problem. The freebsd ports are awesome. Mongrel is ROCK SOLID on freebsd. Sunder On 7/19/06, Kirk Haines wrote: > > On 7/19/06, Kevin Williams wrote: > > Those are all fine distros. The choice is a personal preference, as > > all are capable. The best thing to do is try them all and pick the one > > that suits your personality. If you don't have time for that, just > > pick one. No matter which you pick, each has strengths and weaknesses. > > I would also suggest that it may depend a bit on who your client(s) may > be. > > I have a lot of financial market clients, and being able to point at > RedHat and their documentation for RedHat Enterprise Linux (along with > that magic "Enterprise" word, there), has been helpful with a recent > security audit. > > > Kirk Haines > _______________________________________________ > 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/20060719/189b24d9/attachment.html From kevwil at gmail.com Wed Jul 19 14:06:57 2006 From: kevwil at gmail.com (Kevin Williams) Date: Wed, 19 Jul 2006 12:06:57 -0600 Subject: [Mongrel] I am a newbie and I would like some help deciding w hat operating system In-Reply-To: References: Message-ID: <683a886f0607191106i60992cccy12780cf447f49bf3@mail.gmail.com> Just a general, vague, overall feeling. Most likely from the UI layer. I have no experience using SuSE as a server, so it may be fine. I shouldn't have even mentioned it because Steve was asking about servers. Undo, undo! My life needs a "do over" button. On 7/19/06, Bacchu, Anjan wrote: > Hi Kevin/All, > > I'm a rails/ruby noob. Have put a rails app in production on Windows > :-) > > We have put our java apps in production using SUSE. If you can throw > some light > On "SUSE is gorgeous but slow" -- it will help us. Is only ruby/rails slow > on Suse OR is > it considered to be generally slow distro for all apps ? If slow for most > apps, how much > Performance hit is that ? > > Thank you, > > BR, > ~A > > -----Original Message----- > From: Kevin Williams [mailto:kevwil at gmail.com] > Sent: Wednesday, July 19, 2006 10:44 AM > To: mongrel-users at rubyforge.org > Subject: Re: [Mongrel] I am a newbie and I would like some help deciding > what operating system > > > Those are all fine distros. The choice is a personal preference, as all are > capable. The best thing to do is try them all and pick the one that suits > your personality. If you don't have time for that, just pick one. No matter > which you pick, each has strengths and weaknesses. > > Personally, I use both Ubuntu and Fedora. SuSE is gorgeous but slow. Ubuntu > - the bagillion packages you need to get RoR up and running is a real > hassle. After that, it's fine. I use Fedora on my VPS where my sites are > hosted, mostly for the SELinux security and Apache 2.2. > > I also use Windows and OS X, so I am not offended if you disagree with my > choices. > > Hope that helps, and welcome to the Ruby on Rails community! > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Cheers, Kevin From zedshaw at zedshaw.com Wed Jul 19 16:36:22 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 19 Jul 2006 16:36:22 -0400 Subject: [Mongrel] Recommended testing approaches for new Mongrel handlers? In-Reply-To: References: Message-ID: <1153341382.6707.3.camel@localhost.localdomain> On Wed, 2006-07-19 at 12:00 -0600, Kirk Haines wrote: > Okay, I got off my duff this week and have been finishing Mongrel > support for IOWA. I now have two handlers that I need to test. One > is similar to the Rails handler, passing request handling to IOWA > threads in the same process, and the other allows one or more Mongrel > processes to pass requests to one or more separate IOWA processes, > with session affinity. > > Is there any set of standard sorts of things that have been devised to > test the other handlers that I could apply to my new handlers? Kirk! You're awake! Awesome, since I'm actually writing the "Mongrel HTTP Compliance Test Suite" using RFuzz right now. If you want I can get with you when I have a bit to run and we can work IOWA into the suite. The approach of the suite is that it will start up a target web app with a test web application in it. Then the test suite hits it to verify it meets compliance with the RFC. It does this with different mongrel configs and would run for each web framework. The goal is to make it so that framework authors can validate that their framework is "Mongrel Compliant". Hit me up in IRC if you're game. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From wyhaines at gmail.com Wed Jul 19 17:19:30 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Wed, 19 Jul 2006 15:19:30 -0600 Subject: [Mongrel] Recommended testing approaches for new Mongrel handlers? In-Reply-To: <1153341382.6707.3.camel@localhost.localdomain> References: <1153341382.6707.3.camel@localhost.localdomain> Message-ID: On 7/19/06, Zed Shaw wrote: > On Wed, 2006-07-19 at 12:00 -0600, Kirk Haines wrote: > > Kirk! You're awake! Awesome, since I'm actually writing the "Mongrel > HTTP Compliance Test Suite" using RFuzz right now. If you want I can > get with you when I have a bit to run and we can work IOWA into the > suite. That would be great. > The approach of the suite is that it will start up a target web app with > a test web application in it. Then the test suite hits it to verify it > meets compliance with the RFC. It does this with different mongrel > configs and would run for each web framework. The goal is to make it so > that framework authors can validate that their framework is "Mongrel > Compliant". Okay. I have several tests in the IOWA test suite that start a simple app for testing some aspect or other. I'll just roll a couple of those for testing the Mongrel handlers with some basic tests for the release I'm trying to get together now. Then when you are ready, it can undergo more extensive testing. Thanks, Kirk Haines From mail at flydown.org Wed Jul 19 17:21:32 2006 From: mail at flydown.org (Michele) Date: Wed, 19 Jul 2006 23:21:32 +0200 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> Message-ID: Freebsd + Apache 2.2 + Mongrel has been working great for me. Once you're familiar with FreeBSD, it's a breeze to maintain. But as a rule of thumb, I'd say stick with what you're most familiar with. - Michele Finotto On Jul 19, 2006, at 18:57 , Steve Beyer wrote: > I would like first to introduce my self to the community. I am Steve > Beyer and I am interested in learning Ruby, ROR, and how to set up a > production server. I am going to use OSX for my client/developement > system but I would like to get some advice on what operating system > you would recommend for a production server. I want to use Mongrel > to start and then move up the ladder as my skill and confidence > increase. I would appreciate your 2 cents. I have looked at Debian, > Ubuntu, Fedora, Suse, etc and all seem to have backers. Should I > just pick one and run with it or are there advantages that I should > consider. I am not trying to start a religious war or any fights but > I have an honest curiosity on what to use and I would rather not spin > my wheels on the operating system.... I will have plenty of time on > that for learning all of the other stuff. :-) Thanks for your help > and input. > > > Steve > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From schwuk at gmail.com Thu Jul 20 01:41:19 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 20 Jul 2006 06:41:19 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> Message-ID: <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> On 19/07/06, Kevin Williams wrote: > Ubuntu - the bagillion packages you need to get RoR up and running is > a real hassle. Here we go again. Why is `sudo apt-get install rails` so hard? *You* don't need to install a 'bagillion' packages, that's apt's job. Even if you want to run a more current version of Rails, you only need 6 packages plus rubygems. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Thu Jul 20 01:52:19 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 20 Jul 2006 06:52:19 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> Message-ID: <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> On 19/07/06, Steve Beyer wrote: > Should I > just pick one and run with it or are there advantages that > I should consider. As already stated, choice of distro is a purely personal thing. There are realistically two main choices: Red Hat based or Debian based. I would recommend the latest versions of Fedora Core (the community version of Red Hat) and Ubuntu (which is based on Debian) and giving them both a try. You'll end up finding yourself naturally drawn to one or the other, or you'll want to look at others. The reason I've not included SUSE above (even though it's comparable to both Fedora and Ubuntu) is that I've not noticed it mentioned much in the RoR community. Sticking to Fedora or Ubuntu means that any problems you've encountered are likely to have already been seen and blogged by someone else. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From zedshaw at zedshaw.com Thu Jul 20 02:37:39 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 20 Jul 2006 02:37:39 -0400 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> Message-ID: <1153377459.10131.13.camel@localhost.localdomain> On Thu, 2006-07-20 at 06:41 +0100, Dave Murphy wrote: > On 19/07/06, Kevin Williams wrote: > > Ubuntu - the bagillion packages you need to get RoR up and running is > > a real hassle. > > Here we go again. Why is `sudo apt-get install rails` so hard? *You* > don't need to install a 'bagillion' packages, that's apt's job. Even > if you want to run a more current version of Rails, you only need 6 > packages plus rubygems. Everyone understands you disagree Dave, and that's fine, nodoby holds it against you at all and it's not a religious war. If you notice these folks (including myself) use Debian. They aren't saying it sucks, they're complaining that Ruby is too sliced. No amount of arguing or yelling at them will change their minds since it's an experience based judgement. At some point you have to start blaming Debian and stop blaming the users. I hear this one complaint *constantly*. Go look at the bug tracker, forums, and mailing list. #1 recurring bug is Debian not installing build tools to build Mongrel. Even after continually telling people what to do it doesn't help. Eventually, the amount of evidence that this package slicing is a problem will have to be acknowledged. The sad thing is that Debian could easily fix it by having a "developer mode" flag to apt-get that just installed all the developer crap as well. That would resolve the conflict between systems admins and developers quite easily. Also it would help if the packages were named consistently. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From kevwil at gmail.com Thu Jul 20 03:09:06 2006 From: kevwil at gmail.com (Kevin Williams) Date: Thu, 20 Jul 2006 01:09:06 -0600 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> Message-ID: <683a886f0607200009p6106a910m20ab4e4b0da731c@mail.gmail.com> On 7/19/06, Dave Murphy wrote: > On 19/07/06, Kevin Williams wrote: > > Ubuntu - the bagillion packages you need to get RoR up and running is > > a real hassle. > > Here we go again. Why is `sudo apt-get install rails` so hard? *You* > don't need to install a 'bagillion' packages, that's apt's job. Even > if you want to run a more current version of Rails, you only need 6 > packages plus rubygems. s/RoR/Ruby/ From mrueckert at suse.de Thu Jul 20 08:58:05 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Thu, 20 Jul 2006 14:58:05 +0200 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> Message-ID: <20060720125805.GC5504@suse.de> On 2006-07-20 06:41:19 +0100, Dave Murphy wrote: > On 19/07/06, Kevin Williams wrote: > > Ubuntu - the bagillion packages you need to get RoR up and running is > > a real hassle. > > Here we go again. Why is `sudo apt-get install rails` so hard? *You* > don't need to install a 'bagillion' packages, that's apt's job. Even > if you want to run a more current version of Rails, you only need 6 > packages plus rubygems. yesterday i checked the ubuntu package list for dapper for rubygems packages. none. and if this rails package is still not a gem ... you will have fun if you want to install other gems which maybe depend on rails. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From mrueckert at suse.de Thu Jul 20 09:00:16 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Thu, 20 Jul 2006 15:00:16 +0200 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> Message-ID: <20060720130016.GD5504@suse.de> On 2006-07-20 06:52:19 +0100, Dave Murphy wrote: > On 19/07/06, Steve Beyer wrote: > > Should I > just pick one and run with it or are there advantages that > > I should consider. > > The reason I've not included SUSE above (even though it's comparable > to both Fedora and Ubuntu) is that I've not noticed it mentioned much > in the RoR community. Sticking to Fedora or Ubuntu means that any > problems you've encountered are likely to have already been seen and > blogged by someone else. thats sad. :) especially since the ruby project [1] on the opensuse buildservice [2] provides packages that work together with rubygems. darix [1] http://en.opensuse.org/Ruby [2] http://en.opensuse.org/Build_Service -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From neil at aldur.co.uk Thu Jul 20 09:26:41 2006 From: neil at aldur.co.uk (Neil Wilson) Date: Thu, 20 Jul 2006 14:26:41 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720125805.GC5504@suse.de> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <20060720125805.GC5504@suse.de> Message-ID: On 20/07/06, Marcus Rueckert wrote: > > > yesterday i checked the ubuntu package list for dapper for rubygems > packages. none. Source installing rubygems isn't that big a deal. And there is a Debian package at http://www.sgtpepper.net/hyspro/deb/unstable/ that gets 0.8.11rubygems installed on a Debian based machine. From that you can bootstrap the latest version with a gem update --system. HTH NeilW -- Neil Wilson (neil at aldur.co.uk) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060720/c440275b/attachment.html From dallas.devries at gmail.com Thu Jul 20 09:44:28 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Thu, 20 Jul 2006 09:44:28 -0400 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <20060720125805.GC5504@suse.de> Message-ID: <1200dbac0607200644x22574c99j53f4ad4e8c9a780@mail.gmail.com> I just dealt with getting rails going on Debian. I switched from Fedora. Basically I used the following two links for ruby/rails/mongrel installs. https://forum.bytemark.co.uk/viewtopic.php?pid=1697 http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge Debian is a little more work to get stuff going than Fedora, but people say its suppose to be more stable. Being a newb I also had to compile the kernel for the first time because it defaults to only supporting 900MB of RAM. For newbies like me not knowing how to compile a new kernel http://www.howtoforge.com/forums/showthread.php?t=21 Cheers, Dallas On 7/20/06, Neil Wilson wrote: > > > > On 20/07/06, Marcus Rueckert wrote: > > > > > > yesterday i checked the ubuntu package list for dapper for rubygems > > packages. none. > > > > Source installing rubygems isn't that big a deal. And there is a Debian > package at http://www.sgtpepper.net/hyspro/deb/unstable/ that gets 0.8.11rubygems installed on a Debian based machine. From that you can bootstrap > the latest version with a gem update --system. > > HTH > > NeilW > > > > > > -- > Neil Wilson (neil at aldur.co.uk) > > _______________________________________________ > 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/20060720/08f33fc9/attachment.html From schwuk at gmail.com Thu Jul 20 10:21:14 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 20 Jul 2006 15:21:14 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720125805.GC5504@suse.de> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <20060720125805.GC5504@suse.de> Message-ID: <2e60a9e60607200721w2b4415c1r994cd524cdf84329@mail.gmail.com> On 20/07/06, Marcus Rueckert wrote: > yesterday i checked the ubuntu package list for dapper for rubygems > packages. none. You're quite right. I'm guessing they don't package it because it has the potential to break the packaging system, but it would be nice if it was included. As it is, it's easy enough to install rubygems from a tarball, so it's not too much of a problem. > and if this rails package is still not a gem ... you will have fun if > you want to install other gems which maybe depend on rails. Again you're right. This is why I personally don't use the rails package, and instead install Ruby, manually install rubygems then install rails via that. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Thu Jul 20 10:29:27 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 20 Jul 2006 15:29:27 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <1153377459.10131.13.camel@localhost.localdomain> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <1153377459.10131.13.camel@localhost.localdomain> Message-ID: <2e60a9e60607200729v6fdc9836u9de84330804f1b87@mail.gmail.com> On 20/07/06, Zed Shaw wrote: > Everyone understands you disagree Dave, and that's fine, nodoby holds it > against you at all and it's not a religious war. What I disagree with is the exageration. If you want to run what the distribution considers stable, it's not that difficult. If you want to go outside that, you can't blame the distro any more. I hardly think it's turning into a religious war - I'm just trying to put these things in perspective for the people that don't know. > At some point you have to start blaming Debian and stop blaming the > users. I hear this one complaint *constantly*. Go look at the bug > tracker, forums, and mailing list. #1 recurring bug is Debian not > installing build tools to build Mongrel. Even after continually telling > people what to do it doesn't help. Actually, I'd blame the project. It is not documented anywhere (I can see) on the Mongrel website that you need to have a compiler installed to be to use Mongrel via gems, so how are the users expected to know? > Eventually, the amount of evidence that this package slicing is a > problem will have to be acknowledged. As you say, a developer flag would remove most of the package slicing problems straight away. It would also be nice if any -dev packages depended on build-essential but it's unlikely to happen. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From steve at beyertribe.com Thu Jul 20 10:58:55 2006 From: steve at beyertribe.com (Steve Beyer) Date: Thu, 20 Jul 2006 10:58:55 -0400 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607200729v6fdc9836u9de84330804f1b87@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <1153377459.10131.13.camel@localhost.localdomain> <2e60a9e60607200729v6fdc9836u9de84330804f1b87@mail.gmail.com> Message-ID: Thanks for everyone's input and I am sorry if I stirred it up a bit. This has been very helpful since it surfaced a few ideas that I had not considered. From zedshaw at zedshaw.com Thu Jul 20 12:24:02 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 20 Jul 2006 12:24:02 -0400 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607200729v6fdc9836u9de84330804f1b87@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <1153377459.10131.13.camel@localhost.localdomain> <2e60a9e60607200729v6fdc9836u9de84330804f1b87@mail.gmail.com> Message-ID: <1153412642.6202.10.camel@localhost.localdomain> On Thu, 2006-07-20 at 15:29 +0100, Dave Murphy wrote: > > At some point you have to start blaming Debian and stop blaming the > > users. I hear this one complaint *constantly*. Go look at the bug > > tracker, forums, and mailing list. #1 recurring bug is Debian not > > installing build tools to build Mongrel. Even after continually telling > > people what to do it doesn't help. > > Actually, I'd blame the project. It is not documented anywhere (I can > see) on the Mongrel website that you need to have a compiler installed > to be to use Mongrel via gems, so how are the users expected to know? Dave, you're right, I haven't done anything to help people on Debian. Nope not a single thing. I haven't done any of these things: 1) Installed Ubuntu *just* so I can go through what they go through. 2) Modified the build explicitly so that it warns people with gigantic numbers of exclamation points that it did not build. 3) Constantly tell them how to build it on the mailing list. But you're right Dave, no it's my fault that Debian can't seem to install a damn build tool right anyway. Nope. Time for me to do more work. Thanks for the motivator. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Jul 20 12:54:58 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 20 Jul 2006 12:54:58 -0400 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607200721w2b4415c1r994cd524cdf84329@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <20060720125805.GC5504@suse.de> <2e60a9e60607200721w2b4415c1r994cd524cdf84329@mail.gmail.com> Message-ID: <1153414498.7124.23.camel@localhost.localdomain> On Thu, 2006-07-20 at 15:21 +0100, Dave Murphy wrote: > On 20/07/06, Marcus Rueckert wrote: > > yesterday i checked the ubuntu package list for dapper for rubygems > > packages. none. > > You're quite right. I'm guessing they don't package it because it has > the potential to break the packaging system, but it would be nice if > it was included. As it is, it's easy enough to install rubygems from a > tarball, so it's not too much of a problem. > What?! So all your ranting and instructions meant nothing? > > and if this rails package is still not a gem ... you will have fun if > > you want to install other gems which maybe depend on rails. > > Again you're right. This is why I personally don't use the rails > package, and instead install Ruby, manually install rubygems then > install rails via that. > You know Dave, it's kind of shameful that you give people instructions that you don't use yourself. You're running around telling everyone Debian is easy to use, but how do you know? Eh? I mean, you "personally don't use the rails package". Yet that's your instructions to folks. Most people who do open source do it for love. I like working on Mongrel and it's fun, and I go to great lengths to help people out--even going so far as to install the distro with the most problems so I could iron things out. I even run Windows and try to do development there so I can help them. So don't characterize me as not doing enough for people using Debian. I find it the height of arrogance that you think I have to bend my project around that distro's horrible packaging mechanism--a mechanism **you don't even use**. But don't worry Dave. You've inspired me to put an end to the Debian problem once and for all. I've been avoiding this solution but I guess I'm gonna have to buckle down, keep the 0.3.13.4 release back another weekend, and finally solve Debian. Thanks for the motivator. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From mongrel at philip.pjkh.com Thu Jul 20 13:03:11 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 20 Jul 2006 12:03:11 -0500 (CDT) Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> Message-ID: <20060720120140.C5192@bravo.pjkh.com> > On 19/07/06, Steve Beyer wrote: >> Should I > just pick one and run with it or are there advantages that >> I should consider. > > As already stated, choice of distro is a purely personal thing. There > are realistically two main choices: Red Hat based or Debian based. I I'm really not looking to fuel the fire, but why not FreeBSD? Other than it's not linux, is there a reason I've only seen one person recommend it? There were issues with mysql threading in the past, do those same issues affect mongrel? I had thought that was all fixed in 6... ? -philip From kevwil at gmail.com Thu Jul 20 12:59:50 2006 From: kevwil at gmail.com (Kevin Williams) Date: Thu, 20 Jul 2006 10:59:50 -0600 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <1153414498.7124.23.camel@localhost.localdomain> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <20060720125805.GC5504@suse.de> <2e60a9e60607200721w2b4415c1r994cd524cdf84329@mail.gmail.com> <1153414498.7124.23.camel@localhost.localdomain> Message-ID: <683a886f0607200959g2e422538gf5914a2cdec8f873@mail.gmail.com> On 7/20/06, Zed Shaw wrote: > ....... I even run Windows and try to do development there so > I can help them. And those of us who use Windows appreciate it greatly! -- Cheers, Kevin From anjan.bacchu at Summit.Fiserv.com Thu Jul 20 13:00:41 2006 From: anjan.bacchu at Summit.Fiserv.com (Bacchu, Anjan) Date: Thu, 20 Jul 2006 10:00:41 -0700 Subject: [Mongrel] I am a newbie and I would like some help deciding w hat operating system Message-ID: +1 -----Original Message----- From: Kevin Williams [mailto:kevwil at gmail.com] Sent: Thursday, July 20, 2006 10:00 AM To: mongrel-users at rubyforge.org Subject: Re: [Mongrel] I am a newbie and I would like some help deciding what operating system On 7/20/06, Zed Shaw wrote: > ....... I even run Windows and try to do development there so I can > help them. And those of us who use Windows appreciate it greatly! -- Cheers, Kevin _______________________________________________ Mongrel-users mailing list Mongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users From aidan at infurious.com Thu Jul 20 13:05:19 2006 From: aidan at infurious.com (Aidan Rogers) Date: Thu, 20 Jul 2006 18:05:19 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720120140.C5192@bravo.pjkh.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> Message-ID: <63945E6C-D7B2-45A9-B281-F4E26D626D6D@infurious.com> +1 for FreeBSD. I had ruby + mongrel (albeit with nitro not rails) up and running within minutes. Rails is also very easy to install (having done it before). Aidan On 20/07/2006, at 6:03 PM, Philip Hallstrom wrote: >> On 19/07/06, Steve Beyer wrote: >>> Should I > just pick one and run with it or are there advantages >>> that >>> I should consider. >> >> As already stated, choice of distro is a purely personal thing. There >> are realistically two main choices: Red Hat based or Debian based. I > > I'm really not looking to fuel the fire, but why not FreeBSD? > Other than > it's not linux, is there a reason I've only seen one person > recommend it? > > There were issues with mysql threading in the past, do those same > issues > affect mongrel? I had thought that was all fixed in 6... > > ? > > -philip > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From kevwil at gmail.com Thu Jul 20 13:06:04 2006 From: kevwil at gmail.com (Kevin Williams) Date: Thu, 20 Jul 2006 11:06:04 -0600 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720120140.C5192@bravo.pjkh.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> Message-ID: <683a886f0607201006l578c7782l7dda1cdc63a0b6e4@mail.gmail.com> My only gripe with FreeBSD is/was all the ports not being binary. I know binary versions are out there, but I could never find them. I used Gentoo for a few years before trying FreeBSD, and the constant compiling almost melted the laptop I had it installed on. To FreeBSD's credit, especially as a server, is that compiling is orders of magnitude smaller than what I was doing with Gentoo (KDE and everything, bleeding edge), so the compiling is very infrequent and not as much an issue as my brain leads me to believe. TextDrive servers are still FreeBSD, AFAIK, although they are threatening to switch to Solaris for its ZFS file system, so FreeBSD should be a fine choice for a Rails server. Just be sure to use Mongrel, not FastCGI! :) On 7/20/06, Philip Hallstrom wrote: > > On 19/07/06, Steve Beyer wrote: > >> Should I > just pick one and run with it or are there advantages that > >> I should consider. > > > > As already stated, choice of distro is a purely personal thing. There > > are realistically two main choices: Red Hat based or Debian based. I > > I'm really not looking to fuel the fire, but why not FreeBSD? Other than > it's not linux, is there a reason I've only seen one person recommend it? > > There were issues with mysql threading in the past, do those same issues > affect mongrel? I had thought that was all fixed in 6... > > ? > > -philip > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Cheers, Kevin From talk2sunder at gmail.com Thu Jul 20 13:06:46 2006 From: talk2sunder at gmail.com (Sunder ) Date: Thu, 20 Jul 2006 10:06:46 -0700 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720120140.C5192@bravo.pjkh.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> Message-ID: Phillip, I installed ruby/rails/mongrel/apache2 on my freebsd box and had ZERO problems. In fact after all the juggling I had to do with lighttpd, it was shocking(in a nice way) to see how easy it was with Mongrel. I did not face a SINGLE problem with any of the components. I was seeing some sporadic lost connection to mysql server errors. I then installed the mysql client/ruby native driver using ports and have not had any problems since. I ran some supersmack tests and the results look good. I cant wait to launch my application and slap a "Made with Mongrel" sticker on it. Sunder On 7/20/06, Philip Hallstrom wrote: > > > On 19/07/06, Steve Beyer wrote: > >> Should I > just pick one and run with it or are there advantages that > >> I should consider. > > > > As already stated, choice of distro is a purely personal thing. There > > are realistically two main choices: Red Hat based or Debian based. I > > I'm really not looking to fuel the fire, but why not FreeBSD? Other than > it's not linux, is there a reason I've only seen one person recommend it? > > There were issues with mysql threading in the past, do those same issues > affect mongrel? I had thought that was all fixed in 6... > > ? > > -philip > _______________________________________________ > 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/20060720/9b5bb6f5/attachment.html From mongrel at philip.pjkh.com Thu Jul 20 13:33:48 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 20 Jul 2006 12:33:48 -0500 (CDT) Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <683a886f0607201006l578c7782l7dda1cdc63a0b6e4@mail.gmail.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> <683a886f0607201006l578c7782l7dda1cdc63a0b6e4@mail.gmail.com> Message-ID: <20060720123220.Q5999@bravo.pjkh.com> > My only gripe with FreeBSD is/was all the ports not being binary. I > know binary versions are out there, but I could never find them. I Ironically that's what I hate about RPM's and friends... But I don't use FreeBSD as a desktop so can imagine compiling gnome/openoffice would take all day and then some :) > TextDrive servers are still FreeBSD, AFAIK, although they are > threatening to switch to Solaris for its ZFS file system, so FreeBSD > should be a fine choice for a Rails server. Just be sure to use > Mongrel, not FastCGI! :) We switched from lighttpd/fastcgi to apache/mongrel at work and it's a *world* of difference. I will never, ever go back. From talk2sunder at gmail.com Thu Jul 20 13:31:58 2006 From: talk2sunder at gmail.com (Sunder ) Date: Thu, 20 Jul 2006 10:31:58 -0700 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720123220.Q5999@bravo.pjkh.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> <683a886f0607201006l578c7782l7dda1cdc63a0b6e4@mail.gmail.com> <20060720123220.Q5999@bravo.pjkh.com> Message-ID: yup, I dont use freebsd as my dev env. In fact , I use windows(thats a separate thread) for dev with mongrel for windows and deploy on freebsd. On 7/20/06, Philip Hallstrom wrote: > > > My only gripe with FreeBSD is/was all the ports not being binary. I > > know binary versions are out there, but I could never find them. I > > Ironically that's what I hate about RPM's and friends... But I don't use > FreeBSD as a desktop so can imagine compiling gnome/openoffice would take > all day and then some :) > > > TextDrive servers are still FreeBSD, AFAIK, although they are > > threatening to switch to Solaris for its ZFS file system, so FreeBSD > > should be a fine choice for a Rails server. Just be sure to use > > Mongrel, not FastCGI! :) > > We switched from lighttpd/fastcgi to apache/mongrel at work and it's a > *world* of difference. I will never, ever go back. > > _______________________________________________ > 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/20060720/14350f02/attachment.html From zedshaw at zedshaw.com Thu Jul 20 13:39:21 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 20 Jul 2006 13:39:21 -0400 Subject: [Mongrel] The Debian Plan Message-ID: <1153417161.7352.13.camel@localhost.localdomain> Hello Folks, After all the troubles people have had with Debian I realize that what I've done still isn't enough for smooth sailing. I'm now going to hold back the 0.3.13.4 release in order to put an end to the Debian problem once and for all. I'm currently planning the following changes: 1) Specific documentation for Debian. Debian will become the only Unix distro that requires specific instructions. This should be a sign to all that maybe it's not the one to use. 2) Large warnings that you need a compiler. Fair enough, that's a deficiency all around. 3) The Rakefile will refuse to build if the extension does not build and print a more extensive warning. 4) The Rakefile will warn people running on Debian that they most likely have to install a lot more packages, pointing them at the instructions. 5) The mongrel_rails script will check itself to make sure extensions exist and refuse to run, again pointing people at Debian instructions if on that system. If after this I can't reduce the number of people having problems on Debian then I'm going to publicly declare that I do not support Debian installs of Mongrel via RubyGems and that they should install via Debian packages and work with the package maintainer. If there are Debian people who like running Mongrel on their computers then I'd ask that you step up and help. The fact that I'm holding back a release out of frustration from one distro (that I actually use) is enough for me to not want to support it. I have had less trouble supporting windows than Debian, which is just insane. And again, before people get their panties in a bunch, this isn't a personal insult to you if you use Debian. These are *tools* not religions. I use Operating Systems to get more interesting work done. If you take my hatred of your operating system as hatred for you then you are *not* understanding me at all. You are a fantastic individual and I like you. I hate that you use such a horrible distribution of Linux. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Jul 20 13:43:34 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 20 Jul 2006 13:43:34 -0400 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <63945E6C-D7B2-45A9-B281-F4E26D626D6D@infurious.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> <63945E6C-D7B2-45A9-B281-F4E26D626D6D@infurious.com> Message-ID: <1153417414.7352.18.camel@localhost.localdomain> On Thu, 2006-07-20 at 18:05 +0100, Aidan Rogers wrote: > +1 for FreeBSD. I had ruby + mongrel (albeit with nitro not rails) > up and running within minutes. Rails is also very easy to install > (having done it before). I too like FreeBSD. The BSDs have great packaging and listen to people when they complain about it. A while back I found that FreeBSD had two versions of Ruby: ruby18 and ruby18-nopthreads. I discovered the ruby18-nopthreads version was about 60x faster (yes 60x) than the ruby18. Turns out that turning pthreads support on is a major performance hit. What did the FreeBSD folks do? They immediately switched to the default Ruby being the one without pthreads. Now that's listening. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From aidan at infurious.com Thu Jul 20 13:48:45 2006 From: aidan at infurious.com (Aidan Rogers) Date: Thu, 20 Jul 2006 18:48:45 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720123220.Q5999@bravo.pjkh.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> <683a886f0607201006l578c7782l7dda1cdc63a0b6e4@mail.gmail.com> <20060720123220.Q5999@bravo.pjkh.com> Message-ID: <023FC665-871D-4117-BF8D-FFB7AAA16BAE@infurious.com> pkg_add -r gnome ;-) I use the binaries when they're available (pkg_add -r works for about 80% of every day apps) and compile from source for everything else. Aidan On 20/07/2006, at 6:33 PM, Philip Hallstrom wrote: > Ironically that's what I hate about RPM's and friends... But I > don't use > FreeBSD as a desktop so can imagine compiling gnome/openoffice > would take > all day and then some :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060720/8183d16a/attachment.html From aidan at infurious.com Thu Jul 20 13:48:45 2006 From: aidan at infurious.com (Aidan Rogers) Date: Thu, 20 Jul 2006 18:48:45 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720123220.Q5999@bravo.pjkh.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> <683a886f0607201006l578c7782l7dda1cdc63a0b6e4@mail.gmail.com> <20060720123220.Q5999@bravo.pjkh.com> Message-ID: <023FC665-871D-4117-BF8D-FFB7AAA16BAE@infurious.com> pkg_add -r gnome ;-) I use the binaries when they're available (pkg_add -r works for about 80% of every day apps) and compile from source for everything else. Aidan On 20/07/2006, at 6:33 PM, Philip Hallstrom wrote: > Ironically that's what I hate about RPM's and friends... But I > don't use > FreeBSD as a desktop so can imagine compiling gnome/openoffice > would take > all day and then some :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060720/8183d16a/attachment-0001.html From phil at unimedia.org Thu Jul 20 14:20:01 2006 From: phil at unimedia.org (Phillip Kast) Date: Thu, 20 Jul 2006 12:20:01 -0600 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153417161.7352.13.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: <44BFC951.6070601@unimedia.org> Hey, I run ubuntu on my laptop and debian on several servers. I've got a production box running mongrel and in the next few days I'm about to install a bunch of stuff to a dev box for another project, it's got a clean install of debian stable. I've dealt with the package/dependency mess before and figured out all the missing stuff. I'm not a super linux guru, and I'm no debian zealot, just have medium admin skills and enough persistence to figure out why broken stuff is broken. I'd be happy to help contribute some docs. What do you need? Lists of packages or complete docs? //Gotten any other offers of help here? Oh yeah, I'm driving from Colorado to the west coast right now, so it would be a day or two before I could contribute anything. But IMO you should do 2,3,4,5 and then do the release without holding for 1. Let me know if you can use my assistance here, phil Zed Shaw wrote: > Hello Folks, > > After all the troubles people have had with Debian I realize that what > I've done still isn't enough for smooth sailing. I'm now going to hold > back the 0.3.13.4 release in order to put an end to the Debian problem > once and for all. > > I'm currently planning the following changes: > > 1) Specific documentation for Debian. Debian will become the only Unix > distro that requires specific instructions. This should be a sign to > all that maybe it's not the one to use. > 2) Large warnings that you need a compiler. Fair enough, that's a > deficiency all around. > 3) The Rakefile will refuse to build if the extension does not build and > print a more extensive warning. > 4) The Rakefile will warn people running on Debian that they most likely > have to install a lot more packages, pointing them at the instructions. > 5) The mongrel_rails script will check itself to make sure extensions > exist and refuse to run, again pointing people at Debian instructions if > on that system. > > If after this I can't reduce the number of people having problems on > Debian then I'm going to publicly declare that I do not support Debian > installs of Mongrel via RubyGems and that they should install via Debian > packages and work with the package maintainer. > > If there are Debian people who like running Mongrel on their computers > then I'd ask that you step up and help. The fact that I'm holding back > a release out of frustration from one distro (that I actually use) is > enough for me to not want to support it. I have had less trouble > supporting windows than Debian, which is just insane. > > And again, before people get their panties in a bunch, this isn't a > personal insult to you if you use Debian. These are *tools* not > religions. I use Operating Systems to get more interesting work done. > If you take my hatred of your operating system as hatred for you then > you are *not* understanding me at all. > > You are a fantastic individual and I like you. I hate that you use such > a horrible distribution of Linux. > > -- Phillip Kast (909)630-9562 phil at unimedia.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060720/db61c1eb/attachment.html From coda.hale at gmail.com Thu Jul 20 14:26:02 2006 From: coda.hale at gmail.com (Coda Hale) Date: Thu, 20 Jul 2006 11:26:02 -0700 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153417161.7352.13.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: On 7/20/06, Zed Shaw wrote: > After all the troubles people have had with Debian I realize that what > I've done still isn't enough for smooth sailing. I'm now going to hold > back the 0.3.13.4 release in order to put an end to the Debian problem > once and for all. I'm wondering if it wouldn't be easier to add a script before the gem build which, if the user is running a Debian-style distro, checks for the existence of the appropriate packages and prompts the user if they wouldn't perhaps like to install them first? Maybe even actually install them for the user? I realize this is a strange thing to do in a gem pre-install, but it seems that the threshold for Debian-specific action has been passed, and it seems like automating the hell out of getting Debian to work is a better solution than giving people information up front, especially when it boils down to the important part: freeing up your time for actual work, not answering the same questions over and over again. I figure it's time to get a bit more hand-holdy. To sweeten the deal, I've even written this pre-install script for you (and also to make sure I wasn't asking you to do something for an annoying edge case which involves a lot of work). I've attached it. I'm not sure if the list of required packages is correct, though. -- Coda Hale http://blog.codahale.com -------------- next part -------------- A non-text attachment was scrubbed... Name: deb_preinstall_madness.rb Type: application/octet-stream Size: 1110 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060720/a8b69fd7/attachment.obj From chris at octopod.info Thu Jul 20 14:34:45 2006 From: chris at octopod.info (Chris McGrath) Date: Thu, 20 Jul 2006 19:34:45 +0100 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153417161.7352.13.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: <551EB672-5CC6-4C94-B4A6-A396CEDECB41@octopod.info> On 20 Jul 2006, at 18:39, Zed Shaw wrote: > Hello Folks, > > > > If there are Debian people who like running Mongrel on their computers > then I'd ask that you step up and help. The fact that I'm holding > back > a release out of frustration from one distro (that I actually use) is > enough for me to not want to support it. I have had less trouble > supporting windows than Debian, which is just insane. > Zed, my task for this evening is installing a mongrel stack on a almost spanking new Debian sarge install, taking notes as I go. I should be able to help with the docs. Plan is for ruby 1.8.4 from testing, mongrel from gems. I'll let you know how it goes. Cheers, Chris (octopod on freenode) From zedshaw at zedshaw.com Thu Jul 20 14:32:03 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 20 Jul 2006 14:32:03 -0400 Subject: [Mongrel] The Debian Plan In-Reply-To: <44BFC951.6070601@unimedia.org> References: <1153417161.7352.13.camel@localhost.localdomain> <44BFC951.6070601@unimedia.org> Message-ID: <1153420323.7931.1.camel@localhost.localdomain> On Thu, 2006-07-20 at 12:20 -0600, Phillip Kast wrote: > Hey, > > I run ubuntu on my laptop and debian on several servers. I've got a > production box running mongrel and in the next few days I'm about to > install a bunch of stuff to a dev box for another project, it's got a > clean install of debian stable. > > I've dealt with the package/dependency mess before and figured out all > the missing stuff. I'm not a super linux guru, and I'm no debian > zealot, just have medium admin skills and enough persistence to figure > out why broken stuff is broken. I'd be happy to help contribute some > docs. What do you need? Lists of packages or complete docs? Gotten any > other offers of help here? > Philip, documentation would be awesome. Basically read: http://mongrel.rubyforge.org/docs/contrib.html To get started writing docs (it's like the doc writer's dev guide), and then grab a fresh install of ubuntu and do the mongrel install from scratch. The way I like instructions is the "cut-paste" style where the user can paste the commands into the window and the stuff will work. Kind of like an annotated automation script. > Oh yeah, I'm driving from Colorado to the west coast right now, so it > would be a day or two before I could contribute anything. > But IMO you should do 2,3,4,5 and then do the release without holding > for 1. Take your time. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Jul 20 14:35:46 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 20 Jul 2006 14:35:46 -0400 Subject: [Mongrel] The Debian Plan In-Reply-To: References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: <1153420546.7931.6.camel@localhost.localdomain> On Thu, 2006-07-20 at 11:26 -0700, Coda Hale wrote: > On 7/20/06, Zed Shaw wrote: > > After all the troubles people have had with Debian I realize that what > > I've done still isn't enough for smooth sailing. I'm now going to hold > > back the 0.3.13.4 release in order to put an end to the Debian problem > > once and for all. > > I'm wondering if it wouldn't be easier to add a script before the gem > build which, if the user is running a Debian-style distro, checks for > the existence of the appropriate packages and prompts the user if they > wouldn't perhaps like to install them first? Maybe even actually > install them for the user? > Coda, problem is I'm not sure if gems support this. They don't even support detecting that the extension build failed and stopping. If you got this script, and you know how it can be plugged in then I will love to have it. > To sweeten the deal, I've even written this pre-install script for you > (and also to make sure I wasn't asking you to do something for an > annoying edge case which involves a lot of work). I've attached it. > I'm not sure if the list of required packages is correct, though. It's a start. Can you do a bit of research to see if there's such a way to run this and then abort from a gem install mongrel command? That's the key is we want users to see something like: > gem install mongrel ** Oops, you're on Debian. Checking if you've followed the instructions found at http://mongrel.rubyforge.org/docs/debian.html ... !! PACKAGES NOT FOUND ** Debian requires that you have the following packages installed before building Mongrel: blah blah blah !! ERROR. Aborting due to missing Debian packages. If your script can list the packages, and gems can run it, then that's perfect. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From kevwil at gmail.com Thu Jul 20 14:41:22 2006 From: kevwil at gmail.com (Kevin Williams) Date: Thu, 20 Jul 2006 12:41:22 -0600 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <20060720123220.Q5999@bravo.pjkh.com> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <2e60a9e60607192252p294e9d2cmee6339fc80fa1433@mail.gmail.com> <20060720120140.C5192@bravo.pjkh.com> <683a886f0607201006l578c7782l7dda1cdc63a0b6e4@mail.gmail.com> <20060720123220.Q5999@bravo.pjkh.com> Message-ID: <683a886f0607201141h5012d47ah9d120b6bd0431a5e@mail.gmail.com> On 7/20/06, Philip Hallstrom wrote: > > My only gripe with FreeBSD is/was all the ports not being binary. I > > know binary versions are out there, but I could never find them. I > > Ironically that's what I hate about RPM's and friends... But I don't use > FreeBSD as a desktop so can imagine compiling gnome/openoffice would take > all day and then some :) I'm no RPM fan, trust me. To me, it's all about dependency resolution. I want to run "{installer-bin} kde" and it installs X, Qt, and all KDE packages. The slickest I've seen are Gentoo and Arch Linux. Arch strikes a very happy medium (to me at least) between the console-only crowd and the easy-to-use crowd. Check out http://www.archlinux.org/packages/search/?q=ruby - the dependencies are there and the files (link at right) include ri, rdoc, test/unit, irb, tcltk, rinda, webrick - everything in the tarball. I just run "pacman -S ruby" and I can immediately start installing Rails and other gems. Sorry, got carried away there. And yes, I've had six OSes on one box before. :) When I was using Gentoo, compiling KDE or Gnome took about 24 hours on my 1.2GHz P3 / 512MB RAM laptop. OpenOffice was about 30 or 45 minutes. X was a solid hour. I remember one weekend where Gentoo updated X, KDE, and a bunch of other stuff like GCC, Apache and the kernel. I started Friday night and it was still compiling when I left for work Monday morning! > > > TextDrive servers are still FreeBSD, AFAIK, although they are > > threatening to switch to Solaris for its ZFS file system, so FreeBSD > > should be a fine choice for a Rails server. Just be sure to use > > Mongrel, not FastCGI! :) > > We switched from lighttpd/fastcgi to apache/mongrel at work and it's a > *world* of difference. I will never, ever go back. Amen, brother. I'm so happy Zed gets paid to focus on Mongrel, I can't begin to tell you. Actually, I think Mongrel should supplant Webrick in the main Ruby package. Why do we need Webrick anymore? -- Cheers, Kevin From kevwil at gmail.com Thu Jul 20 14:58:38 2006 From: kevwil at gmail.com (Kevin Williams) Date: Thu, 20 Jul 2006 12:58:38 -0600 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153420546.7931.6.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> <1153420546.7931.6.camel@localhost.localdomain> Message-ID: <683a886f0607201158u74cdcba9q2fe90b0d7a37190e@mail.gmail.com> I was at a Ruby users group last night with Chad Fowler - the topic was RubyGems. This is something that has been brought up before. It would take time, resources, manpower - it's a big deal. Ideally, the gem could: 1) detect in needed native libs are present. 2) install them if not present, specific to the OS "sudo yum install blah, blah" if Fedora (SuSE too?) "sudo apt-get install blah, blah, blah, blah" if Debian-based "sudo pkg_add -r blah, blah" if BSD-based "sudo pacman -S blah, blah" if Arch Linux "sudo emerge blah, blah" if Gentoo "sudo ports install blah, blah" if OS X, or point to a binary package? and even some automated hack if Windows, or at least give a URL to locate the installer. That's quite an undertaking. That's how it _should_ work, but wow that would take a lot of time and energy to implement and maintain. Anyway, the RubyGems guys are aware of this idea already. Another idea is "gem install mongrel" - what if it detected which build to use (ruby or win32) based on the Ruby install that's running the gem command and just installed the latest one automatically? More food for thought. http://rubyforge.org/projects/rubygems/ On 7/20/06, Zed Shaw wrote: > On Thu, 2006-07-20 at 11:26 -0700, Coda Hale wrote: > > On 7/20/06, Zed Shaw wrote: > > > After all the troubles people have had with Debian I realize that what > > > I've done still isn't enough for smooth sailing. I'm now going to hold > > > back the 0.3.13.4 release in order to put an end to the Debian problem > > > once and for all. > > > > I'm wondering if it wouldn't be easier to add a script before the gem > > build which, if the user is running a Debian-style distro, checks for > > the existence of the appropriate packages and prompts the user if they > > wouldn't perhaps like to install them first? Maybe even actually > > install them for the user? > > > > Coda, problem is I'm not sure if gems support this. They don't even > support detecting that the extension build failed and stopping. If you > got this script, and you know how it can be plugged in then I will love > to have it. > > > To sweeten the deal, I've even written this pre-install script for you > > (and also to make sure I wasn't asking you to do something for an > > annoying edge case which involves a lot of work). I've attached it. > > I'm not sure if the list of required packages is correct, though. > > It's a start. Can you do a bit of research to see if there's such a way > to run this and then abort from a gem install mongrel command? That's > the key is we want users to see something like: > > > gem install mongrel > ** Oops, you're on Debian. Checking if you've followed the instructions > found at http://mongrel.rubyforge.org/docs/debian.html ... > !! PACKAGES NOT FOUND > ** Debian requires that you have the following packages installed before > building Mongrel: > blah > blah > blah > !! ERROR. Aborting due to missing Debian packages. > > If your script can list the packages, and gems can run it, then that's > perfect. > > > -- > 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 > -- Cheers, Kevin From Daniel.Berger at qwest.com Thu Jul 20 15:04:18 2006 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu, 20 Jul 2006 14:04:18 -0500 Subject: [Mongrel] The Debian Plan Message-ID: <39AA6550E5AA554AB1456707D6E5563D0259E737@QTOMAE2K3M01.AD.QINTRA.COM> > -----Original Message----- > From: mongrel-users-bounces at rubyforge.org > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Zed Shaw > Sent: Thursday, July 20, 2006 12:36 PM > To: mongrel-users at rubyforge.org > Subject: Re: [Mongrel] The Debian Plan > > I'm wondering if it wouldn't be easier to add a script > before the gem > > build which, if the user is running a Debian-style distro, > checks for > > the existence of the appropriate packages and prompts the > user if they > > wouldn't perhaps like to install them first? Maybe even actually > > install them for the user? > > > > Coda, problem is I'm not sure if gems support this. They > don't even support detecting that the extension build failed > and stopping. If you got this script, and you know how it > can be plugged in then I will love to have it. I *think* the reason they don't bail out on build failures is because they figure it's up to you to bail out if you want using 'gem install -t'. If you were to add something to your gemspec that forced a bailout, yet the end user did 'gem install -f', who wins? Mind you, I'm not advocating that the current behavior is good. Personally, I think gems should, by default, do what Perl's CPAN does in the case of C extensions - bail out unless forced. In the meantime, I think I'll add '-run-tests' to my gem config file, assuming this actually forces gems to bail out on failure (which I haven't verified). Regards, Dan PS - There's always RPA. 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 coda.hale at gmail.com Thu Jul 20 15:05:16 2006 From: coda.hale at gmail.com (Coda Hale) Date: Thu, 20 Jul 2006 12:05:16 -0700 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153420546.7931.6.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> <1153420546.7931.6.camel@localhost.localdomain> Message-ID: On 7/20/06, Zed Shaw wrote: > Coda, problem is I'm not sure if gems support this. They don't even > support detecting that the extension build failed and stopping. If you > got this script, and you know how it can be plugged in then I will love > to have it. > > It's a start. Can you do a bit of research to see if there's such a way > to run this and then abort from a gem install mongrel command? Any code added to the pre-config.rb file in the project root will be executed by setup.rb before the extension's makefile is generated, thus heading the problems off at the pass. I'm pretty sure you can just rename the file I attached to pre-config.rb, toss it in the project, and once you get the required packages list filled out, you're good to go. The output to the user for this would look like this: Mongrel requires the following Debian packages be installed: * build-essential * ruby1.8-dev Would you like to install these now? [y/n] n Installation canceled. No Mongrel for you. or Mongrel requires the following Debian packages be installed: * build-essential * ruby1.8-dev Would you like to install these now? [y/n] y Installing required packages... Password: (unless you're running gem as root) (apt-get does its thing here) (mongrel goes on installing) That said, I don't have much (read: any) experience with building Gems, so I'm not 100% positive this will work with gems (esp. with the changes to 0.9 regarding extension build output). If I could get a copy of the gemspec for Mongrel (or even be able to check out the SVN files or something) then I'd be willing to spend the time to dial this in perfectly. I'm like 99% sure this will work. It may be quicker for you to give it a shot (add some unrelated and unistalled package to the required list to see what it would look like). (Also, I have no idea what this does on Windows. Passing bash to cmd.exe may provoke a lot of ugly error messages for the user to worry about, so you may want to wrap the whole thing in an architecture check.) (Also, you may want to change the exit codes to something error-y.) -- Coda Hale http://blog.codahale.com From francois.beausoleil at gmail.com Thu Jul 20 15:36:36 2006 From: francois.beausoleil at gmail.com (Francois Beausoleil) Date: Thu, 20 Jul 2006 15:36:36 -0400 Subject: [Mongrel] Apache 2.2, Mongrel and #caches_page Message-ID: <41d5fadf0607201236i1d439a0asb8d59001da6609e@mail.gmail.com> Hi ! I'm no expect when it comes time to configure Apache. I just enabled page caching in my Rails app, and am now looking at making Apache serve the cached files instead of calling into Rails. I know Mongrel is able to serve cached files if it finds them, but I'd like Apache to do it. Looking at .htaccess, there is this section: RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] The last line MUST change because I am proxying. What should it change to is what I'm wondering. I tried: RewriteRule ^(.*)$ balancer://smrty/ [QSA,L] but that simply generates an HTML file that says "Found, document moved here", with here being a link to "balancer://smrty/". Anybody knows what I should be using here ? Thanks ! -- Fran?ois Beausoleil http://blog.teksol.info/ From coda.hale at gmail.com Thu Jul 20 15:42:07 2006 From: coda.hale at gmail.com (Coda Hale) Date: Thu, 20 Jul 2006 12:42:07 -0700 Subject: [Mongrel] Apache 2.2, Mongrel and #caches_page In-Reply-To: <41d5fadf0607201236i1d439a0asb8d59001da6609e@mail.gmail.com> References: <41d5fadf0607201236i1d439a0asb8d59001da6609e@mail.gmail.com> Message-ID: On 7/20/06, Francois Beausoleil wrote: > I'm no expect when it comes time to configure Apache. I just enabled > page caching in my Rails app, and am now looking at making Apache > serve the cached files instead of calling into Rails. > > I know Mongrel is able to serve cached files if it finds them, but I'd > like Apache to do it. > > Looking at .htaccess, there is this section: > > RewriteEngine On > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > The last line MUST change because I am proxying. What should it > change to is what I'm wondering. I tried: > > RewriteRule ^(.*)$ balancer://smrty/ [QSA,L] > > but that simply generates an HTML file that says "Found, document > moved here", with here being a link to "balancer://smrty/". > > Anybody knows what I should be using here ? Try this: RewriteRule ^/(.*)$ balancer://smrty%{REQUEST_URI} [P,QSA,L] -- Coda Hale http://blog.codahale.com From francois.beausoleil at gmail.com Thu Jul 20 16:11:32 2006 From: francois.beausoleil at gmail.com (Francois Beausoleil) Date: Thu, 20 Jul 2006 16:11:32 -0400 Subject: [Mongrel] Apache 2.2, Mongrel and #caches_page In-Reply-To: References: <41d5fadf0607201236i1d439a0asb8d59001da6609e@mail.gmail.com> Message-ID: <41d5fadf0607201311p5633b313y832289c419e02092@mail.gmail.com> Hi ! 2006/7/20, Coda Hale : > RewriteRule ^/(.*)$ balancer://smrty%{REQUEST_URI} [P,QSA,L] Tried it and it didn't work. I also tried keeping only these: RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] But that returned a 403 Forbidden instead. Thanks Coda ! -- Fran?ois Beausoleil http://blog.teksol.info/ From coda.hale at gmail.com Thu Jul 20 16:14:46 2006 From: coda.hale at gmail.com (Coda Hale) Date: Thu, 20 Jul 2006 13:14:46 -0700 Subject: [Mongrel] Apache 2.2, Mongrel and #caches_page In-Reply-To: <41d5fadf0607201311p5633b313y832289c419e02092@mail.gmail.com> References: <41d5fadf0607201236i1d439a0asb8d59001da6609e@mail.gmail.com> <41d5fadf0607201311p5633b313y832289c419e02092@mail.gmail.com> Message-ID: On 7/20/06, Francois Beausoleil wrote: > 2006/7/20, Coda Hale : > > RewriteRule ^/(.*)$ balancer://smrty%{REQUEST_URI} [P,QSA,L] > > Tried it and it didn't work. I also tried keeping only these: > RewriteEngine On > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > > But that returned a 403 Forbidden instead. Huh. Well, you may want to check your config files against mine: http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ -- Coda Hale http://blog.codahale.com From matt at eastmedia.com Thu Jul 20 16:22:29 2006 From: matt at eastmedia.com (Matt Pelletier) Date: Thu, 20 Jul 2006 16:22:29 -0400 Subject: [Mongrel] Apache 2.2, Mongrel and #caches_page In-Reply-To: <41d5fadf0607201311p5633b313y832289c419e02092@mail.gmail.com> References: <41d5fadf0607201236i1d439a0asb8d59001da6609e@mail.gmail.com> <41d5fadf0607201311p5633b313y832289c419e02092@mail.gmail.com> Message-ID: <5346591B-EEB4-488F-90B3-0E179F3FC8D5@eastmedia.com> Francois, This works for me: RewriteEngine On RewriteRule ^/$ /index.html [QSA] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://cruster%{REQUEST_URI} [P,QSA,L] Tested with curl for content and httperf for performance. Matt On Jul 20, 2006, at 4:11 PM, Francois Beausoleil wrote: > Hi ! > > 2006/7/20, Coda Hale : >> RewriteRule ^/(.*)$ balancer://smrty%{REQUEST_URI} [P,QSA,L] > > Tried it and it didn't work. I also tried keeping only these: > RewriteEngine On > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > > But that returned a 403 Forbidden instead. > > Thanks Coda ! > -- > Fran?ois Beausoleil > http://blog.teksol.info/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From francois.beausoleil at gmail.com Thu Jul 20 16:46:11 2006 From: francois.beausoleil at gmail.com (Francois Beausoleil) Date: Thu, 20 Jul 2006 16:46:11 -0400 Subject: [Mongrel] Apache 2.2, Mongrel and #caches_page In-Reply-To: <5346591B-EEB4-488F-90B3-0E179F3FC8D5@eastmedia.com> References: <41d5fadf0607201236i1d439a0asb8d59001da6609e@mail.gmail.com> <41d5fadf0607201311p5633b313y832289c419e02092@mail.gmail.com> <5346591B-EEB4-488F-90B3-0E179F3FC8D5@eastmedia.com> Message-ID: <41d5fadf0607201346n7c6f661do5b11fc58f861da86@mail.gmail.com> 2006/7/20, Matt Pelletier : > RewriteEngine On > RewriteRule ^/$ /index.html [QSA] > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteRule ^/(.*)$ balancer://cruster%{REQUEST_URI} [P,QSA,L] Works for me too. Thanks ! -- Fran?ois Beausoleil http://blog.teksol.info/ From Daniel.Berger at qwest.com Thu Jul 20 18:32:58 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Thu, 20 Jul 2006 16:32:58 -0600 Subject: [Mongrel] A few minor warnings from Sun Studio 11 Message-ID: <44C0049A.8020403@qwest.com> These come courtesy of Sun Studio 11 on Solaris 10 in case you care: "http11.c", line 54: warning: syntax error: empty declaration "http11.c", line 55: warning: syntax error: empty declaration "http11.c", line 56: warning: syntax error: empty declaration "http11.c", line 57: warning: syntax error: empty declaration "http11.c", line 58: warning: syntax error: empty declaration "ext/http11/http11_parser.rl", line 57: warning: statement not reached I'm not sure what to make of the empty declaration warnings. Confusion caused by macros? I have no clue on the parser. 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 chris at ozmm.org Thu Jul 20 20:53:44 2006 From: chris at ozmm.org (Chris Wanstrath) Date: Thu, 20 Jul 2006 17:53:44 -0700 Subject: [Mongrel] RedirectHandler? mongrel_rewrite? Message-ID: Hey guys. I've been playing with RedirectHandler and it's pretty neat, but I question its usefulness. At work we do the trendy "/javascripts/spy.1152734636.js"-style asset includes rather than the default Rails style of "/javascripts/spy.js? 1152734636". This is no problem with mod_rewrite as we run the basic Apache => Pen => Mongrel setup. Now, sometimes we want to run Mongrel in production mode on our dev boxes. In these cases we'd be hitting Mongrel straight-on. As you can imagine, all of the /js/file.number.js includes are 404's. Here's the deal: if I register a RedirectHandler on '/javascripts' and try to redirect to '/javascripts/x', everything explodes. Is there a way around this? I am registering my RedirectHandler using the 'uri' method in a file passed to mongrel_rails via -S. Before RedirectHandler was included in Mongrel we had worked out a solution: a gem_plugin we joking called mongrel_rewrite. You simply create 'config/rewrites.rb' in your Rails root. Ours looks like this: RewriteRules = { /\/(.+)\/(\w+)\.\d+\.(js|css|gif|jpg|png)/ => '/$1/$2.$3' } If the plugin (gem) is installed, it will rewrite params [Mongrel::Const::PATH_INFO] based on this RewriteRules hash (if it can find the config file) by benevolently sitting atop Mongrel::HttpRequest. Works like a charm. Is there a use for this? Am I just setting up my RedirectHandlers wrong? I'd like to do things the Official way, so any help on the RedirectHandler would be appreciated. Thanks. In case anyone wants check this plugin out, it's really similar to the RedirectHandler: - http://code.ozmm.org/rewrite/ --- - [ chris wanstrath, chris at ozmm.org ] - [ http://ozmm.org ] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060720/7e2cdacd/attachment.html From jason at joyent.com Thu Jul 20 22:14:27 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Thu, 20 Jul 2006 19:14:27 -0700 Subject: [Mongrel] A few minor warnings from Sun Studio 11 In-Reply-To: <44C0049A.8020403@qwest.com> References: <44C0049A.8020403@qwest.com> Message-ID: <61648326-365E-4425-AEEF-EAEE13674AE6@joyent.com> On Jul 20, 2006, at 3:32 PM, Daniel Berger wrote: > These come courtesy of Sun Studio 11 on Solaris 10 in case you care: > > "http11.c", line 54: warning: syntax error: empty declaration > "http11.c", line 55: warning: syntax error: empty declaration > "http11.c", line 56: warning: syntax error: empty declaration > "http11.c", line 57: warning: syntax error: empty declaration > "http11.c", line 58: warning: syntax error: empty declaration > > "ext/http11/http11_parser.rl", line 57: warning: statement not reached > > I'm not sure what to make of the empty declaration warnings. > Confusion caused > by macros? > > I have no clue on the parser. > > Regards, > > Dan Yes those don't show up when you compile it correctly on Solaris. I can send a how-to (just need to look it up) and we have sparc and amd64 packages for mongrel. - Jason ?????????????????????????????????????????????????????????????????????? Jason A. Hoffman, PhD | Founder, CTO, Joyent Inc., TextDrive Inc. Email: jason at joyent.com or jason at textdrive.com ?????????????????????????????????????????????????????????????????????? From schwuk at gmail.com Fri Jul 21 01:33:14 2006 From: schwuk at gmail.com (Dave Murphy) Date: Fri, 21 Jul 2006 06:33:14 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <1153412642.6202.10.camel@localhost.localdomain> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <1153377459.10131.13.camel@localhost.localdomain> <2e60a9e60607200729v6fdc9836u9de84330804f1b87@mail.gmail.com> <1153412642.6202.10.camel@localhost.localdomain> Message-ID: <2e60a9e60607202233h7f9fa763ucfe93a2a618ae1b5@mail.gmail.com> On 20/07/06, Zed Shaw wrote: > On Thu, 2006-07-20 at 15:29 +0100, Dave Murphy wrote: > > > > At some point you have to start blaming Debian and stop blaming the > > > users. I hear this one complaint *constantly*. Go look at the bug > > > tracker, forums, and mailing list. #1 recurring bug is Debian not > > > installing build tools to build Mongrel. Even after continually telling > > > people what to do it doesn't help. > > > > Actually, I'd blame the project. It is not documented anywhere (I can > > see) on the Mongrel website that you need to have a compiler installed > > to be to use Mongrel via gems, so how are the users expected to know? > > Dave, you're right, I haven't done anything to help people on Debian. > Nope not a single thing. I haven't done any of these things: Unneccessary. I didn't say you "haven't done anything to help people on Debian". I said the project website tells people how easy it is to get mongrel via gems, but neglects to mention that you need developer tools to do this. That's all. It wasn't meant as a personal attack, so please don't take it as one. -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Fri Jul 21 01:40:34 2006 From: schwuk at gmail.com (Dave Murphy) Date: Fri, 21 Jul 2006 06:40:34 +0100 Subject: [Mongrel] I am a newbie and I would like some help deciding what operating system In-Reply-To: <1153414498.7124.23.camel@localhost.localdomain> References: <06297FB5-7CE6-4051-A63E-A06BEDD9E072@beyertribe.com> <683a886f0607191043q58143856wc6292955e158ce@mail.gmail.com> <2e60a9e60607192241k5da1ee9dq1fc7299a7db9959@mail.gmail.com> <20060720125805.GC5504@suse.de> <2e60a9e60607200721w2b4415c1r994cd524cdf84329@mail.gmail.com> <1153414498.7124.23.camel@localhost.localdomain> Message-ID: <2e60a9e60607202240m1ac3414dk7b43b5747cc769bd@mail.gmail.com> On 20/07/06, Zed Shaw wrote: > You know Dave, it's kind of shameful that you give people instructions > that you don't use yourself. You're running around telling everyone > Debian is easy to use, but how do you know? Eh? I mean, you > "personally don't use the rails package". Yet that's your instructions > to folks. But I do use them myself. I still install Ruby via apt (as described in the original thread on this topic), for which I install six packages including ruby1.8-dev and build-essential. I've not been instructing people to just 'use the rails package', I've been demonstrating that installing rails is not as hard as everyone else is making out. > So don't characterize me as not doing enough for people using Debian. I > find it the height of arrogance that you think I have to bend my project > around that distro's horrible packaging mechanism--a mechanism **you > don't even use**. I didn't characterize you in that way, nor have I asked you to "bend your project". If you feel that I have, then I'm sorry. -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Fri Jul 21 02:05:38 2006 From: schwuk at gmail.com (Dave Murphy) Date: Fri, 21 Jul 2006 07:05:38 +0100 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153417161.7352.13.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: <2e60a9e60607202305m74527963i64ef8f78d0e7262a@mail.gmail.com> On 20/07/06, Zed Shaw wrote: > If there are Debian people who like running Mongrel on their computers > then I'd ask that you step up and help. I've got no chance to write anything this weekend as I'm away, but I'll contribute something next week. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From zedshaw at zedshaw.com Fri Jul 21 02:35:18 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 21 Jul 2006 02:35:18 -0400 Subject: [Mongrel] A few minor warnings from Sun Studio 11 In-Reply-To: <44C0049A.8020403@qwest.com> References: <44C0049A.8020403@qwest.com> Message-ID: <1153463718.5981.27.camel@localhost.localdomain> Hey Dan, that's in the bug list. I just have to change a define. The parser is actually defined in the .rl file (should be in the gem, but if not check svn). I'll fix it though when I tackle the bugs for the 0.3.13.4 release. On Thu, 2006-07-20 at 16:32 -0600, Daniel Berger wrote: > These come courtesy of Sun Studio 11 on Solaris 10 in case you care: > > "http11.c", line 54: warning: syntax error: empty declaration > "http11.c", line 55: warning: syntax error: empty declaration > "http11.c", line 56: warning: syntax error: empty declaration > "http11.c", line 57: warning: syntax error: empty declaration > "http11.c", line 58: warning: syntax error: empty declaration > > "ext/http11/http11_parser.rl", line 57: warning: statement not reached From zedshaw at zedshaw.com Fri Jul 21 02:36:58 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 21 Jul 2006 02:36:58 -0400 Subject: [Mongrel] A few minor warnings from Sun Studio 11 In-Reply-To: <61648326-365E-4425-AEEF-EAEE13674AE6@joyent.com> References: <44C0049A.8020403@qwest.com> <61648326-365E-4425-AEEF-EAEE13674AE6@joyent.com> Message-ID: <1153463818.5981.30.camel@localhost.localdomain> On Thu, 2006-07-20 at 19:14 -0700, Jason A. Hoffman wrote: > On Jul 20, 2006, at 3:32 PM, Daniel Berger wrote: > > These come courtesy of Sun Studio 11 on Solaris 10 in case you care: > > > > "http11.c", line 54: warning: syntax error: empty declaration > > "http11.c", line 55: warning: syntax error: empty declaration > > "http11.c", line 56: warning: syntax error: empty declaration > > "http11.c", line 57: warning: syntax error: empty declaration > > "http11.c", line 58: warning: syntax error: empty declaration > > > > "ext/http11/http11_parser.rl", line 57: warning: statement not reached > > > > I'm not sure what to make of the empty declaration warnings. > > Confusion caused > > by macros? > > > Yes those don't show up when you compile it correctly on Solaris. I > can send a how-to (just need to look it up) and we have sparc and > amd64 packages for mongrel. You also don't get those when you use a compiler that's compliant with the standard (empty declarations are perfectly alright). But hey, when you're Sun you don't need no GCC. (Not that GCC is all that compliant). Zed From zedshaw at zedshaw.com Fri Jul 21 02:41:41 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 21 Jul 2006 02:41:41 -0400 Subject: [Mongrel] RedirectHandler? mongrel_rewrite? In-Reply-To: References: Message-ID: <1153464101.5981.34.camel@localhost.localdomain> On Thu, 2006-07-20 at 17:53 -0700, Chris Wanstrath wrote: > Hey guys. > > > I've been playing with RedirectHandler and it's pretty neat, but I > question its usefulness. > Here's the deal: if I register a RedirectHandler on '/javascripts' and > try to redirect to '/javascripts/x', everything explodes. Is there a > way around this? I am registering my RedirectHandler using the 'uri' > method in a file passed to mongrel_rails via -S. > It does regex and procs as well I believe. I haven't touched it in a bit but take a look and if you see nothing I'll dig it up. > > Before RedirectHandler was included in Mongrel we had worked out a > solution: a gem_plugin we joking called mongrel_rewrite. > > > You simply create 'config/rewrites.rb' in your Rails root. Ours looks > like this: > RewriteRules = { > /\/(.+)\/(\w+)\.\d+\.(js|css|gif|jpg|png)/ => '/$1/$2.$3' > } > > Is there a use for this? Am I just setting up my RedirectHandlers > wrong? I'd like to do things the Official way, so any help on the > RedirectHandler would be appreciated. Just go ahead and offer it up as a gem plugin. If you're not sure how to make one I can walk you through it, but it's pretty simple. I'd say if you're getting in there monkey patching then you're in for a world of hurt pretty soon since code is changing right there. Test it with the 0.3.13.4 pre-release first: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Otherwise, just roll it out and people who need it will install. That's the great thing about gem plugins and Mongrel, you don't have to beg "core" to add your features (and you don't need subversion). Now, if you could find a way to merge your functionality into the current redirect handler then that'd be patch worthy. Check it out and let me know (tests and docs too please). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From kraemer at webit.de Fri Jul 21 06:26:03 2006 From: kraemer at webit.de (Jens Kraemer) Date: Fri, 21 Jul 2006 12:26:03 +0200 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153417161.7352.13.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: <20060721102603.GF28283@cordoba.webit.de> Hi, On Thu, Jul 20, 2006 at 01:39:21PM -0400, Zed Shaw wrote: [..] > I'm currently planning the following changes: > > 1) Specific documentation for Debian. Debian will become the only Unix > distro that requires specific instructions. This should be a sign to > all that maybe it's not the one to use. > 2) Large warnings that you need a compiler. Fair enough, that's a > deficiency all around. > 3) The Rakefile will refuse to build if the extension does not build and > print a more extensive warning. > 4) The Rakefile will warn people running on Debian that they most likely > have to install a lot more packages, pointing them at the instructions. > 5) The mongrel_rails script will check itself to make sure extensions > exist and refuse to run, again pointing people at Debian instructions if > on that system. that really should help. there's no point in continuing the installation of the gem if the build of the native extension didn't succeed - gem should just fail hard in that case, saying what's missing. > If after this I can't reduce the number of people having problems on > Debian then I'm going to publicly declare that I do not support Debian > installs of Mongrel via RubyGems and that they should install via Debian > packages and work with the package maintainer. Why not point people to the debs in the first place ? I'll have new packages up as soon as 0.3.13.4 is out. Honestly, I consider compiling anything on a production system bad practice. Imho nobody running a Debian server should have to compile anything to get a new version of Mongrel installed. Once we get this right Debian is *the* Distro for running Mongrel without pain. Well, besides the fact it doesn't have Apache 2.2 with it's mod_proxy_balance, but that's another story ;-) Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From neil at aldur.co.uk Fri Jul 21 09:58:49 2006 From: neil at aldur.co.uk (Neil Wilson) Date: Fri, 21 Jul 2006 14:58:49 +0100 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153417161.7352.13.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: On 20/07/06, Zed Shaw wrote: > > > If there are Debian people who like running Mongrel on their computers > then I'd ask that you step up and help. The fact that I'm holding back > a release out of frustration from one distro (that I actually use) is > enough for me to not want to support it. I have had less trouble > supporting windows than Debian, which is just insane. Zed, I have written a capistrano based Debian machine builder which builds Debian based Virtual Machines automatically and sits them on top of Xen (it also builds the Xen controller automatically). The idea is to build machines internally for testing purposes and also to bring the Bytemark VM service ( www.bytemark.co.uk) up to a level where you can deploy Rails apps to the machine. Bytemark provide mirror support to both Rubyforge and Debian and they are just up the road from me. The idea was to have the RailsMachine gem deploy onto the base the tool built. But the lack of a Debian Apache 2.2 package has put the mockers on that. So (with extreme respect to the RailMachine crew) I've created an augmentation that is a little more flexible. It handles the automatic backporting of ruby 1.8.4 to Debian Stable and you can choose which release of Debian you want to use on each VM (other than the external Bytemark ones - which are always Sarge). Importantly it also knows all the dependencies required to run the various gems and packages required by Rails and mysql. I have a gem setup (vmbuilder), but I haven't released anything yet because the tool is not quite production ready. There are a lot of holes in it (primarily the lack of an Apache 2.0/pound combination that saves backporting Apache 2.2), but the basic Mongrel/Ruby/Mysql system is fully operational. The documentation is also only half-way there - although its not much more than describing your machine requirements in either Ruby or YAML and then doing 'rake vm:setup'. If anybody would find this useful I'll try and get the Gem up over the weekend. But please remember that it is very half-baked at the moment. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060721/b680a0f6/attachment.html From Daniel.Berger at qwest.com Fri Jul 21 09:56:15 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Fri, 21 Jul 2006 07:56:15 -0600 Subject: [Mongrel] A few minor warnings from Sun Studio 11 In-Reply-To: <61648326-365E-4425-AEEF-EAEE13674AE6@joyent.com> References: <44C0049A.8020403@qwest.com> <61648326-365E-4425-AEEF-EAEE13674AE6@joyent.com> Message-ID: <44C0DCFF.6010403@qwest.com> Jason A. Hoffman wrote: > On Jul 20, 2006, at 3:32 PM, Daniel Berger wrote: >> These come courtesy of Sun Studio 11 on Solaris 10 in case you care: >> >> "http11.c", line 54: warning: syntax error: empty declaration >> "http11.c", line 55: warning: syntax error: empty declaration >> "http11.c", line 56: warning: syntax error: empty declaration >> "http11.c", line 57: warning: syntax error: empty declaration >> "http11.c", line 58: warning: syntax error: empty declaration >> >> "ext/http11/http11_parser.rl", line 57: warning: statement not reached >> >> I'm not sure what to make of the empty declaration warnings. >> Confusion caused >> by macros? >> >> I have no clue on the parser. >> >> Regards, >> >> Dan > > Yes those don't show up when you compile it correctly on Solaris. I > can send a how-to (just need to look it up) and we have sparc and > amd64 packages for mongrel. > > - Jason I should have included my setup: CC=cc CFLAGS='-dalign -fns -xbuiltin=%all -xlibmil -xtarget=ultra2e -xO5 -xipo' LDSHARED='cc -G -xO5 -xipo -xtarget=ultra2e' LDFLAGS='-xO5 -xipo -xtarget=ultra2e' EXTLDFLAGS='-xO5 -xipo -xtarget=ultra2e' It's a stock Sunblade 150, btw. If those flags aren't ideal, I'd love to know what 'correct' settings are, as I'm fairly new to Sun's cc. I switched to it because I wanted to use blastwave packages and I was tired of dealing with the gcc compatibility issues. If you have packages for Solaris, may I ask where they are? And can we get them on blastwave? :) 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 Daniel.Berger at qwest.com Fri Jul 21 09:58:27 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Fri, 21 Jul 2006 07:58:27 -0600 Subject: [Mongrel] A few minor warnings from Sun Studio 11 In-Reply-To: <1153463818.5981.30.camel@localhost.localdomain> References: <44C0049A.8020403@qwest.com><61648326-365E-4425-AEEF-EAEE13674AE 6@joyent.com> <1153463818.5981.30.camel@localhost.localdomain> Message-ID: <44C0DD83.4040608@qwest.com> Zed Shaw wrote: > On Thu, 2006-07-20 at 19:14 -0700, Jason A. Hoffman wrote: >> On Jul 20, 2006, at 3:32 PM, Daniel Berger wrote: >>> These come courtesy of Sun Studio 11 on Solaris 10 in case you care: >>> >>> "http11.c", line 54: warning: syntax error: empty declaration >>> "http11.c", line 55: warning: syntax error: empty declaration >>> "http11.c", line 56: warning: syntax error: empty declaration >>> "http11.c", line 57: warning: syntax error: empty declaration >>> "http11.c", line 58: warning: syntax error: empty declaration >>> >>> "ext/http11/http11_parser.rl", line 57: warning: statement not reached >>> >>> I'm not sure what to make of the empty declaration warnings. >>> Confusion caused >>> by macros? >>> > >> Yes those don't show up when you compile it correctly on Solaris. I >> can send a how-to (just need to look it up) and we have sparc and >> amd64 packages for mongrel. > > You also don't get those when you use a compiler that's compliant with > the standard (empty declarations are perfectly alright). But hey, when > you're Sun you don't need no GCC. (Not that GCC is all that compliant). Indeed, I've found gcc's warnings have gone from 'slightly annoying' in the 3.x branch to 'complete bullshit' in the 4.x branch, which I only just tried recently. - 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 stonelists at gmail.com Fri Jul 21 10:34:55 2006 From: stonelists at gmail.com (Andrew Stone) Date: Fri, 21 Jul 2006 10:34:55 -0400 Subject: [Mongrel] The Debian Plan In-Reply-To: References: <1153417161.7352.13.camel@localhost.localdomain> <1153420546.7931.6.camel@localhost.localdomain> Message-ID: > > Mongrel requires the following Debian packages be installed: > * build-essential > * ruby1.8-dev > > Probably a dumb question, but what if the user didn't install the ruby1.8-dev package but built ruby? Wouldn't this check fail in that instance and block the installation? I don't install any ruby packages on debian. I build ruby/gems and use gems as my package management. -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060721/9c30d1a7/attachment.html From zedshaw at zedshaw.com Fri Jul 21 12:04:36 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 21 Jul 2006 12:04:36 -0400 Subject: [Mongrel] The Debian Plan In-Reply-To: <20060721102603.GF28283@cordoba.webit.de> References: <1153417161.7352.13.camel@localhost.localdomain> <20060721102603.GF28283@cordoba.webit.de> Message-ID: <1153497876.5996.1.camel@localhost.localdomain> On Fri, 2006-07-21 at 12:26 +0200, Jens Kraemer wrote: > Hi, > > that really should help. there's no point in continuing the installation > of the gem if the build of the native extension didn't succeed - gem > should just fail hard in that case, saying what's missing. > > > If after this I can't reduce the number of people having problems on > > Debian then I'm going to publicly declare that I do not support Debian > > installs of Mongrel via RubyGems and that they should install via Debian > > packages and work with the package maintainer. > > Why not point people to the debs in the first place ? I'll have new > packages up as soon as 0.3.13.4 is out. > Can you crank up a short e-mail of instructions for this and I'll put it in the Debian uber doc I'm compiling? That's basically what I'm saying in the "final option". Problem is people go *right* for rubygems, then go right to me when it doesn't work. So I've got work to do. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Jul 21 12:06:25 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 21 Jul 2006 12:06:25 -0400 Subject: [Mongrel] The Debian Plan In-Reply-To: References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: <1153497985.5996.4.camel@localhost.localdomain> > > I have written a capistrano based Debian machine builder which builds > Debian based Virtual Machines automatically and sits them on top of > Xen (it also builds the Xen controller automatically). The idea is to > build machines internally for testing purposes and also to bring the > Bytemark VM service ( www.bytemark.co.uk) up to a level where you can > deploy Rails apps to the machine. Bytemark provide mirror support to > both Rubyforge and Debian and they are just up the road from me. You should either get with the railsmachine folks and contribute back or you should setup a project page for it. I'm sure people would want it badly, just expect to do a lot more work to "productionize" it for other folks before their happy with it. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From chris at octopod.info Fri Jul 21 12:24:39 2006 From: chris at octopod.info (Chris McGrath) Date: Fri, 21 Jul 2006 17:24:39 +0100 Subject: [Mongrel] The Debian Plan In-Reply-To: References: <1153417161.7352.13.camel@localhost.localdomain> Message-ID: On 21 Jul 2006, at 14:58, Neil Wilson wrote: > > I have written a capistrano based Debian machine builder which > builds Debian based Virtual Machines automatically and sits them on > top of Xen (it also builds the Xen controller automatically). The > idea is to build machines internally for testing purposes and also > to bring the Bytemark VM service ( www.bytemark.co.uk) up to a > level where you can deploy Rails apps to the machine. Bytemark > provide mirror support to both Rubyforge and Debian and they are > just up the road from me. > > The idea was to have the RailsMachine gem deploy onto the base the > tool built. But the lack of a Debian Apache 2.2 package has put the > mockers on that. So (with extreme respect to the RailMachine crew) > I've created an augmentation that is a little more flexible. > > It handles the automatic backporting of ruby 1.8.4 to Debian Stable > and you can choose which release of Debian you want to use on each > VM (other than the external Bytemark ones - which are always > Sarge). Importantly it also knows all the dependencies required to > run the various gems and packages required by Rails and mysql. > > I have a gem setup (vmbuilder), but I haven't released anything yet > because the tool is not quite production ready. There are a lot of > holes in it (primarily the lack of an Apache 2.0/pound combination > that saves backporting Apache 2.2), but the basic Mongrel/Ruby/ > Mysql system is fully operational. > > The documentation is also only half-way there - although its not > much more than describing your machine requirements in either Ruby > or YAML and then doing 'rake vm:setup'. > > If anybody would find this useful I'll try and get the Gem up over > the weekend. But please remember that it is very half-baked at the > moment. Very cool! I'm going through this process manually at the moment, mainly to get to know the various bits of software I haven't used before. I have a machine here I can reinstall Debian on over and over so let me know if you want help testing it out. Chers Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060721/0115a2ea/attachment.html From coda.hale at gmail.com Fri Jul 21 13:41:35 2006 From: coda.hale at gmail.com (Coda Hale) Date: Fri, 21 Jul 2006 10:41:35 -0700 Subject: [Mongrel] The Debian Plan In-Reply-To: References: <1153417161.7352.13.camel@localhost.localdomain> <1153420546.7931.6.camel@localhost.localdomain> Message-ID: On 7/21/06, Andrew Stone wrote: > Probably a dumb question, but what if the user didn't install the > ruby1.8-dev package but built ruby? Wouldn't this check fail in that > instance and block the installation? > > I don't install any ruby packages on debian. I build ruby/gems and use > gems as my package management. Not dumb at all, Andrew. Actually something I totally forgot to take into consideration. Thanks for bringing it up. I've re-written the script, and now the flow goes like this: If ruby1.8 is installed, check to see that build-essential and ruby1.8-dev are installed as well. If not, the user is prompted to install them. They have the option of declining, in which case they're warned that the compile will in all likelihood explode, and are they sure they'd really like to do that? If ruby1.8 is not installed, we check to see that the ruby interpreter is installed (/usr/bin/env ruby, like the scripts), and prompt the user with a warning to make sure their Ruby header files are in the right place and goes on with the compile. If ruby1.8 isn't installed and we can't find the ruby interpreter, we're off the maps so we let the user go ahead and sail off the edge of the earth. Whee! Now the only fixed exit point is when the installation of the required packages fails, which I think is a reasonable place to keel over dead. Also, it now checks to see that we're not on Windows, so we don't startle cmd.exe with all sorts of stderr redirection crazytalk. Zed--dropping this file in the Mongrel root directory (i.e., right next to setup.rb) will indeed get the jump on the rest of the installation process, including the extension building. Any exit within pre-config kills the entire setup process. Would various people mind running this and making sure I'm not forgetting something else? -- Coda Hale http://blog.codahale.com -------------- next part -------------- A non-text attachment was scrubbed... Name: pre-config.rb Type: application/octet-stream Size: 2212 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060721/ef70d818/attachment.obj From jason at joyent.com Fri Jul 21 20:18:15 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Fri, 21 Jul 2006 17:18:15 -0700 Subject: [Mongrel] A few minor warnings from Sun Studio 11 In-Reply-To: <44C0DD83.4040608@qwest.com> References: <44C0049A.8020403@qwest.com><61648326-365E-4425-AEEF-EAEE13674AE 6@joyent.com> <1153463818.5981.30.camel@localhost.localdomain> <44C0DD83.4040608@qwest.com> Message-ID: <727DDB42-1E79-468D-81C4-0B6C841C88E0@joyent.com> On Jul 21, 2006, at 6:58 AM, Daniel Berger wrote: > Zed Shaw wrote: >> On Thu, 2006-07-20 at 19:14 -0700, Jason A. Hoffman wrote: >>> On Jul 20, 2006, at 3:32 PM, Daniel Berger wrote: >>>> These come courtesy of Sun Studio 11 on Solaris 10 in case you >>>> care: >>>> >>>> "http11.c", line 54: warning: syntax error: empty declaration >>>> "http11.c", line 55: warning: syntax error: empty declaration >>>> "http11.c", line 56: warning: syntax error: empty declaration >>>> "http11.c", line 57: warning: syntax error: empty declaration >>>> "http11.c", line 58: warning: syntax error: empty declaration >>>> >>>> "ext/http11/http11_parser.rl", line 57: warning: statement not >>>> reached >>>> >>>> I'm not sure what to make of the empty declaration warnings. >>>> Confusion caused >>>> by macros? >>>> >> >>> Yes those don't show up when you compile it correctly on Solaris. I >>> can send a how-to (just need to look it up) and we have sparc and >>> amd64 packages for mongrel. >> >> You also don't get those when you use a compiler that's compliant >> with >> the standard (empty declarations are perfectly alright). But hey, >> when >> you're Sun you don't need no GCC. (Not that GCC is all that >> compliant). > > Indeed, I've found gcc's warnings have gone from 'slightly > annoying' in the 3.x > branch to 'complete bullshit' in the 4.x branch, which I only just > tried recently. I just put it up at http://joyeur.com/2006/07/21/a-mongrel-endorsement-and-a-manual-fix- for-installing-mongrel-on-solaris-1011 Because I also still owed Zed some blurbage. - Jason From neil at aldur.co.uk Sat Jul 22 08:35:33 2006 From: neil at aldur.co.uk (Neil Wilson) Date: Sat, 22 Jul 2006 13:35:33 +0100 Subject: [Mongrel] [ANN] VmBuilder released Message-ID: At the prompting of several kind souls on the list, I've placed an early release of my Virtual Machine Builder gem on rubyforge at http://rubyforge.org/projects/vmbuilder/. Documentation at http://vmbuilder.rubyforge.org/ The gem builds Xen masters and Xen based VMs from scratch using Debian that are ready to accept Rails apps (although at the moment it is missing the Web server part!). The system is designed to allow you to build test and staging machines quickly and easily to the same specification as the commercial VMs so that you can see how your app works in the limited VM environment. A lot of the tool deals with handling things like PKI infrastructure and managing the Debian APT system via Capistrano/Rake. These should in theory be easy to crib and get working separately for those struggling to get Mongrel working on Debian. Feedback gratefully received. -- Neil Wilson (neil at aldur.co.uk) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060722/e62c470d/attachment.html From ezmobius at gmail.com Sat Jul 22 14:21:17 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Sat, 22 Jul 2006 11:21:17 -0700 Subject: [Mongrel] [ANN] VmBuilder released In-Reply-To: References: Message-ID: On Jul 22, 2006, at 5:35 AM, Neil Wilson wrote: > At the prompting of several kind souls on the list, I've placed an > early release of my Virtual Machine Builder gem on rubyforge at > http://rubyforge.org/projects/vmbuilder/ . Documentation at http:// > vmbuilder.rubyforge.org/ > > The gem builds Xen masters and Xen based VMs from scratch using > Debian that are ready to accept Rails apps (although at the moment > it is missing the Web server part!). The system is designed to > allow you to build test and staging machines quickly and easily to > the same specification as the commercial VMs so that you can see > how your app works in the limited VM environment. > > A lot of the tool deals with handling things like PKI > infrastructure and managing the Debian APT system via Capistrano/ > Rake. These should in theory be easy to crib and get working > separately for those struggling to get Mongrel working on Debian. > > Feedback gratefully received. > > -- > Neil Wilson (neil at aldur.co.uk) > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users Niel - This is really cool. Very similar to some stuff I have been working on. Thanks for releasing it! Cheers- -Ezra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060722/47d44922/attachment.html From kevwil at gmail.com Sat Jul 22 19:38:54 2006 From: kevwil at gmail.com (Kevin Williams) Date: Sat, 22 Jul 2006 17:38:54 -0600 Subject: [Mongrel] using MongrelDbg Message-ID: <683a886f0607221638m281900ccge1e231073c0525fc@mail.gmail.com> I coded up a handler, using the MongrelDbg module to help me debug. I deployed my code and found it royally broken in production because it couldn't include that module. What's the best practice for having MongrelDbg in code and not breaking in different environments? Is this just a bug? I commented out all my MongrelDbg usage and redeployed, and it works now. -- Cheers, Kevin From zedshaw at zedshaw.com Sun Jul 23 03:44:19 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 23 Jul 2006 03:44:19 -0400 Subject: [Mongrel] using MongrelDbg In-Reply-To: <683a886f0607221638m281900ccge1e231073c0525fc@mail.gmail.com> References: <683a886f0607221638m281900ccge1e231073c0525fc@mail.gmail.com> Message-ID: <1153640659.6098.2.camel@localhost.localdomain> On Sat, 2006-07-22 at 17:38 -0600, Kevin Williams wrote: > I coded up a handler, using the MongrelDbg module to help me debug. I > deployed my code and found it royally broken in production because it > couldn't include that module. > > What's the best practice for having MongrelDbg in code and not > breaking in different environments? Is this just a bug? I commented > out all my MongrelDbg usage and redeployed, and it works now. > Actually the best practice is to not actually use that in your code. It's pretty much internal Mongrel code only used when you *temporarily* put Mongrel unto -B (debug) mode. The main nasty part of that module is the object tracking stuff, which I'm actually rewriting with something much lighter. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From kevwil at gmail.com Sun Jul 23 11:44:29 2006 From: kevwil at gmail.com (Kevin Williams) Date: Sun, 23 Jul 2006 09:44:29 -0600 Subject: [Mongrel] using MongrelDbg In-Reply-To: <1153640659.6098.2.camel@localhost.localdomain> References: <683a886f0607221638m281900ccge1e231073c0525fc@mail.gmail.com> <1153640659.6098.2.camel@localhost.localdomain> Message-ID: <683a886f0607230844u24d21e0bm2984e1c6dce005c2@mail.gmail.com> OK, fair enough. I'll leave it commented out. On 7/23/06, Zed Shaw wrote: > On Sat, 2006-07-22 at 17:38 -0600, Kevin Williams wrote: > > I coded up a handler, using the MongrelDbg module to help me debug. I > > deployed my code and found it royally broken in production because it > > couldn't include that module. > > > > What's the best practice for having MongrelDbg in code and not > > breaking in different environments? Is this just a bug? I commented > > out all my MongrelDbg usage and redeployed, and it works now. > > > > Actually the best practice is to not actually use that in your code. > It's pretty much internal Mongrel code only used when you *temporarily* > put Mongrel unto -B (debug) mode. > > The main nasty part of that module is the object tracking stuff, which > I'm actually rewriting with something much lighter. > > > -- > 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 > -- Cheers, Kevin From martin_longo at hotmail.com Sun Jul 23 17:49:10 2006 From: martin_longo at hotmail.com (Martin Longo) Date: Sun, 23 Jul 2006 14:49:10 -0700 Subject: [Mongrel] Mongrel, Apache 2.2, Rails question. HELP! Message-ID: Sorry to bother you with a Rails "newbie"-like question, but I have been tearing my hair out for a couple of days with the deployment scenario I am trying to setup. I use a service provider that supports multiple domains via Virtual Hosts. I have all the software installed and "working". I want to deploy two apps under my domain and have the following in my .conf file: Redirect /app1 http://www.mydomain.com/app1/ ProxyPass /app1/ http://localhost:3000/ ProxyPassReverse /app1/ http://localhost:3000/ Redirect /app2 http://www.mydomain.com/app2/ ProxyPass /app2/ http://localhost:3001/ ProxyPassReverse /app2/ http://localhost:3001/ ProxyPreserveHost On Everything seems to work fine from my browser when I enter things like: www.mydomain.com/app1 www.mydomain.com/app1/ www.mydomain.com/app1/controller/action etc... The problem occurs when I am on one of those pages (say www.mydomain.com/app1/controller/action) and the controller does something like: redirect_back_or_default(:controller => '/account', :action => 'index') then I get the following error: Not Found The requested URL /controller/action was not found on this server. Apache/2.0.52 (CentOS) Server at www.mydomain.com Port 80 I know that I am missing something REALLY simple here! Somehow I need to have "appX" prepended in this scenario? If so, how do I do that? If not, do you have any idea what I am doing wrong? Thanks SO much for taking the time to help someone new to Rails with a question! Thanks!, Martin From stonelists at gmail.com Sun Jul 23 18:52:28 2006 From: stonelists at gmail.com (Andrew Stone) Date: Sun, 23 Jul 2006 18:52:28 -0400 Subject: [Mongrel] Kubuntu, Apache 2.2, Mongrel, Mongrel Cluster Message-ID: I've spent today setting up my new config using Apache 2.2, Mongrel, Mongrel Cluster. Haven't delved into Capistrano just yet. Attached is the list of steps I took from building apache 2.2 (no packages available for kubuntu), building Ruby and RubyGems to configuring Apache 2.2, etc.. etc.. ending up with a working rails application. This is definitely not my forte, but it's working and I had to jump around to a few different sites before everything worked so I thought I'd save someone else the steps. If you see some stuff I did wrong, please point them out to help others and me :). I'm no guru at server configurations. Thanks to everyone for their work and various documentation. The following sites are the main ones I used for getting this done, but there were a few others (I didn't keep track of) that had some nuggets of good info. http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ http://mongrel.rubyforge.org/docs/ http://httpd.apache.org/docs/2.2/ Hope someone finds this useful. -andy Note: There additional packages/gems you may not need. I needed them for my app so they are in this notes file. -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060723/34e20e45/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: new_notes Type: application/octet-stream Size: 5801 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060723/34e20e45/attachment.obj From stonelists at gmail.com Sun Jul 23 19:40:20 2006 From: stonelists at gmail.com (Andrew Stone) Date: Sun, 23 Jul 2006 19:40:20 -0400 Subject: [Mongrel] Fwd: [Rails] Kubuntu, Apache 2.2, Mongrel, Mongrel Cluster In-Reply-To: References: <3E3D57E8-BE4C-4301-AA20-4A96384B9762@dankohn.com> Message-ID: Good suggestion, thanks. Also found a small error (lack of a cd command). The following is the entire notes: #~~~~~~~~~~~~~~~ #Starting notes #~~~~~~~~~~~~~~~ #get some necessary packages before beginning #some are used to build ruby, some are required #for gems that will be installed/built later sudo wajig install build-essential libssl-dev ssl-cert libssl0.9.8 openssl slapd ldap-utils libldap2 imagemagick libmagick9 libmagick9-dev libldap2-dev memcached zlib1g zlib1g-dev #dowload apache2.2 source and extract #in apache2.2 source dir #apache 2.2 configure ./configure --prefix=/etc/apache2 --enable-cache --enable-mem-cache --enable-deflate --enable-proxy --enable-proxy-html --enable-proxy-balancer --enable-rewrite make sudo make install #download Ruby source #edit ext/Setup to look like: #~~~~~~~~~~~~~ #begin ext/Setup #~~~~~~~~~~~~~ option nodynamic #Win32API bigdecimal curses dbm digest digest/md5 digest/rmd160 digest/sha1 digest/sha2 #dl etc enumerator fcntl #gdbm iconv #io/wait nkf #pty openssl racc/cparse readline #sdbm socket stringio strscan syck syslog #tcltklib #tk #win32ole zlib #~~~~~~~~~~~~~~~ #end ext/Setup #~~~~~~~~~~~~~~~ #in ruby source dir ./configure make sudo make install #dowload ruby gems source, tar -xvzf ruby-source #in ruby source dir ruby setup.rb #if you receive permission error on creating directories, manually create them gem install rails --include-dependencies gem install daemons gem_plugin mongrel mongrel_cluster sendfile --include-dependencies gem install rmagick postgres-pr memcache-client vim-ruby pdf_writer --include-dependencies #In your rails app dir #create the config/mongrel_cluster.yml #-e : environment (production, development (default)) #-p : port #-a : address (using localhost) #-N : number of clients #-c : work dir (should be RAILS_ROOT dir of application) mongrel_rails cluster::configure -e development -p 8000 -a 127.0.0.1 -N 2 -c /var/www/ #configure mongrel cluster as system service cd /etc/init.d sudo ln -s /usr/local/lib/ruby/gems/1.8/gems/mongrel_cluster-0.2.0/resources/mongrel_cluster mongrel_cluster sudo chmod +x mongrel_cluster sudo /usr/sbin/update-rc.d mongrel_cluster defaults #fyi: to remove #sudo /usr/sbin/update-rc.d mongrel_cluster remove cd /etc sudo mkdir mongrel_cluster cd mongrel_cluster sudo ln -s /var/www//config/mongrel_cluster.yml .yml #apache configuration sudo cp httpd.conf httpd.conf.orig sudo vi httpd.conf #change DocumentRoot defining htdocs #DocumentRoot "/var/www" #change Directory defining htdocs #Directory "/var/www"> #create a common configuration that applies to all apps sudo vi /etc/apache2/conf/common.conf #~~~~~~~~~~~~~~~ #begin common.conf #~~~~~~~~~~~~~~~ UseCanonicalName Off ServerSignature On Options FollowSymLinks Allow from all #~~~~~~~~~~~~~~~~~ #end common.conf #~~~~~~~~~~~~~~~~~ #vhost definition cd /etc/apache2/conf/extra sudo cp httpd-vhosts.conf httpd-vhosts.conf.orig sudo vi httpd-vhost.conf #~~~~~~~~~~~~~~~~~~ #begin httpd-vhosts.conf #~~~~~~~~~~~~~~~~~~ NameVirtualHost *:80 ServerAdmin ServerName .com DocumentRoot /var/www//public ErrorLog /var/log/apache2/_error_log CustomLog /var/log/apache2/_access_log combined /public> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! ProxyPass /favicon.ico ! ProxyPass / balancer://_cluster ProxyPreserveHost On _cluster> BalancerMember http://127.0.0.1:8000 BalancerMember http://127.0.0.1:8001 RewriteEngine On # Uncomment for rewrite debugging #RewriteLog /var/log/apache2/_rewrite_log #RewriteLogLevel 9 # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch bMSIE !no-gzip !gzip-only-text/html # Uncomment for deflate debugging #DeflateFilterNote Input input_info #DeflateFilterNote Output output_info #DeflateFilterNote Ratio ratio_info #LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate #CustomLog /var/log/apache2/_deflate_log deflate #~~~~~~~~~~~ #end httpd-vhosts.conf #~~~~~~~~~~~ cd /etc/apache2/conf sudo vi httpd.conf #first line under Supplemental configuration #include your common.conf Includ conf/common.conf #enable vhosts in /etc/apache2/conf/httpd.conf #uncomment the following Include conf/extra/httpd-vhosts.conf #start/stop by using sudo /etc/apache2/bin/apachectl (start|stop) #~~~~~~~~~~~~~~~ #ending notes #~~~~~~~~~~~~~~~ I really hope this formats okay... -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060723/5e80ad39/attachment-0001.html From snacktime at gmail.com Sun Jul 23 19:40:42 2006 From: snacktime at gmail.com (snacktime) Date: Sun, 23 Jul 2006 16:40:42 -0700 Subject: [Mongrel] mongrel 0.3.13.3 in debug mode chewing up memory Message-ID: <1f060c4c0607231640n1ffa79c5v49f5948ac7a175e@mail.gmail.com> In development mode with debug turned on mongrel adds several mb of memory per request. This is on freebsd 6.1-RELEASE Is this normal? Chris From snacktime at gmail.com Sun Jul 23 19:49:39 2006 From: snacktime at gmail.com (snacktime) Date: Sun, 23 Jul 2006 16:49:39 -0700 Subject: [Mongrel] Persistant database connections with custom handler Message-ID: <1f060c4c0607231649k5416b793sf779b1261a7913ad@mail.gmail.com> I've been looking at using mongrel for a lightweight web service I want to do in ruby. Everything looks pretty simple, but I'm wondering what would be a good way to persist database connections? Is there an easy way to use activerecord in a custom handler and use it's connection pooling? Chris From snacktime at gmail.com Sun Jul 23 19:51:02 2006 From: snacktime at gmail.com (snacktime) Date: Sun, 23 Jul 2006 16:51:02 -0700 Subject: [Mongrel] mongrel 0.3.13.3 in debug mode chewing up memory In-Reply-To: <1f060c4c0607231640n1ffa79c5v49f5948ac7a175e@mail.gmail.com> References: <1f060c4c0607231640n1ffa79c5v49f5948ac7a175e@mail.gmail.com> Message-ID: <1f060c4c0607231651l3a2722fdh1f759714cecb583b@mail.gmail.com> Forgot to mention this is with rails On 7/23/06, snacktime wrote: > In development mode with debug turned on mongrel adds several mb of > memory per request. This is on freebsd 6.1-RELEASE Is this normal? > > Chris > From zedshaw at zedshaw.com Mon Jul 24 01:43:28 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 24 Jul 2006 01:43:28 -0400 Subject: [Mongrel] mongrel 0.3.13.3 in debug mode chewing up memory In-Reply-To: <1f060c4c0607231640n1ffa79c5v49f5948ac7a175e@mail.gmail.com> References: <1f060c4c0607231640n1ffa79c5v49f5948ac7a175e@mail.gmail.com> Message-ID: <1153719808.6099.8.camel@localhost.localdomain> On Sun, 2006-07-23 at 16:40 -0700, snacktime wrote: > In development mode with debug turned on mongrel adds several mb of > memory per request. This is on freebsd 6.1-RELEASE Is this normal? Yeah, debug should really be renamed "emergency no damn clue what's going on" mode. It's only meant to be run for a short period of time to find out what's happening. I've got a revised memory checking system that should cut down on lots of the ram being used and is much more useful. Check for this in the future, but otherwise it'll eat ram fast. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Jul 24 01:45:45 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 24 Jul 2006 01:45:45 -0400 Subject: [Mongrel] Persistant database connections with custom handler In-Reply-To: <1f060c4c0607231649k5416b793sf779b1261a7913ad@mail.gmail.com> References: <1f060c4c0607231649k5416b793sf779b1261a7913ad@mail.gmail.com> Message-ID: <1153719945.6099.12.camel@localhost.localdomain> On Sun, 2006-07-23 at 16:49 -0700, snacktime wrote: > I've been looking at using mongrel for a lightweight web service I > want to do in ruby. Everything looks pretty simple, but I'm wondering > what would be a good way to persist database connections? Is there an > easy way to use activerecord in a custom handler and use it's > connection pooling? The mongrel handlers are registered as one object per each URI you put in the classifier (each time do "uri '/', BlahHandler.new). This means that any class variables are persistent between connections. Also means you needs to thread lock those real quick if the connector isn't thread safe. It's doable but don't expect it to be ultra nice. Only do this if you really need the ultra speed and test the results periodically to see if it actually is faster than a rails version. You most likely won't get greater performance off a Mongrel only handler unless you also do some good caching. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Jul 24 01:48:12 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 24 Jul 2006 01:48:12 -0400 Subject: [Mongrel] Mongrel, Apache 2.2, Rails question. HELP! In-Reply-To: References: Message-ID: <1153720092.6099.15.camel@localhost.localdomain> On Sun, 2006-07-23 at 14:49 -0700, Martin Longo wrote: > Sorry to bother you with a Rails "newbie"-like question, but I have been > tearing my hair out for a couple of days with the deployment scenario I am > trying to setup. I use a service provider that supports multiple domains via > Virtual Hosts. I have all the software installed and "working". I want to > deploy two apps under my domain and have the following in my .conf file: > > Everything seems to work fine from my browser when I enter things like: Hi Martin, try out the 0.3.13.4 pre-release and use the --prefix argument: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ mongrel_rails start -e production --prefix /app1 This will mount the rails controller at /app1 so that your routing and such will work. It tends to work better when the whole app is at /app1 or /app2 rather than some half-between with some stuff at / and some stuff at /app[1,2]. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From pedro at pedrocr.net Mon Jul 24 12:46:10 2006 From: pedro at pedrocr.net (=?ISO-8859-1?Q?Pedro_C=F4rte-Real?=) Date: Mon, 24 Jul 2006 17:46:10 +0100 Subject: [Mongrel] Mongrel and request.uri Message-ID: <62e8012c0607240946l74e2576dgb998b7f94e53835b@mail.gmail.com> Is there any reason for Mongrel to be stripping request.uri as described in this bug report: http://rubyforge.org/tracker/index.php?func=detail&aid=5103&group_id=1306&atid=5145 I was planning on using mongrel to deploy my app but my login code depends on the full request.uri to redirect back after login. Greetings, Pedro. From francois.beausoleil at gmail.com Mon Jul 24 14:43:18 2006 From: francois.beausoleil at gmail.com (Francois Beausoleil) Date: Mon, 24 Jul 2006 14:43:18 -0400 Subject: [Mongrel] Minor doc patch for mongrel_cluster page Message-ID: <41d5fadf0607241143s57d71b98gb1914b93af9e2dfe@mail.gmail.com> Hello All, Zed, Just a minor patch to say how to setup /etc/init.d/mongrel_cluster for the default runlevels. Enjoy ! -- Fran?ois Beausoleil http://blog.teksol.info/ -------------- next part -------------- A non-text attachment was scrubbed... Name: debian-docs.patch Type: application/octet-stream Size: 629 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060724/b60f15f2/attachment.obj From zedshaw at zedshaw.com Mon Jul 24 19:03:16 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 24 Jul 2006 19:03:16 -0400 Subject: [Mongrel] Mongrel and request.uri In-Reply-To: <62e8012c0607240946l74e2576dgb998b7f94e53835b@mail.gmail.com> References: <62e8012c0607240946l74e2576dgb998b7f94e53835b@mail.gmail.com> Message-ID: <1153782196.5751.0.camel@localhost.localdomain> On Mon, 2006-07-24 at 17:46 +0100, Pedro C?rte-Real wrote: > Is there any reason for Mongrel to be stripping request.uri as > described in this bug report: > > http://rubyforge.org/tracker/index.php?func=detail&aid=5103&group_id=1306&atid=5145 > > I was planning on using mongrel to deploy my app but my login code > depends on the full request.uri to redirect back after login. Hi Pedro, I'm getting around to fixing that shortly. It'll be in 0.3.13.4 when I release that. Zed From gethemant at gmail.com Mon Jul 24 20:11:36 2006 From: gethemant at gmail.com (hemant) Date: Tue, 25 Jul 2006 05:41:36 +0530 Subject: [Mongrel] problem with *.foobar.com urls Message-ID: I am using Apache2.2 + mod_proxy_balancer + mongrel setup and my mongrel.conf file(for apache is like this) 2 3 4 BalancerMember http://127.0.0.1:9000 5 BalancerMember http://127.0.0.1:9001 6 BalancerMember http://127.0.0.1:9002 7 8 9 10 ServerAdmin rags at fasia.com 11 ServerName *.foobar.com 12 ServerAlias foobar.com 13 ProxyPass / balancer://mongrel_cluster/ 14 # ProxyPassReverse / balancer://mongrel_cluster/ 15 # ErrorLog /usr/local/apache2/logs/mon.log 16 # CustomLog /var/log/apache/apache_access_log combined 17 18 19 20 SetHandler balancer-manager 21 Now, i get pages for foobar.com allright, but if i try to view pages for us.foobar.com, i get Forbidden Error. Though, when i manually enter, http://us.foobar.com:9001, then i get corrpesponding page for that country allright. So, my wild guess is mod_proxy_balancer is messing things a little. Any clues? -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060725/b4b8d15e/attachment.html From snacktime at gmail.com Tue Jul 25 13:51:19 2006 From: snacktime at gmail.com (snacktime) Date: Tue, 25 Jul 2006 10:51:19 -0700 Subject: [Mongrel] Getting ssl environment to mongrel from apache Message-ID: <1f060c4c0607251051p6259b536hf00c529dd9be0c9f@mail.gmail.com> I have apache 1.3 with mod_ssl in front of mongrel/rails. Apache is setup to require client certification, and I'm trying to figure out how to pass the ssl env variables to mongrel. Here is the apache config to proxy requests to mongrel. I haven't tried to pass env variables like this before so I'm not sure if it's the apache config I have wrong, if mongrel isn't picking up the env variables I am setting, or if it's just not possible to do what I'm trying to do. Any guidance would be appreciated. ProxyPass /xml/ http://localhost:88/xml/ RewriteEngine On RewriteRule ^/xml/(.*) /xml/$1 [P,E=SSL_CLIENT_CERT:%{SSL_CLIENT_CERT}] From snacktime at gmail.com Tue Jul 25 14:01:23 2006 From: snacktime at gmail.com (snacktime) Date: Tue, 25 Jul 2006 11:01:23 -0700 Subject: [Mongrel] Getting ssl environment to mongrel from apache In-Reply-To: <1f060c4c0607251051p6259b536hf00c529dd9be0c9f@mail.gmail.com> References: <1f060c4c0607251051p6259b536hf00c529dd9be0c9f@mail.gmail.com> Message-ID: <1f060c4c0607251101s3a4b476fif79c3895c6b7d20a@mail.gmail.com> > > ProxyPass /xml/ http://localhost:88/xml/ > RewriteEngine On > RewriteRule ^/xml/(.*) /xml/$1 [P,E=SSL_CLIENT_CERT:%{SSL_CLIENT_CERT}] > One note on this, I've also tried the following (the above is just one of my last efforts): [P,E=SSL_CLIENT_CERT:%{SSL:SSL_CLIENT_CERT}] [P,E=SSL_CLIENT_CERT:%{ENV:SSL_CLIENT_CERT}] From thorin at gmail.com Tue Jul 25 15:59:57 2006 From: thorin at gmail.com (Curtis Spencer) Date: Tue, 25 Jul 2006 12:59:57 -0700 Subject: [Mongrel] Question about how Mongrel process works with singletons Message-ID: Hi, I have a controller where I access a singleton class that I use to connect to a DRbprocess DrbConnector.instance.some_method I notice that on every request, the constructor is called so it is making a new instance of this singleton. Is this normal? Thanks, Curtis From technoweenie at gmail.com Tue Jul 25 16:17:45 2006 From: technoweenie at gmail.com (Rick Olson) Date: Tue, 25 Jul 2006 15:17:45 -0500 Subject: [Mongrel] Question about how Mongrel process works with singletons In-Reply-To: References: Message-ID: <48fe25b0607251317t71bede23i65f7fb1813282e57@mail.gmail.com> On 7/25/06, Curtis Spencer wrote: > Hi, > > I have a controller where I access a singleton class that I use to > connect to a DRbprocess > > DrbConnector.instance.some_method > > I notice that on every request, the constructor is called so it is > making a new instance of this singleton. Is this normal? > > Thanks, > > Curtis If you look in the mongrel source under trunk/projects/mongrel_upload_progress, I start and maintain a drb process. -- Rick Olson http://techno-weenie.net From thorin at gmail.com Tue Jul 25 16:26:59 2006 From: thorin at gmail.com (Curtis Spencer) Date: Tue, 25 Jul 2006 13:26:59 -0700 Subject: [Mongrel] Question about how Mongrel process works with singletons In-Reply-To: <48fe25b0607251317t71bede23i65f7fb1813282e57@mail.gmail.com> References: <48fe25b0607251317t71bede23i65f7fb1813282e57@mail.gmail.com> Message-ID: Rick Olson wrote: > On 7/25/06, Curtis Spencer wrote: >> Hi, >> >> I have a controller where I access a singleton class that I use to >> connect to a DRbprocess >> >> DrbConnector.instance.some_method >> >> I notice that on every request, the constructor is called so it is >> making a new instance of this singleton. Is this normal? >> >> Thanks, >> >> Curtis > > If you look in the mongrel source under > trunk/projects/mongrel_upload_progress, I start and maintain a drb > process. > Rick, Thanks for the information. This looks to be a little lower level than I was originally working with (using Mongrel handlers instead of Rails Controllers). Do I need to bind a variable to a Mongrel constant in order to have it persist between requests? My question is more about why the singleton is reinitialized every request rather than about drb specifically. Thanks, Curtis From technoweenie at gmail.com Tue Jul 25 16:33:08 2006 From: technoweenie at gmail.com (Rick Olson) Date: Tue, 25 Jul 2006 15:33:08 -0500 Subject: [Mongrel] Question about how Mongrel process works with singletons In-Reply-To: References: <48fe25b0607251317t71bede23i65f7fb1813282e57@mail.gmail.com> Message-ID: <48fe25b0607251333t384be71dm57033b415f95a3fe@mail.gmail.com> > Thanks for the information. This looks to be a little lower level than > I was originally working with (using Mongrel handlers instead of Rails > Controllers). Do I need to bind a variable to a Mongrel constant in > order to have it persist between requests? My question is more about > why the singleton is reinitialized every request rather than about drb > specifically. Oh, well I just assumed, this being a mongrel list and all :) It's probably a development issue. Rails controller classes are reloaded every request. Turn cache_classes to false in config/environments/dev.rb (or run in production) mode to see if this is the case. -- Rick Olson http://techno-weenie.net From stonelists at gmail.com Tue Jul 25 21:02:23 2006 From: stonelists at gmail.com (Andrew Stone) Date: Tue, 25 Jul 2006 21:02:23 -0400 Subject: [Mongrel] mongrel_cluster Message-ID: I'm currently working on 4 different RoR apps all using mongrel cluster and each with their own config file in /etc/mongrel_cluster. I would like the ability to stop|start|restart a single app. Anyone working on something like this? I'd be happy to code it up and contribute this if there's a need. Basically I would like this: sudo /etc/init.d/mongrel_cluster restart myapp thanks, andy -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060725/ec3f3060/attachment.html From mrueckert at suse.de Tue Jul 25 21:09:46 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Wed, 26 Jul 2006 03:09:46 +0200 Subject: [Mongrel] mongrel_cluster In-Reply-To: References: Message-ID: <20060726010946.GZ5504@suse.de> On 2006-07-25 21:02:23 -0400, Andrew Stone wrote: > Date: Tue, 25 Jul 2006 21:02:23 -0400 > From: Andrew Stone > Subject: [Mongrel] mongrel_cluster > To: mongrel-users at rubyforge.org > > I'm currently working on 4 different RoR apps all using mongrel cluster and > each with their own config file in /etc/mongrel_cluster. I would like the > ability to stop|start|restart a single app. Anyone working on something > like this? I'd be happy to code it up and contribute this if there's a > need. > > Basically I would like this: > > sudo /etc/init.d/mongrel_cluster restart myapp i am working on that. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From stonelists at gmail.com Tue Jul 25 21:17:36 2006 From: stonelists at gmail.com (Andrew Stone) Date: Tue, 25 Jul 2006 21:17:36 -0400 Subject: [Mongrel] mongrel_cluster In-Reply-To: <20060726010946.GZ5504@suse.de> References: <20060726010946.GZ5504@suse.de> Message-ID: > > i am working on that. > > Fantastic, I glad I asked then. :) thanks, andy -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060725/fdc2fe05/attachment.html From stonelists at gmail.com Tue Jul 25 21:19:47 2006 From: stonelists at gmail.com (Andrew Stone) Date: Tue, 25 Jul 2006 21:19:47 -0400 Subject: [Mongrel] mongrel_cluster In-Reply-To: References: <20060726010946.GZ5504@suse.de> Message-ID: > > Fantastic, I glad I asked then. :) > > meant: I'm glad I asked then...I really need to start reviewing my emails *before* I send them. :( -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060725/b1e7be32/attachment.html From mongrel at philip.pjkh.com Tue Jul 25 21:39:44 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Tue, 25 Jul 2006 20:39:44 -0500 (CDT) Subject: [Mongrel] mongrel_cluster In-Reply-To: References: Message-ID: <20060725203859.I23260@bravo.pjkh.com> > I'm currently working on 4 different RoR apps all using mongrel cluster and > each with their own config file in /etc/mongrel_cluster. I would like the > ability to stop|start|restart a single app. Anyone working on something > like this? I'd be happy to code it up and contribute this if there's a > need. > > Basically I would like this: > > sudo /etc/init.d/mongrel_cluster restart myapp Why can't you do this? mongrel_rails cluster::restart -C /etc/mongrel_cluster/myapp.yml ? I do that on our dev server all the time... seems to work just fine... From stonelists at gmail.com Tue Jul 25 21:37:12 2006 From: stonelists at gmail.com (Andrew Stone) Date: Tue, 25 Jul 2006 21:37:12 -0400 Subject: [Mongrel] mongrel_cluster In-Reply-To: <20060725203859.I23260@bravo.pjkh.com> References: <20060725203859.I23260@bravo.pjkh.com> Message-ID: > > > mongrel_rails cluster::restart -C /etc/mongrel_cluster/myapp.yml > > ? > > I do that on our dev server all the time... seems to work just fine... > Just pure laziness on my part. That's sooo much to type. :) -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060725/2ecc2b54/attachment.html From bradley at railsmachine.com Wed Jul 26 00:10:04 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Wed, 26 Jul 2006 00:10:04 -0400 Subject: [Mongrel] mongrel_cluster In-Reply-To: References: <20060725203859.I23260@bravo.pjkh.com> Message-ID: Hi Andrew: On Jul 25, 2006, at 9:37 PM, Andrew Stone wrote: > > mongrel_rails cluster::restart -C /etc/mongrel_cluster/myapp.yml > > Just pure laziness on my part. That's sooo much to type. :) > Just use these bash functions and put them in your .bashrc: cluster_restart () { mongrel_rails cluster::restart -C /etc/ mongrel_cluster/$1.yml;} cluster_start () { mongrel_rails cluster::start -C /etc/ mongrel_cluster/$1.yml;} cluster_stop () { mongrel_rails cluster::stop -C /etc/mongrel_cluster/ $1.yml;} usage: $ cluster_start fluxura Thanks, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060726/f3b763d0/attachment-0001.html From gethemant at gmail.com Thu Jul 27 08:27:58 2006 From: gethemant at gmail.com (hemant) Date: Thu, 27 Jul 2006 17:57:58 +0530 Subject: [Mongrel] problem with *.foobar.com urls In-Reply-To: References: Message-ID: Any clues? As for i have same rails app generating pages for other countries also... I do some url checks in my start_controller to ensure the country flags work correctly. Is it because, mongrel can't handle request_uri correctly? On 7/25/06, hemant wrote: > > I am using Apache2.2 + mod_proxy_balancer + mongrel setup and my > mongrel.conf file(for apache is like this) > > > 2 > 3 > 4 BalancerMember http://127.0.0.1:9000 > 5 BalancerMember http://127.0.0.1:9001 > 6 BalancerMember http://127.0.0.1:9002 > 7 > 8 > 9 > 10 ServerAdmin rags at fasia.com > 11 ServerName *.foobar.com > 12 ServerAlias foobar.com > 13 ProxyPass / balancer://mongrel_cluster/ > 14 # ProxyPassReverse / balancer://mongrel_cluster/ > 15 # ErrorLog /usr/local/apache2/logs/mon.log > 16 # CustomLog /var/log/apache/apache_access_log combined > 17 > 18 > 19 > 20 SetHandler balancer-manager > 21 > > > Now, i get pages for foobar.com allright, but if i try to view pages for > us.foobar.com, i get Forbidden Error. > Though, when i manually enter, http://us.foobar.com:9001 , then i get > corrpesponding page for that country allright. > > So, my wild guess is mod_proxy_balancer is messing things a little. Any > clues? > > -- > nothing much to talk > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060727/cd81e210/attachment.html From stonelists at gmail.com Thu Jul 27 08:35:19 2006 From: stonelists at gmail.com (Andrew Stone) Date: Thu, 27 Jul 2006 08:35:19 -0400 Subject: [Mongrel] problem with *.foobar.com urls In-Reply-To: References: Message-ID: > > 9 > > 10 ServerAdmin rags at fasia.com > > 11 ServerName *.foobar.com > > 12 ServerAlias foobar.com > > > Give this a shot: ServerName foobar.com ServerAlias *.foobar.com this should work. -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060727/0d5cb26c/attachment.html From gethemant at gmail.com Thu Jul 27 09:00:04 2006 From: gethemant at gmail.com (hemant) Date: Thu, 27 Jul 2006 18:30:04 +0530 Subject: [Mongrel] suspicious memory usages Message-ID: Following is the output of top command at my server and i find the high usage very much alarming. We are basically a team of three developers working on same machine(remotely), so we run mongrel_rails servers from out ~/public/app directories. We also run a cluster of mongrel servers using apache2.2. Is this much memory use normal? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 13982 prashant 16 0 147m 110m 3956 S 0.0 11.0 0:48.57 mongrel_rails 22665 mongrel 16 0 97220 56m 3396 S 0.0 5.6 0:06.66 mongrel_rails 22070 rags 16 0 88640 54m 3936 R 0.0 5.4 0:41.97 mongrel_rails 22671 mongrel 16 0 86160 49m 3432 S 0.0 4.9 0:04.74 mongrel_rails 21260 hemant 16 0 87164 48m 3400 S 0.0 4.8 0:06.09 mongrel_rails 22668 mongrel 16 0 75976 45m 3396 S 0.0 4.5 0:04.11 mongrel_rails 22284 nobody 15 0 54572 42m 1396 S 0.3 4.2 0:16.64 ruby 10327 mysql 16 0 133m 30m 5196 S 0.0 3.0 2:42.69 mysqld 13206 hemant 16 0 54280 28m 2156 S 0.0 2.8 1:41.25 ruby 22750 kiran 16 0 43428 23m 3908 S 0.0 2.3 0:03.15 mongrel_rails 3961 root 16 0 10012 8964 588 S 0.0 0.9 0:03.51 memcached 22728 www-data 16 0 13536 7536 2620 S 0.0 0.7 0:00.10 httpd 22379 hemant 16 0 11980 7208 3060 S 0.0 0.7 0:01.73 emacs -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060727/6d191339/attachment.html From gethemant at gmail.com Thu Jul 27 09:16:41 2006 From: gethemant at gmail.com (hemant) Date: Thu, 27 Jul 2006 18:46:41 +0530 Subject: [Mongrel] problem with *.foobar.com urls In-Reply-To: References: Message-ID: Yeah... thanks it kinda works... but there seems to be a problem with urls though....got to fix my own code i guess. On 7/27/06, Andrew Stone wrote: > > 9 > > > 10 ServerAdmin rags at fasia.com > > > 11 ServerName *.foobar.com > > > 12 ServerAlias foobar.com > > > > > > > Give this a shot: > > ServerName foobar.com > ServerAlias *.foobar.com > > this should work. > > -- > Andrew Stone > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060727/0e4754d6/attachment.html From me at seebq.com Thu Jul 27 09:55:14 2006 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 27 Jul 2006 09:55:14 -0400 Subject: [Mongrel] suspicious memory usages In-Reply-To: References: Message-ID: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> 11% of what, though? (how much memory on the box)? Here's one from a server we've had in production for a while: top - 09:50:01 up 26 days, 21:29, 1 user, load average: 0.00, 0.01, 0.00 Tasks: 79 total, 1 running, 78 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0% us, 0.2% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.2% hi, 0.0% si Mem: 2070040k total, 1774248k used, 295792k free, 198304k buffers Swap: 2031608k total, 0k used, 2031608k free, 1005236k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20960 highgroo 16 0 99.0m 91m 3364 S 0.0 4.5 95:56.97 mongrel_rails 20957 highgroo 16 0 97136 87m 3368 S 0.0 4.3 101:51.13 mongrel_rails 20954 highgroo 16 0 78076 68m 3296 S 0.0 3.4 97:52.91 mongrel_rails 2020 mysql 16 0 125m 28m 4780 S 0.0 1.4 423:45.18 mysqld 20943 highgroo 16 0 24916 21m 2508 S 0.0 1.0 0:16.49 ruby 1927 ntp 16 0 4044 4044 3044 S 0.0 0.2 0:00.52 ntpd 5502 daemon 16 0 7560 3504 1412 S 0.0 0.2 0:01.20 httpd ... This box has 2 GB of memory though -- linux (in general) is pretty good about using all your memory (versus swap) if you've got it -- less important is the memory footprint and perhaps the performance? It looks fine by me.... On 7/27/06, hemant wrote: > Following is the output of top command at my server and i find the high > usage very much alarming. > > We are basically a team of three developers working on same > machine(remotely), so we run mongrel_rails servers from out ~/public/app > directories. > We also run a cluster of mongrel servers using apache2.2. > > Is this much memory use normal? > > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 13982 prashant 16 0 147m 110m 3956 S 0.0 11.0 0:48.57 mongrel_rails > 22665 mongrel 16 0 97220 56m 3396 S 0.0 5.6 0:06.66 mongrel_rails > 22070 rags 16 0 88640 54m 3936 R 0.0 5.4 0:41.97 mongrel_rails > 22671 mongrel 16 0 86160 49m 3432 S 0.0 4.9 0:04.74 mongrel_rails > 21260 hemant 16 0 87164 48m 3400 S 0.0 4.8 0:06.09 mongrel_rails > 22668 mongrel 16 0 75976 45m 3396 S 0.0 4.5 0:04.11 mongrel_rails > 22284 nobody 15 0 54572 42m 1396 S 0.3 4.2 0:16.64 ruby > 10327 mysql 16 0 133m 30m 5196 S 0.0 3.0 2:42.69 mysqld > 13206 hemant 16 0 54280 28m 2156 S 0.0 2.8 1:41.25 ruby > 22750 kiran 16 0 43428 23m 3908 S 0.0 2.3 0: 03.15 mongrel_rails > 3961 root 16 0 10012 8964 588 S 0.0 0.9 0:03.51 memcached > 22728 www-data 16 0 13536 7536 2620 S 0.0 0.7 0:00.10 httpd > 22379 hemant 16 0 11980 7208 3060 S 0.0 0.7 0: 01.73 emacs > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Charles Brian Quinn www.seebq.com From wyhaines at gmail.com Thu Jul 27 10:33:42 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Thu, 27 Jul 2006 08:33:42 -0600 Subject: [Mongrel] suspicious memory usages In-Reply-To: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> References: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> Message-ID: On 7/27/06, Charles Brian Quinn wrote: > 11% of what, though? (how much memory on the box)? > > Here's one from a server we've had in production for a while: > > top - 09:50:01 up 26 days, 21:29, 1 user, load average: 0.00, 0.01, 0.00 > Tasks: 79 total, 1 running, 78 sleeping, 0 stopped, 0 zombie > Cpu(s): 0.0% us, 0.2% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.2% hi, 0.0% si > Mem: 2070040k total, 1774248k used, 295792k free, 198304k buffers > Swap: 2031608k total, 0k used, 2031608k free, 1005236k cached > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 20960 highgroo 16 0 99.0m 91m 3364 S 0.0 4.5 95:56.97 > mongrel_rails My guess is that he is asking about the 147m virt and 110m resident RAM usage. That does seem appallingly high to me unless his application is doing something that is itself very RAM intensive. I don't have enough experience with substantial Rails apps, though, to know whether to lay that at the feet of Rails or not. Kirk Haines From zedshaw at zedshaw.com Thu Jul 27 11:36:12 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 27 Jul 2006 11:36:12 -0400 Subject: [Mongrel] suspicious memory usages In-Reply-To: References: Message-ID: <1154014572.6976.6.camel@localhost.localdomain> On Thu, 2006-07-27 at 18:30 +0530, hemant wrote: > Following is the output of top command at my server and i find the > high usage very much alarming. > > We are basically a team of three developers working on same > machine(remotely), so we run mongrel_rails servers from out > ~/public/app directories. > We also run a cluster of mongrel servers using apache2.2. > > Is this much memory use normal? > It's funny, but just the other day I setup a tomcat server to run a small 10 JSP app and Sun's JDK used up 358M of ram while IBM's JDK used 150M. What you might be experiencing though is the common development mode memory leaks that come up once in a while. If these are developers then I wouldn't worry about it. It's when you're in production that you've got problems if you see this kind of memory activity. I've got a quick hack I've been handing to people who have memory problems which has helped them track down leaks. ***ONLY USE THIS IN PRODUCTION MODE***. Don't bother with this in dev mode. http://pastie.caboo.se/6218 Take that, put it in a file called mongrel.conf, and then start mongrel with: mongrel_rails start -e production -S mongrel.conf It'll start writing a file called objects.log and after you've thrashed the app a bit you can go look at how memory is being used for the different objects. When you thrash the app, don't do concurrenct hits, just run a bunch in a series. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Jul 27 11:38:02 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 27 Jul 2006 11:38:02 -0400 Subject: [Mongrel] suspicious memory usages In-Reply-To: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> References: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> Message-ID: <1154014682.6976.9.camel@localhost.localdomain> On Thu, 2006-07-27 at 09:55 -0400, Charles Brian Quinn wrote: > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 20960 highgroo 16 0 99.0m 91m 3364 S 0.0 4.5 95:56.97 > mongrel_rails > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > 13982 prashant 16 0 147m 110m 3956 S 0.0 11.0 0:48.57 mongrel_rails > > 22665 mongrel 16 0 97220 56m 3396 S 0.0 5.6 0:06.66 mongrel_rails > > 22070 rags 16 0 88640 54m 3936 R 0.0 5.4 0:41.97 mongrel_rails > > 21260 hemant 16 0 87164 48m 3400 S 0.0 4.8 0:06.09 mongrel_rails > > 22284 nobody 15 0 54572 42m 1396 S 0.3 4.2 0:16.64 ruby > > 10327 mysql 16 0 133m 30m 5196 S 0.0 3.0 2:42.69 mysqld > > 13206 hemant 16 0 54280 28m 2156 S 0.0 2.8 1:41.25 ruby > > 22750 kiran 16 0 43428 23m 3908 S 0.0 2.3 0: 03.15 mongrel_rails > > 22728 www-data 16 0 13536 7536 2620 S 0.0 0.7 0:00.10 httpd Wow, look at all those wonderful usernames I can use to hack that box. Now if I can just find the right server I could be in there like swimwear. :-) -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From me at seebq.com Thu Jul 27 12:03:09 2006 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 27 Jul 2006 12:03:09 -0400 Subject: [Mongrel] suspicious memory usages In-Reply-To: <1154014682.6976.9.camel@localhost.localdomain> References: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> <1154014682.6976.9.camel@localhost.localdomain> Message-ID: <3a2de0cd0607270903s7e84f6d8kf3bb29c1181c060d@mail.gmail.com> On 7/27/06, Zed Shaw wrote: > > > Wow, look at all those wonderful usernames I can use to hack that box. > Now if I can just find the right server I could be in there like > swimwear. Especially since those pesky capistrano config/deploy.rb have all the passwords in there for you. And, with .ssh_keys on most of our boxes, it would only take one to get 'em all! Our servers are constantly polled by programs searching for random username/password combinations (the message log is filled with attempts for common usernames), and just the other day we had some program polling our app for FrontPage (gasp! who still uses those) extension dlls and crazy large posting of \x000 \x000 characters to one of our forms for buffer exploits. mongrel handled 'em fine. Maybe it's time to move ssh up to a different port? It's a wild world out there y'all. ;-) p.s. the username on our box got cut off, it's highgroove_deploy for all the hackers out there... -- Charles Brian Quinn www.seebq.com From gethemant at gmail.com Thu Jul 27 12:06:22 2006 From: gethemant at gmail.com (hemant) Date: Thu, 27 Jul 2006 21:36:22 +0530 Subject: [Mongrel] suspicious memory usages In-Reply-To: <1154014682.6976.9.camel@localhost.localdomain> References: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> <1154014682.6976.9.camel@localhost.localdomain> Message-ID: Hey this machine is not online.... I doubt you can hack into this box, since we just run the stuff only in our LAN.But yeah, next time i would be careful. Anyway, this is still a development box, only difference is, mongrel_rails script run by users other than mongrel are probably running on development mode, while mongrel_cluster spawns the remaining three processes in production mode and so when second process takes 56MB of RES memory, it worries me.I have 1GB of RAM/AMD64 and on Ubuntu. On 7/27/06, Zed Shaw wrote: > > On Thu, 2006-07-27 at 09:55 -0400, Charles Brian Quinn wrote: > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > 20960 highgroo 16 0 99.0m 91m 3364 S 0.0 4.5 95:56.97 > > mongrel_rails > > > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > > 13982 prashant 16 0 147m 110m 3956 S 0.0 11.0 0:48.57mongrel_rails > > > 22665 mongrel 16 0 97220 56m 3396 S 0.0 5.6 0:06.66mongrel_rails > > > 22070 rags 16 0 88640 54m 3936 R 0.0 5.4 0:41.97mongrel_rails > > > 21260 hemant 16 0 87164 48m 3400 S 0.0 4.8 0:06.09mongrel_rails > > > 22284 nobody 15 0 54572 42m 1396 S 0.3 4.2 0:16.64 ruby > > > 10327 mysql 16 0 133m 30m 5196 S 0.0 3.0 2:42.69 mysqld > > > 13206 hemant 16 0 54280 28m 2156 S 0.0 2.8 1:41.25 ruby > > > 22750 kiran 16 0 43428 23m 3908 S 0.0 2.3 0: 03.15mongrel_rails > > > 22728 www-data 16 0 13536 7536 2620 S 0.0 0.7 0:00.10 httpd > > Wow, look at all those wonderful usernames I can use to hack that box. > Now if I can just find the right server I could be in there like > swimwear. > > :-) > > > -- > 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 > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060727/6e2dd836/attachment.html From josh at besquared.net Thu Jul 27 13:08:28 2006 From: josh at besquared.net (Josh Ferguson) Date: Thu, 27 Jul 2006 12:08:28 -0500 Subject: [Mongrel] suspicious memory usages In-Reply-To: <3a2de0cd0607270903s7e84f6d8kf3bb29c1181c060d@mail.gmail.com> References: <3a2de0cd0607270655g2f5042d8wfff9e959d454a782@mail.gmail.com> <1154014682.6976.9.camel@localhost.localdomain> <3a2de0cd0607270903s7e84f6d8kf3bb29c1181c060d@mail.gmail.com> Message-ID: <44C8F30C.2040000@besquared.net> A little self promotion? Shameful cbq shameful..:) josh @ besquared Charles Brian Quinn wrote: > On 7/27/06, Zed Shaw wrote: > >> >> >> Wow, look at all those wonderful usernames I can use to hack that box. >> Now if I can just find the right server I could be in there like >> swimwear. >> > > Especially since those pesky capistrano config/deploy.rb have all the > passwords in there for you. And, with .ssh_keys on most of our boxes, > it would only take one to get 'em all! > > Our servers are constantly polled by programs searching for random > username/password combinations (the message log is filled with > attempts for common usernames), and just the other day we had some > program polling our app for FrontPage (gasp! who still uses those) > extension dlls and crazy large posting of \x000 \x000 characters to > one of our forms for buffer exploits. mongrel handled 'em fine. > Maybe it's time to move ssh up to a different port? > > It's a wild world out there y'all. ;-) > > p.s. the username on our box got cut off, it's highgroove_deploy for > all the hackers out there... > From rusty at berkeley.edu Thu Jul 27 18:45:07 2006 From: rusty at berkeley.edu (Rusty Wright) Date: Thu, 27 Jul 2006 15:45:07 -0700 Subject: [Mongrel] problem starting mongrel Message-ID: <44C941F3.4070903@berkeley.edu> I'm also getting the "undefined method resolve" error. I installed ruby from source on solaris x86. In a previous email Zed said > You'll need to install all ruby related items, not just "apt-get > install ruby". There's ri, irb, ruby1.8-dev, and lots of other > packages. I've looked at the configure script for when I compile ruby and it doesn't have any options for "build tools." My solaris system has all of the usual unix build tools. When I installed mongrel I used --test with gem and it had errors; where do I find the output/errors of the tests? > # gem install --include-dependencies --rdoc --ri --test mongrel > 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.13.3/lib/http11.so] Error 127 > ruby extconf.rb install --include-dependencies --rdoc --ri --test mongrel > checking for main() in -lc... yes > creating Makefile > > make > gcc -fPIC -O3 -pipe -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 -O3 -pipe -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 -O3 -pipe -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 -O3 -pipe -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 -O3 -pipe -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 -O3 -pipe -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 -O3 -pipe -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 -O3 -pipe -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.13.3/lib > > make clean > Successfully installed mongrel, version 0.3.13.3 > Installing ri documentation for mongrel-0.3.13.3... > Installing RDoc documentation for mongrel-0.3.13.3... > ...keep Gem? [Yn] y > ERROR: 46 tests, 9 assertions, 0 failures, 60 errors Also note for future versions that the installer for mongrel seems to not work as well with the solaris make as it does with the gnu make; I received an error on the make install part until I added a symbolic link to gnu make in my ~/bin directory. If possible, an easy way to fix this is to test for the existence of gmake in $PATH and use that instead of make (solaris installs gnu make as gmake). Otherwise, document this wart. Also note the "command not found" error in the first part of the above output. I don't know if that's a problem or what. Thanks for your help. From zedshaw at zedshaw.com Thu Jul 27 23:30:27 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 27 Jul 2006 23:30:27 -0400 Subject: [Mongrel] problem starting mongrel In-Reply-To: <44C941F3.4070903@berkeley.edu> References: <44C941F3.4070903@berkeley.edu> Message-ID: <1154057427.6976.22.camel@localhost.localdomain> Hi Rusty, On Thu, 2006-07-27 at 15:45 -0700, Rusty Wright wrote: > I'm also getting the "undefined method resolve" error. I installed ruby > from source on solaris x86. In a previous email Zed said > > > You'll need to install all ruby related items, not just "apt-get > > install ruby". There's ri, irb, ruby1.8-dev, and lots of other > > packages. There's other folks who use Solaris and have cranked out packages. Check the archives. > Also note for future versions that the installer for mongrel seems to > not work as well with the solaris make as it does with the gnu make; I > received an error on the make install part until I added a symbolic link > to gnu make in my ~/bin directory. If possible, an easy way to fix this > is to test for the existence of gmake in $PATH and use that instead of > make (solaris installs gnu make as gmake). Otherwise, document this wart. > > Also note the "command not found" error in the first part of the above > output. I don't know if that's a problem or what. > > Thanks for your help. Yeah, that's actually a problem in the mkmf stuff Ruby has. I think I might be able to cook up a fix for it, but not sure exactly how to go about it. I'll ask around and see how the other Solaris folks did this. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From rusty at berkeley.edu Fri Jul 28 02:15:50 2006 From: rusty at berkeley.edu (Rusty Wright) Date: Thu, 27 Jul 2006 23:15:50 -0700 Subject: [Mongrel] problem starting mongrel In-Reply-To: <1154057427.6976.22.camel@localhost.localdomain> References: <44C941F3.4070903@berkeley.edu> <1154057427.6976.22.camel@localhost.localdomain> Message-ID: <44C9AB96.2010103@berkeley.edu> Sorry, I'm not sure what you mean by "There's other folks who use Solaris and have cranked out packages. Check the archives." I tried installing ruby from sunfreeware.com but still get the exact same error. The only thing I found in the archives was someone using Sun's c compiler, but I'm using gcc. It looks to me like http11.so is not being built correctly. I figured out that the "resolve" routine that it's looking for is in it. When I do a "file" on all of the .so files in the /usr/local/lib/ruby directory all of the .so files are the right type *except* http11.so; for some reason it's a DOS executable when it should be the same as the others (ELF 32-bit blah blah blah). See the following output of the file command: > file ` find . -name '*.so' -print ` > ./1.8/i386-solaris2.10/bigdecimal.so: ELF 32-bit LSB dynamic lib 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available > ./1.8/i386-solaris2.10/curses.so: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available > (many more lines like this) > ./site_ruby/1.8/i386-solaris2.10/readline.so: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available > ./gems/1.8/gems/mongrel-0.3.13.3/lib/http11.so: DOS executable (EXE) Still a lost and clueless newbie in Ruby & Rails land. Thanks again. Zed Shaw wrote: > Hi Rusty, > > On Thu, 2006-07-27 at 15:45 -0700, Rusty Wright wrote: >> I'm also getting the "undefined method resolve" error. I installed ruby >> from source on solaris x86. In a previous email Zed said >> >>> You'll need to install all ruby related items, not just "apt-get >>> install ruby". There's ri, irb, ruby1.8-dev, and lots of other >>> packages. > > There's other folks who use Solaris and have cranked out packages. > Check the archives. > >> Also note for future versions that the installer for mongrel seems to >> not work as well with the solaris make as it does with the gnu make; I >> received an error on the make install part until I added a symbolic link >> to gnu make in my ~/bin directory. If possible, an easy way to fix this >> is to test for the existence of gmake in $PATH and use that instead of >> make (solaris installs gnu make as gmake). Otherwise, document this wart. >> >> Also note the "command not found" error in the first part of the above >> output. I don't know if that's a problem or what. >> >> Thanks for your help. > > Yeah, that's actually a problem in the mkmf stuff Ruby has. I think I > might be able to cook up a fix for it, but not sure exactly how to go > about it. > > I'll ask around and see how the other Solaris folks did this. > > From rusty at berkeley.edu Fri Jul 28 02:25:27 2006 From: rusty at berkeley.edu (Rusty Wright) Date: Thu, 27 Jul 2006 23:25:27 -0700 Subject: [Mongrel] problem starting mongrel In-Reply-To: <1154057427.6976.22.camel@localhost.localdomain> References: <44C941F3.4070903@berkeley.edu> <1154057427.6976.22.camel@localhost.localdomain> Message-ID: <44C9ADD7.4060703@berkeley.edu> Ok, more sleuthing. I downloaded the file mongrel-0.3.13.3.gem and it's tar files inside of tar files and I extracted one named data.tar and it has a lib directory and in it is an http11.so and the unix file command says that it's a DOS executable. So it looks to me like when I run the gem install it's just copying that http11.so and not the one that gets compiled from source by gem. Zed Shaw wrote: > Hi Rusty, > > On Thu, 2006-07-27 at 15:45 -0700, Rusty Wright wrote: >> I'm also getting the "undefined method resolve" error. I installed ruby >> from source on solaris x86. In a previous email Zed said >> >>> You'll need to install all ruby related items, not just "apt-get >>> install ruby". There's ri, irb, ruby1.8-dev, and lots of other >>> packages. > > There's other folks who use Solaris and have cranked out packages. > Check the archives. > >> Also note for future versions that the installer for mongrel seems to >> not work as well with the solaris make as it does with the gnu make; I >> received an error on the make install part until I added a symbolic link >> to gnu make in my ~/bin directory. If possible, an easy way to fix this >> is to test for the existence of gmake in $PATH and use that instead of >> make (solaris installs gnu make as gmake). Otherwise, document this wart. >> >> Also note the "command not found" error in the first part of the above >> output. I don't know if that's a problem or what. >> >> Thanks for your help. > > Yeah, that's actually a problem in the mkmf stuff Ruby has. I think I > might be able to cook up a fix for it, but not sure exactly how to go > about it. > > I'll ask around and see how the other Solaris folks did this. > > From rusty at berkeley.edu Fri Jul 28 02:32:12 2006 From: rusty at berkeley.edu (Rusty Wright) Date: Thu, 27 Jul 2006 23:32:12 -0700 Subject: [Mongrel] problem starting mongrel In-Reply-To: <1154057427.6976.22.camel@localhost.localdomain> References: <44C941F3.4070903@berkeley.edu> <1154057427.6976.22.camel@localhost.localdomain> Message-ID: <44C9AF6C.3040507@berkeley.edu> Ok, hopefully my final missive on this saga. I saw the setup.rb file in the files extracted from the data.tar and on a whim ran ruby on that, which produced an http11.so file which I moved into the ruby gems directory (clobbering the DOS one) and now it works. Zed Shaw wrote: > Hi Rusty, > > On Thu, 2006-07-27 at 15:45 -0700, Rusty Wright wrote: >> I'm also getting the "undefined method resolve" error. I installed ruby >> from source on solaris x86. In a previous email Zed said >> >>> You'll need to install all ruby related items, not just "apt-get >>> install ruby". There's ri, irb, ruby1.8-dev, and lots of other >>> packages. > > There's other folks who use Solaris and have cranked out packages. > Check the archives. > >> Also note for future versions that the installer for mongrel seems to >> not work as well with the solaris make as it does with the gnu make; I >> received an error on the make install part until I added a symbolic link >> to gnu make in my ~/bin directory. If possible, an easy way to fix this >> is to test for the existence of gmake in $PATH and use that instead of >> make (solaris installs gnu make as gmake). Otherwise, document this wart. >> >> Also note the "command not found" error in the first part of the above >> output. I don't know if that's a problem or what. >> >> Thanks for your help. > > Yeah, that's actually a problem in the mkmf stuff Ruby has. I think I > might be able to cook up a fix for it, but not sure exactly how to go > about it. > > I'll ask around and see how the other Solaris folks did this. > > From zedshaw at zedshaw.com Fri Jul 28 04:49:23 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 28 Jul 2006 04:49:23 -0400 Subject: [Mongrel] problem starting mongrel In-Reply-To: <44C9AF6C.3040507@berkeley.edu> References: <44C941F3.4070903@berkeley.edu> <1154057427.6976.22.camel@localhost.localdomain> <44C9AF6C.3040507@berkeley.edu> Message-ID: <1154076563.23336.0.camel@localhost.localdomain> On Thu, 2006-07-27 at 23:32 -0700, Rusty Wright wrote: > Ok, hopefully my final missive on this saga. I saw the setup.rb file in > the files extracted from the data.tar and on a whim ran ruby on that, > which produced an http11.so file which I moved into the ruby gems > directory (clobbering the DOS one) and now it works. Ah, yeah I know what's going on *now*. Those aren't supposed to get included. Ok, thanks, I'll fix that up on the next release. Thanks for tracking this down Rusty. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From wyhaines at gmail.com Fri Jul 28 07:23:28 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Fri, 28 Jul 2006 05:23:28 -0600 Subject: [Mongrel] escape/unescape attribution Message-ID: Not filing this as a bug, but simply as confusion. In the mongrel.rb, you have a comment that says this about the self.escape method: # Performs URI escaping so that you can construct proper # query strings faster. Use this rather than the cgi.rb # version since it's faster. (Stolen from Camping). def self.escape(s) s.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) { '%'+$1.unpack('H2'*$1.size).join('%').upcase }.tr(' ', '+') end That "Stolen from Camping" thing perplexed me, because when I looked at that, it looked fundamentally identical to what I have in IOWA, which definitely was not stolen from camping. Here's the code from Iowa::Util.escape() def Util.escape(string) string.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) do '%' + $1.unpack('H2' * $1.size).join('%').upcase end.tr(' ', '+') end Now, the funny thing here is that I just stole this from cgi.rb so that it would be available without having to require all of CGI. Here's the original code from cgi.rb: def CGI::escape(string) string.gsub(/([^ a-zA-Z0-9_.-]+)/n) do '%' + $1.unpack('H2' * $1.size).join('%').upcase end.tr(' ', '+') end Camping simply stole from cgi.rb, too, so Camping's escape() can't be any faster than CGI's, and the comment in mongrel.rb should probably reflect this. Kirk Haines From jason.young at eXtension.org Fri Jul 28 10:09:46 2006 From: jason.young at eXtension.org (Jason Young) Date: Fri, 28 Jul 2006 10:09:46 -0400 Subject: [Mongrel] problem starting mongrel In-Reply-To: <1154076563.23336.0.camel@localhost.localdomain> References: <44C941F3.4070903@berkeley.edu> <1154057427.6976.22.camel@localhost.localdomain> <44C9AF6C.3040507@berkeley.edu> <1154076563.23336.0.camel@localhost.localdomain> Message-ID: <88B93B52-430F-4F4A-B955-B0C7645F6747@eXtension.org> Got the same thing here. Fixed on a reinstall of mongrel. I didn't dig in and see if the Win32 executable was my problem too. Think I fumbled-fingered getting the wrong gem - getting the Win32 instead of the "Ruby" one? (can I put a plugin for trimming the the list of available mongrels at rubyforge? :-) ) Jason On Jul 28, 2006, at 4:49 AM, Zed Shaw wrote: > On Thu, 2006-07-27 at 23:32 -0700, Rusty Wright wrote: >> Ok, hopefully my final missive on this saga. I saw the setup.rb >> file in >> the files extracted from the data.tar and on a whim ran ruby on that, >> which produced an http11.so file which I moved into the ruby gems >> directory (clobbering the DOS one) and now it works. > > Ah, yeah I know what's going on *now*. Those aren't supposed to get > included. > > Ok, thanks, I'll fix that up on the next release. Thanks for tracking > this down Rusty. > > > -- > 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 > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jason Young -- Systems Manager, eXtension http://about.extension.org/wiki/Jason_Young ______________________________________ From rusty at berkeley.edu Fri Jul 28 12:38:19 2006 From: rusty at berkeley.edu (Rusty Wright) Date: Fri, 28 Jul 2006 09:38:19 -0700 Subject: [Mongrel] problem starting mongrel In-Reply-To: <88B93B52-430F-4F4A-B955-B0C7645F6747@eXtension.org> References: <44C941F3.4070903@berkeley.edu> <1154057427.6976.22.camel@localhost.localdomain> <44C9AF6C.3040507@berkeley.edu> <1154076563.23336.0.camel@localhost.localdomain> <88B93B52-430F-4F4A-B955-B0C7645F6747@eXtension.org> Message-ID: <44CA3D7B.8000304@berkeley.edu> As long as you write the plugin. ;-) Jason Young wrote: > (can I put a plugin for trimming the the list of available mongrels > at rubyforge? :-) ) From asa at caltech.edu Fri Jul 28 13:04:17 2006 From: asa at caltech.edu (Asa Hopkins) Date: Fri, 28 Jul 2006 10:04:17 -0700 Subject: [Mongrel] URL root/serving more than one app per subdomain Message-ID: <85EE42A0-0CA8-4001-8A24-9A339F9635D8@caltech.edu> Hey folks, I have the following situation: I have a secure server, and I'd like to run multiple Rails apps without dealing with setting up multiple secure servers, with their fixed IPs, etc. So, I want to do https:// secure.domain.com/app1/ and https://secure.domain.com/app2/ etc. In lighttpd this is possible using a combination of relative_url_root in each app (in environment.rb), some URL handling in lighttpd.conf, and mod_alias, which maps "/app1" to the public directory for app1, etc, so that stylesheets, images, etc, get served right. I'm trying out switching to an Apache/Pound/Mongrel setup (on PlanetArgon's servers). Pound can handle directing to different ports for different URLs, so I can sent /app1/ to port 3000, and / app2/ to port 3010, for example. This works with separate Mongrels running on those different ports, except that Mongrel can't find the stylesheets and other "assets". That is, the app runs fine, but looks awful and has no javascript. Yesterday as I was setting this up, I managed to get it to work by hacking Mongrel itself. i added a "-u" (--urlroot) flag to mongrel_rails, added a @urlroot variable to the RailsHandler, and added the following lines to change the request path: In rails.rb/RailsHandler#process path_info = path_info[@urlroot.length, path_info.length- @urlroot.length] unless @urlroot.nil? or path_info[0, at urlroot.length]! =@urlroot and in handlers.rb / DirHandler#process path_info = request.params[Const::PATH_INFO] path_info = path_info[urlroot.length,path_info.length- urlroot.length] unless urlroot.nil? or path_info[0,urlroot.length]! =urlroot req_path = can_serve path_info I imagine there are other places where such a parameter might need to be added to get serving things other than rails apps to work right. I also didn't try to add it to the Windows service binaries. So, I guess my question is twofold: 1) I'm new to making changes/adding features to open source code. How would I go about lobbying for this feature (if not the code that I wrote) to be included in a release, so that when PlanetArgon updates their gems I can use this feature there? 2) Lacking that, how do I create a separate copy of mongrel that uses my changes and ignores the installed gems? Thanks! Asa ----------------- Work is love made visible ----------------- Asa S. Hopkins MC 266-33, Pasadena, CA 91125 asa at caltech.edu http://www.its.caltech.edu/~asa/ ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060728/8fbb600f/attachment.html From asa at caltech.edu Fri Jul 28 13:10:34 2006 From: asa at caltech.edu (Asa Hopkins) Date: Fri, 28 Jul 2006 10:10:34 -0700 Subject: [Mongrel] or, alternatively.... Message-ID: <23A823C3-55C1-4EAE-81AF-4CEA46ECB00C@caltech.edu> Related to serving multiple apps in one domain: Is there something I can do in a Mongrel configuration file that would do what I need to do, and kill the need for changing Mongrel? I see in the Typo 4.0.0 mongrel.conf that it has: blog = Mongrel::Rails.new('/blog',{}) uri "/blog", :handler => blog Does this do something like what I want? Thanks, Asa ----------------- Work is love made visible ----------------- Asa S. Hopkins MC 266-33, Pasadena, CA 91125 asa at caltech.edu http://www.its.caltech.edu/~asa/ ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060728/3b8d2645/attachment.html From asa at caltech.edu Fri Jul 28 13:32:43 2006 From: asa at caltech.edu (Asa Hopkins) Date: Fri, 28 Jul 2006 10:32:43 -0700 Subject: [Mongrel] OK, so I'm not the first person... Message-ID: <7B9C3E48-CF90-4577-BFA2-4ED4BCB4E686@caltech.edu> Sorry for the flurry of messages. Looking through the archives, I see that what I want is available in 0.3.13.4 as '--prefix'. Thanks! Asa ----------------- Work is love made visible ----------------- Asa S. Hopkins MC 266-33, Pasadena, CA 91125 asa at caltech.edu http://www.its.caltech.edu/~asa/ ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060728/87399070/attachment-0001.html From zedshaw at zedshaw.com Fri Jul 28 13:50:17 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 28 Jul 2006 13:50:17 -0400 Subject: [Mongrel] problem starting mongrel In-Reply-To: <88B93B52-430F-4F4A-B955-B0C7645F6747@eXtension.org> References: <44C941F3.4070903@berkeley.edu> <1154057427.6976.22.camel@localhost.localdomain> <44C9AF6C.3040507@berkeley.edu> <1154076563.23336.0.camel@localhost.localdomain> <88B93B52-430F-4F4A-B955-B0C7645F6747@eXtension.org> Message-ID: <1154109017.6309.0.camel@localhost.localdomain> On Fri, 2006-07-28 at 10:09 -0400, Jason Young wrote: > (can I put a plugin for trimming the the list of available mongrels > at rubyforge? :-) ) Oh man that annoys me so much. I've tried disabling them, deleting them, everything. I've got to contact the rubyforge folks and have them just do it manually. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From potatosaladx at gmail.com Fri Jul 28 16:04:46 2006 From: potatosaladx at gmail.com (Andrew Bennett) Date: Fri, 28 Jul 2006 16:04:46 -0400 Subject: [Mongrel] mongrel_cluster rc.d script for FreeBSD Message-ID: I wanted to be able to specify in my /etc/rc.conf file whether mongrel_cluster should be enabled and the mongrel_cluster_config file for the init script, so I wrote this simple rc.d style script. Just throw it in /usr/local/etc/rc.d/ and do a chmod +x /usr/local/etc/rc.d/mongrel_cluster.sh To enable the script, add mongrel_cluster_enable="YES" to /etc/rc.conf and optionally add mongrel_cluster_config="/etc/mongrel_cluster" The default config path is /usr/local/etc/mongrel_cluster Would be nice if mongrel_cluster_ctl had some sort of "status" switch to see if the servers are actually running and what their pids are. Andrew Bennett potatosaladx at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: mongrel_cluster.sh Type: application/x-sh Size: 936 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060728/9a5a9a41/attachment.sh From talk2sunder at gmail.com Fri Jul 28 16:55:09 2006 From: talk2sunder at gmail.com (Sunder ) Date: Fri, 28 Jul 2006 13:55:09 -0700 Subject: [Mongrel] mongrel_cluster rc.d script for FreeBSD In-Reply-To: References: Message-ID: Andrew, This is pretty cool. will give it a run and see let you know. Sunder On 7/28/06, Andrew Bennett wrote: > > I wanted to be able to specify in my /etc/rc.conf file whether > mongrel_cluster should be enabled and the mongrel_cluster_config file > for the init script, so I wrote this simple rc.d style script. > > Just throw it in /usr/local/etc/rc.d/ and do a chmod +x > /usr/local/etc/rc.d/mongrel_cluster.sh > > To enable the script, add mongrel_cluster_enable="YES" to /etc/rc.conf > and optionally add mongrel_cluster_config="/etc/mongrel_cluster" > > The default config path is /usr/local/etc/mongrel_cluster > > Would be nice if mongrel_cluster_ctl had some sort of "status" switch > to see if the servers are actually running and what their pids are. > > Andrew Bennett > potatosaladx at gmail.com > > > _______________________________________________ > 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/20060728/4480e34c/attachment.html From bradley at railsmachine.com Fri Jul 28 16:57:25 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Fri, 28 Jul 2006 16:57:25 -0400 Subject: [Mongrel] mongrel_cluster rc.d script for FreeBSD In-Reply-To: References: Message-ID: <9EB90C8D-23A3-4165-A182-A9783D97C27A@railsmachine.com> Hi Andrew: On Jul 28, 2006, at 4:04 PM, Andrew Bennett wrote: > I wanted to be able to specify in my /etc/rc.conf file whether > mongrel_cluster should be enabled and the mongrel_cluster_config file > for the init script, so I wrote this simple rc.d style script. That's awesome. Thanks! I'll include it in the next prerelease. > > Would be nice if mongrel_cluster_ctl had some sort of "status" switch > to see if the servers are actually running and what their pids are. I'll look into this. Thanks, Bradley Taylor ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060728/fb3af45a/attachment.html From tolsen718 at gmail.com Fri Jul 28 18:29:36 2006 From: tolsen718 at gmail.com (Tim Olsen) Date: Fri, 28 Jul 2006 18:29:36 -0400 Subject: [Mongrel] s/IF_UNMODIFIED_SINCE/IF_MODIFIED_SINCE/ ??? Message-ID: <4be80d840607281529u117ff35al24e690604d02c654@mail.gmail.com> I've noticed in the source code that Mongrel handles the IF_UNMODIFIED_SINCE header. I thought this rather odd, since IF_UNMODIFIED_SINCE is generally only useful with PUT. Even more odd is that there is no mention of IF_MODIFIED_SINCE in Mongrel which is useful with GET (although not as useful as IF_NONE_MATCH of course). Is this a bug in Mongrel? -Tim From dan.kubb at autopilotmarketing.com Fri Jul 28 21:00:39 2006 From: dan.kubb at autopilotmarketing.com (Dan Kubb) Date: Fri, 28 Jul 2006 18:00:39 -0700 Subject: [Mongrel] s/IF_UNMODIFIED_SINCE/IF_MODIFIED_SINCE/ ??? In-Reply-To: <4be80d840607281529u117ff35al24e690604d02c654@mail.gmail.com> References: <4be80d840607281529u117ff35al24e690604d02c654@mail.gmail.com> Message-ID: <0E89115E-ED89-4657-8C48-B66EA32379D7@autopilotmarketing.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Tim, > I've noticed in the source code that Mongrel handles the > IF_UNMODIFIED_SINCE header. I thought this rather odd, since > IF_UNMODIFIED_SINCE is generally only useful with PUT. Even more odd > is that there is no mention of IF_MODIFIED_SINCE in Mongrel which is > useful with GET (although not as useful as IF_NONE_MATCH of course). > > Is this a bug in Mongrel? I wrote some of the code that does this, and I think it might be a bug. Good catch. The test cases passed, and the browser testing I did passed too. The code was created to function when either, or both is present. Since most browsers send an ETag too, it would've worked in those cases. I probably got the header wrong when I wrote the test case, and the mistake rippled out into the code. The actual logic should still be correct its just the header name that is wrong. I'll submit a patch to fix this. - -- Thanks, Dan __________________________________________________________________ Dan Kubb Autopilot Marketing Inc. Email: dan.kubb at autopilotmarketing.com Phone: 1 (604) 820-0212 Web: http://autopilotmarketing.com/ vCard: http://autopilotmarketing.com/~dan.kubb/vcard __________________________________________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) iD8DBQFEyrM44DfZD7OEWk0RApV+AJ9e5GdbxDdOrCem1x+fmBhoIHSPMQCdHu8R ZgyyiAHV3+Bjx5/SDwcVKbo= =0oEA -----END PGP SIGNATURE----- From potatosaladx at gmail.com Sat Jul 29 18:54:41 2006 From: potatosaladx at gmail.com (Andrew Bennett) Date: Sat, 29 Jul 2006 18:54:41 -0400 Subject: [Mongrel] mongrel_cluster rc.d script for FreeBSD Message-ID: Hey Bradley, On Jul 28, 2006, at 4:57 PM, Bradley Taylor wrote: > > > > Would be nice if mongrel_cluster_ctl had some sort of "status" switch > > to see if the servers are actually running and what their pids are. > > I'll look into this. I made a simple patch that displays the pids and port numbers of all the running mongrel clusters based on the pid files that exist. Not sure if that's the best way to do that, but it gets the job done. I use mongrel on a (FreeBSD) server at my work and I needed a way of automating the clusters and checking on their existance. It should work on both Linux and FreeBSD or anything that uses pid files (ie. not Windows). I also updated the rc.d script to include the status ability. Hope this helps. Andrew Bennett potatosaladx at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: mongrel_cluster-0.2.0+status.patch.diff Type: application/octet-stream Size: 4176 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060729/fc1b26a1/attachment-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: mongrel_cluster.sh Type: application/x-sh Size: 1036 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060729/fc1b26a1/attachment-0001.sh From zedshaw at zedshaw.com Sat Jul 29 19:21:39 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 29 Jul 2006 19:21:39 -0400 Subject: [Mongrel] escape/unescape attribution In-Reply-To: References: Message-ID: <1154215299.6298.7.camel@localhost.localdomain> On Fri, 2006-07-28 at 05:23 -0600, Kirk Haines wrote: > Not filing this as a bug, but simply as confusion. > > In the mongrel.rb, you have a comment that says this about the > self.escape method: > > # Performs URI escaping so that you can construct proper > # query strings faster. Use this rather than the cgi.rb > # version since it's faster. (Stolen from Camping). > Camping simply stole from cgi.rb, too, so Camping's escape() can't be > any faster than CGI's, and the comment in mongrel.rb should probably > reflect this. Hilarious. See what happens when I'm the only person between you, _why, and myself who gives proper attribution for where I steal code? Now we know it's not faster. :-) How's your Mongrel adapter going BTW? Need any help? Next week is Mongrel week for me so that's the time to ask. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From kraemer at webit.de Sun Jul 30 06:00:03 2006 From: kraemer at webit.de (Jens Kraemer) Date: Sun, 30 Jul 2006 12:00:03 +0200 Subject: [Mongrel] The Debian Plan In-Reply-To: <1153497876.5996.1.camel@localhost.localdomain> References: <1153417161.7352.13.camel@localhost.localdomain> <20060721102603.GF28283@cordoba.webit.de> <1153497876.5996.1.camel@localhost.localdomain> Message-ID: <20060730100003.GB26219@cordoba.webit.de> Hi all, sorry for late reply. On Fri, Jul 21, 2006 at 12:04:36PM -0400, Zed Shaw wrote: > On Fri, 2006-07-21 at 12:26 +0200, Jens Kraemer wrote: > > Why not point people to the debs in the first place ? I'll have new > > packages up as soon as 0.3.13.4 is out. > > Can you crank up a short e-mail of instructions for this and I'll put it > in the Debian uber doc I'm compiling? That's basically what I'm saying > in the "final option". Ok, so here's a stripped down version of what I've written on my blog (http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge): Note: This assumes a clean Sarge install, things might get a bit difficult if there is an existing ruby / rubygems installation in /usr/local. ========== Install Ruby 1.8.4 + Mongrel =========== - add the following lines to /etc/apt/sources.list deb http://debian.jkraemer.net/apt sarge main contrib non-free deb http://ftp.de.debian.org/debian/ experimental main contrib - edit /etc/apt/preferences Package: * Pin: release a=experimental Pin-Priority: 100 - edit /etc/apt/apt.conf APT::Default-Release "stable"; - go get it, pen is completely optional apt-get update && apt-get install mongrel pen ========== Set up your Application =========== Apache 2.0/Pen/Mongrel - create config file for your app in /etc/mongrel/sites-enabled/ : # RAILS_ROOT of your application dir=/home/webapps/your_application/current # port the first mongrel instance should listen to, additional instances # will use ports above this port=8100 # number of mongrel instances servers=3 # port pen will listen on (if installed) proxy_port=8001 - fire up mongrel /etc/init.d/mongrel start - you should now have 3 mongrels running, listening on ports 8100-8102 - if installed, pen will be listening on port 8001, forwarding connections to the mongrels. - Rewrite rules for Apache 2.0 for forwarding to pen: RewriteEngine On RewriteRule ^/$ /index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f # 8001 is the proxy_port from mongrel configuration of your app RewriteRule .* http://localhost:8001%{REQUEST_URI} [P,QSA] The experimental rubygems stuff is not that nice, but I didn't manage to build a Sarge package for this until now. Maybe providing dummy Debian packages for people who have already installed Ruby and/or Rubygems from source would be a good idea, too. Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 From lapomme00 at gmail.com Sun Jul 30 23:36:09 2006 From: lapomme00 at gmail.com (Brett Walker) Date: Mon, 31 Jul 2006 11:36:09 +0800 Subject: [Mongrel] Mongrel and Apache docs? Message-ID: Any news on the Apache Best Practice Deployment instructions? I'm getting ready to set up a production server, and would prefer to use Apache and Mongrel/Cluster. Don't think I'll be able to get the latest Apache though. Do I have to proxy through Pound or something to handle multiple mongrel instances? Any pointers? Any help appreciated, Brett From schwuk at gmail.com Mon Jul 31 03:21:20 2006 From: schwuk at gmail.com (Dave Murphy) Date: Mon, 31 Jul 2006 08:21:20 +0100 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: References: Message-ID: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> On 31/07/06, Brett Walker wrote: > Any news on the Apache Best Practice Deployment instructions? I'm > getting ready to set up a production server, and would prefer to use > Apache and Mongrel/Cluster. Don't think I'll be able to get the > latest Apache though. Do I have to proxy through Pound or something > to handle multiple mongrel instances? Any pointers? I've got a brief guide here (must get around to writing it up properly): http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod_proxy-on-debian-stable You will need a load balancer if you're not using Apache 2.2. Cheers. -- Dave Murphy (Schwuk) http://schwuk.com