From maurizio at gmail.com Tue Aug 1 05:30:29 2006 From: maurizio at gmail.com (Maurizio Balestrieri) Date: Tue, 1 Aug 2006 11:30:29 +0200 Subject: [Mongrel] Mongrel crash Message-ID: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> Hi. A mongrel/rails installation (proxyed through apache) is crashing for some reason with the following error found in the mongrel.log: ERROR: meta.c (179): wmf_header_read: this isn't a wmf file /root/local/radiant/config/../vendor/rails/activerecord/lib/active_record/base.rb:2068: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i386-linux] Fedora 5 mongrel: 0.3.13.3 Apache/2.2.0 Any ideads? TIA. --M From pedro at pedrocr.net Tue Aug 1 05:40:07 2006 From: pedro at pedrocr.net (=?ISO-8859-1?Q?Pedro_C=F4rte-Real?=) Date: Tue, 1 Aug 2006 10:40:07 +0100 Subject: [Mongrel] Mongrel crash In-Reply-To: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> References: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> Message-ID: <62e8012c0608010240l4d52b1e1x93aa8e0009bd1663@mail.gmail.com> On 8/1/06, Maurizio Balestrieri wrote: > Hi. A mongrel/rails installation (proxyed through apache) is crashing > for some reason with the following error found in the mongrel.log: > > ERROR: meta.c (179): wmf_header_read: this isn't a wmf file > /root/local/radiant/config/../vendor/rails/activerecord/lib/active_record/base.rb:2068: > [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [i386-linux] > > Fedora 5 > mongrel: 0.3.13.3 > Apache/2.2.0 > > Any ideads? TIA. If ruby is crashing it's probably a bug in the C extension it's using. Check where that meta.c is from. Seems to be something for video files? WMF? Pedro. From lapomme00 at gmail.com Tue Aug 1 05:47:36 2006 From: lapomme00 at gmail.com (Brett Walker) Date: Tue, 1 Aug 2006 17:47:36 +0800 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> References: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> Message-ID: On 7/31/06, Dave Murphy wrote: > 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. Dave, thanks for the pointer. This will help. It looks like you're running only one Mongrel instance, is that right? Cheers, Brett From jason.young at eXtension.org Tue Aug 1 08:11:03 2006 From: jason.young at eXtension.org (Jason Young) Date: Tue, 1 Aug 2006 08:11:03 -0400 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: References: Message-ID: <94859C73-B65E-4C9B-AE9E-C2857FFC44B2@eXtension.org> On Jul 30, 2006, at 11:36 PM, 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 basically do the same that Dave did - actually - I just basically do the same thing as: http://mongrel.rubyforge.org/docs/mongrel_cluster.html basically for the init script and configuration file-based start/stop. And: ProxyPass / http://127.0.0.1:mongrelport/ ProxyPassReverse / http://127.0.0.1:mongrelport/ in the configuration file for each Vhost I'm running on the box that Apache and the Mongrel+Rails app is located at, and where mongrelport corresponds to the configuration for mongrel+mongrel_cluster ( Where X depends on which port I defined in the yml file mongrel_cluster) It actually just turns out to be *that* simple. (simple enough that I'm perpetually worried I completely missed something) I'm using Red Hat's Apache 2 distribution (actually the beta stack version: 2.0.55) Jason -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jason Young -- Systems Manager, eXtension http://about.extension.org/wiki/Jason_Young ______________________________________ From jason.young at eXtension.org Tue Aug 1 08:12:15 2006 From: jason.young at eXtension.org (Jason Young) Date: Tue, 1 Aug 2006 08:12:15 -0400 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> References: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> Message-ID: <7514A96F-1AB1-4781-8F46-26A04C376E5B@eXtension.org> On Jul 31, 2006, at 3:21 AM, Dave Murphy wrote: > You will need a load balancer if you're not using Apache 2.2. Why exactly? I have relatively low traffic sites, but I'm not load- balancing - and as far as I know (which is one of the biggest self- lies in system administration I know) - I'm not having any delivery problems. At what traffic point ls LB really necessary? Jason -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jason Young -- Systems Manager, eXtension http://about.extension.org/wiki/Jason_Young ______________________________________ From me at seebq.com Tue Aug 1 08:50:25 2006 From: me at seebq.com (Charles Brian Quinn) Date: Tue, 1 Aug 2006 08:50:25 -0400 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <7514A96F-1AB1-4781-8F46-26A04C376E5B@eXtension.org> References: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> <7514A96F-1AB1-4781-8F46-26A04C376E5B@eXtension.org> Message-ID: <3a2de0cd0608010550k31359d8dx9d2b8db31cd4605c@mail.gmail.com> I would assume two requests coming in at the same time would really be the first point you would consider getting a load balancer in some form or fashion. If you have a lot of long web requests (searches, big calculations, etc.) you tie up the web request for any users. Of course, if the web request completes in a matter of milleseconds, you've made your user wait milliseconds. Probably not a big deal. Load Balancing has the connotation of requiring Big Hardware, but can be as simple as Apache's mod_proxy_balancer looking at incoming requests and deciding which mongrel instance in a mongrel_cluster to route to. I personally have 2 instances running on several low traffic sites, and you can see in the Apache built in mod_proxy_balancer manager screen that the 2nd one hardly ever kicks in. There are some most excellent docs that even tell you how to mod_deflate and have the Apache instance serve up static content (one thing that mongrel does well, but not as well as it serves up ruby) and configure a 3 mongrel_cluster setup. Coda Hale's comes to mind: http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ Only using httperf or ab or siege or anything to simulate the kind of traffic you expect will tell you if you need a load-balancer. I wouldn't add one before at least doing that. On a side note, if you do have long running web requests, might I suggest using backgrounDRb to free up the web request. Cheers, -- Charles Brian Quinn self-promotion: www.seebq.com Highgroove Studios: www.highgroove.com Slingshot Hosting: www.slingshothosting.com On 8/1/06, Jason Young wrote: > > On Jul 31, 2006, at 3:21 AM, Dave Murphy wrote: > > > > You will need a load balancer if you're not using Apache 2.2. > > Why exactly? I have relatively low traffic sites, but I'm not load- > balancing - and as far as I know (which is one of the biggest self- > lies in system administration I know) - I'm not having any delivery > problems. At what traffic point ls LB really necessary? > > Jason > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Jason Young -- Systems Manager, eXtension > http://about.extension.org/wiki/Jason_Young > ______________________________________ > > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From josh at besquared.net Tue Aug 1 15:01:45 2006 From: josh at besquared.net (Josh Ferguson) Date: Tue, 01 Aug 2006 14:01:45 -0500 Subject: [Mongrel] Mongrel crash In-Reply-To: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> References: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> Message-ID: <44CFA519.7070205@besquared.net> Maurizio I'm fighting with the same problems on a production machine. They are with radiant, and most likely with caching on RHEL/FC with the apache 2.2/mongrel 0.3.13 combo. Are you running this radiant on a virtual server or a machine that is all your own? Josh Maurizio Balestrieri wrote: > Hi. A mongrel/rails installation (proxyed through apache) is crashing > for some reason with the following error found in the mongrel.log: > > ERROR: meta.c (179): wmf_header_read: this isn't a wmf file > /root/local/radiant/config/../vendor/rails/activerecord/lib/active_record/base.rb:2068: > [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [i386-linux] > > Fedora 5 > mongrel: 0.3.13.3 > Apache/2.2.0 > > Any ideads? TIA. > > --M > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From josh at besquared.net Tue Aug 1 15:03:17 2006 From: josh at besquared.net (Josh Ferguson) Date: Tue, 01 Aug 2006 14:03:17 -0500 Subject: [Mongrel] Mongrel crash In-Reply-To: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> References: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> Message-ID: <44CFA575.5010408@besquared.net> Maurizio I'm fighting with similar problems with radiant on a production machine where mongrel segfaults for various reasons at different times. It seems random to me so my guess it that the problem is with caching on RHEL/FC with the apache 2.2/mongrel 0.3.13 combo which is what I'm running. Are you running this radiant on a virtual server or a machine that is all your own? Josh Maurizio Balestrieri wrote: > Hi. A mongrel/rails installation (proxyed through apache) is crashing > for some reason with the following error found in the mongrel.log: > > ERROR: meta.c (179): wmf_header_read: this isn't a wmf file > /root/local/radiant/config/../vendor/rails/activerecord/lib/active_record/base.rb:2068: > [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [i386-linux] > > Fedora 5 > mongrel: 0.3.13.3 > Apache/2.2.0 > > Any ideads? TIA. > > --M > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From maurizio at gmail.com Tue Aug 1 14:26:57 2006 From: maurizio at gmail.com (Maurizio Balestrieri) Date: Tue, 1 Aug 2006 20:26:57 +0200 Subject: [Mongrel] Mongrel crash In-Reply-To: <44CFA519.7070205@besquared.net> References: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> <44CFA519.7070205@besquared.net> Message-ID: <1c7fecb90608011126le4f3e56m23240f1e2f470317@mail.gmail.com> On 8/1/06, Josh Ferguson wrote: > They are with radiant, and most likely with caching on RHEL/FC with the > apache 2.2/mongrel 0.3.13 combo. Are you running this radiant on a > virtual server or a machine that is all your own? Josh, It's a VPS on rimuhosting with 256MB RAM, and the same system software stack you mentioned (including radiant). From zedshaw at zedshaw.com Tue Aug 1 15:03:50 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 01 Aug 2006 12:03:50 -0700 Subject: [Mongrel] Mongrel Week! Message-ID: <1154459030.9131.13.camel@localhost.localdomain> Hey Folks, I've been rather absent lately, but I now have this week slated for full-time Mongrel development. The goal is to get a few big fixes into 0.3.13.4 and release that, and then get a pre-release of 0.4 out for folks to test against. Please make sure you put any outstanding bugs into: http://rubyforge.org/tracker/?atid=5145&group_id=1306&func=browse And any feature requests into: http://rubyforge.org/tracker/?atid=5148&group_id=1306&func=browse So that I can triage and put them into the right versions. Finally, everyone please try out the pre-release (especially if you get segfaults): sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And tell me how it works for you. Thanks! -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From gethemant at gmail.com Tue Aug 1 16:32:32 2006 From: gethemant at gmail.com (hemant) Date: Wed, 2 Aug 2006 02:02:32 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) Message-ID: Following errors are taken from monrgrel running in development mode. It complained routes.rb, no such file or directory and then sometimes i get application.rb, no such file or directory.Doesn't seem correct to me. Though not so often, but even production servers throw these errors sometimes, and i have no special routes setup or something.Its pretty much default one, except few changes here and there. MissingSourceFile no such file to load -- /home/foo_fighter/public_html/foobar/config/routes.rb RAILS_ROOT: /home/foo_fighter/public_html/foobar/config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:574:in `reload' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:67:in `prepare_application' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:37:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/rails.rb:73:in`process' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:551:in`process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:550:in`process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:625:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:956:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:955:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in`run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 /usr/bin/mongrel_rails:18 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:574:in `reload' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:67:in `prepare_application' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:37:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/rails.rb:73:in`process' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:551:in`process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:550:in`process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:625:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:956:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:955:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in`run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:574:in `reload' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:67:in `prepare_application' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:37:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/rails.rb:73:in`process' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:551:in`process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:550:in`process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:625:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:956:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:955:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in`run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 /usr/bin/mongrel_rails:18 This error occured while loading the following files: /home/foo_fighter/public_html/foobar/config/../config/routes.rb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060802/de6dfbc2/attachment.html From carl.lerche at verizon.net Tue Aug 1 17:35:38 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Tue, 01 Aug 2006 14:35:38 -0700 Subject: [Mongrel] Mongrel Week! In-Reply-To: <1154459030.9131.13.camel@localhost.localdomain> References: <1154459030.9131.13.camel@localhost.localdomain> Message-ID: <0994EF57-DE62-44BA-ABFD-BC4B2BCFC6A8@verizon.net> Great news :) I can't wait to play with 0.4. Quick question, I believe in your last release you mentioned that the upload progress plugin was fixed? Am I remembering right or should I wait until 0.4 is out to start playing around with this? Thanks, -carl On Aug 1, 2006, at 12:03 PM, Zed Shaw wrote: > Hey Folks, > > I've been rather absent lately, but I now have this week slated for > full-time Mongrel development. The goal is to get a few big fixes > into > 0.3.13.4 and release that, and then get a pre-release of 0.4 out for > folks to test against. > > Please make sure you put any outstanding bugs into: > > http://rubyforge.org/tracker/?atid=5145&group_id=1306&func=browse > > > And any feature requests into: > > http://rubyforge.org/tracker/?atid=5148&group_id=1306&func=browse > > So that I can triage and put them into the right versions. > > Finally, everyone please try out the pre-release (especially if you > get > segfaults): > > sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ > > And tell me how it works for you. > > 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 From technoweenie at gmail.com Tue Aug 1 21:35:16 2006 From: technoweenie at gmail.com (Rick Olson) Date: Tue, 1 Aug 2006 20:35:16 -0500 Subject: [Mongrel] Mongrel Week! In-Reply-To: <0994EF57-DE62-44BA-ABFD-BC4B2BCFC6A8@verizon.net> References: <1154459030.9131.13.camel@localhost.localdomain> <0994EF57-DE62-44BA-ABFD-BC4B2BCFC6A8@verizon.net> Message-ID: <48fe25b0608011835y2dd29567taf15d45b5478e066@mail.gmail.com> On 8/1/06, Carl Lerche wrote: > Great news :) > > I can't wait to play with 0.4. Quick question, I believe in your last > release you mentioned that the upload progress plugin was fixed? Am I > remembering right or should I wait until 0.4 is out to start playing > around with this? > > Thanks, > -carl It's working, but you need some javascript to get the client side stuff working. I have a sample rails project, but the important bits are javascript: http://svn.techno-weenie.net/projects/mongrel_upload_progress/ I'll work on getting some documentation written this week. I just wanted to make sure I wasn't doing anything stupid in the actual mongrel code. -- Rick Olson http://techno-weenie.net From lapomme00 at gmail.com Wed Aug 2 05:50:00 2006 From: lapomme00 at gmail.com (Brett Walker) Date: Wed, 2 Aug 2006 17:50:00 +0800 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <3a2de0cd0608010550k31359d8dx9d2b8db31cd4605c@mail.gmail.com> References: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> <7514A96F-1AB1-4781-8F46-26A04C376E5B@eXtension.org> <3a2de0cd0608010550k31359d8dx9d2b8db31cd4605c@mail.gmail.com> Message-ID: Just ran across this blog post by Ezra (from a couple months ago) that could come in handy: http://brainspl.at/articles/2006/06/12/apache2-2-vhost-template-for-mongrel-clusters Cheers, Brett From shubham.singal at gmail.com Wed Aug 2 06:38:59 2006 From: shubham.singal at gmail.com (Shubham Singal) Date: Wed, 2 Aug 2006 16:08:59 +0530 Subject: [Mongrel] Modifying Mongrel Examples Message-ID: <860243270608020338u6854b80fra709ac7e9c9b7251@mail.gmail.com> Hi, I am tryinig to work on the Mongrel examples. I am trying to modify the HttpResponse. def process(request, response) response.start do |head,out| if request.params["REQUEST_METHOD"] == OPTIONS" else end end One can detect that the request is OPTIONS like this, but how does one generate the custom response by using HttpResponse. Please help. Shubham From aidanf at gmail.com Wed Aug 2 06:47:17 2006 From: aidanf at gmail.com (Aidan Finn) Date: Wed, 2 Aug 2006 11:47:17 +0100 Subject: [Mongrel] Mongrel crashes whenever an exception is raised Message-ID: <4836d4ce0608020347t56c18ffbpa6d7cc529c4a9dd2@mail.gmail.com> Hi all, I have a rails app running on mongrel on freebsd using mongrel 0.3.13.3 with ruby 1.8.4. Mongrel dies every time the application generates an exception. I have the same setup running on a linux box without any problems. Mongrel crashes with the following error: Bus error (core dumped) And the following message in /var/log/message kernel: pid 57638 (ruby), uid 0: exited on signal 10 (core dumped) Anyone seen this before or got any idea what is causing it? cheers, AF -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060802/ce376357/attachment.html From gitte at wange.dk Wed Aug 2 08:37:52 2006 From: gitte at wange.dk (Gitte Wange) Date: Wed, 2 Aug 2006 14:37:52 +0200 Subject: [Mongrel] mongrel to execute ruby script? Message-ID: <803F9B1F-9696-491C-ABE9-4471A85BE309@wange.dk> Hello, I've spent a couple of hours now searching for (what I thought) was pretty straightforward. I'm using mongrel together with RoR and need to execute a .rb file located in my public folder (cgi style). But mongrel just can't do that out-of-the-box - or am I missing something? I really don't get how I'm supposed to configure mongrel for this task so I'm hoping to find some help here :-) Greetings, Gitte Wange -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1881 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060802/864143f8/attachment.bin From aidanf at gmail.com Wed Aug 2 09:11:26 2006 From: aidanf at gmail.com (Aidan Finn) Date: Wed, 2 Aug 2006 14:11:26 +0100 Subject: [Mongrel] Mongrel crashes whenever an exception is raised In-Reply-To: <4836d4ce0608020347t56c18ffbpa6d7cc529c4a9dd2@mail.gmail.com> References: <4836d4ce0608020347t56c18ffbpa6d7cc529c4a9dd2@mail.gmail.com> Message-ID: <4836d4ce0608020611p9f7004cv1cb0d96c9e7c0eef@mail.gmail.com> Hi all, Turns out the problem was with pthreads on freebsd. Installing ruby with pthreads disabled solved the problem. The version of ruby installed had pthreads enabled. Recent versions of the ruby freebsd port have pthreads disabled by default or else you can use the ruby18-nopthreads port. Cheers, AF On 8/2/06, Aidan Finn wrote: > > Hi all, > > I have a rails app running on mongrel on freebsd using mongrel 0.3.13.3with ruby > 1.8.4. > > Mongrel dies every time the application generates an exception. I have > the same setup running on a linux box without any problems. > > Mongrel crashes with the following error: > Bus error (core dumped) > > And the following message in /var/log/message > kernel: pid 57638 (ruby), uid 0: exited on signal 10 (core dumped) > > Anyone seen this before or got any idea what is causing it? > > > cheers, > > AF > -- ------------------------------- http://www.aidanf.net ------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060802/6d403018/attachment.html From zedshaw at zedshaw.com Thu Aug 3 02:47:08 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 02 Aug 2006 23:47:08 -0700 Subject: [Mongrel] mongrel to execute ruby script? In-Reply-To: <803F9B1F-9696-491C-ABE9-4471A85BE309@wange.dk> References: <803F9B1F-9696-491C-ABE9-4471A85BE309@wange.dk> Message-ID: <1154587628.6047.33.camel@localhost.localdomain> Yeah, Mongrel doesn't support this unless you write a Handler to do it. Take a look at the documentation on the site and if you can't figure it out then I'll help. You'll want a small mongrel.conf with code in it that makes an HttpHandler which you can pass to mongrel_rails -S. That should get you started. On Wed, 2006-08-02 at 14:37 +0200, Gitte Wange wrote: > Hello, > > I've spent a couple of hours now searching for (what I thought) was > pretty straightforward. > I'm using mongrel together with RoR and need to execute a .rb file > located in my public folder (cgi style). > > But mongrel just can't do that out-of-the-box - or am I missing > something? > I really don't get how I'm supposed to configure mongrel for this > task so I'm hoping to find some help here :-) > > Greetings, > Gitte Wange > _______________________________________________ Mongrel-users mailing list Mongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users From zedshaw at zedshaw.com Thu Aug 3 02:48:35 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 02 Aug 2006 23:48:35 -0700 Subject: [Mongrel] Mongrel crashes whenever an exception is raised In-Reply-To: <4836d4ce0608020611p9f7004cv1cb0d96c9e7c0eef@mail.gmail.com> References: <4836d4ce0608020347t56c18ffbpa6d7cc529c4a9dd2@mail.gmail.com> <4836d4ce0608020611p9f7004cv1cb0d96c9e7c0eef@mail.gmail.com> Message-ID: <1154587715.6047.35.camel@localhost.localdomain> Thanks Aidan, it's on the list for FAQ questions. I'll also look at why this might be. On Wed, 2006-08-02 at 14:11 +0100, Aidan Finn wrote: > Hi all, > > Turns out the problem was with pthreads on freebsd. Installing ruby > with pthreads disabled solved the problem. The version of ruby > installed had pthreads enabled. Recent versions of the ruby freebsd > port have pthreads disabled by default or else you can use the > ruby18-nopthreads port. > > Cheers, > > AF > > On 8/2/06, Aidan Finn wrote: > Hi all, > > I have a rails app running on mongrel on freebsd using mongrel > 0.3.13.3 with ruby 1.8.4. > > Mongrel dies every time the application generates an > exception. I have the same setup running on a linux box > without any problems. > > Mongrel crashes with the following error: > Bus error (core dumped) > > And the following message in /var/log/message > kernel: pid 57638 (ruby), uid 0: exited on signal 10 (core > dumped) > > Anyone seen this before or got any idea what is causing it? > > > cheers, > > > AF > > > > > -- > ------------------------------- > http://www.aidanf.net > ------------------------------- > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From schwuk at gmail.com Thu Aug 3 02:48:49 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 07:48:49 +0100 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: References: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> Message-ID: <2e60a9e60608022348y60261f2cs4c721783eee02fad@mail.gmail.com> On 01/08/06, Brett Walker wrote: > Dave, thanks for the pointer. This will help. It looks like you're > running only one Mongrel instance, is that right? Yes. Because of low memory on the host, I decided to stick with one instance. Cheers -- Dave Murphy (Schwuk) http://schwuk.com From zedshaw at zedshaw.com Thu Aug 3 02:49:38 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 02 Aug 2006 23:49:38 -0700 Subject: [Mongrel] Modifying Mongrel Examples In-Reply-To: <860243270608020338u6854b80fra709ac7e9c9b7251@mail.gmail.com> References: <860243270608020338u6854b80fra709ac7e9c9b7251@mail.gmail.com> Message-ID: <1154587778.6047.38.camel@localhost.localdomain> On Wed, 2006-08-02 at 16:08 +0530, Shubham Singal wrote: > Hi, > > I am tryinig to work on the Mongrel examples. I am trying to modify > the HttpResponse. > Like this: out.write("my stuff") That's it. The out param is just a IO object you write your response to and then Mongrel packs it up and goes. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 3 02:53:09 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 02 Aug 2006 23:53:09 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile Message-ID: <1154587989.6047.41.camel@localhost.localdomain> Hi Folks, I've been getting reports of people with serious stability problems in Mongrel. These problems go away instantly when they remove ruby-sendfile. If your mongrel starts up saying that you have "sendfile installed" and that it is using it then **you are wrong**. Remove the gem and don't use it. I'll be investigating why it doesn't really work as advertised, and really it's not worth the hassle for just a 20% perf boost on static files (and ONLY static files, no other requests at all). Really, if you need fast static files use a real web server instead. Thanks! P.S. Almost through my e-mail queue. Man. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From schwuk at gmail.com Thu Aug 3 02:54:55 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 07:54:55 +0100 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <7514A96F-1AB1-4781-8F46-26A04C376E5B@eXtension.org> References: <2e60a9e60607310021o25fb8cb9qfb371b49add5e971@mail.gmail.com> <7514A96F-1AB1-4781-8F46-26A04C376E5B@eXtension.org> Message-ID: <2e60a9e60608022354o62c9e4afh91b0a91530efc9f4@mail.gmail.com> On 01/08/06, Jason Young wrote: > > You will need a load balancer if you're not using Apache 2.2. > > Why exactly? I have relatively low traffic sites, but I'm not load- > balancing - and as far as I know (which is one of the biggest self- > lies in system administration I know) - I'm not having any delivery > problems. At what traffic point ls LB really necessary? Sorry I should have qualified that with "if you want load balancing". I've avoided it due to memory constraints and have not had any real problems on a low traffic site. My rule of thumb for load balancing would be anything where it is going to cause you pain/embarassment/financial loss if a user has to wait for a unresponsive site. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From zedshaw at zedshaw.com Thu Aug 3 02:54:59 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 02 Aug 2006 23:54:59 -0700 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: Message-ID: <1154588099.6047.44.camel@localhost.localdomain> On Wed, 2006-08-02 at 02:02 +0530, hemant wrote: > Following errors are taken from monrgrel running in development mode. > It complained routes.rb, no such file or directory and then sometimes > i get application.rb, no such file or directory.Doesn't seem correct > to me. > > Though not so often, but even production servers throw these errors Have you solved this yet? I'm working up my bug list. Try the following things: 1) remove ruby-sendfile if you have it installed. 2) try the pre-release: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ 3) try your app with webrick and see if you get the error. 4) tell me what OS and mongrel version this happens with. sorry if you gave me this info already, i'm just whipping through my e-mail queue to catch up. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 3 02:56:19 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 02 Aug 2006 23:56:19 -0700 Subject: [Mongrel] Mongrel crash In-Reply-To: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> References: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> Message-ID: <1154588179.6047.46.camel@localhost.localdomain> On Tue, 2006-08-01 at 11:30 +0200, Maurizio Balestrieri wrote: > Hi. A mongrel/rails installation (proxyed through apache) is crashing > for some reason with the following error found in the mongrel.log: > > ERROR: meta.c (179): wmf_header_read: this isn't a wmf file > /root/local/radiant/config/../vendor/rails/activerecord/lib/active_record/base.rb:2068: > [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [i386-linux] > Did you solve this Maurizio? Did you see a similar posting earlier about RMagick and missing LD_* configurations when run under sudo? -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From schwuk at gmail.com Thu Aug 3 02:59:02 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 07:59:02 +0100 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <94859C73-B65E-4C9B-AE9E-C2857FFC44B2@eXtension.org> References: <94859C73-B65E-4C9B-AE9E-C2857FFC44B2@eXtension.org> Message-ID: <2e60a9e60608022359u21db6640v498bb878074c813a@mail.gmail.com> On 01/08/06, Jason Young wrote: > basically for the init script and configuration file-based start/stop. I've written a howto on rolling your own init scripts for single mongrel instances: http://schwuk.com/articles/2006/06/29/daemonizing-mongrel It could easily be adapted to use config files and/or clusters. > ProxyPass / http://127.0.0.1:mongrelport/ > ProxyPassReverse / http://127.0.0.1:mongrelport/ Because I'm using a bunch of rewrites to enhance caching etc. I not using ProxyPass anymore - I just use a proxying rewrite. I'll write this up on my website as soon as I get the chance. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From zedshaw at zedshaw.com Thu Aug 3 03:08:23 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:08:23 -0700 Subject: [Mongrel] s/IF_UNMODIFIED_SINCE/IF_MODIFIED_SINCE/ ??? In-Reply-To: <4be80d840607281529u117ff35al24e690604d02c654@mail.gmail.com> References: <4be80d840607281529u117ff35al24e690604d02c654@mail.gmail.com> Message-ID: <1154588903.6047.60.camel@localhost.localdomain> On Fri, 2006-07-28 at 18:29 -0400, Tim Olsen wrote: > 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? Alright, I got Dan's patch in the queue and this will be fixed in the 0.3.13.4 pre-release. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From schwuk at gmail.com Thu Aug 3 03:09:53 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 08:09:53 +0100 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <94859C73-B65E-4C9B-AE9E-C2857FFC44B2@eXtension.org> References: <94859C73-B65E-4C9B-AE9E-C2857FFC44B2@eXtension.org> Message-ID: <2e60a9e60608030009t54593e2enb3c651402037f8b8@mail.gmail.com> On 01/08/06, Jason Young wrote: > ProxyPass / http://127.0.0.1:mongrelport/ > ProxyPassReverse / http://127.0.0.1:mongrelport/ > > in the configuration file for each Vhost I'm running on the box that > Apache and the Mongrel+Rails app is located at, and where mongrelport > corresponds to the configuration for mongrel+mongrel_cluster > > ( Where X depends on which port I defined in the yml file > mongrel_cluster) > > It actually just turns out to be *that* simple. (simple enough that > I'm perpetually worried I completely missed something) I think you are. My impression from reading the above is that a) your using mongrel_cluster and b) you're *not* using mod_proxy_balancer (because it's not available for Apache 2.0). If both of these are true, then all requests are being served by the first member of the mongrel_cluster - the others will never be touched. Is this the case? Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Thu Aug 3 03:13:37 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 08:13:37 +0100 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: <1154587989.6047.41.camel@localhost.localdomain> References: <1154587989.6047.41.camel@localhost.localdomain> Message-ID: <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> On 03/08/06, Zed Shaw wrote: > I've been getting reports of people with serious stability problems in > Mongrel. These problems go away instantly when they remove > ruby-sendfile. You may want to nudge Coda to update his post [1] - I'd never heard of sendfile until I read that, and it's often referred to in the community. [1] http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From zedshaw at zedshaw.com Thu Aug 3 03:13:56 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:13:56 -0700 Subject: [Mongrel] Getting ssl environment to mongrel from apache In-Reply-To: <1f060c4c0607251051p6259b536hf00c529dd9be0c9f@mail.gmail.com> References: <1f060c4c0607251051p6259b536hf00c529dd9be0c9f@mail.gmail.com> Message-ID: <1154589236.6047.62.camel@localhost.localdomain> On Tue, 2006-07-25 at 10:51 -0700, snacktime wrote: > 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. > Did you get this working yet? -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 3 03:24:58 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:24:58 -0700 Subject: [Mongrel] Mongrel process unexpectedly dying In-Reply-To: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> References: <1200dbac0607180908o6ca23864pee88d371b7642778@mail.gmail.com> Message-ID: <1154589898.6047.70.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. > BTW, did you have ruby-sendfile installed at all? -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From schwuk at gmail.com Thu Aug 3 03:26:08 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 08:26:08 +0100 Subject: [Mongrel] Mongrel processes Message-ID: <2e60a9e60608030026p6314477j787eae2dd0bfdb32@mail.gmail.com> Whilst monitoring my host I noticed that there were three mongrel_rails processes running for a single (non mongrel_clustered) application. Is this normal? Do the processes share the memory top indicates they're each using? Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From zedshaw at zedshaw.com Thu Aug 3 03:26:52 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:26:52 -0700 Subject: [Mongrel] FF1.0 + Prototype Ajax not working in 0.3.13.x In-Reply-To: <64e1f5070607162218k68cf80cakdb27ef7a25765b84@mail.gmail.com> References: <64e1f5070607162218k68cf80cakdb27ef7a25765b84@mail.gmail.com> Message-ID: <1154590012.6047.74.camel@localhost.localdomain> On Mon, 2006-07-17 at 13:18 +0800, choonkeat wrote: > 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.request > doesn'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. > Hey, could you file this in the bug tracker so I can work it? Thanks. I'd do it but I'm busy :-) Zed From zedshaw at zedshaw.com Thu Aug 3 03:31:47 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:31:47 -0700 Subject: [Mongrel] crashing mongrel In-Reply-To: References: Message-ID: <1154590307.6047.78.camel@localhost.localdomain> Ben, Did you by chance have ruby-sendfile installed? I'm tracking down a bug that looks like this. Zed 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) > 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 > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From zedshaw at zedshaw.com Thu Aug 3 03:34:34 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:34:34 -0700 Subject: [Mongrel] Charset issue In-Reply-To: <082942B9-C091-4809-B6E8-668BA0D0E61B@flydown.org> References: <20060703094601.GY5504@suse.de> <082942B9-C091-4809-B6E8-668BA0D0E61B@flydown.org> Message-ID: <1154590474.6047.80.camel@localhost.localdomain> Did you resolve this Michele? If not could you post it as a bug. Please include: 1) OS used. 2) browser used. 3) mongrel version. 4) important log snippets from mongrel_rails start -e production -B (in log/mongrel_debug). Thanks. On Mon, 2006-07-03 at 12:07 +0200, Michele wrote: > 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 > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From zedshaw at zedshaw.com Thu Aug 3 03:36:38 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:36:38 -0700 Subject: [Mongrel] Mongrel processes In-Reply-To: <2e60a9e60608030026p6314477j787eae2dd0bfdb32@mail.gmail.com> References: <2e60a9e60608030026p6314477j787eae2dd0bfdb32@mail.gmail.com> Message-ID: <1154590598.6047.82.camel@localhost.localdomain> On Thu, 2006-08-03 at 08:26 +0100, Dave Murphy wrote: > Whilst monitoring my host I noticed that there were three > mongrel_rails processes running for a single (non mongrel_clustered) > application. Is this normal? Do the processes share the memory top > indicates they're each using? If it's linux then go ask the linux kernel guys why they show processes that way. :-) Otherwise, double check that you really are running just one. Use lsof -i -P | grep ruby to get a better picture. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 3 03:40:32 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 00:40:32 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> Message-ID: <1154590832.6047.89.camel@localhost.localdomain> On Thu, 2006-08-03 at 08:13 +0100, Dave Murphy wrote: > On 03/08/06, Zed Shaw wrote: > > I've been getting reports of people with serious stability problems in > > Mongrel. These problems go away instantly when they remove > > ruby-sendfile. > > You may want to nudge Coda to update his post [1] - I'd never heard of > sendfile until I read that, and it's often referred to in the > community. > > [1] http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ Thanks, contacted him. That seems to be the source. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From gethemant at gmail.com Thu Aug 3 04:13:11 2006 From: gethemant at gmail.com (hemant) Date: Thu, 3 Aug 2006 13:43:11 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: <1154588099.6047.44.camel@localhost.localdomain> References: <1154588099.6047.44.camel@localhost.localdomain> Message-ID: Thanks for following up. I am on Ubuntu server edition, and yes i have sendfile installed. But removing it may create some performance problem won't it? As for the mongrel version, you can already see in the earlier message, it is 0.3.13. I was earlier running, apache2 with fcgi and didn't face this issue. I am myself trying to investigate this problem. On 8/3/06, Zed Shaw wrote: > > On Wed, 2006-08-02 at 02:02 +0530, hemant wrote: > > Following errors are taken from monrgrel running in development mode. > > It complained routes.rb, no such file or directory and then sometimes > > i get application.rb, no such file or directory.Doesn't seem correct > > to me. > > > > Though not so often, but even production servers throw these errors > > Have you solved this yet? I'm working up my bug list. > > Try the following things: > > 1) remove ruby-sendfile if you have it installed. > 2) try the pre-release: sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ > 3) try your app with webrick and see if you get the error. > 4) tell me what OS and mongrel version this happens with. > > sorry if you gave me this info already, i'm just whipping through my > e-mail queue to catch up. > > > -- > 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/20060803/5e8fd3d0/attachment.html From kraemer at webit.de Thu Aug 3 05:10:56 2006 From: kraemer at webit.de (Jens Kraemer) Date: Thu, 3 Aug 2006 11:10:56 +0200 Subject: [Mongrel] Mongrel and Apache docs? In-Reply-To: <2e60a9e60608022359u21db6640v498bb878074c813a@mail.gmail.com> References: <94859C73-B65E-4C9B-AE9E-C2857FFC44B2@eXtension.org> <2e60a9e60608022359u21db6640v498bb878074c813a@mail.gmail.com> Message-ID: <20060803091056.GN26391@cordoba.webit.de> On Thu, Aug 03, 2006 at 07:59:02AM +0100, Dave Murphy wrote: > On 01/08/06, Jason Young wrote: > > basically for the init script and configuration file-based start/stop. > > I've written a howto on rolling your own init scripts for single > mongrel instances: > > http://schwuk.com/articles/2006/06/29/daemonizing-mongrel > > It could easily be adapted to use config files and/or clusters. > > > ProxyPass / http://127.0.0.1:mongrelport/ > > ProxyPassReverse / http://127.0.0.1:mongrelport/ > > Because I'm using a bunch of rewrites to enhance caching etc. I not > using ProxyPass anymore - I just use a proxying rewrite. I'll write > this up on my website as soon as I get the chance. I already did so some time ago (for Apache 2.0): http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge In the second half of the post, below Configuration / Apache there's a snippet of Apache config like I use it in my VirtualHost sections. It uses rewrite rules for serving static files via Apache and sends all remaining requests to localhost:8001. What actually listens on that port doesn't matter in terms of Apache configuration - it might be some load balancer like Pen, or just a single Mongrel instance. 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 schwuk at gmail.com Thu Aug 3 05:12:42 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 10:12:42 +0100 Subject: [Mongrel] Mongrel processes In-Reply-To: <1154590598.6047.82.camel@localhost.localdomain> References: <2e60a9e60608030026p6314477j787eae2dd0bfdb32@mail.gmail.com> <1154590598.6047.82.camel@localhost.localdomain> Message-ID: <2e60a9e60608030212k3b20acdfx963c3c6b57c9535c@mail.gmail.com> > Otherwise, double check that you really are running just one. Use lsof > -i -P | grep ruby to get a better picture. Running: $ sudo lsof -i -P | grep ruby ...gave me nothing. With a slight twist: $ sudo lsof -i -P | grep mongrel mongrel_r 7657 root 3u IPv4 9018835 TCP *:3000 (LISTEN) mongrel_r 7658 root 3u IPv4 9018835 TCP *:3000 (LISTEN) mongrel_r 7659 root 3u IPv4 9018835 TCP *:3000 (LISTEN) And finally: $ sudo ps ax | grep mongrel Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html 7657 ? S 490:07 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -c /home/schwuk/typo -e production -p 3000 -d 7658 ? S 0:00 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -c /home/schwuk/typo -e production -p 3000 -d 7659 ? S 0:01 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -c /home/schwuk/typo -e production -p 3000 -d 28223 pts/0 S+ 0:00 grep mongrel Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From kraemer at webit.de Thu Aug 3 05:28:48 2006 From: kraemer at webit.de (Jens Kraemer) Date: Thu, 3 Aug 2006 11:28:48 +0200 Subject: [Mongrel] Mongrel processes In-Reply-To: <2e60a9e60608030212k3b20acdfx963c3c6b57c9535c@mail.gmail.com> References: <2e60a9e60608030026p6314477j787eae2dd0bfdb32@mail.gmail.com> <1154590598.6047.82.camel@localhost.localdomain> <2e60a9e60608030212k3b20acdfx963c3c6b57c9535c@mail.gmail.com> Message-ID: <20060803092848.GB21809@cordoba.webit.de> On Thu, Aug 03, 2006 at 10:12:42AM +0100, Dave Murphy wrote: [..] > And finally: > > $ sudo ps ax | grep mongrel > Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html > 7657 ? S 490:07 /usr/bin/ruby1.8 /usr/bin/mongrel_rails > start -c /home/schwuk/typo -e production -p 3000 -d > 7658 ? S 0:00 /usr/bin/ruby1.8 /usr/bin/mongrel_rails > start -c /home/schwuk/typo -e production -p 3000 -d > 7659 ? S 0:01 /usr/bin/ruby1.8 /usr/bin/mongrel_rails > start -c /home/schwuk/typo -e production -p 3000 -d > 28223 pts/0 S+ 0:00 grep mongrel Seems to depend on the exact kernel you use - or on the Mongrel version. On a 2.6.16-2-xen-686 kernel running 0.3.13.2 I get similar output like the above - 3 processes per Mongrel instance. On a 2.6.8-3-k7 kernel running 0.3.13.4 it's only one entry per Mongrel instance. I don't think there's any difference in terms of memory consumption, imho it's just a difference in how ps shows processes / threads. I remember that back in my old Java days on some systems (2.4 kernels) ps showed each single Java thread, that behaviour disappeared with 2.6 kernels - then ps showed only one process per running application, regardless of any threads it has spawned. 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 jamesludlow at gmail.com Thu Aug 3 08:53:54 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Thu, 3 Aug 2006 07:53:54 -0500 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: <1154587989.6047.41.camel@localhost.localdomain> References: <1154587989.6047.41.camel@localhost.localdomain> Message-ID: On 8/3/06, Zed Shaw wrote: > I'll be investigating why it doesn't really work as advertised, and > really it's not worth the hassle for just a 20% perf boost on static > files (and ONLY static files, no other requests at all). Really, if you > need fast static files use a real web server instead. In my case, most of my content is static and the performance boost is very significant. I'm using file_column to manage the uploads, so using a "real web server" around this is just a pain. I haven't noticed any stability problems at all either. Is this something that people notice right away (perhaps due to something else in their environment), or will it sneak up on me? -- James From schwuk at gmail.com Thu Aug 3 09:25:50 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 3 Aug 2006 14:25:50 +0100 Subject: [Mongrel] Mongrel processes In-Reply-To: <20060803092848.GB21809@cordoba.webit.de> References: <2e60a9e60608030026p6314477j787eae2dd0bfdb32@mail.gmail.com> <1154590598.6047.82.camel@localhost.localdomain> <2e60a9e60608030212k3b20acdfx963c3c6b57c9535c@mail.gmail.com> <20060803092848.GB21809@cordoba.webit.de> Message-ID: <2e60a9e60608030625k3323e9f6p9da66ae44349253e@mail.gmail.com> On 03/08/06, Jens Kraemer wrote: > I don't think there's any difference in terms of memory consumption, > imho it's just a difference in how ps shows processes / threads. I > remember that back in my old Java days on some systems (2.4 kernels) ps > showed each single Java thread, that behaviour disappeared with 2.6 > kernels - then ps showed only one process per running application, > regardless of any threads it has spawned. I suspected it was threads rather than processes, but I wanted to confirm it. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From gethemant at gmail.com Thu Aug 3 10:08:58 2006 From: gethemant at gmail.com (hemant) Date: Thu, 3 Aug 2006 19:38:58 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: <1154588099.6047.44.camel@localhost.localdomain> Message-ID: Ok...I have removed sendfile and will see if the problem persists. There is one more strange error and this from server running in production mode, using Apache2.2, mod_proxy and mod_proxy_balancer and mongrel. I have a controller price_controller and i call it from main page, using <%= periodically_call_remote(:controller => 'price',:action => 'index',:frequency => 180) %> And sometime i get /appname/price not found errors. On 8/3/06, hemant wrote: > > Thanks for following up. > > I am on Ubuntu server edition, and yes i have sendfile installed. But > removing it may create some performance problem won't it? > As for the mongrel version, you can already see in the earlier message, it > is 0.3.13. > > I was earlier running, apache2 with fcgi and didn't face this issue. I am > myself trying to investigate this problem. > > > > > > > On 8/3/06, Zed Shaw wrote: > > > > On Wed, 2006-08-02 at 02:02 +0530, hemant wrote: > > > Following errors are taken from monrgrel running in development mode. > > > It complained routes.rb, no such file or directory and then sometimes > > > i get application.rb , no such file or directory.Doesn't seem correct > > > to me. > > > > > > Though not so often, but even production servers throw these errors > > > > Have you solved this yet? I'm working up my bug list. > > > > Try the following things: > > > > 1) remove ruby-sendfile if you have it installed. > > 2) try the pre-release: sudo gem install mongrel > > --source=http://mongrel.rubyforge.org/releases/ > > 3) try your app with webrick and see if you get the error. > > 4) tell me what OS and mongrel version this happens with. > > > > sorry if you gave me this info already, i'm just whipping through my > > e-mail queue to catch up. > > > > > > -- > > 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 > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060803/293c55e3/attachment.html From zedshaw at zedshaw.com Thu Aug 3 10:23:48 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 07:23:48 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: References: <1154587989.6047.41.camel@localhost.localdomain> Message-ID: <1154615028.5989.3.camel@localhost.localdomain> On Thu, 2006-08-03 at 07:53 -0500, James Ludlow wrote: > On 8/3/06, Zed Shaw wrote: > > I'll be investigating why it doesn't really work as advertised, and > > really it's not worth the hassle for just a 20% perf boost on static > > files (and ONLY static files, no other requests at all). Really, if you > > need fast static files use a real web server instead. > > In my case, most of my content is static and the performance boost is > very significant. I'm using file_column to manage the uploads, so > using a "real web server" around this is just a pain. > Measure the performance of both (with sendfile and without), you may find it's not that great (20% is a high estimate). > I haven't noticed any stability problems at all either. Is this > something that people notice right away (perhaps due to something else > in their environment), or will it sneak up on me? It sneaks up on you. Just one day you hit the right load and the OS starts canceling client requests at weird moments and Mongrel crashes for no reason. You're on your own now man. :-) -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 3 10:26:34 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 07:26:34 -0700 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: <1154588099.6047.44.camel@localhost.localdomain> Message-ID: <1154615194.5989.6.camel@localhost.localdomain> On Thu, 2006-08-03 at 19:38 +0530, hemant wrote: > Ok...I have removed sendfile and will see if the problem persists. > > There is one more strange error and this from server running in > production mode, using Apache2.2, mod_proxy and mod_proxy_balancer and > mongrel. > > I have a controller price_controller and i call it from main page, > using <%= periodically_call_remote(:controller => 'price',:action => > 'index',:frequency => 180) %> > > And sometime i get /appname/price not found errors. > Ok, so removing sendfile fixed problems for you? It's not quite clear from your message. As for the priodically_call_remote I'm thinking it's your code, double check though. The performance difference isn't that great and it isn't worth the stability problems. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From jamesludlow at gmail.com Thu Aug 3 10:40:51 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Thu, 3 Aug 2006 09:40:51 -0500 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: <1154615028.5989.3.camel@localhost.localdomain> References: <1154587989.6047.41.camel@localhost.localdomain> <1154615028.5989.3.camel@localhost.localdomain> Message-ID: On 8/3/06, Zed Shaw wrote: > On Thu, 2006-08-03 at 07:53 -0500, James Ludlow wrote: > > On 8/3/06, Zed Shaw wrote: > > > I'll be investigating why it doesn't really work as advertised, and > > > really it's not worth the hassle for just a 20% perf boost on static > > > files (and ONLY static files, no other requests at all). Really, if you > > > need fast static files use a real web server instead. > > > > In my case, most of my content is static and the performance boost is > > very significant. I'm using file_column to manage the uploads, so > > using a "real web server" around this is just a pain. > > > > Measure the performance of both (with sendfile and without), you may > find it's not that great (20% is a high estimate). Setting the performance issue aside for a moment, if I have a long download (i.e. streaming video), I'm going to tie up a mongrel process for one user for a relatively long time. This isn't a crisis, because I can just spawn more, and I'm more constrained by the bandwidth at the switch than by memory or CPU time. My use of the word "performance" was pretty vague and imprecise. I'll try it without sendfile, but with more mongrel processes and see what happens. > > I haven't noticed any stability problems at all either. Is this > > something that people notice right away (perhaps due to something else > > in their environment), or will it sneak up on me? > > It sneaks up on you. Just one day you hit the right load and the OS > starts canceling client requests at weird moments and Mongrel crashes > for no reason. > > You're on your own now man. :-) I appreciate the warning. With what seems like a sudden influx of stability problems and now this announcement about sendfile, I'm wondering if something else might be going on though. I'm not saying that ruby-sendfile isn't broken, but maybe something else changed recently that exposed this bug. -- James From gethemant at gmail.com Thu Aug 3 10:52:04 2006 From: gethemant at gmail.com (hemant) Date: Thu, 3 Aug 2006 20:22:04 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: <1154615194.5989.6.camel@localhost.localdomain> References: <1154588099.6047.44.camel@localhost.localdomain> <1154615194.5989.6.camel@localhost.localdomain> Message-ID: Well, at least now i am not getting application.rb and routes.rb file not found error. But I am still getting errors in perdiodically_call_remote. Here is the code snippet:
<%= render_component(:controller => '/price', :action => 'index') %>
<%= periodically_call_remote(:update => 'pricedlist', :url => {:controller => 'price',:action => 'index'}, :frequency => 180)%> Now just forget use of components for a while, I will replace this with widgets.But the point is, when the page loads for the first time, it loads allright. Now, for some ajax calls, i have put as the dummy url and when within this inlined view of price/index, you click somewhere and a "#" is appended to the url, in the next call to perdiodically_call_remote, i get : Recognition failed for "/foobar/public/price" Where foobar is application name. First of, should this call be "/foobar/price"? rather than /foobar/public/price. and i dont have any routes setup for this spefic for this controller. Here is my routes.rb file: ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' # This route can be invoked with purchase_url(:id => product.id) # You can have the root of your site routed by hooking up '' # -- just remember to delete public/index.html. map.connect '', :controller => "start" # Allow downloading Web Service WSDL as a file with an extension # instead of a file named 'wsdl' map.connect ':controller/service.wsdl', :action => 'wsdl' # Install the default route as the lowest priority. #map.connect ':controller/:action/:id', :controller => 'start' map.connect ':controller/:action/:id' end so what is the problem? On 8/3/06, Zed Shaw wrote: > > On Thu, 2006-08-03 at 19:38 +0530, hemant wrote: > > Ok...I have removed sendfile and will see if the problem persists. > > > > There is one more strange error and this from server running in > > production mode, using Apache2.2, mod_proxy and mod_proxy_balancer and > > mongrel. > > > > I have a controller price_controller and i call it from main page, > > using <%= periodically_call_remote(:controller => 'price',:action => > > 'index',:frequency => 180) %> > > > > And sometime i get /appname/price not found errors. > > > > Ok, so removing sendfile fixed problems for you? It's not quite clear > from your message. As for the priodically_call_remote I'm thinking it's > your code, double check though. > > The performance difference isn't that great and it isn't worth the > stability problems. > > > -- > 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/20060803/0b957aaf/attachment.html From gethemant at gmail.com Thu Aug 3 10:54:04 2006 From: gethemant at gmail.com (hemant) Date: Thu, 3 Aug 2006 20:24:04 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: <1154588099.6047.44.camel@localhost.localdomain> <1154615194.5989.6.camel@localhost.localdomain> Message-ID: If i dont touch any of the links within price/index view, which may append "#" to the url, then periodically_call_remote works fine. I am sort of sure, it could be a mongrel problem. On 8/3/06, hemant wrote: > > Well, at least now i am not getting application.rb and routes.rb file not > found error. > But I am still getting errors in perdiodically_call_remote. Here is the > code snippet: > >
> <%= render_component(:controller => '/price', :action => 'index') %> >
> <%= periodically_call_remote(:update => 'pricedlist', :url => {:controller > => 'price',:action => 'index'}, :frequency => 180)%> > > Now just forget use of components for a while, I will replace this with > widgets.But the point is, when the page loads for the first time, it loads > allright. Now, for some ajax calls, i have put
as the dummy > url and when within this inlined view of price/index, you click somewhere > and a "#" is appended to the url, in the next call to > perdiodically_call_remote, i get : > > Recognition failed for "/foobar/public/price" > > Where foobar is application name. First of, should this call be > "/foobar/price"? rather than /foobar/public/price. and i dont have any > routes setup for this spefic for this controller. > > Here is my routes.rb file: > > ActionController::Routing::Routes.draw do |map| > # The priority is based upon order of creation: first created -> highest > priority. > > # Sample of regular route: > # map.connect 'products/:id', :controller => 'catalog', :action => > 'view' > # Keep in mind you can assign values other than :controller and :action > > # Sample of named route: > # map.purchase 'products/:id/purchase', :controller => 'catalog', > :action => 'purchase' > # This route can be invoked with purchase_url(:id => product.id) > > # You can have the root of your site routed by hooking up '' > # -- just remember to delete public/index.html. > map.connect '', :controller => "start" > > # Allow downloading Web Service WSDL as a file with an extension > # instead of a file named 'wsdl' > map.connect ':controller/service.wsdl', :action => 'wsdl' > > # Install the default route as the lowest priority. > #map.connect ':controller/:action/:id', :controller => 'start' > map.connect ':controller/:action/:id' > end > so what is the problem? > > On 8/3/06, Zed Shaw wrote: > > > On Thu, 2006-08-03 at 19:38 +0530, hemant wrote: > > > Ok...I have removed sendfile and will see if the problem persists. > > > > > > There is one more strange error and this from server running in > > > production mode, using Apache2.2, mod_proxy and mod_proxy_balancer and > > > mongrel. > > > > > > I have a controller price_controller and i call it from main page, > > > using <%= periodically_call_remote(:controller => 'price',:action => > > > 'index',:frequency => 180) %> > > > > > > And sometime i get /appname/price not found errors. > > > > > > > Ok, so removing sendfile fixed problems for you? It's not quite clear > > from your message. As for the priodically_call_remote I'm thinking it's > > > > your code, double check though. > > > > The performance difference isn't that great and it isn't worth the > > stability problems. > > > > > > -- > > 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 > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060803/4784b09b/attachment.html From zedshaw at zedshaw.com Thu Aug 3 11:23:32 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 08:23:32 -0700 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: <1154588099.6047.44.camel@localhost.localdomain> <1154615194.5989.6.camel@localhost.localdomain> Message-ID: <1154618612.5989.15.camel@localhost.localdomain> On Thu, 2006-08-03 at 20:22 +0530, hemant wrote: > Well, at least now i am not getting application.rb and routes.rb file > not found error. Ok, good. > But I am still getting errors in perdiodically_call_remote. Here is > the code snippet: > Recognition failed for "/foobar/public/price" > Where foobar is application name. Unless you both configure the fronting proxy AND use the latest pre-release mongrel AND use the --prefix option, then having your app mounted at /foobar "application" will not work. Try: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And then: mongrel_rails start -e production --prefix=/foobar And see if that works. Lots of other stuff will most likely break though. You have to plan ahead for making your RoR app mountable at different bases. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From coda.hale at gmail.com Thu Aug 3 11:24:57 2006 From: coda.hale at gmail.com (Coda Hale) Date: Thu, 3 Aug 2006 08:24:57 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: <1154590832.6047.89.camel@localhost.localdomain> References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> <1154590832.6047.89.camel@localhost.localdomain> Message-ID: On 8/3/06, Zed Shaw wrote: > > You may want to nudge Coda to update his post [1] - I'd never heard of > > sendfile until I read that, and it's often referred to in the > > community. > > > > [1] http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ > > Thanks, contacted him. That seems to be the source. Nudged! Sorry for the problems--I figured it was a decent CYA maneuver if my proxying config let stuff through (which it did, at first), but I haven't experienced any problems with it. Either way, my post has been updated with the current recommendation to stay the hell away from sendfile. Thanks for the heads-up, Zed. -- Coda Hale http://blog.codahale.com From zedshaw at zedshaw.com Thu Aug 3 11:30:57 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 08:30:57 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: References: <1154587989.6047.41.camel@localhost.localdomain> <1154615028.5989.3.camel@localhost.localdomain> Message-ID: <1154619057.5989.23.camel@localhost.localdomain> On Thu, 2006-08-03 at 09:40 -0500, James Ludlow wrote: > On 8/3/06, Zed Shaw wrote: > Setting the performance issue aside for a moment, if I have a long > download (i.e. streaming video), I'm going to tie up a mongrel process > for one user for a relatively long time. This isn't a crisis, because > I can just spawn more, and I'm more constrained by the bandwidth at > the switch than by memory or CPU time. > I think you're misunderstanding the purpose of install ruby-sendfile. Even *without* sendfile installed Mongrel won't block on sending a file. It'll still chug away on multiple concurrent files without stopping anything else. There's a limit of course, but it's not locked like with Rails. What sendfile does is this: http://www.die.net/doc/linux/man/man2/sendfile.2.html It gives ruby the sendfile API. Problem with the sendfile API is that's it's implemented wildly differently on all the OS and even different versions of the OS. On some it blocks. On others it can throw EINTERRUPT. On still others it doesn't even do zero-copy. This is the main reason it causes instability in Mongrel. > My use of the word "performance" was pretty vague and imprecise. I'll > try it without sendfile, but with more mongrel processes and see what > happens. > You shouldn't need more Mongrel processes. > I appreciate the warning. With what seems like a sudden influx of > stability problems and now this announcement about sendfile, I'm > wondering if something else might be going on though. I'm not saying > that ruby-sendfile isn't broken, but maybe something else changed > recently that exposed this bug. No, what actually happened is Coda Hale put sendfile in a list of gems to install. Previously most folks weren't installing it. Now that they're following those docs they were just installing it arbitrarily without understanding what it did. With an increase in different people using sendfile for different apps I started getting complaints about stability. Telling them to remove sendfile fixed all their problems. Also, in every OS that I've tried it on the errors are related to differences in how sendfile is implemented. For example, FreeBSD was aborting sendfile with EINTERRUPT and returning the amount sent requiring that you send the remainder (which isn't very helpful). It was also doing this on exactly 32k boundaries, but only when the server is overloaded. Anyway, let me know how it works. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From jamesludlow at gmail.com Thu Aug 3 11:43:05 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Thu, 3 Aug 2006 10:43:05 -0500 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: <1154619057.5989.23.camel@localhost.localdomain> References: <1154587989.6047.41.camel@localhost.localdomain> <1154615028.5989.3.camel@localhost.localdomain> <1154619057.5989.23.camel@localhost.localdomain> Message-ID: On 8/3/06, Zed Shaw wrote: > On Thu, 2006-08-03 at 09:40 -0500, James Ludlow wrote: > > On 8/3/06, Zed Shaw wrote: > > > Setting the performance issue aside for a moment, if I have a long > > download (i.e. streaming video), I'm going to tie up a mongrel process > > for one user for a relatively long time. This isn't a crisis, because > > I can just spawn more, and I'm more constrained by the bandwidth at > > the switch than by memory or CPU time. > > > I think you're misunderstanding the purpose of install ruby-sendfile. > Even *without* sendfile installed Mongrel won't block on sending a file. > It'll still chug away on multiple concurrent files without stopping > anything else. There's a limit of course, but it's not locked like with > Rails. You are correct about my misunderstanding. I was mistaken about how mongrel would handle this. Why didn't I just check it out to begin with? Laziness apparently. Plus, sendfile "seemed" to be working great. > What sendfile does is this: > > http://www.die.net/doc/linux/man/man2/sendfile.2.html > > It gives ruby the sendfile API. Problem with the sendfile API is that's > it's implemented wildly differently on all the OS and even different > versions of the OS. On some it blocks. On others it can throw > EINTERRUPT. On still others it doesn't even do zero-copy. > > This is the main reason it causes instability in Mongrel. Cool, thanks. > No, what actually happened is Coda Hale put sendfile in a list of gems > to install. Previously most folks weren't installing it. Now that > they're following those docs they were just installing it arbitrarily > without understanding what it did. Yeah, those were the instructions that I used. It really is a nice piece of documentation, despite the current problems being found. > Anyway, let me know how it works. OK -- James From talk2sunder at gmail.com Thu Aug 3 12:08:15 2006 From: talk2sunder at gmail.com (Sunder ) Date: Thu, 3 Aug 2006 09:08:15 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> <1154590832.6047.89.camel@localhost.localdomain> Message-ID: Okay. So send file is bad and has been removed. Correct me if Iam wrong , but if you have apache installed and proxying through it, you dont really need sendfile . is that assumption correct? Sunder On 8/3/06, Coda Hale wrote: > > On 8/3/06, Zed Shaw wrote: > > > You may want to nudge Coda to update his post [1] - I'd never heard of > > > sendfile until I read that, and it's often referred to in the > > > community. > > > > > > [1] > http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ > > > > Thanks, contacted him. That seems to be the source. > > Nudged! > > Sorry for the problems--I figured it was a decent CYA maneuver if my > proxying config let stuff through (which it did, at first), but I > haven't experienced any problems with it. Either way, my post has been > updated with the current recommendation to stay the hell away from > sendfile. > > Thanks for the heads-up, Zed. > > -- > Coda Hale > http://blog.codahale.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/20060803/5891a64f/attachment.html From zedshaw at zedshaw.com Thu Aug 3 12:27:36 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 09:27:36 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> <1154590832.6047.89.camel@localhost.localdomain> Message-ID: <1154622456.7087.0.camel@localhost.localdomain> On Thu, 2006-08-03 at 09:08 -0700, Sunder wrote: > Okay. So send file is bad and has been removed. Correct me if Iam > wrong , but if you have apache installed and proxying through it, you > dont really need sendfile . is that assumption correct? You are correct! -- 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 Aug 3 12:34:41 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 3 Aug 2006 11:34:41 -0500 (CDT) Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> <1154590832.6047.89.camel@localhost.localdomain> Message-ID: <20060803113307.N92521@bravo.pjkh.com> > Okay. So send file is bad and has been removed. Correct me if Iam wrong , > but if you have apache installed and proxying through it, you dont really > need sendfile . is that assumption correct? Depends on how you're proxying I think... If you pass everything to mongrel, well, everything will get handled by mongrel. If you hadd those re-write rules that check file existence thatn probably not as important. We're running 0.3.13 on centos with sendfile doing a *lot* of traffic, and not seeing any issues... although I wouldn't be surprised if sendfile was never being activated as we've got those rewrite rules in place for existing files... -philip > > Sunder > > On 8/3/06, Coda Hale wrote: >> >> On 8/3/06, Zed Shaw wrote: >> > > You may want to nudge Coda to update his post [1] - I'd never heard of >> > > sendfile until I read that, and it's often referred to in the >> > > community. >> > > >> > > [1] >> http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ >> > >> > Thanks, contacted him. That seems to be the source. >> >> Nudged! >> >> Sorry for the problems--I figured it was a decent CYA maneuver if my >> proxying config let stuff through (which it did, at first), but I >> haven't experienced any problems with it. Either way, my post has been >> updated with the current recommendation to stay the hell away from >> sendfile. >> >> Thanks for the heads-up, Zed. >> >> -- >> Coda Hale >> http://blog.codahale.com >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > From tlockney at gmail.com Thu Aug 3 12:44:41 2006 From: tlockney at gmail.com (Thomas Lockney) Date: Thu, 3 Aug 2006 09:44:41 -0700 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> <1154590832.6047.89.camel@localhost.localdomain> Message-ID: On 8/3/06, Sunder wrote: > Okay. So send file is bad and has been removed. Correct me if Iam wrong , > but if you have apache installed and proxying through it, you dont really > need sendfile . is that assumption correct? It depends on how you set up the proxy. In general, no, everything will go through mongrel, you would have to either explicitly map only certain paths to mongrel (for anything that's not static) or explicitly exclude things that are static (can't recall how or even if this is possible with mod_proxy using filetypes, but you can always use mod_rewrite to do more complicated stuff). Thomas From me at seebq.com Thu Aug 3 12:57:38 2006 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 3 Aug 2006 12:57:38 -0400 Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> <1154590832.6047.89.camel@localhost.localdomain> Message-ID: <3a2de0cd0608030957j6f3eaa26gd623677d9a3b798a@mail.gmail.com> Just curious, if you are really need the "performance" for static files, why not use an asset_host ? i haven't personally used it, nor do I fully know what it does, but on a cursory, half-hazard glance, it appears you can serve up content from another web server (lightty, apache, etc.) here for all your other stuff: http://asset.yourapp.com/images/zed_rules.gif just tossin' it out there.... On 8/3/06, Thomas Lockney wrote: > On 8/3/06, Sunder wrote: > > Okay. So send file is bad and has been removed. Correct me if Iam wrong , > > but if you have apache installed and proxying through it, you dont really > > need sendfile . is that assumption correct? > > It depends on how you set up the proxy. In general, no, everything > will go through mongrel, you would have to either explicitly map only > certain paths to mongrel (for anything that's not static) or > explicitly exclude things that are static (can't recall how or even if > this is possible with mod_proxy using filetypes, but you can always > use mod_rewrite to do more complicated stuff). > > Thomas > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com From mongrel at philip.pjkh.com Thu Aug 3 13:32:48 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 3 Aug 2006 12:32:48 -0500 (CDT) Subject: [Mongrel] [WARNING] don't use ruby-sendfile In-Reply-To: <3a2de0cd0608030957j6f3eaa26gd623677d9a3b798a@mail.gmail.com> References: <1154587989.6047.41.camel@localhost.localdomain> <2e60a9e60608030013t4817cd5ao9faf03a62973ae78@mail.gmail.com> <1154590832.6047.89.camel@localhost.localdomain> <3a2de0cd0608030957j6f3eaa26gd623677d9a3b798a@mail.gmail.com> Message-ID: <20060803123211.A93740@bravo.pjkh.com> > Just curious, if you are really need the "performance" for static > files, why not use an asset_host ? i haven't personally used it, nor > do I fully know what it does, but on a cursory, half-hazard glance, it > appears you can serve up content from another web server (lightty, > apache, etc.) here for all your other stuff: > > http://asset.yourapp.com/images/zed_rules.gif > > just tossin' it out there.... Because sometimes you work with people who aren't good about using the various _tag method that make this work... heh. but yeah, it would help. > > On 8/3/06, Thomas Lockney wrote: >> On 8/3/06, Sunder wrote: >>> Okay. So send file is bad and has been removed. Correct me if Iam wrong , >>> but if you have apache installed and proxying through it, you dont really >>> need sendfile . is that assumption correct? >> >> It depends on how you set up the proxy. In general, no, everything >> will go through mongrel, you would have to either explicitly map only >> certain paths to mongrel (for anything that's not static) or >> explicitly exclude things that are static (can't recall how or even if >> this is possible with mod_proxy using filetypes, but you can always >> use mod_rewrite to do more complicated stuff). >> >> Thomas >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > > > -- > Charles Brian Quinn > self-promotion: www.seebq.com > highgroove studios: www.highgroove.com > slingshot hosting: www.slingshothosting.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From schoefma at cip.ifi.lmu.de Thu Aug 3 15:00:59 2006 From: schoefma at cip.ifi.lmu.de (Maximilian Schoefmann) Date: Thu, 3 Aug 2006 21:00:59 +0200 (CEST) Subject: [Mongrel] Finding out on which port mongrel is running Message-ID: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> Hi *, What's the best way to find out on which port mongrel is running from within Rails? I have a cluster of mongrels behind a balancer (Pen) behind a webserver (Apache). In Rails, request.port return 80 and request.env['SERVER_PORT'] returns 3000 (the port of Pen) Any ideas? Cheers, Max From maurizio at gmail.com Thu Aug 3 15:21:44 2006 From: maurizio at gmail.com (Maurizio Balestrieri) Date: Thu, 3 Aug 2006 21:21:44 +0200 Subject: [Mongrel] Mongrel crash In-Reply-To: <1154588179.6047.46.camel@localhost.localdomain> References: <1c7fecb90608010230t7aff2a58jd203ee23d8d49f7@mail.gmail.com> <1154588179.6047.46.camel@localhost.localdomain> Message-ID: <1c7fecb90608031221m52d27700wf4da9880178a22fa@mail.gmail.com> On 8/3/06, Zed Shaw wrote: > Did you solve this Maurizio? Did you see a similar posting earlier > about RMagick and missing LD_* configurations when run under sudo? Hello Zed. This issue happened in the past roughly every couple of days, based on rather moderate usage pattern of a radiant powered site. At the end of the day, I tended to link it with radiant and its cache handling mechanism when the page content is a large CSS file ... I don't know exactly why I started linking all this factors and I don't have a proof of their relevance in causing the accident though. What I did was installing the latest mongrel (the one still in beta) suggested as a possible remedy for segfault, and using a CSS file (stored in the file system rather than in a radiant page--by sqlite3). So far the problem has not shown up again. I'll let you know if it happens again. Thank you. --M From snacktime at gmail.com Thu Aug 3 15:23:34 2006 From: snacktime at gmail.com (snacktime) Date: Thu, 3 Aug 2006 12:23:34 -0700 Subject: [Mongrel] Getting ssl environment to mongrel from apache In-Reply-To: <1154589236.6047.62.camel@localhost.localdomain> References: <1f060c4c0607251051p6259b536hf00c529dd9be0c9f@mail.gmail.com> <1154589236.6047.62.camel@localhost.localdomain> Message-ID: <1f060c4c0608031223w66684166x7d304b79f5855a65@mail.gmail.com> On 8/3/06, Zed Shaw wrote: > On Tue, 2006-07-25 at 10:51 -0700, snacktime wrote: > > 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. > > > > Did you get this working yet? No, but the problem is that I'm using apache 1.3 that doesn't have a way to set custom headers in the proxy request. 2.X would work, it's just not an option in this case. In any case it's definitely not a mongrel issue per say. Using scgi does work, although I've ran into a different problem where my app throws a Device Not Configured error when trying to make an https connection after being idle for a few hours. I have a feeling something in the mix isn't thread safe, but it's a bit above me to track down. The next thing I might try is to use pound. It will pass the ssl client certificate to mongrel/rails where I can just do the certificate verification manually with openssl. From gethemant at gmail.com Thu Aug 3 21:52:49 2006 From: gethemant at gmail.com (hemant) Date: Fri, 4 Aug 2006 07:22:49 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: <1154618612.5989.15.camel@localhost.localdomain> References: <1154588099.6047.44.camel@localhost.localdomain> <1154615194.5989.6.camel@localhost.localdomain> <1154618612.5989.15.camel@localhost.localdomain> Message-ID: Ok, I will worry abt apache proxy configuration later. First, 1. I did upgrade to pre-release mongrel 2. Fortunately my app was written to accomadate differenet mountable bases.Iuse paramaters.yml to load some directory specifc things. So stuff generally workd(except some image urls that were hardcoded!!). 3. so, currently for the mongrel instance that I am running from my $HOME directory.I do cd public_html/foobar/ mongrel_rails start -e production --prefix=/foobar And my app generally works, but the problem with periodically_call_remote persists. On 8/3/06, Zed Shaw wrote: > > On Thu, 2006-08-03 at 20:22 +0530, hemant wrote: > > Well, at least now i am not getting application.rb and routes.rb file > > not found error. > Ok, good. > > > But I am still getting errors in perdiodically_call_remote. Here is > > the code snippet: > > > Recognition failed for "/foobar/public/price" > > Where foobar is application name. > > Unless you both configure the fronting proxy AND use the latest > pre-release mongrel AND use the --prefix option, then having your app > mounted at /foobar "application" will not work. Try: > > sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > And then: > > mongrel_rails start -e production --prefix=/foobar > > And see if that works. Lots of other stuff will most likely break > though. You have to plan ahead for making your RoR app mountable at > different bases. > > > -- > 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/20060804/3096fb0c/attachment.html From gethemant at gmail.com Thu Aug 3 22:04:34 2006 From: gethemant at gmail.com (hemant) Date: Fri, 4 Aug 2006 07:34:34 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: <1154588099.6047.44.camel@localhost.localdomain> <1154615194.5989.6.camel@localhost.localdomain> <1154618612.5989.15.camel@localhost.localdomain> Message-ID: Worst part is, when i manually open http://my_host_name.com:3000/foobar/price it opens normally and yet periodically_call_remote fails to open the URL. just down below the code, I have one more periodically_call_remote which works flawlessly. On 8/4/06, hemant wrote: > > Ok, I will worry abt apache proxy configuration later. First, > > 1. I did upgrade to pre-release mongrel > 2. Fortunately my app was written to accomadate differenet mountable > bases.I use paramaters.yml to load some directory specifc things. So stuff > generally workd(except some image urls that were hardcoded!!). > 3. so, currently for the mongrel instance that I am running from my $HOME > directory.I do > cd public_html/foobar/ > > mongrel_rails start -e production --prefix=/foobar > And my app generally works, but the problem with periodically_call_remote > persists. > > > On 8/3/06, Zed Shaw wrote: > > > On Thu, 2006-08-03 at 20:22 +0530, hemant wrote: > > > Well, at least now i am not getting application.rb and routes.rb file > > > not found error. > > Ok, good. > > > > > But I am still getting errors in perdiodically_call_remote. Here is > > > the code snippet: > > > > > Recognition failed for "/foobar/public/price" > > > Where foobar is application name. > > > > Unless you both configure the fronting proxy AND use the latest > > pre-release mongrel AND use the --prefix option, then having your app > > mounted at /foobar "application" will not work. Try: > > > > sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > > > And then: > > > > mongrel_rails start -e production --prefix=/foobar > > > > And see if that works. Lots of other stuff will most likely break > > though. You have to plan ahead for making your RoR app mountable at > > different bases. > > > > > > -- > > 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 > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060804/92efb62d/attachment.html From gethemant at gmail.com Thu Aug 3 22:35:48 2006 From: gethemant at gmail.com (hemant) Date: Fri, 4 Aug 2006 08:05:48 +0530 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: <1154588099.6047.44.camel@localhost.localdomain> <1154615194.5989.6.camel@localhost.localdomain> <1154618612.5989.15.camel@localhost.localdomain> Message-ID: Ok the problem is solve, and it was nothing to do with mongrel. On 8/4/06, hemant wrote: > > Worst part is, when i manually open > http://my_host_name.com:3000/foobar/price it opens normally and yet > periodically_call_remote fails to open the URL. > > just down below the code, I have one more periodically_call_remote which > works flawlessly. > > > On 8/4/06, hemant wrote: > > > > Ok, I will worry abt apache proxy configuration later. First, > > > > 1. I did upgrade to pre-release mongrel > > 2. Fortunately my app was written to accomadate differenet mountable > > bases.I use paramaters.yml to load some directory specifc things. So > > stuff generally workd(except some image urls that were hardcoded!!). > > 3. so, currently for the mongrel instance that I am running from my > > $HOME directory.I do > > cd public_html/foobar/ > > > > mongrel_rails start -e production --prefix=/foobar > > And my app generally works, but the problem with > > periodically_call_remote persists. > > > > > > On 8/3/06, Zed Shaw < zedshaw at zedshaw.com> wrote: > > > > > On Thu, 2006-08-03 at 20:22 +0530, hemant wrote: > > > > Well, at least now i am not getting application.rb and routes.rbfile > > > > not found error. > > > Ok, good. > > > > > > > But I am still getting errors in perdiodically_call_remote. Here is > > > > the code snippet: > > > > > > > Recognition failed for "/foobar/public/price" > > > > Where foobar is application name. > > > > > > Unless you both configure the fronting proxy AND use the latest > > > pre-release mongrel AND use the --prefix option, then having your app > > > mounted at /foobar "application" will not work. Try: > > > > > > sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > > > > > And then: > > > > > > mongrel_rails start -e production --prefix=/foobar > > > > > > And see if that works. Lots of other stuff will most likely break > > > though. You have to plan ahead for making your RoR app mountable at > > > different bases. > > > > > > > > > -- > > > 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 > > > > > > -- > nothing much to talk > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060804/bfb2974a/attachment-0001.html From zedshaw at zedshaw.com Fri Aug 4 01:16:53 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 03 Aug 2006 22:16:53 -0700 Subject: [Mongrel] strange bugs while using mongrel, while running in development (and also sometimes in production mode) In-Reply-To: References: <1154588099.6047.44.camel@localhost.localdomain> <1154615194.5989.6.camel@localhost.localdomain> <1154618612.5989.15.camel@localhost.localdomain> Message-ID: <1154668613.6117.1.camel@localhost.localdomain> On Fri, 2006-08-04 at 08:05 +0530, hemant wrote: > Ok the problem is solve, and it was nothing to do with mongrel. Hehe, glad you figured that out :-) Hey, next time use the -B option to mongrel and then watch the log/mongrel_debug/rails.log. It'll tell you what is being passed to Rails as parameters. Helps a lot. The 0.3.13.4 release will have a speedier -B option. Zed From schwuk at gmail.com Fri Aug 4 04:26:13 2006 From: schwuk at gmail.com (Dave Murphy) Date: Fri, 4 Aug 2006 09:26:13 +0100 Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> Message-ID: <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> On 03/08/06, Maximilian Schoefmann wrote: > What's the best way to find out on which port mongrel is running from > within Rails? Why would you want to do this? If you set it up, you should know which ports you've configured... -- Dave Murphy (Schwuk) http://schwuk.com From schoefma at cip.ifi.lmu.de Fri Aug 4 04:42:26 2006 From: schoefma at cip.ifi.lmu.de (Maximilian Schoefmann) Date: Fri, 4 Aug 2006 10:42:26 +0200 (CEST) Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> Message-ID: <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> > On 03/08/06, Maximilian Schoefmann wrote: >> What's the best way to find out on which port mongrel is running from >> within Rails? > > Why would you want to do this? If you set it up, you should know which > ports you've configured... I want to invoke a maintenance method on all instances through a webinterface. To do this I do a local http call to the other mongrels from the current mongrel. The problem is of course, that the current mongrel gets a timeout when it tries to call itself (thus I need to know the port to be able to skip it). I'm of course open for better ideas how to accomplish this Regards, Max From kraemer at webit.de Fri Aug 4 05:36:57 2006 From: kraemer at webit.de (Jens Kraemer) Date: Fri, 4 Aug 2006 11:36:57 +0200 Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> Message-ID: <20060804093657.GB5627@cordoba.webit.de> On Fri, Aug 04, 2006 at 10:42:26AM +0200, Maximilian Schoefmann wrote: > > On 03/08/06, Maximilian Schoefmann wrote: > >> What's the best way to find out on which port mongrel is running from > >> within Rails? > > > > Why would you want to do this? If you set it up, you should know which > > ports you've configured... > > I want to invoke a maintenance method on all instances through a > webinterface. To do this I do a local http call to the other mongrels from > the current mongrel. > The problem is of course, that the current mongrel gets a timeout when it > tries to call itself (thus I need to know the port to be able to skip it). > > I'm of course open for better ideas how to accomplish this Maybe storing the port in an environment variable in the call to mongrel_rails would work ? something like: MONGREL_PORT=9200 mongrel_rails start -p $MONGREL_PORT -e production \ -a 127.0.0.1 -c /yourapp I think you could then access this via ENV['MONGREL_PORT'] 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 schoefma at cip.ifi.lmu.de Fri Aug 4 05:48:48 2006 From: schoefma at cip.ifi.lmu.de (Maximilian Schoefmann) Date: Fri, 4 Aug 2006 11:48:48 +0200 (CEST) Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <20060804093657.GB5627@cordoba.webit.de> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> <20060804093657.GB5627@cordoba.webit.de> Message-ID: <25350.193.180.189.158.1154684928.squirrel@webmail.ifi.lmu.de> > On Fri, Aug 04, 2006 at 10:42:26AM +0200, Maximilian Schoefmann wrote: >> > On 03/08/06, Maximilian Schoefmann wrote: >> >> What's the best way to find out on which port mongrel is running from >> >> within Rails? >> > >> > Why would you want to do this? If you set it up, you should know which >> > ports you've configured... >> >> I want to invoke a maintenance method on all instances through a >> webinterface. To do this I do a local http call to the other mongrels >> from >> the current mongrel. >> The problem is of course, that the current mongrel gets a timeout when >> it >> tries to call itself (thus I need to know the port to be able to skip >> it). >> >> I'm of course open for better ideas how to accomplish this > > Maybe storing the port in an environment variable in the call to > mongrel_rails would work ? Yes, this would be an option. Unfortunately I would loose the possibility to use the nice mongrel_cluster gem to manage my cluster (maybe this would be a useful addition to mongrel_cluster). I just thought that it should be possibile to find it out without using such tricks, as mongrel _has_ to know the port it is running on. But I couldn't find something in the API docs of mongrel either. From bradley at railsmachine.com Fri Aug 4 08:26:53 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Fri, 4 Aug 2006 08:26:53 -0400 Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <25350.193.180.189.158.1154684928.squirrel@webmail.ifi.lmu.de> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> <20060804093657.GB5627@cordoba.webit.de> <25350.193.180.189.158.1154684928.squirrel@webmail.ifi.lmu.de> Message-ID: Hi: > Yes, this would be an option. Unfortunately I would loose the > possibility > to use the nice mongrel_cluster gem to manage my cluster (maybe > this would > be a useful addition to mongrel_cluster). The port is included in the name of the pid file. Could you just parse it from the file name? 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/20060804/e19dda4d/attachment.html From schoefma at cip.ifi.lmu.de Fri Aug 4 09:01:52 2006 From: schoefma at cip.ifi.lmu.de (Maximilian Schoefmann) Date: Fri, 4 Aug 2006 15:01:52 +0200 (CEST) Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> <20060804093657.GB5627@cordoba.webit.de> <25350.193.180.189.158.1154684928.squirrel@webmail.ifi.lmu.de> Message-ID: <18667.193.180.189.158.1154696512.squirrel@webmail.ifi.lmu.de> Hi, >> Yes, this would be an option. Unfortunately I would loose the >> possibility >> to use the nice mongrel_cluster gem to manage my cluster (maybe >> this would >> be a useful addition to mongrel_cluster). > > The port is included in the name of the pid file. Could you just > parse it from the file name? yes, that's what I'm in fact doing now :-) But I have to open every file matching the mongrel..pid pattern and check if the stored pid matches the current pid. ... not the most elegant solution :-/ but it works Cheers, Max From mongrel at philip.pjkh.com Fri Aug 4 12:33:25 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Fri, 4 Aug 2006 11:33:25 -0500 (CDT) Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <18667.193.180.189.158.1154696512.squirrel@webmail.ifi.lmu.de> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> <20060804093657.GB5627@cordoba.webit.de> <25350.193.180.189.158.1154684928.squirrel@webmail.ifi.lmu.de> <18667.193.180.189.158.1154696512.squirrel@webmail.ifi.lmu.de> Message-ID: <20060804112922.P35630@bravo.pjkh.com> >>> Yes, this would be an option. Unfortunately I would loose the >>> possibility >>> to use the nice mongrel_cluster gem to manage my cluster (maybe >>> this would >>> be a useful addition to mongrel_cluster). >> >> The port is included in the name of the pid file. Could you just >> parse it from the file name? > > yes, that's what I'm in fact doing now :-) > But I have to open every file matching the mongrel..pid > pattern and check if the stored pid matches the current pid. > ... not the most elegant solution :-/ but it works We have the exception_notification plugin which emails us when there is a rails error... in that email we get the following: * URL: http://127.0.0.1:8004/search/results I just checked a couple of them and that :8004 changes to whatever the port is that is that mongrel. Digging through the code for the plugin I see this in a view: * URL: <%= @request.protocol %><%= @host %><%= @request.request_uri %> and this in a lib: :exception => exception, :host => request.env["HTTP_HOST"], We're using apache 2.2 and mongrel 0.3.13.... So it's gettable... From zedshaw at zedshaw.com Fri Aug 4 12:48:11 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 04 Aug 2006 09:48:11 -0700 Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> Message-ID: <1154710091.6002.4.camel@localhost.localdomain> On Thu, 2006-08-03 at 21:00 +0200, Maximilian Schoefmann wrote: > Hi *, > > What's the best way to find out on which port mongrel is running from > within Rails? > I have a cluster of mongrels behind a balancer (Pen) behind a webserver > (Apache). > > In Rails, > request.port return 80 > and > request.env['SERVER_PORT'] returns 3000 (the port of Pen) > > Any ideas? First off, doing this "connect back to mongrel" in rails is bad news. It'll lock up on you because Rails is locked while your making the request so you deadlock. Second, you should be doing this with an external monitor like monit. I highly recommend monit. And since you're using mongrel_cluster you should know what ports they're configured on. But, you'll probably want to continue with your idea anyway, so go check out handlers.rb StatsHandler and see how it's printing out stats. Every handler has access to it's "listener". So the snippet: results << table("settings", [ ["host",listener.host], ["port",listener.port], ["timeout",listener.timeout], ["workers max",listener.num_processors], ]) Is printing the host, port, and other setting for the handlers listener. So, write a mongrel handler and you won't have to worry about rails locking. The RDoc has more info like this. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From gethemant at gmail.com Fri Aug 4 23:42:07 2006 From: gethemant at gmail.com (hemant) Date: Sat, 5 Aug 2006 09:12:07 +0530 Subject: [Mongrel] Memory Usage after upgrading to pre-release and removing sendfile Message-ID: After the upgrade my memory usage is shown like this: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4592 flipl 16 0 197m 150m 2360 S 0.0 14.9 6:17.28 mongrel_rails 4585 mongrel 16 0 190m 140m 1756 S 0.0 13.9 0:52.86 mongrel_rails 4579 mongrel 16 0 200m 157m 1752 S 0.0 15.5 0:56.31 mongrel_rails 4582 mongrel 16 0 189m 139m 1752 S 0.0 13.8 1:05.89 mongrel_rails 5427 foo 16 0 184m 139m 1732 S 0.0 13.8 3:30.28 mongrel_rails 5092 blah 16 0 175m 138m 1720 S 0.0 13.7 0:44.70 mongrel_rails 4365 flipl 15 0 8796 2060 1596 S 0.0 0.2 0:15.71 smbd 4089 mysql 15 0 126m 5940 1568 S 0.0 0.6 7:26.58 mysqld 3982 www-data 16 0 20752 2620 1552 S 0.0 0.3 0:01.56 httpd 5498 www-data 15 0 18332 2208 1464 S 0.0 0.2 0:00.29 httpd 5335 flipl 16 0 35852 15m 1432 S 0.0 1.6 3:24.55 ruby 3984 www-data 16 0 16760 2084 1376 S 0.0 0.2 0:01.15 httpd 5032 root 16 0 8656 1708 1372 S 0.0 0.2 0:00.16 smbd 3985 www-data 16 0 16784 2056 1352 S 0.0 0.2 0:01.58 httpd 3981 www-data 16 0 18580 1868 1240 S 0.0 0.2 0:02.12 httpd 4371 www-data 15 0 16280 1856 1240 S 0.0 0.2 0:00.66 httpd 3983 www-data 15 0 18184 1852 1232 S 0.0 0.2 0:01.29 httpd 4376 www-data 16 0 21080 1808 1228 S 0.0 0.2 0:01.13 httpd 5147 www-data 16 0 15540 1828 1224 S 0.0 0.2 0:00.49 httpd 5071 www-data 16 0 16496 1804 1216 S 0.0 0.2 0:00.91 httpd 5115 flipl 15 0 4884 1248 1196 S 0.0 0.1 0:00.11 irb Where servers running with username mongrel are proxied through mod_proxy_balancer in Apache2.2 and are running in production mode. Rest of the mongrel processes , doesn't use apache proxies and being run by developers from their individual home directories. The one mongrel running on top is running in development mode and rest all are running in production mode. Now, I agree our app is a little complex and we do lot of Ajax and Charting kind of styff.And truth to be told, it doesn't depend so much of databases. I am using memcache-client(Eric Hodel,et el), Ubuntu "Linux 2.6.15-23-server #1 SMP i686 GNU/Linux" with 1 GB of memory on AMD64 machine.Mysql version, 5.0.21(from Ubuntu rep). Apache2.2 and Mongrel 0.3.13.4. After I removed sendfile and upgraded to pre-release, I admit it has gone a little high.Previously it was PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 13982 foo 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 flipl 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 flipl 16 0 54280 28m 2156 S 0.0 2.8 1:41.25 ruby > 22750 blah 16 0 43428 23m 3908 S 0.0 2.3 0: 03.1 mongrel_rails > 3961 root 16 0 10012 8964 588 S 0.0 0.9 0:03.51 memcached > 22728 www-data16 0 13536 7536 2620 S 0.0 0.7 0:00.10 httpd > 22379 flipl 16 0 11980 7208 3060 S 0.0 0.7 0: 01.7 emacs We are in process of opimizing our code.And we are concentrating on: 1. Removing unnecessary instance variables 2. Removal of Components( We have only one component left in entire application) 3. Mysql query optimisation, but I am afraid our app, as i said before doesn't depend so much on databases, if you ignore basic authentication and other kind of stuff. 4. We use gnuplot( ploticus didn't fit our needs), through pipes and It is a major performance problem.We are in process of handling this stuff to a seperate server(which will do just that).But still using gnuplot though pipes in one thing, I personally don't like.Is there any viable solution? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060805/68c34ff9/attachment.html From al-mongrelusers at none.at Sat Aug 5 04:59:37 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 10:59:37 +0200 Subject: [Mongrel] Q about Mongrel::Configurator Message-ID: <20060805085937.GA30534@none.at> Hi, what is the preferd way to configure/start mongrel? [ ] with Mongrel::Configurator => HttpServer [ ] @var = HttpServer.new(...) @var.run I ask because the only debug methode i have found was in Mongrel::Configurator ;-) @Zed: are you also subscribed on nitro list?! regards Alex From carl.lerche at verizon.net Sat Aug 5 05:50:18 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 05 Aug 2006 02:50:18 -0700 Subject: [Mongrel] Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection? Message-ID: <4DBCBD12-EB17-4CF8-9614-DBC94601E8C8@verizon.net> Hey guys, Ok, basically I coded a ruby on rails CMS to manage a bunch of media files. I am finding that a lot of people are "hot linking" to these media files and would like to prevent this to save bandwidth. Usually in the past, it hasn't been a problem, I would add something like the following to my .htaccess file RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC] RewriteRule .(gif|jpg)$ - [F] However, with my httpd config containing the following lines now: ProxyPass / balancer://mycluster/ ProxyPassReverse / balancer://mycluster/ ProxyBlock images media Options Indexes FollowSymLinks The hotlink protection doesn't really work anymore. Does anybody know how I could implement this? Thanks, Carl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060805/0ac483c4/attachment.html From al-mongrelusers at none.at Sat Aug 5 06:08:36 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 12:08:36 +0200 Subject: [Mongrel] Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection? In-Reply-To: <4DBCBD12-EB17-4CF8-9614-DBC94601E8C8@verizon.net> References: <4DBCBD12-EB17-4CF8-9614-DBC94601E8C8@verizon.net> Message-ID: <20060805100836.GA32266@none.at> Hi, On Sam 05.08.2006 02:50, Carl Lerche wrote: > >Ok, basically I coded a ruby on rails CMS to manage a bunch of media >files. I am finding that a lot of people are "hot linking" to these >media files and would like to prevent this to save bandwidth. Usually >in the past, it hasn't been a problem, I would add something like the >following to my .htaccess file > >RewriteEngine on >RewriteCond %{HTTP_REFERER} !^$ >RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC] >RewriteRule .(gif|jpg)$ - [F] > >However, with my httpd config containing the following lines now: > >ProxyPass / balancer://mycluster/ >ProxyPassReverse / balancer://mycluster/ >ProxyBlock images media >Options Indexes FollowSymLinks > >The hotlink protection doesn't really work anymore. Does anybody know >how I could implement this? Where in your config are the Proxy*-Directives, in a Location/Director-Tag or in Global? I think this is a question for the httpd-users list, imho. Regards Alex From hutch at recursive.ca Sat Aug 5 09:42:09 2006 From: hutch at recursive.ca (Bob Hutchison) Date: Sat, 5 Aug 2006 09:42:09 -0400 Subject: [Mongrel] Input/output error on linux In-Reply-To: References: <1150117431.6940.0.camel@localhost.localdomain> <9AE4B975-D378-4F34-B73F-3506D1471E57@recursive.ca> <1150119078.6940.16.camel@localhost.localdomain> <393ED45A-1849-4269-A8AD-4E7A4D40FCBD@recursive.ca> <1150386249.6044.2.camel@localhost.localdomain> Message-ID: <71458281-7497-46EF-A22A-86B88D9D2424@recursive.ca> On Jun 15, 2006, at 5:15 PM, Bob Hutchison wrote: >> So you're seeing a HUP signal for some reason, so that's something >> you >> have to track down. But, HUP does a "reload" of Rails, which >> tends to >> not work so well. If you get a HUP and the server stops working >> after >> that, then the only thing you can do is not send the process HUP >> signals. > > I'm not sending a HUP signal, and I don't know who did. Looking > into it... I've installed on a VPS and the problem appears to have gone away. Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur -- xampl for Ruby -- From zedshaw at zedshaw.com Sat Aug 5 12:41:10 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 05 Aug 2006 09:41:10 -0700 Subject: [Mongrel] Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection? In-Reply-To: <4DBCBD12-EB17-4CF8-9614-DBC94601E8C8@verizon.net> References: <4DBCBD12-EB17-4CF8-9614-DBC94601E8C8@verizon.net> Message-ID: <1154796070.6039.2.camel@localhost.localdomain> On Sat, 2006-08-05 at 02:50 -0700, Carl Lerche wrote: > Hey guys, > > RewriteEngine on > RewriteCond %{HTTP_REFERER} !^$ > RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC] > RewriteRule .(gif|jpg)$ - [F] > > The hotlink protection doesn't really work anymore. Does anybody know > how I could implement this? I'm pretty sure that'll still work, but you'll want to turn on the mod_rewrite debugging to see what happens. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Sat Aug 5 12:44:06 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 05 Aug 2006 09:44:06 -0700 Subject: [Mongrel] Q about Mongrel::Configurator In-Reply-To: <20060805085937.GA30534@none.at> References: <20060805085937.GA30534@none.at> Message-ID: <1154796246.6039.6.camel@localhost.localdomain> On Sat, 2006-08-05 at 10:59 +0200, Alexander Lazic wrote: > Hi, > > what is the preferd way to configure/start mongrel? > > [ ] with Mongrel::Configurator => HttpServer > [ ] @var = HttpServer.new(...) @var.run > Use the Configurator since it's simpler, but if you have NIH syndrome like rails-core you can do it all yourself with the HttpServer directly. > I ask because the only debug methode i have found was in > Mongrel::Configurator ;-) > Well, the configurator is a DSL for configuring a Mongrel server (even with multiple ports), so all you need to do is take a look at the code and see how debug is implemented. > @Zed: are you also subscribed on nitro list?! > Yep, I troll the nitro list too. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From al-mongrelusers at none.at Sat Aug 5 13:27:30 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 19:27:30 +0200 Subject: [Mongrel] Q about Mongrel::Configurator In-Reply-To: <1154796246.6039.6.camel@localhost.localdomain> References: <20060805085937.GA30534@none.at> <1154796246.6039.6.camel@localhost.localdomain> Message-ID: <20060805172730.GA23804@none.at> On Sam 05.08.2006 09:44, Zed Shaw wrote: >On Sat, 2006-08-05 at 10:59 +0200, Alexander Lazic wrote: > >Use the Configurator since it's simpler, but if you have NIH syndrome >like rails-core you can do it all yourself with the HttpServer >directly. Sorry but what is the 'NIH syndrome'?! >> I ask because the only debug methode i have found was in >> Mongrel::Configurator ;-) > >Well, the configurator is a DSL for configuring a Mongrel server (even >with multiple ports), so all you need to do is take a look at the code >and see how debug is implemented. With multiple ports, i have look into the mongrel/configurator.rb but the as i understand the source with :port i can only use one port or do you mean in a for-loop outside the listerners?! >> @Zed: are you also subscribed on nitro list?! > >Yep, I troll the nitro list too. ;-) Regards Alex From zedshaw at zedshaw.com Sat Aug 5 13:44:05 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 05 Aug 2006 10:44:05 -0700 Subject: [Mongrel] Q about Mongrel::Configurator In-Reply-To: <20060805172730.GA23804@none.at> References: <20060805085937.GA30534@none.at> <1154796246.6039.6.camel@localhost.localdomain> <20060805172730.GA23804@none.at> Message-ID: <1154799845.6039.46.camel@localhost.localdomain> On Sat, 2006-08-05 at 19:27 +0200, Alexander Lazic wrote: > On Sam 05.08.2006 09:44, Zed Shaw wrote: > >On Sat, 2006-08-05 at 10:59 +0200, Alexander Lazic wrote: > > > >Use the Configurator since it's simpler, but if you have NIH syndrome > >like rails-core you can do it all yourself with the HttpServer > >directly. > > Sorry but what is the 'NIH syndrome'?! Not Invented Here Syndrome. Means people like to go implement their own versions of stuff not because the current one has deficiencies but because they think they're smarter and obviously anything someone else implements must be crap. The problem with NIH isn't re-implementing stuff (Mongrel does this), the problem with it is people who have NIH syndrome just immediately assume the previous author was an asshole/idiot/moron/shitbag/etc. and they don't try to understand the motivation for the current implementation. Eventually what happens is they end up implementing the exact same thing but in a different style because they encounter all the same problems and use all the same basic solutions. Then they waste a bunch of work on something that isn't really better, just different. In other words, just use Configurator, but do it like RailsConfigurator where Nitro specific stuff is done in a subclass. Trying to do it all yourself defeats the stuff I've already figured out. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From al-mongrelusers at none.at Sat Aug 5 13:59:38 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 19:59:38 +0200 Subject: [Mongrel] Q about Mongrel::Configurator In-Reply-To: <1154799845.6039.46.camel@localhost.localdomain> References: <20060805085937.GA30534@none.at> <1154796246.6039.6.camel@localhost.localdomain> <20060805172730.GA23804@none.at> <1154799845.6039.46.camel@localhost.localdomain> Message-ID: <20060805175938.GE23804@none.at> On Sam 05.08.2006 10:44, Zed Shaw wrote: >On Sat, 2006-08-05 at 19:27 +0200, Alexander Lazic wrote: > >> Sorry but what is the 'NIH syndrome'?! > >Not Invented Here Syndrome. Means people like to go implement their >own versions of stuff not because the current one has deficiencies but >because they think they're smarter and obviously anything someone else >implements must be crap. Aha this one, it's a nice abbreviation, i never heard it ;-) >In other words, just use Configurator, but do it like RailsConfigurator >where Nitro specific stuff is done in a subclass. Trying to do it all >yourself defeats the stuff I've already figured out. Well do you mean to add a lib/mongrel/nitro.rb intro mongrel?! Sorry but i'am not sure that i understand your right?! Regards Alex From zedshaw at zedshaw.com Sat Aug 5 14:03:33 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 05 Aug 2006 11:03:33 -0700 Subject: [Mongrel] Q about Mongrel::Configurator In-Reply-To: <20060805175938.GE23804@none.at> References: <20060805085937.GA30534@none.at> <1154796246.6039.6.camel@localhost.localdomain> <20060805172730.GA23804@none.at> <1154799845.6039.46.camel@localhost.localdomain> <20060805175938.GE23804@none.at> Message-ID: <1154801013.6039.48.camel@localhost.localdomain> On Sat, 2006-08-05 at 19:59 +0200, Alexander Lazic wrote: > On Sam 05.08.2006 10:44, Zed Shaw wrote: > >In other words, just use Configurator, but do it like RailsConfigurator > >where Nitro specific stuff is done in a subclass. Trying to do it all > >yourself defeats the stuff I've already figured out. > > Well do you mean to add a lib/mongrel/nitro.rb intro mongrel?! > > Sorry but i'am not sure that i understand your right?! That could be the end result, and I'm willing to help to do that. What I actually mean is instead of hand coding your own configuration script, use the features in Configurator. Just look at RailsConfigurator. Please? :-) -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From al-mongrelusers at none.at Sat Aug 5 14:09:01 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 20:09:01 +0200 Subject: [Mongrel] Q about Mongrel::Configurator In-Reply-To: <1154801013.6039.48.camel@localhost.localdomain> References: <20060805085937.GA30534@none.at> <1154796246.6039.6.camel@localhost.localdomain> <20060805172730.GA23804@none.at> <1154799845.6039.46.camel@localhost.localdomain> <20060805175938.GE23804@none.at> <1154801013.6039.48.camel@localhost.localdomain> Message-ID: <20060805180901.GA26099@none.at> On Sam 05.08.2006 11:03, Zed Shaw wrote: >On Sat, 2006-08-05 at 19:59 +0200, Alexander Lazic wrote: >> >> Well do you mean to add a lib/mongrel/nitro.rb intro mongrel?! >> >> Sorry but i'am not sure that i understand your right?! > >That could be the end result, and I'm willing to help to do that. What >I actually mean is instead of hand coding your own configuration >script, use the features in Configurator. Wow i'am very suprised about this to hear *baff* ;-)) >Just look at RailsConfigurator. Please? :-) Thats the point which i have thought to start ;-)) As you may assume i like to read the source ;-) About the question on nitro list about mongrel starts rails and nitro starts mongrel, what is the *better* way?! I think we should also ask george what he want, shouldn't we? regards Alex From lists at lastonepicked.com Sat Aug 5 17:31:30 2006 From: lists at lastonepicked.com (HH) Date: Sat, 05 Aug 2006 14:31:30 -0700 Subject: [Mongrel] Uploading/file_column and Mongrel Message-ID: Howdy, I recently switched an app to Mongrel and since the switch, when I upload files using the file_column plug-in, the files are not uploaded with the correct permissions. I want something like this: -rw-rw-rw- file.jpg But I am getting: -rw------- file.jpg So, of course the files aren't being served up by the Web server. Mongrel is running as the 'mongrel' user that I created when I set the system up. Any suggestions? I am on Red Hat Enterprise Linux 3. Thanks, Hunter From schwuk at gmail.com Sun Aug 6 05:12:45 2006 From: schwuk at gmail.com (Dave Murphy) Date: Sun, 6 Aug 2006 10:12:45 +0100 Subject: [Mongrel] Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection? In-Reply-To: <4DBCBD12-EB17-4CF8-9614-DBC94601E8C8@verizon.net> References: <4DBCBD12-EB17-4CF8-9614-DBC94601E8C8@verizon.net> Message-ID: <2e60a9e60608060212u54e0470gcac84ee6477bc85a@mail.gmail.com> On 05/08/06, Carl Lerche wrote: > The hotlink protection doesn't really work anymore. Does anybody know how I > could implement this? I had a similar problem when I re-configured my server to use Apache + mod_proxy + mongrel. I had some rewrite rules to handle feeds (re-directed to Feedburner), page caching (inspired by Coda's howto) and links from my previous blog engine. I couldn't get re-write to work until I dropped the ProxyPass lines and put the following in: RewriteRule ^/(.*)$ http://localhost:3000%{REQUEST_URI} [P,QSA,L] Now the all the other rewrite rules work as intended, and mongrel still handles dynamic queries. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From schoefma at cip.ifi.lmu.de Mon Aug 7 03:32:01 2006 From: schoefma at cip.ifi.lmu.de (Maximilian Schoefmann) Date: Mon, 7 Aug 2006 09:32:01 +0200 (CEST) Subject: [Mongrel] Finding out on which port mongrel is running In-Reply-To: <20060804112922.P35630@bravo.pjkh.com> References: <61199.213.89.99.25.1154631659.squirrel@webmail.ifi.lmu.de> <2e60a9e60608040126q4f7caca2o77dde08a4cdacf18@mail.gmail.com> <36785.193.180.189.158.1154680946.squirrel@webmail.ifi.lmu.de> <20060804093657.GB5627@cordoba.webit.de> <25350.193.180.189.158.1154684928.squirrel@webmail.ifi.lmu.de> <18667.193.180.189.158.1154696512.squirrel@webmail.ifi.lmu.de> <20060804112922.P35630@bravo.pjkh.com> Message-ID: <50729.193.180.189.158.1154935921.squirrel@webmail.ifi.lmu.de> >>>> Yes, this would be an option. Unfortunately I would loose the >>>> possibility >>>> to use the nice mongrel_cluster gem to manage my cluster (maybe >>>> this would >>>> be a useful addition to mongrel_cluster). >>> >>> The port is included in the name of the pid file. Could you just >>> parse it from the file name? >> >> yes, that's what I'm in fact doing now :-) >> But I have to open every file matching the mongrel..pid >> pattern and check if the stored pid matches the current pid. >> ... not the most elegant solution :-/ but it works > > We have the exception_notification plugin which emails us when there is a > rails error... in that email we get the following: > > * URL: http://127.0.0.1:8004/search/results > > I just checked a couple of them and that :8004 changes to whatever the > port is that is that mongrel. Digging through the code for the plugin I > see this in a view: > > * URL: <%= @request.protocol %><%= @host %><%= @request.request_uri %> > > and this in a lib: > > :exception => exception, :host => request.env["HTTP_HOST"], > > We're using apache 2.2 and mongrel 0.3.13.... > > So it's gettable... I'm sure Apache 2.2/mod_proxy_balancer does a better job in forwarding the correct port to rails. Unfortunately I'm doomed to Apache 2.0 / Pen here. But good to know. From christopher.k.hall at gmail.com Mon Aug 7 09:30:24 2006 From: christopher.k.hall at gmail.com (Chris Hall) Date: Mon, 7 Aug 2006 09:30:24 -0400 Subject: [Mongrel] some questions about mongrel Message-ID: i posted some of these questions on the rails list, but thought that i should probably post them here instead. zed has already answered one of my questions, but i did have a couple more. 1) mongrel is not writing the pid file, which i have specified in the config file --- :cwd: /srv/www/railsapps/rftrack :includes: - mongrel :log_file: log/mongrel.log :config_script: :pid_file: log/mongrel.pid :num_processors: 1024 :environment: production :group: webdev :docroot: public :user: mongrel :timeout: 0 :host: 0.0.0.0 :mime_map: :port: "3010" :debug: false :daemon: true i start mongrel from within the application root as: mongrel_rails start -C config/mongrel.yml the mongrel.log file IS created and written to just fine. all directories in the app are group owned by 'webdev' and are group writable and accessible. 2) i saw this in an earlier posting to the mailing list. i switched from apache2/fcgi to apache2/mongrel (with mod_proxy) on friday morning. apache2/mongrel is on a different server than the first setup, basically a brand new install of the app. everything ran fine for the most part, except for a strange session issue which i am not going to worry about unless it reappears. i came in this morning and all the rails apps i have running under apache2/mongrel would not respond. after looking into their respective apache logs, i saw the following: [Mon Aug 07 06:29:42 2006] [error] [client 10.200.14.187] proxy: error reading status line from remote server localhost [Mon Aug 07 06:29:42 2006] [error] [client 10.200.14.187] proxy: Error reading from remote server returned by / [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: HTTP: attempt to connect to [::1]:3010 (localhost) failed [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling worker for (localhost) [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection for (localhost) [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection for (localhost) [Mon Aug 07 06:30:29 2006] [error] proxy: HTTP: disabled connection for (localhost) [Mon Aug 07 06:30:29 2006] [error] proxy: HTTP: disabled connection for (localhost) [Mon Aug 07 06:30:31 2006] [error] proxy: HTTP: disabled connection for (localhost) [Mon Aug 07 06:30:31 2006] [error] proxy: HTTP: disabled connection for (localhost) each mongrel instance runs on it's own port, so this is the same for each app, just a different port (3000, 3010 and 3020). i had to kill each mongrel instance, restart them and then restart apache. everything seems ok now. based on the previous conversation, only one of these applications has anything to do with uploading and that app was never even accessed apparently, except when it produced that error. trying to access the apps directly, rather than via apache/proxy exhibited the same behavior i n the browser (app would not render). here is my basic apache/proxy setup, which is the same for each app. ServerAdmin root at localhost ServerName rftrack.[protected].com ServerAlias rftrack DocumentRoot /srv/www/railsapps/rftrack/public CustomLog /var/log/apache2/rftrack_access_log common ErrorLog /var/log/apache2/rftrack_error_log AddDefaultCharset utf-8 Options -Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all ProxyRequests Off ProxyPass / http://localhost:3010/ ProxyPassReverse / http://localhost:3010/ ProxyPreserveHost On RewriteEngine On RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] i've seen mention of adding SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 hoever, the errors related to this 'fix' aren't the same errors i am experiencing. system info: rails: 1.1.4 mongrel: 0.3.13.3 ruby 1.8.4 apache2 2.2.0 thanks for any/all help. Chris From lists at lastonepicked.com Mon Aug 7 12:53:39 2006 From: lists at lastonepicked.com (HH) Date: Mon, 07 Aug 2006 09:53:39 -0700 Subject: [Mongrel] Uploading/file_column and Mongrel Message-ID: ** I am re-sending as I didn't get any responses and I'm hoping someone has the answer to this. ** Howdy, I recently switched an app to Mongrel and since the switch, when I upload files using the file_column plug-in, the files are not uploaded with the correct permissions. I want something like this: -rw-rw-rw- file.jpg But I am getting: -rw------- file.jpg So, of course the files aren't being served up by the Web server. Mongrel is running as the 'mongrel' user that I created when I set the system up. Any suggestions? I am on Red Hat Enterprise Linux 3. Thanks, Hunter From _ at whats-your.name Mon Aug 7 13:03:15 2006 From: _ at whats-your.name (carmen) Date: Mon, 7 Aug 2006 17:03:15 +0000 Subject: [Mongrel] DirHandler in surplus slashing / unrequited unescaping Message-ID: <20060807170315.GD22088@replic.net> im using Mongrels to serve up /usr/portage/packages for other gentoo boxen. since i guess im the guinea pig with the DirHandler, ran into a couple issues: first, the client showed no files in the remote binhost, turns out the DirHandler was adding a trailing "/" to every filename, presumably making the client think they were directories, not files. attached is a patch which fixes this behavior.. so now portage gets a bit further, and starts showing the normal xxxxoxxxx cache hit/miss line, and generating a lot of http traffic. eventually this fails, and mongrel stderr says: Mon Aug 07 12:42:02 EDT 2006: BAD CLIENT (24.66.193.83): Invalid HTTP format, parsing fails. in ngrep port 80, the last request is this: T 24.69.123.83:39560 -> 24.91.155.55:80 [AP] GET /files/usr/portage/packages/All//gtk -2.10.1.tbz2 HTTP/1.1..Host: m..Accept-Encoding: identity..Range: bytes=-3000.. .. which does look a little messed. theres a space between gtk and -. the package is actually gtk+-. presumably this line in DirHandler#send_dir_listing is causing it: child = HttpRequest.unescape(child) maybe it should only unescape this for the displayed version? eg within the ? i havent read over everything to look at the overall escaping strategy, but its what i will do for now, so that it stops mangling the filename.. cheers, C -------------- next part -------------- --- /a/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/handlers.rb 2006-08-07 12:26:22.000000000 -0400 +++ ./handlers.rb 2006-08-07 12:28:01.000000000 -0400 @@ -175,12 +175,9 @@ Dir.entries(dir).each do |child| child = HttpRequest.unescape(child) next if child == "." - - if child == ".." - out << "Up to parent..
" - else - out << "#{child}
" - end + out << "" + out << (child == ".." ? "Up to parent.." : child) + out << "
" end out << "" end From _ at whats-your.name Mon Aug 7 14:11:40 2006 From: _ at whats-your.name (carmen) Date: Mon, 7 Aug 2006 18:11:40 +0000 Subject: [Mongrel] DirHandler escaping (patch) Message-ID: <20060807181140.GA18139@replic.net> fiddled around a bit and got DirGHandler to work for both files and directories with spaces in them, and plusses in them (on disk). eg: gtk+-2.10.1.tbz2
hey whatsthis dir both end up at the right place now.. ..c. -------------- next part -------------- --- /a/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/handlers.rb 2006-08-07 12:26:22.000000000 -0400 +++ ./handlers.rb 2006-08-07 13:36:14.000000000 -0400 @@ -173,14 +173,10 @@ head[Const::CONTENT_TYPE] = "text/html" out << "Directory Listing" Dir.entries(dir).each do |child| - child = HttpRequest.unescape(child) next if child == "." - - if child == ".." - out << "Up to parent..
" - else - out << "#{child}
" - end + out << "" + out << (child == ".." ? "Up to parent.." : child) + out << "
" end out << "" end From brianm at apache.org Mon Aug 7 15:19:21 2006 From: brianm at apache.org (Brian McCallister) Date: Mon, 7 Aug 2006 12:19:21 -0700 Subject: [Mongrel] HTTP Pipelining Message-ID: I am trying to understand why Mongrel so forcefully disables http pipelining. The docs say because the spec is unclear, and it hurts performance. These reasons smell... wrong. The HTTP spec is pretty clear, and, er, I cannot find anywhere else that claims there is a performance drawback, and lots of studies (and personal benchmarks across years of writing webapps) showing how much it helps. The only common case I can think of for getting a possible performance boost from forcing a connection close is if you with certainty that there are no followup resource requests to the same domain, and the cost of maintaining connection state in memory is too high for the app server. This holds true for folks like Yahoo! or whatnot who use a CDN for resources (and use pipelining on the CDN connections) and separate app servers for the dynamic page elements, but... it seems to be a strange assumption for a web server to force on users. Anyway, trying to understand why it works this way. Anyone know? -Brian From carl.lerche at verizon.net Mon Aug 7 17:51:00 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Mon, 07 Aug 2006 14:51:00 -0700 Subject: [Mongrel] mongrel_cluster rc.d script for FreeBSD In-Reply-To: References: Message-ID: <9885BBC1-71AD-4D9B-86EA-532E847859AA@verizon.net> Hey there, Thanks for the script. I use FreeBSD too so this is really useful. I'm not much of a shell script person though. What would I have to change in order to manage more than one clusters? (so that they all can start on boot). Thanks, -carl On Jul 29, 2006, at 3:54 PM, Andrew Bennett wrote: > 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 > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From zedshaw at zedshaw.com Mon Aug 7 14:05:25 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 07 Aug 2006 11:05:25 -0700 Subject: [Mongrel] Uploading/file_column and Mongrel In-Reply-To: References: Message-ID: <1154973925.6038.3.camel@localhost.localdomain> On Mon, 2006-08-07 at 09:53 -0700, HH wrote: > ** I am re-sending as I didn't get any responses and I'm hoping someone has > the answer to this. ** > > Howdy, > > I recently switched an app to Mongrel and since the switch, when I upload > files using the file_column plug-in, the files are not uploaded with the > correct permissions. > > I want something like this: > > -rw-rw-rw- file.jpg > > But I am getting: > > -rw------- file.jpg > > So, of course the files aren't being served up by the Web server. > > Mongrel is running as the 'mongrel' user that I created when I set the > system up. > > Any suggestions? I am on Red Hat Enterprise Linux 3. I've been a bit busy, but verify that the user you run Mongrel as has the proper umode. Zed From zedshaw at zedshaw.com Mon Aug 7 14:12:01 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 07 Aug 2006 11:12:01 -0700 Subject: [Mongrel] DirHandler in surplus slashing / unrequited unescaping In-Reply-To: <20060807170315.GD22088@replic.net> References: <20060807170315.GD22088@replic.net> Message-ID: <1154974321.6038.8.camel@localhost.localdomain> On Mon, 2006-08-07 at 17:03 +0000, carmen wrote: > im using Mongrels to serve up /usr/portage/packages for other gentoo boxen. since i guess im the guinea pig with the DirHandler, ran into a couple issues: > Yep, but good timing because I'm working on the DirHandler right now. > first, the client showed no files in the remote binhost, turns out the DirHandler was adding a trailing "/" to every filename, presumably making the client think they were directories, not files. attached is a patch which fixes this behavior.. > Yeah, that was to get around how people don't add trailing slashes. I'm working up a fix that instead redirects to the / version, but haven't worked out the logic yet. I applied your patch and it all seems to work. Grab the latest pre-releases at: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > so now portage gets a bit further, and starts showing the normal xxxxoxxxx cache hit/miss line, and generating a lot of http traffic. eventually this fails, and mongrel stderr says: > > Mon Aug 07 12:42:02 EDT 2006: BAD CLIENT (24.66.193.83): Invalid HTTP format, parsing fails. > > in ngrep port 80, the last request is this: > > T 24.69.123.83:39560 -> 24.91.155.55:80 [AP] > GET /files/usr/portage/packages/All//gtk -2.10.1.tbz2 HTTP/1.1..Host: m..Accept-Encoding: identity..Range: bytes=-3000.. > .. > maybe it should only unescape this for the displayed version? eg within the ? i havent read over everything to look at the overall escaping strategy, but its what i will do for now, so that it stops mangling the filename.. Hmm, that's probably right. I'll put it in my list of bugs to fix, but feel free to work up a patch since you're probably the most advanced DirHandler user right now. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Aug 7 14:28:01 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 07 Aug 2006 11:28:01 -0700 Subject: [Mongrel] DirHandler escaping (patch) In-Reply-To: <20060807181140.GA18139@replic.net> References: <20060807181140.GA18139@replic.net> Message-ID: <1154975281.6975.1.camel@localhost.localdomain> On Mon, 2006-08-07 at 18:11 +0000, carmen wrote: > fiddled around a bit and got DirGHandler to work for both files and directories with spaces in them, and plusses in them (on disk). > > eg: > > gtk+-2.10.1.tbz2
> hey whatsthis dir > > both end up at the right place now.. Cool. I reversed your previous patch and did the update. Keep plugging at this since you're probably the most advanced DirHandler user out there right now. Also, why the hell are the gentoo folks using directory listings pages? You should look at making a nice rest service for that which makes it easier to collect the package info. Anyway, thanks for the patch, grab the pre-release and try it out. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From carl.lerche at verizon.net Mon Aug 7 22:46:45 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Mon, 07 Aug 2006 19:46:45 -0700 Subject: [Mongrel] Mongrel 0.3.13.3 error on start Message-ID: <01C58252-990F-41D1-BD63-DB4C1BFD9BD5@verizon.net> Hello, I'm trying to get a new application running with mongrel. I've been running a number of applications already using it and it's been working fine, however now I can't get mongrel to start. The only difference I can think of is that I'm using postgresql for this and not mysql. However, I am able to run the application using webrick. When I try to start it with mongrel, I get the following error: /usr/local/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/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/ mongrel.rb:850:in `uri' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:112:in `cloaker_' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/ mongrel.rb:832:in `listener' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:96:in `cloaker_' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/ mongrel.rb:750:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:83: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 I tried to go over my setup for any dumb slip that I could have made but I couldn't find any (although, I'm still betting it is something I did). Any ideas as to what the problem could be? Thanks, Carl From zedshaw at zedshaw.com Mon Aug 7 23:08:30 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 07 Aug 2006 20:08:30 -0700 Subject: [Mongrel] HTTP Pipelining In-Reply-To: References: Message-ID: <1155006510.5748.56.camel@localhost.localdomain> On Mon, 2006-08-07 at 12:19 -0700, Brian McCallister wrote: > I am trying to understand why Mongrel so forcefully disables http > pipelining. The docs say because the spec is unclear, and it hurts > performance. These reasons smell... wrong. The HTTP spec is pretty > clear, and, er, I cannot find anywhere else that claims there is a > performance drawback, and lots of studies (and personal benchmarks > across years of writing webapps) showing how much it helps. > The problem is performance, resources, and usage related. First, Ruby's IO subsystem isn't that great at processing HTTP style protocols since you have to parse off chunks, then parse more chunks, and since there's no decent ring buffer it requires tons of string creation. I've worked on this a bit but it's a real pain so I focused on just making Mongrel work well in the simple case. Second, Ruby only has 1024 file descriptors open for *all* files, in practical usage on a Rails server this is about 500 sockets before the server tanks badly. Allowing clients to keep sockets open means that clients very easily crash Ruby by just not closing them off. As it is now Mongrel has to boot clients that take too long in order to keep service levels high. It would get much more complex in a pipeline/keepalive situation where the sockets are kept open. Throw in threading issues around Rails, socket and file usage by random authors, and problems with how pipelined resources are dealt with (not by mongrel, but by the frameworks) and you've got a total mess. It's just simpler to process one request and go away. Third, Mongrel is more often used behind another more capable server and off localhost. Mongrel's not intended to be a full blown server, but rather just small enough and fast enough to get a Ruby application going. Rather than waste a lot of resources on making Mongrel handle all the nuances of the HTTP RFC I went and implemented what worked the fastest in *this* situation. This also indirectly helps with a common queuing problem when a series of pipeline requests cause one backend to be taken over by a client, thus shutting out many others. It turns out that when you're in a clustering situation most of the requests Mongrel handles are better done being sprayed around to multiple servers so that all clients get a fair chance at service. Those would be the reasons right now. Things may change in the future when the technology landscape for Mongrel changes, but until then it's enough work to just get this simplest case going well. > The only common case I can think of for getting a possible > performance boost from forcing a connection close is if you with > certainty that there are no followup resource requests to the same > domain, and the cost of maintaining connection state in memory is too > high for the app server. This holds true for folks like Yahoo! or > whatnot who use a CDN for resources (and use pipelining on the CDN > connections) and separate app servers for the dynamic page elements, > but... it seems to be a strange assumption for a web server to force > on users. > Again, forcing the connection closed works better in this situation because it's expected to work on localhost, and there's not a statistical difference in performance in that situation. But, if you're reading through the spec you might be able to help me out, since I'm writing a test suite for this very purpose (and then exploits around it). If you can, help me find the answers to these: 1) Can a client perpetually send pipelined requests eating up available socket descriptors (remember, ruby's only got 1024 available FDs, about 500 sockets in practical usage)? 2) Can a client send 20 or 30 requests right away and not process any responses, and then suddenly close? 3) Can a client "trickle" requests (send them very slowly and very chunked) in such a way that the server has to perform tons of processing? 4) Who closes? It's not clear if the client closes, the server closes, who's allowed to close, when, what situations. This is really unclear but incredibly important in a TCP/IP protocol, and in the HTTP RFC it's hidden in little SHOULD and MAY statements in all sorts of irrelevant sections. 5) What are the official size limits of each element of HTTP? Can someone send a 1M header element? 6) Why are servers required to be nice to malicious clients? All over the spec are things where the server is required to read all of the client's garbage, and then politely return an error. With DDoS you'd think this would change. So when is it appropriate for a server to be mean in order to protect itself? 7) What's the allowed time limit for a client to complete it's request? 8) Are pipelined requests all sent at once, and then all processed at once? Or, are they sent/processed/sent/processed in keeping with HTTP request/response semantics. a) If a client can pipeline 20 requests, but request #3 causes an error that requires the client be closed, does the server have to process the remaining 17 before responding (see #6). b) If a client does request/response then why have pipeline at all? c) How does a client make 20 requests, and then after getting #6 abort the remaining 13? d) What does the server do with all the resources it's gathered up if the socket is closed? e) The server can't just start sending since client receive buffers and server send buffers are finite and set by the OS. If this is the case, then either the server has to queue up all response and send when the client is done, or the client has to do request/response. d) If they do request/response, how do they synchronize the processing? It's a catch-22 if you say they can send 20 pipelined requests, but in actuality due to send/recv buffers they have to also process requests at the same time. Without a clear decision on this it's very difficult and pretty much either side can just stop processing without the other side knowing. 9) If both sides just keep sockets open and process whatever comes their way, then what prevents a malicious client or server from doing nothing and eating up resources. 10) If there's pipelined requests and responses then why is there chunked encoding, multipart mime, byte ranges, and other mechanisms for doing nearly the same thing. 11) If it's not explicitly declared that both sides will pipeline, and neither side needs to declare the size of it's content, then what prevents both sides from sending tons of junk? How does either side really know the end of a request? That's from my latest notes. As you can see most of the problems encountered tend to come from a lack of clarity in the areas of: * Asynchronous vs. Synchronous processing. * Request/Response vs. Batch vs. spray and pray. :-) * Abuse of resources by clients. * Changes in the technology landscape since 1999 that makes it so that servers are at a major disadvantage (DDoS baby). * A lack of understanding of the needs for web applications like Mongrel which typically run on localhost or highly controlled networks where much of this isn't necessary and only adds complexity. * Not anticipating that the *real* performance problem in web applications is *not* TCP/IP connection times, but rather the slow nature of dynamic page generation (can we get something other than Etag please?) > Anyway, trying to understand why it works this way. Anyone know? Yeah, you know what we should do, and you might get a kick out of this, but I'm working on a test suite in RFuzz that's exploring all the parts of the RFC. I've got sections 3 and 4 laid out and ready to be filled in with more to come. It basically goes through each part and makes sure a server is compliant. I'm also working up attacks and DDoS operations that exploit the ambiguous parts of the RFC using RFuzz. If you want, hook up with me off list and maybe we can fill out the RFuzz test suite that does this part of the RFC, then work out the exploits, *then* beef up Mongrel to deal with it. Could be fun. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Aug 7 23:09:21 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 07 Aug 2006 20:09:21 -0700 Subject: [Mongrel] Mongrel 0.3.13.3 error on start In-Reply-To: <01C58252-990F-41D1-BD63-DB4C1BFD9BD5@verizon.net> References: <01C58252-990F-41D1-BD63-DB4C1BFD9BD5@verizon.net> Message-ID: <1155006561.5748.58.camel@localhost.localdomain> On Mon, 2006-08-07 at 19:46 -0700, Carl Lerche wrote: > Hello, > > I'm trying to get a new application running with mongrel. I've been > running a number of applications already using it and it's been > working fine, however now I can't get mongrel to start. The only > difference I can think of is that I'm using postgresql for this and > not mysql. However, I am able to run the application using webrick. > When I try to start it with mongrel, I get the following error: You're on Debian, you don't have all the build tools installed, so Mongrle didn't build right. Search the mailing list to see the solution. It's really common. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From carl.lerche at verizon.net Mon Aug 7 23:22:25 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Mon, 07 Aug 2006 20:22:25 -0700 Subject: [Mongrel] Mongrel 0.3.13.3 error on start In-Reply-To: <1155006561.5748.58.camel@localhost.localdomain> References: <01C58252-990F-41D1-BD63-DB4C1BFD9BD5@verizon.net> <1155006561.5748.58.camel@localhost.localdomain> Message-ID: Zed, Thanks for the reply, but I'm not on Debian. I'm on FreeBSD 5.4- RELEASE (GENERIC). Also, I have exactly the same OS & setup as 3 other servers I manage and installed mongrel the same way as all the others. So, the problem is that mongrel didn't compile right? Should I try an uninstall / reinstall? Thanks, -carl On Aug 7, 2006, at 8:09 PM, Zed Shaw wrote: > On Mon, 2006-08-07 at 19:46 -0700, Carl Lerche wrote: >> Hello, >> >> I'm trying to get a new application running with mongrel. I've been >> running a number of applications already using it and it's been >> working fine, however now I can't get mongrel to start. The only >> difference I can think of is that I'm using postgresql for this and >> not mysql. However, I am able to run the application using webrick. >> When I try to start it with mongrel, I get the following error: > > You're on Debian, you don't have all the build tools installed, so > Mongrle didn't build right. > > Search the mailing list to see the solution. It's really common. > > > -- > 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 Mon Aug 7 23:31:18 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 07 Aug 2006 20:31:18 -0700 Subject: [Mongrel] Mongrel 0.3.13.3 error on start In-Reply-To: References: <01C58252-990F-41D1-BD63-DB4C1BFD9BD5@verizon.net> <1155006561.5748.58.camel@localhost.localdomain> Message-ID: <1155007878.5748.69.camel@localhost.localdomain> On Mon, 2006-08-07 at 20:22 -0700, Carl Lerche wrote: > Zed, > > Thanks for the reply, but I'm not on Debian. I'm on FreeBSD 5.4- > RELEASE (GENERIC). Also, I have exactly the same OS & setup as 3 > other servers I manage and installed mongrel the same way as all the > others. So, the problem is that mongrel didn't compile right? Should > I try an uninstall / reinstall? Yeah, try that. Basically when you get that error it's most likely because things didn't compile right. From dan.kubb at autopilotmarketing.com Tue Aug 8 00:12:33 2006 From: dan.kubb at autopilotmarketing.com (Dan Kubb) Date: Mon, 7 Aug 2006 21:12:33 -0700 Subject: [Mongrel] HTTP Pipelining In-Reply-To: <1155006510.5748.56.camel@localhost.localdomain> References: <1155006510.5748.56.camel@localhost.localdomain> Message-ID: <9B53A9BD-912F-4932-80AB-71C812384AAF@autopilotmarketing.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Zed, > But, if you're reading through the spec you might be able to help me > out, since I'm writing a test suite for this very purpose (and then > exploits around it). If you can, help me find the answers to these: I don't know very many of the answers to your questions since I've never implemented the pipelining part of an HTTP server before. Here's what I could find for a few of your questions from RFC 2616. Hope this helps. > 4) Who closes? It's not clear if the client closes, the server > closes, > who's allowed to close, when, what situations. This is really unclear > but incredibly important in a TCP/IP protocol, and in the HTTP RFC > it's > hidden in little SHOULD and MAY statements in all sorts of irrelevant > sections. http://rfc.net/rfc2616.html#s8.1.4 When a client or server wishes to time-out it SHOULD issue a graceful close on the transport connection. Clients and servers SHOULD both constantly watch for the other side of the transport close, and respond to it as appropriate. If a client or server does not detect the other side's close promptly it could cause unnecessary resource drain on the network. A client, server, or proxy MAY close the transport connection at any time. For example, a client might have started to send a new request at the same time that the server has decided to close the "idle" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress. This means that clients, servers, and proxies MUST be able to recover from asynchronous close events. Client software SHOULD reopen the transport connection and retransmit the aborted sequence of requests without user interaction so long as the request sequence is idempotent (see section 9.1.2). Non-idempotent methods or sequences MUST NOT be automatically retried, although user agents MAY offer a human operator the choice of retrying the request(s). Confirmation by user-agent software with semantic understanding of the application MAY substitute for user confirmation. The automatic retry SHOULD NOT be repeated if the second sequence of requests fails. Servers SHOULD always respond to at least one request per connection, if at all possible. Servers SHOULD NOT close a connection in the middle of transmitting a response, unless a network or client failure is suspected. Not completely clear, but gives a hint anyway. Hmm, is this one of those "irrelevant sections" you were talking about? ;-) > 5) What are the official size limits of each element of HTTP? Can > someone send a 1M header element? Header lengths? Actually I didn't see a direct reference, but there a hint in a round-about sort of way here: http://rfc.net/rfc2616.html#s19.4.7 HTTP implementations which share code with MHTML [45] implementations need to be aware of MIME line length limitations. Since HTTP does not have this limitation, HTTP does not fold long lines. MHTML messages being transported by HTTP follow all conventions of MHTML, including line length limitations and folding, canonicalization, etc., since HTTP transports all message-bodies as payload (see section 3.7.2) and does not interpret the content or any MIME header lines that might be contained therein. The key phrase being "implementations need to be aware of MIME line length limitations. Since HTTP does not have this limitation" leads me to believe they do not define any limit on header lengths. Actually the HTTP spec doesn't limit anything as far as I can tell. > 7) What's the allowed time limit for a client to complete it's > request? http://rfc.net/rfc2616.html#s8.1.4 Servers will usually have some time-out value beyond which they will no longer maintain an inactive connection. Proxy servers might make this a higher value since it is likely that the client will be making more connections through the same server. The use of persistent connections places no requirements on the length (or existence) of this time-out for either the client or the server. > 8) Are pipelined requests all sent at once, and then all processed at > once? Or, are they sent/processed/sent/processed in keeping with HTTP > request/response semantics. http://rfc.net/rfc2616.html#s8.1.1 Pipelining allows a client to make multiple requests without waiting for each response, allowing a single TCP connection to be used much more efficiently, with much lower elapsed time. http://rfc.net/rfc2616.html#s8.1.2.2 A client that supports persistent connections MAY "pipeline" its requests (i.e., send multiple requests without waiting for each response). - -- 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) iD8DBQFE2A8x4DfZD7OEWk0RAsvNAJwKpNaOf8J0+iWYUUdt9JqTU2aXWwCcDK1J oaRSXVCheKOBqd/m3cys4HA= =Lt+j -----END PGP SIGNATURE----- From zedshaw at zedshaw.com Tue Aug 8 05:47:08 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 08 Aug 2006 02:47:08 -0700 Subject: [Mongrel] [ANN] 0.3.13.4 Pre-Release -- Almost Ready Message-ID: <1155030428.6010.16.camel@localhost.localdomain> Hi folks, I just put a pre-release of Mongrel up for people to try. You can install it with: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And try out your application and confirm the stuff works. USE RFUZZ AND RUBY If you find a bug, I'd appreciate it if you can go grab RFuzz (or use net/http) and work up a little bit of Ruby that demonstrates the bug. If you do this then I'll include it in the RFuzz test suite I'm doing and the bug will never show it's ugly head again. Same goes for problems with command line options. Just work up a little ruby that starts mongrel the way you start it, tests for the error, then stops mongrel. CHANGE LOG Knocked out a bunch of bugs people reported so far: * Makes Mongrel act like WEBrick re: REQUEST_URI, PATH_INFO, SCRIPT_INFO, and QUERY_STRING. This should fix redirects, but in order to make it work I've added REQUEST_PATH as well which is technically PATH_INFO+SCRIPT_INFO. * Mongrel now includes *all* of the requested URI even if Mongrel doesn't have a clue what it should do with it. Let's hope we don't see tons of requests for proxy crap (like * and full hostnames) to Rails apps. Could get interesting. * Expanded some of the size limits that Mongrel enforces to accommodate the new REQUEST_URI changes. REQUEST_URI can now be 2k. If it's over 2k then you need to use a FORM POST you dumbass. * REQUEST_PATH can only be 1k. (only? man). * Fixes the PID files and log files confusion. Mongrel now does absolutely not transforming of your -P and -l settings (pid_file, log_file in the configs). This means that it should work as expected, and that everyone should use absolute paths if they're going to set it, otherwise leave it to log/mongrel.log and log/mongrel.pid. * DirHandler directory listings are more consistent thanks to a patch from carmen whats-your-name (no relation to Carmen San Diego). * Removed the extraneous ; in the C code that was choking the Sun C compilers. Is there someone at Sun I can kick to death over this? * Removes junk from the packaged gem such as the .so and test/coverage files. * Extra checks on the --prefix option to make sure they get it right. It's a *path* prefix folks. That means it starts with a / but don't end it in a /. * SENDFILE IS BANISHED! If you have it installed Mongrel ignores it. It causes way too many instability problems and isn't really worth the trouble. Since I can't trust that everyone will remove it, I've just ripped that code out. * Dan Kubb fixed up the conditional responses to not use Unmodified-Since. * Fixes up the IO loop so that it is more exact in it's processing and error handling. * The start of a full RFC compliance test using RFuzz. This test suite basically breaks down the RFC, fires up Rails or other web apps, and then makes sure they can follow the RFC. So far I've got the conditional response stuff going, a few lame duck things about rails tested, and the layout of sections 3 and 4 set. Contributors are welcome on this. Enjoy and report those bugs. The sooner I get 0.3.13.4 out and happy the sooner I can get 0.4 done. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From potatosaladx at gmail.com Tue Aug 8 06:26:02 2006 From: potatosaladx at gmail.com (Andrew Bennett) Date: Tue, 8 Aug 2006 06:26:02 -0400 Subject: [Mongrel] mongrel_cluster rc.d script for FreeBSD In-Reply-To: <9885BBC1-71AD-4D9B-86EA-532E847859AA@verizon.net> References: <9885BBC1-71AD-4D9B-86EA-532E847859AA@verizon.net> Message-ID: Hey Carl, On 8/7/06, Carl Lerche wrote: > Thanks for the script. I use FreeBSD too so this is really useful. > I'm not much of a shell script person though. What would I have to > change in order to manage more than one clusters? (so that they all > can start on boot). Here's how I have things set up: Create a directory at /usr/local/etc/mongrel_cluster and link your mongrel configuration files under there (I'm including the commands for reference, not to insult your intelligence): user$ sudo mkdir /usr/local/etc/mongrel_cluster user$ sudo ln -svf /home/rails/blog/config/mongrel_cluster.yml /usr/local/etc/mongrel_cluster/blog.yml user$ sudo ln -svf /home/rails/shop/config/mongrel_cluster.yml /usr/local/etc/mongrel_cluster/shop.yml Move my script to /usr/local/etc/rc.d/ and set permissions: user$ sudo mv mongrel_cluster.sh /usr/local/etc/rc.d/ user$ sudo chmod 755 /usr/local/etc/rc.d/mongrel_cluster.sh Add mongrel_cluster to /etc/rc.conf to run at startup: user$ sudo vim /etc/rc.conf (Add mongrel_cluster_enable="YES" where you want it to start up in the order of things. Optionally add mongrel_cluster_config="..." if you decided to have your mongrel_cluster configuration in a differnet location.) Now start the clusters: user$ sudo /usr/local/etc/rc.d/mongrel_cluster.sh start And it should always startup on boot now. If you apply my patch, you can run things like: user$ sudo /usr/local/etc/rc.d/mongrel_cluster.sh status ...to see if your clusters are running, what ports they are running on, and what their process identifier (pid) numbers are. Lemme know if you have any problems or questions, I hope this helps. Andrew Bennett potatosaladx at gmail.com From gethemant at gmail.com Tue Aug 8 19:21:48 2006 From: gethemant at gmail.com (hemant) Date: Wed, 9 Aug 2006 04:51:48 +0530 Subject: [Mongrel] [Rails] Re: Fwd: Kubuntu, Apache 2.2, Mongrel, Mongrel Cluster In-Reply-To: References: Message-ID: Really? I guess the setup is similar(I am afraid it is identical) to one given by Coda and Erza on their blogs. Can anbody clarify on this?. What should be the rewrite rules so that, static pages are served by Apache.I have benchmarked, Apache2 with fcgi and Apache 2.2 + mongrel + mod_proxy_balancer. To me, it looks like Apache2 + fcgi is winning the race currently. On 8/5/06, Nauhaie wrote: > > I think the rewrite rules will never be used here... I have run tests > and it appears that cached contents are served by Mongrel instead of > Apache with such a configuration. You should use either proxy pass > exceptions (! rules), or rewrite. But I might be wrong... > > Proxy pass exceptions are faster for everything that is in the excluded > directories, but they just forward everything else to Mongrel, including > cached content... > > But once more, I can be totally wrong... > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails at lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060809/fe9662d0/attachment.html From mongrel at philip.pjkh.com Tue Aug 8 19:36:14 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Tue, 8 Aug 2006 18:36:14 -0500 (CDT) Subject: [Mongrel] [Rails] Re: Fwd: Kubuntu, Apache 2.2, Mongrel, Mongrel Cluster In-Reply-To: References: Message-ID: <20060808183540.T30892@bravo.pjkh.com> > I guess the setup is similar(I am afraid it is identical) to one given by > Coda and Erza on their blogs. > > Can anbody clarify on this?. > What should be the rewrite rules so that, static pages are served by > Apache.I have benchmarked, Apache2 with fcgi and Apache 2.2 + mongrel + > mod_proxy_balancer. To me, it looks like Apache2 + fcgi is winning the race > currently. We use this to handle rails/mongrel "side-by-side".... RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php RewriteRule ^(.*)$ $1 [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f RewriteRule ^(.*)$ $1/index.html [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f RewriteRule ^(.*)$ $1/index.php [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d RewriteRule ^(.*)[^/]$ $1/ [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] > > On 8/5/06, Nauhaie wrote: >> >> I think the rewrite rules will never be used here... I have run tests >> and it appears that cached contents are served by Mongrel instead of >> Apache with such a configuration. You should use either proxy pass >> exceptions (! rules), or rewrite. But I might be wrong... >> >> Proxy pass exceptions are faster for everything that is in the excluded >> directories, but they just forward everything else to Mongrel, including >> cached content... >> >> But once more, I can be totally wrong... >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Rails mailing list >> Rails at lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > > -- > nothing much to talk > From jec at rptec.ch Wed Aug 9 04:21:24 2006 From: jec at rptec.ch (Jean-Eric Cuendet) Date: Wed, 09 Aug 2006 10:21:24 +0200 Subject: [Mongrel] Mongrel and multi apps Message-ID: <44D99B04.2070508@rptec.ch> Hi, I use Mongrel to serve my Rails applications on my server, but how can I serve more than one application with one mongrel server? Thanks. -jec -- Best regards / Salutations. Jean-Eric Cuendet Senior developer / Technical support Riskpro Technologies SA Av. Louis-Ruchonnet 2 CH-1003 Lausanne Switzerland Direct : +41 21 637 0123 Principal : +41 21 637 0110 Fax : +41 21 637 0111 Skype : jec.rptec Web : http://www.rptec.ch -------------------------------------------------------- From christopher.k.hall at gmail.com Wed Aug 9 07:38:07 2006 From: christopher.k.hall at gmail.com (Chris Hall) Date: Wed, 9 Aug 2006 07:38:07 -0400 Subject: [Mongrel] Mongrel and multi apps In-Reply-To: <44D99B04.2070508@rptec.ch> References: <44D99B04.2070508@rptec.ch> Message-ID: in a nutshell, you can't. you'll need (at least) one instance of mongrel for each app, each running on a different port. what you will want to do is run you mongrel instances proxied behind another server, for example, apache. you also have the option of using mongrel_cluster to load balance if necessary. check out the docs on the mongrel site for more detailed info on proxying and clustering mongrel. Chris On 8/9/06, Jean-Eric Cuendet wrote: > Hi, > I use Mongrel to serve my Rails applications on my server, but how can I > serve more than one application with one mongrel server? > Thanks. > -jec > > -- > Best regards / Salutations. > > Jean-Eric Cuendet > Senior developer / Technical support > Riskpro Technologies SA > Av. Louis-Ruchonnet 2 > CH-1003 Lausanne > Switzerland > > Direct : +41 21 637 0123 > Principal : +41 21 637 0110 > Fax : +41 21 637 0111 > Skype : jec.rptec > Web : http://www.rptec.ch > -------------------------------------------------------- > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From me at seebq.com Wed Aug 9 10:37:10 2006 From: me at seebq.com (Charles Brian Quinn) Date: Wed, 9 Aug 2006 10:37:10 -0400 Subject: [Mongrel] IIS proxying to lighttpd/apache to mongrel with SSL Message-ID: <3a2de0cd0608090737u517a73f1n8c5415ac69193a86@mail.gmail.com> This might not be a mongrel question so much as an IIS question, and if so, my apologies. I'm needing to switch a (ASP.NET) web application that's running behind a firewall appliance on IIS on port 8443 under SSL to a rails web application -- a mongrel instance (and perhaps later apache or lighttpd with new mod_core_prox in front of mongrel) on a different server. I remember Apache proxy_pass confs having to foward on a special request to let mongrel know it's SSL, and I've also seen that for IIS forwarding, I'll need to use a reverse_proxy_pass plugin. Are there any other snafus with all that redirection? I see: http://www.napcs.com/howto/rails/deploy/ (Brian Hogan, if you're on here, great work, thanks) Just curious if it's a lot of work, if so, I'll just gladly pay to rekey the SSL cert to apache/lighttpd and be done with it. Thanks, -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com From _ at whats-your.name Wed Aug 9 11:33:18 2006 From: _ at whats-your.name (carmen) Date: Wed, 9 Aug 2006 15:33:18 +0000 Subject: [Mongrel] Mongrel and multi apps In-Reply-To: References: <44D99B04.2070508@rptec.ch> Message-ID: <20060809153318.GH19432@replic.net> On Wed Aug 09, 2006 at 07:38:07AM -0400, Chris Hall wrote: > in a nutshell, you can't. are you sure you can't? i mean cant you run like 10 MouseHole/Camping apps off a single mongrel? im guessing youd need to investigate mongrel_rails script.. From technoweenie at gmail.com Wed Aug 9 11:38:07 2006 From: technoweenie at gmail.com (Rick Olson) Date: Wed, 9 Aug 2006 10:38:07 -0500 Subject: [Mongrel] Mongrel and multi apps In-Reply-To: <20060809153318.GH19432@replic.net> References: <44D99B04.2070508@rptec.ch> <20060809153318.GH19432@replic.net> Message-ID: <48fe25b0608090838t64dd5495x21faa8e824afd135@mail.gmail.com> > are you sure you can't? i mean cant you run like 10 MouseHole/Camping apps off a single mongrel? im guessing youd need to investigate mongrel_rails script.. Rails is not threadsafe, so you can only have 1 process per mongrel. -- Rick Olson http://techno-weenie.net From _ at whats-your.name Wed Aug 9 11:49:36 2006 From: _ at whats-your.name (carmen) Date: Wed, 9 Aug 2006 15:49:36 +0000 Subject: [Mongrel] Mongrel and multi apps In-Reply-To: <48fe25b0608090838t64dd5495x21faa8e824afd135@mail.gmail.com> References: <44D99B04.2070508@rptec.ch> <20060809153318.GH19432@replic.net> <48fe25b0608090838t64dd5495x21faa8e824afd135@mail.gmail.com> Message-ID: <20060809154936.GI19432@replic.net> > Rails is not threadsafe, so you can only have 1 process per mongrel. according to actionpack/lib/action_controller/base.rb:239: "Action Pack and Active Record are by default thread-safe". plus doesnt mongrel typical run about 4 rails instances? i dont see why you couldnt run 8, and have half of them be another app with a URI prefix? From ezmobius at gmail.com Wed Aug 9 12:17:10 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Wed, 9 Aug 2006 09:17:10 -0700 Subject: [Mongrel] Mongrel and multi apps In-Reply-To: <20060809154936.GI19432@replic.net> References: <44D99B04.2070508@rptec.ch> <20060809153318.GH19432@replic.net> <48fe25b0608090838t64dd5495x21faa8e824afd135@mail.gmail.com> <20060809154936.GI19432@replic.net> Message-ID: On Aug 9, 2006, at 8:49 AM, carmen wrote: >> Rails is not threadsafe, so you can only have 1 process per mongrel. > > according to actionpack/lib/action_controller/base.rb:239: "Action > Pack and Active Record are by default thread-safe". plus doesnt > mongrel typical run about 4 rails instances? i dont see why you > couldnt run 8, and have half of them be another app with a URI prefix? > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users ActionPack and ActiveRecord claim to be thread safe but this is a lie ;) When the whole rails stack is used together it is definitely not thread safe. -Ezra From wyhaines at gmail.com Wed Aug 9 12:18:29 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Wed, 9 Aug 2006 10:18:29 -0600 Subject: [Mongrel] Mongrel and multi apps In-Reply-To: <20060809154936.GI19432@replic.net> References: <44D99B04.2070508@rptec.ch> <20060809153318.GH19432@replic.net> <48fe25b0608090838t64dd5495x21faa8e824afd135@mail.gmail.com> <20060809154936.GI19432@replic.net> Message-ID: On 8/9/06, carmen <_ at whats-your.name> wrote: > > Rails is not threadsafe, so you can only have 1 process per mongrel. > > according to actionpack/lib/action_controller/base.rb:239: "Action Pack and Active Record > are by default thread-safe". plus doesnt mongrel typical run about 4 rails instances? i dont > see why you couldnt run 8, and have half of them be another app with a URI prefix? Someone else can speak to Rails and whether it actually is threadsafe or not. However, you misunderstand Mongrel's handler for Rails. Take a look at the source code. It's clean and easy to read. The Rails handler has a single Rails application instance, and it has a mutex that it uses to limit request processing within Rails to one at a time. The use of this guard mutex can be disabled in the handler, if you want to use Rails multithreaded, but Zed has a strongly worded warning against doing that in the code. Kirk Haines From zedshaw at zedshaw.com Wed Aug 9 14:52:18 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 09 Aug 2006 11:52:18 -0700 Subject: [Mongrel] Mongrel and multi apps In-Reply-To: References: <44D99B04.2070508@rptec.ch> <20060809153318.GH19432@replic.net> <48fe25b0608090838t64dd5495x21faa8e824afd135@mail.gmail.com> <20060809154936.GI19432@replic.net> Message-ID: <1155149538.6001.2.camel@localhost.localdomain> On Wed, 2006-08-09 at 10:18 -0600, Kirk Haines wrote: > On 8/9/06, carmen <_ at whats-your.name> wrote: > > > Rails is not threadsafe, so you can only have 1 process per mongrel. > > > > according to actionpack/lib/action_controller/base.rb:239: "Action Pack and Active Record > > are by default thread-safe". plus doesnt mongrel typical run about 4 rails instances? i dont > > see why you couldnt run 8, and have half of them be another app with a URI prefix? > > Someone else can speak to Rails and whether it actually is threadsafe or not. > > However, you misunderstand Mongrel's handler for Rails. Take a look > at the source code. It's clean and easy to read. The Rails handler > has a single Rails application instance, and it has a mutex that it > uses to limit request processing within Rails to one at a time. The > use of this guard mutex can be disabled in the handler, if you want to > use Rails multithreaded, but Zed has a strongly worded warning against > doing that in the code. > Yes, also known as the Great Katana Suicide Warning. The name should probably tell that you shouldn't use it. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Wed Aug 9 20:15:03 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 09 Aug 2006 17:15:03 -0700 Subject: [Mongrel] Hey, me and some friends want to break typo In-Reply-To: <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> Message-ID: <1155168903.6519.2.camel@localhost.localdomain> Hey Scott, Cool finally meeting you last night. I wanted to see if you were willing to work with me and two other guys in doing a security test of Rails and Typo. Basically, after today's nasty little security hole I got with DHH and two security pros I know and we're looking for a small fun first project to try out a security test with. Since I know you, you wrote typo, typo is popular, I figured it'd be a good start. If you're interested, get ahold of me and we'll start putting this together. I'm thinking you could help them get a good tour of it, help when bugs are found, and just generally learn about how they attack stuff. Thanks. Zed From scott at sigkill.org Wed Aug 9 20:18:18 2006 From: scott at sigkill.org (Scott Laird) Date: Wed, 9 Aug 2006 17:18:18 -0700 Subject: [Mongrel] Hey, me and some friends want to break typo In-Reply-To: <1155168903.6519.2.camel@localhost.localdomain> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> <1155168903.6519.2.camel@localhost.localdomain> Message-ID: <14b7e5ef0608091718r6741980buc913fef081e3f272@mail.gmail.com> Sounds good to me. As usual, I'm afraid of what they'll find. I'm going to push a new Typo release tonight to deal with the 1.1.5 mess, but after that I should have time to work on this. Contact me off-list for scheduling details :-). Scott On 8/9/06, Zed Shaw wrote: > Hey Scott, > > Cool finally meeting you last night. I wanted to see if you were > willing to work with me and two other guys in doing a security test of > Rails and Typo. > > Basically, after today's nasty little security hole I got with DHH and > two security pros I know and we're looking for a small fun first project > to try out a security test with. > > Since I know you, you wrote typo, typo is popular, I figured it'd be a > good start. > > If you're interested, get ahold of me and we'll start putting this > together. I'm thinking you could help them get a good tour of it, help > when bugs are found, and just generally learn about how they attack > stuff. > > Thanks. > > Zed > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Wed Aug 9 20:31:17 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 09 Aug 2006 17:31:17 -0700 Subject: [Mongrel] Hey, me and some friends want to break typo In-Reply-To: <1155168903.6519.2.camel@localhost.localdomain> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> <14b7e5ef0607131247k5920684cm90657ca9af1e43ec@mail.gmail.com> <1155168903.6519.2.camel@localhost.localdomain> Message-ID: <1155169877.6519.4.camel@localhost.localdomain> On Wed, 2006-08-09 at 17:15 -0700, Zed Shaw wrote: > Hey Scott, > > Cool finally meeting you last night. I wanted to see if you were > willing to work with me and two other guys in doing a security test of > Rails and Typo. > DOH! Not supposed to go to the list, but hey, cat's out of the bag I guess. Zed From wilsonb at gmail.com Wed Aug 9 23:22:42 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Wed, 9 Aug 2006 23:22:42 -0400 Subject: [Mongrel] Uploading/file_column and Mongrel In-Reply-To: References: Message-ID: On 8/5/06, HH wrote: > Howdy, > > I recently switched an app to Mongrel and since the switch, when I upload > files using the file_column plug-in, the files are not uploaded with the > correct permissions. > > I want something like this: > > -rw-rw-rw- file.jpg > > But I am getting: > > -rw------- file.jpg > There might be a cooler trick, but you could start Mongrel with a -S, pointing at a script that sets the umask to 0000 http://www.linuxforums.org/security/file_permissions.html From christophercyll at gmail.com Thu Aug 10 02:45:00 2006 From: christophercyll at gmail.com (Topher Cyll) Date: Wed, 9 Aug 2006 23:45:00 -0700 Subject: [Mongrel] mongrel and comet "implementation" Message-ID: <2599499e0608092345n49b1071bl73e042623175616@mail.gmail.com> Hey folks, I was playing around with adding Comet (a javascript technology used to receive events without AJAX polling) support to Mongrel. More info about Comet here: http://en.wikipedia.org/wiki/Comet_%28programming%29) I sort of got it working. My code is available at: http;//cyll.org/comet.tar.gz Run comet.rb from inside the directory and point your browser at: http://localhost:5555/ The fly in the ointment is that until a Comet request finishes, that URL mount point stops responding. I assume this is because of how thread management happens in Mongrel. Leaving the request unfinished like I do is probably uncool. One way to sort of work around the problem is to use a dispatcher that registers a new handler at a unique URL for each Comet user. You can see that both the main page and: http://localhost:5555/2 work simultaneous. And neither affects other mounted handlers, so you can also access: http://localhost:5555/moose Anyways, I'm not really doing anything with this code and I'm sure it has problems, but I thought I'd put it out there in case anyone else wanted to play around with Mongrel and Comet. Mongrel rocks, Topher Cyll From cjwoodward at gmail.com Thu Aug 10 02:56:46 2006 From: cjwoodward at gmail.com (Carl Woodward) Date: Thu, 10 Aug 2006 16:56:46 +1000 Subject: [Mongrel] Error on Solaris Message-ID: Hi everyone, I'm having a problem starting rails on solaris. I have made the changes suggested in the joyeur article but it doesn't make any difference. The error is below. Does anyone have any idea? /opt/csw/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 /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:850:in `uri' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1018:in `debug' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1016:in `debug' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:108:in `cloaker_' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:832:in `listener' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:96:in `cloaker_' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:750:in `initialize' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:83:in `run' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in `run' from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 from /opt/csw/bin/mongrel_rails:18 Thanks, Carl. From cjwoodward at gmail.com Thu Aug 10 03:45:21 2006 From: cjwoodward at gmail.com (Carl Woodward) Date: Thu, 10 Aug 2006 17:45:21 +1000 Subject: [Mongrel] Error on Solaris In-Reply-To: References: Message-ID: Sorry but I might not be seeing some sort of meta programming hidden around the place because when I look at the URIClassifier is see none of the methods that are described in the documentation: class URIClassifier attr_reader :handler_map # Returns the URIs that have been registered with this classifier so far. # The URIs returned should not be modified as this will cause a memory leak. # You can use this to inspect the contents of the URIClassifier. def uris @handler_map.keys end # Simply does an inspect that looks like a Hash inspect. def inspect @handler_map.inspect end end I'm confused. On 8/10/06, Carl Woodward wrote: > Hi everyone, I'm having a problem starting rails on solaris. I have > made the changes suggested in the joyeur article but it doesn't make > any difference. The error is below. Does anyone have any idea? > > /opt/csw/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 /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:850:in > `uri' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1018:in > `debug' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1016:in > `debug' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:108:in > `cloaker_' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:832:in > `listener' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:96:in > `cloaker_' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:750:in > `initialize' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:83:in > `run' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in > `run' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 > from /opt/csw/bin/mongrel_rails:18 > > Thanks, > Carl. > -- Carl Woodward 0412218979 cjwoodward at gmail.com From cjwoodward at gmail.com Thu Aug 10 03:53:53 2006 From: cjwoodward at gmail.com (Carl Woodward) Date: Thu, 10 Aug 2006 17:53:53 +1000 Subject: [Mongrel] Fwd: Error on Solaris In-Reply-To: References: Message-ID: Sorry guys, I'm an idiot. Its in C. ---------- Forwarded message ---------- From: Carl Woodward Date: Aug 10, 2006 5:45 PM Subject: Re: Error on Solaris To: mongrel-users at rubyforge.org Sorry but I might not be seeing some sort of meta programming hidden around the place because when I look at the URIClassifier is see none of the methods that are described in the documentation: class URIClassifier attr_reader :handler_map # Returns the URIs that have been registered with this classifier so far. # The URIs returned should not be modified as this will cause a memory leak. # You can use this to inspect the contents of the URIClassifier. def uris @handler_map.keys end # Simply does an inspect that looks like a Hash inspect. def inspect @handler_map.inspect end end I'm confused. On 8/10/06, Carl Woodward wrote: > Hi everyone, I'm having a problem starting rails on solaris. I have > made the changes suggested in the joyeur article but it doesn't make > any difference. The error is below. Does anyone have any idea? > > /opt/csw/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 /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:850:in > `uri' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1018:in > `debug' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1016:in > `debug' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:108:in > `cloaker_' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:832:in > `listener' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:96:in > `cloaker_' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:750:in > `initialize' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:83:in > `run' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in > `run' > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 > from /opt/csw/bin/mongrel_rails:18 > > Thanks, > Carl. > -- Carl Woodward 0412218979 cjwoodward at gmail.com -- Carl Woodward 0412218979 cjwoodward at gmail.com From scott at sigkill.org Thu Aug 10 03:56:29 2006 From: scott at sigkill.org (Scott Laird) Date: Thu, 10 Aug 2006 00:56:29 -0700 Subject: [Mongrel] Fwd: Error on Solaris In-Reply-To: References: Message-ID: <14b7e5ef0608100056p27ef88eq30ea22d014eb781b@mail.gmail.com> I believe the usual problem with Mongrel on Solaris is caused by mixing Sun's C compiler and GCC. Make sure that Ruby and Mongrel are compiled with the same compiler. Scott On 8/10/06, Carl Woodward wrote: > Sorry guys, I'm an idiot. Its in C. > > ---------- Forwarded message ---------- > From: Carl Woodward > Date: Aug 10, 2006 5:45 PM > Subject: Re: Error on Solaris > To: mongrel-users at rubyforge.org > > > Sorry but I might not be seeing some sort of meta programming hidden > around the place because when I look at the URIClassifier is see none > of the methods that are described in the documentation: > > class URIClassifier > attr_reader :handler_map > > # Returns the URIs that have been registered with this classifier so far. > # The URIs returned should not be modified as this will cause a memory leak. > # You can use this to inspect the contents of the URIClassifier. > def uris > @handler_map.keys > end > > # Simply does an inspect that looks like a Hash inspect. > def inspect > @handler_map.inspect > end > end > > I'm confused. > > On 8/10/06, Carl Woodward wrote: > > Hi everyone, I'm having a problem starting rails on solaris. I have > > made the changes suggested in the joyeur article but it doesn't make > > any difference. The error is below. Does anyone have any idea? > > > > /opt/csw/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 /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:850:in > > `uri' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1018:in > > `debug' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1016:in > > `debug' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:108:in > > `cloaker_' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:832:in > > `listener' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:96:in > > `cloaker_' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:750:in > > `initialize' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:83:in > > `run' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in > > `run' > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 > > from /opt/csw/bin/mongrel_rails:18 > > > > Thanks, > > Carl. > > > > > -- > Carl Woodward > 0412218979 > cjwoodward at gmail.com > > > -- > Carl Woodward > 0412218979 > cjwoodward at gmail.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From cjwoodward at gmail.com Thu Aug 10 04:49:59 2006 From: cjwoodward at gmail.com (Carl Woodward) Date: Thu, 10 Aug 2006 18:49:59 +1000 Subject: [Mongrel] Fwd: Error on Solaris In-Reply-To: <14b7e5ef0608100056p27ef88eq30ea22d014eb781b@mail.gmail.com> References: <14b7e5ef0608100056p27ef88eq30ea22d014eb781b@mail.gmail.com> Message-ID: Thanks for that. On 8/10/06, Scott Laird wrote: > I believe the usual problem with Mongrel on Solaris is caused by > mixing Sun's C compiler and GCC. Make sure that Ruby and Mongrel are > compiled with the same compiler. > > > Scott > > On 8/10/06, Carl Woodward wrote: > > Sorry guys, I'm an idiot. Its in C. > > > > ---------- Forwarded message ---------- > > From: Carl Woodward > > Date: Aug 10, 2006 5:45 PM > > Subject: Re: Error on Solaris > > To: mongrel-users at rubyforge.org > > > > > > Sorry but I might not be seeing some sort of meta programming hidden > > around the place because when I look at the URIClassifier is see none > > of the methods that are described in the documentation: > > > > class URIClassifier > > attr_reader :handler_map > > > > # Returns the URIs that have been registered with this classifier so far. > > # The URIs returned should not be modified as this will cause a memory leak. > > # You can use this to inspect the contents of the URIClassifier. > > def uris > > @handler_map.keys > > end > > > > # Simply does an inspect that looks like a Hash inspect. > > def inspect > > @handler_map.inspect > > end > > end > > > > I'm confused. > > > > On 8/10/06, Carl Woodward wrote: > > > Hi everyone, I'm having a problem starting rails on solaris. I have > > > made the changes suggested in the joyeur article but it doesn't make > > > any difference. The error is below. Does anyone have any idea? > > > > > > /opt/csw/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 /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:850:in > > > `uri' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1018:in > > > `debug' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:1016:in > > > `debug' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:108:in > > > `cloaker_' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:832:in > > > `listener' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:96:in > > > `cloaker_' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:750:in > > > `initialize' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:83:in > > > `run' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in > > > `run' > > > from /opt/csw/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 > > > from /opt/csw/bin/mongrel_rails:18 > > > > > > Thanks, > > > Carl. > > > > > > > > > -- > > Carl Woodward > > 0412218979 > > cjwoodward at gmail.com > > > > > > -- > > Carl Woodward > > 0412218979 > > cjwoodward at gmail.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 > -- Carl Woodward 0412218979 cjwoodward at gmail.com From christopher.k.hall at gmail.com Thu Aug 10 07:17:50 2006 From: christopher.k.hall at gmail.com (Chris Hall) Date: Thu, 10 Aug 2006 07:17:50 -0400 Subject: [Mongrel] mongrel stops responding after period of no use Message-ID: I just moved from apache2/fcgi to apache2.2/mongrel and everything seems to work great except for 2 issues, one being major and one minor. the major issue i am experiencing is that after a period of time where my rails apps are not used, typically overnight, the mongrel processes become unresponsive. I currently have 3 apps running behind an apache2.2 proxy. every morning when i come in to work, all 3 apps no longer respond, either via apache or even if i try to connect directly to the port the app is running on. i start each mongrel instance as: cd mongrel_rails start -e production -p -d i see nothing in any of the log files to indicate a problem other than this is the apache error log i have setup for each app: [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error reading status line from remote server localhost [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error reading from remote server returned by / [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: HTTP: attempt to connect to [::1]:3010 (localhost) failed [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling worker for (localhost) [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection for (localhost) [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection for (localhost) each app is setup in it's own virtual host directive with: ProxyRequests Off ProxyPass / http://localhost:/ ProxyPassReverse / http://localhost:/ ProxyPreserveHost On RewriteEngine On RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] with being the port specific the app. i wind up having to kill each process and restarting, then restart apache. also, the minor issue, is that when i start mongrel_rails with a configuration file, the pid file never gets created, yet the log file does, and they are set to the default location, log/mongrel.log and log/mongrel.pid in this case it's only a minor inconvenience, because i can just run: ps -C mongrel_rails -o pid= |xargs kill -9 to kill the processes so i can restart. i have since switched to starting mongrel from the command line as the pid file will get created when used this way. installed gems: actionmailer (1.2.3, 1.2.2, 1.1.5) Service layer for easy email delivery and testing. actionpack (1.12.3, 1.12.2, 1.11.2) Web-flow and rendering framework putting the VC in MVC. actionwebservice (1.1.4, 1.1.3, 1.0.0) Web service support for Action Pack. activerecord (1.14.3, 1.13.2) Implements the ActiveRecord pattern for ORM. activesupport (1.3.1, 1.2.5) Support and utility classes used by the Rails framework. cmdparse (2.0.0) Advanced command line parser supporting commands daemons (0.4.4) A toolkit to create and control daemons in different ways gem_plugin (0.2.1) A plugin system based only on rubygems that uses dependencies only login_generator (1.1.0) [Rails] Login generator. mongrel (0.3.13.3) A small fast HTTP library and server that runs Rails, Camping, and Nitro apps. rails (1.1.4, 1.1.3, 1.0.0) Web-application framework with template engine, control-flow layer, and ORM. rake (0.7.1, 0.7.0) Ruby based make-like utility. sources (0.0.1) This package provides download sources for remote gem installation any help would be greatly appreciated. Chris From jason at joyent.com Thu Aug 10 07:41:27 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Thu, 10 Aug 2006 04:41:27 -0700 Subject: [Mongrel] mongrel stops responding after period of no use In-Reply-To: References: Message-ID: <4A9D9436-B47B-4F0C-91EA-1484C2A94C64@joyent.com> What's the database backend? Regards, J On Aug 10, 2006, at 4:17 AM, Chris Hall wrote: > I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor. > > the major issue i am experiencing is that after a period of time where > my rails apps are not used, typically overnight, the mongrel processes > become unresponsive. I currently have 3 apps running behind an > apache2.2 proxy. every morning when i come in to work, all 3 apps no > longer respond, either via apache or even if i try to connect directly > to the port the app is running on. > > i start each mongrel instance as: > > cd > mongrel_rails start -e production -p -d > > i see nothing in any of the log files to indicate a problem other than > this is the apache error log i have setup for each app: > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error > reading status line from remote server localhost > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error > reading from remote server returned by / > [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: > HTTP: attempt to connect to [::1]:3010 (localhost) failed > [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling > worker for (localhost) > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > for (localhost) > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > for (localhost) > > each app is setup in it's own virtual host directive with: > > ProxyRequests Off > ProxyPass / http://localhost:/ > ProxyPassReverse / http://localhost:/ > ProxyPreserveHost On > RewriteEngine On > RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] > > with being the port specific the app. > > i wind up having to kill each process and restarting, then restart > apache. > > also, the minor issue, is that when i start mongrel_rails with a > configuration file, the pid file never gets created, yet the log file > does, and they are set to the default location, log/mongrel.log and > log/mongrel.pid > > in this case it's only a minor inconvenience, because i can just run: > > ps -C mongrel_rails -o pid= |xargs kill -9 > > to kill the processes so i can restart. i have since switched to > starting mongrel from the command line as the pid file will get > created when used this way. > > installed gems: > > > actionmailer (1.2.3, 1.2.2, 1.1.5) > Service layer for easy email delivery and testing. > > actionpack (1.12.3, 1.12.2, 1.11.2) > Web-flow and rendering framework putting the VC in MVC. > > actionwebservice (1.1.4, 1.1.3, 1.0.0) > Web service support for Action Pack. > > activerecord (1.14.3, 1.13.2) > Implements the ActiveRecord pattern for ORM. > > activesupport (1.3.1, 1.2.5) > Support and utility classes used by the Rails framework. > > cmdparse (2.0.0) > Advanced command line parser supporting commands > > daemons (0.4.4) > A toolkit to create and control daemons in different ways > > gem_plugin (0.2.1) > A plugin system based only on rubygems that uses dependencies only > > login_generator (1.1.0) > [Rails] Login generator. > > mongrel (0.3.13.3) > A small fast HTTP library and server that runs Rails, Camping, and > Nitro apps. > > rails (1.1.4, 1.1.3, 1.0.0) > Web-application framework with template engine, control-flow > layer, > and ORM. > > rake (0.7.1, 0.7.0) > Ruby based make-like utility. > > sources (0.0.1) > This package provides download sources for remote gem installation > > > any help would be greatly appreciated. > > Chris > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From christopher.k.hall at gmail.com Thu Aug 10 08:09:55 2006 From: christopher.k.hall at gmail.com (Chris Hall) Date: Thu, 10 Aug 2006 08:09:55 -0400 Subject: [Mongrel] mongrel stops responding after period of no use In-Reply-To: <4A9D9436-B47B-4F0C-91EA-1484C2A94C64@joyent.com> References: <4A9D9436-B47B-4F0C-91EA-1484C2A94C64@joyent.com> Message-ID: mysql 5.0.22 Chris On 8/10/06, Jason A. Hoffman wrote: > What's the database backend? > > Regards, J > > On Aug 10, 2006, at 4:17 AM, Chris Hall wrote: > > > I just moved from apache2/fcgi to apache2.2/mongrel and everything > > seems to work great except for 2 issues, one being major and one > > minor. > > > > the major issue i am experiencing is that after a period of time where > > my rails apps are not used, typically overnight, the mongrel processes > > become unresponsive. I currently have 3 apps running behind an > > apache2.2 proxy. every morning when i come in to work, all 3 apps no > > longer respond, either via apache or even if i try to connect directly > > to the port the app is running on. > > > > i start each mongrel instance as: > > > > cd > > mongrel_rails start -e production -p -d > > > > i see nothing in any of the log files to indicate a problem other than > > this is the apache error log i have setup for each app: > > > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error > > reading status line from remote server localhost > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error > > reading from remote server returned by / > > [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: > > HTTP: attempt to connect to [::1]:3010 (localhost) failed > > [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling > > worker for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > > > each app is setup in it's own virtual host directive with: > > > > ProxyRequests Off > > ProxyPass / http://localhost:/ > > ProxyPassReverse / http://localhost:/ > > ProxyPreserveHost On > > RewriteEngine On > > RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] > > > > with being the port specific the app. > > > > i wind up having to kill each process and restarting, then restart > > apache. > > > > also, the minor issue, is that when i start mongrel_rails with a > > configuration file, the pid file never gets created, yet the log file > > does, and they are set to the default location, log/mongrel.log and > > log/mongrel.pid > > > > in this case it's only a minor inconvenience, because i can just run: > > > > ps -C mongrel_rails -o pid= |xargs kill -9 > > > > to kill the processes so i can restart. i have since switched to > > starting mongrel from the command line as the pid file will get > > created when used this way. > > > > installed gems: > > > > > > actionmailer (1.2.3, 1.2.2, 1.1.5) > > Service layer for easy email delivery and testing. > > > > actionpack (1.12.3, 1.12.2, 1.11.2) > > Web-flow and rendering framework putting the VC in MVC. > > > > actionwebservice (1.1.4, 1.1.3, 1.0.0) > > Web service support for Action Pack. > > > > activerecord (1.14.3, 1.13.2) > > Implements the ActiveRecord pattern for ORM. > > > > activesupport (1.3.1, 1.2.5) > > Support and utility classes used by the Rails framework. > > > > cmdparse (2.0.0) > > Advanced command line parser supporting commands > > > > daemons (0.4.4) > > A toolkit to create and control daemons in different ways > > > > gem_plugin (0.2.1) > > A plugin system based only on rubygems that uses dependencies only > > > > login_generator (1.1.0) > > [Rails] Login generator. > > > > mongrel (0.3.13.3) > > A small fast HTTP library and server that runs Rails, Camping, and > > Nitro apps. > > > > rails (1.1.4, 1.1.3, 1.0.0) > > Web-application framework with template engine, control-flow > > layer, > > and ORM. > > > > rake (0.7.1, 0.7.0) > > Ruby based make-like utility. > > > > sources (0.0.1) > > This package provides download sources for remote gem installation > > > > > > any help would be greatly appreciated. > > > > Chris > > _______________________________________________ > > 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 me at seebq.com Thu Aug 10 08:14:06 2006 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 10 Aug 2006 08:14:06 -0400 Subject: [Mongrel] mongrel stops responding after period of no use In-Reply-To: <4A9D9436-B47B-4F0C-91EA-1484C2A94C64@joyent.com> References: <4A9D9436-B47B-4F0C-91EA-1484C2A94C64@joyent.com> Message-ID: <3a2de0cd0608100514l5c4365bcib6c6fabac121e145@mail.gmail.com> Do you have any special log rotation on apache that occurs nightly? p.s. upgrade rails to 1.1.5 On 8/10/06, Jason A. Hoffman wrote: > What's the database backend? > > Regards, J > > On Aug 10, 2006, at 4:17 AM, Chris Hall wrote: > > > I just moved from apache2/fcgi to apache2.2/mongrel and everything > > seems to work great except for 2 issues, one being major and one > > minor. > > > > the major issue i am experiencing is that after a period of time where > > my rails apps are not used, typically overnight, the mongrel processes > > become unresponsive. I currently have 3 apps running behind an > > apache2.2 proxy. every morning when i come in to work, all 3 apps no > > longer respond, either via apache or even if i try to connect directly > > to the port the app is running on. > > > > i start each mongrel instance as: > > > > cd > > mongrel_rails start -e production -p -d > > > > i see nothing in any of the log files to indicate a problem other than > > this is the apache error log i have setup for each app: > > > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error > > reading status line from remote server localhost > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error > > reading from remote server returned by / > > [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: > > HTTP: attempt to connect to [::1]:3010 (localhost) failed > > [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling > > worker for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > > > each app is setup in it's own virtual host directive with: > > > > ProxyRequests Off > > ProxyPass / http://localhost:/ > > ProxyPassReverse / http://localhost:/ > > ProxyPreserveHost On > > RewriteEngine On > > RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] > > > > with being the port specific the app. > > > > i wind up having to kill each process and restarting, then restart > > apache. > > > > also, the minor issue, is that when i start mongrel_rails with a > > configuration file, the pid file never gets created, yet the log file > > does, and they are set to the default location, log/mongrel.log and > > log/mongrel.pid > > > > in this case it's only a minor inconvenience, because i can just run: > > > > ps -C mongrel_rails -o pid= |xargs kill -9 > > > > to kill the processes so i can restart. i have since switched to > > starting mongrel from the command line as the pid file will get > > created when used this way. > > > > installed gems: > > > > > > actionmailer (1.2.3, 1.2.2, 1.1.5) > > Service layer for easy email delivery and testing. > > > > actionpack (1.12.3, 1.12.2, 1.11.2) > > Web-flow and rendering framework putting the VC in MVC. > > > > actionwebservice (1.1.4, 1.1.3, 1.0.0) > > Web service support for Action Pack. > > > > activerecord (1.14.3, 1.13.2) > > Implements the ActiveRecord pattern for ORM. > > > > activesupport (1.3.1, 1.2.5) > > Support and utility classes used by the Rails framework. > > > > cmdparse (2.0.0) > > Advanced command line parser supporting commands > > > > daemons (0.4.4) > > A toolkit to create and control daemons in different ways > > > > gem_plugin (0.2.1) > > A plugin system based only on rubygems that uses dependencies only > > > > login_generator (1.1.0) > > [Rails] Login generator. > > > > mongrel (0.3.13.3) > > A small fast HTTP library and server that runs Rails, Camping, and > > Nitro apps. > > > > rails (1.1.4, 1.1.3, 1.0.0) > > Web-application framework with template engine, control-flow > > layer, > > and ORM. > > > > rake (0.7.1, 0.7.0) > > Ruby based make-like utility. > > > > sources (0.0.1) > > This package provides download sources for remote gem installation > > > > > > any help would be greatly appreciated. > > > > Chris > > _______________________________________________ > > 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 > -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com From uberkorp at gmail.com Thu Aug 10 08:35:15 2006 From: uberkorp at gmail.com (Scott Mathieson) Date: Thu, 10 Aug 2006 13:35:15 +0100 Subject: [Mongrel] Hey, me and some friends want to break typo In-Reply-To: <1155169877.6519.4.camel@localhost.localdomain> References: <149FFF9F-4D2D-45EB-8D00-2FD4F9A10AB6@feldpost.com> <1155168903.6519.2.camel@localhost.localdomain> <1155169877.6519.4.camel@localhost.localdomain> Message-ID: <200608101335.15503.uberkorp@gmail.com> On Thursday 10 August 2006 01:31, Zed Shaw wrote: > On Wed, 2006-08-09 at 17:15 -0700, Zed Shaw wrote: > > Hey Scott, > > > > Cool finally meeting you last night. I wanted to see if you were > > willing to work with me and two other guys in doing a security test of > > Rails and Typo. > > DOH! Not supposed to go to the list, but hey, cat's out of the bag I > guess. > > Zed > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users even better is the few seconds of panic when i couldn't remember going transcontinental and writing typo, all in the last 24 hours; but i'm ok now From wilsonb at gmail.com Thu Aug 10 11:15:17 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Thu, 10 Aug 2006 11:15:17 -0400 Subject: [Mongrel] mongrel stops responding after period of no use In-Reply-To: References: Message-ID: On 8/10/06, Chris Hall wrote: > I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor. > > the major issue i am experiencing is that after a period of time where > my rails apps are not used, typically overnight, the mongrel processes > become unresponsive. I currently have 3 apps running behind an > apache2.2 proxy. every morning when i come in to work, all 3 apps no > longer respond, either via apache or even if i try to connect directly > to the port the app is running on. > I ran into this the other day. I'm fairly sure it's an Apache bug, potentially this one: http://issues.apache.org/bugzilla/show_bug.cgi?id=37770 I upgraded from 2.2.2 to 2.2.3, and it happens much less frequently now. From zedshaw at zedshaw.com Thu Aug 10 11:36:04 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 10 Aug 2006 08:36:04 -0700 Subject: [Mongrel] mongrel and comet "implementation" In-Reply-To: <2599499e0608092345n49b1071bl73e042623175616@mail.gmail.com> References: <2599499e0608092345n49b1071bl73e042623175616@mail.gmail.com> Message-ID: <1155224164.5997.10.camel@localhost.localdomain> On Wed, 2006-08-09 at 23:45 -0700, Topher Cyll wrote: > Hey folks, > > I was playing around with adding Comet (a javascript technology used > to receive events without AJAX polling) support to Mongrel. More info > about Comet here: > > http://en.wikipedia.org/wiki/Comet_%28programming%29) > > I sort of got it working. My code is available at: > > http;//cyll.org/comet.tar.gz > Pretty cool. So you're using a chunked encoding to stream out the new data. One thing: @response.write(sprintf("%x;\r\n", size)) ... @response.write("0;\r\n") You don't need the ";". That's only required if you add parameters to the chunked encoding header. Just give the size (in hex). I've contemplated doing chunked encodings for Mongrel, but I still have the problem that frameworks do their headers and body out of order, so it gets ugly (and also most proxies don't grok chunked encoding). > The fly in the ointment is that until a Comet request finishes, that > URL mount point stops responding. I assume this is because of how > thread management happens in Mongrel. Leaving the request unfinished > like I do is probably uncool. > That shouldn't happen. Mongrel isn't locking or anything when running, so you should be able to server multiple requests. I'll take a look at this further. > One way to sort of work around the problem is to use a dispatcher that > registers a new handler at a unique URL for each Comet user. You can > see that both the main page and: > > http://localhost:5555/2 > > work simultaneous. And neither affects other mounted handlers, so you > can also access: > > http://localhost:5555/moose > > Anyways, I'm not really doing anything with this code and I'm sure it > has problems, but I thought I'd put it out there in case anyone else > wanted to play around with Mongrel and Comet. And no idea why that would work. Like I said, no locking in mongrel but I'll look at it. Cool job. If you get a chance to work this further keep sending me feedback and code. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 10 11:39:12 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 10 Aug 2006 08:39:12 -0700 Subject: [Mongrel] mongrel stops responding after period of no use In-Reply-To: References: Message-ID: <1155224352.5997.12.camel@localhost.localdomain> On Thu, 2006-08-10 at 07:17 -0400, Chris Hall wrote: > I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor. > > the major issue i am experiencing is that after a period of time where > my rails apps are not used, typically overnight, the mongrel processes > become unresponsive. I currently have 3 apps running behind an > apache2.2 proxy. every morning when i come in to work, all 3 apps no > longer respond, either via apache or even if i try to connect directly > to the port the app is running on. > Two things can cause this: apache bug that Wilson mentioned, or that your MySQL adapter needs to be told to reduce it's timeout time. Don't remember the magic incantation but it was mentioned several times in the list (gotta get that in the damn FAQ) > also, the minor issue, is that when i start mongrel_rails with a > configuration file, the pid file never gets created, yet the log file > does, and they are set to the default location, log/mongrel.log and > log/mongrel.pid > Upgrade to the 0.3.13.4 pre-release and this will be fixed: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 10 11:48:51 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 10 Aug 2006 08:48:51 -0700 Subject: [Mongrel] mongrel stops responding after period of no use In-Reply-To: References: Message-ID: <1155224931.5997.16.camel@localhost.localdomain> On Thu, 2006-08-10 at 07:17 -0400, Chris Hall wrote: > I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor. ActiveRecord::Base.verification_timeout = 14400 This is the option to try in environment.rb -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 10 11:54:26 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 10 Aug 2006 08:54:26 -0700 Subject: [Mongrel] Fwd: Error on Solaris In-Reply-To: References: Message-ID: <1155225266.5997.18.camel@localhost.localdomain> On Thu, 2006-08-10 at 17:53 +1000, Carl Woodward wrote: > Sorry guys, I'm an idiot. Its in C. Also, try installing the pre-release as I've (hopefully) fixed things that cause the Sun C compiler to blow up (because they couldn't read a spec if it was filled with porn). gem install mongrel --source=http://mongrel.rubyforge.org/releases/ -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From tsailipu at gmail.com Thu Aug 10 11:58:33 2006 From: tsailipu at gmail.com (Philip Lipu Tsai) Date: Thu, 10 Aug 2006 08:58:33 -0700 Subject: [Mongrel] Software caused connection abort In-Reply-To: References: Message-ID: Hi Zed or anyone that is also looking at Mongrel, Just want to report something that, although doesn't crash mongrel, is rather annoying. I am running the latest Mongrel 0.3.13.3 - ruby version on cygwin (yeah, poor me). When I start mongrel_rails with ActiveRecord::Base.allow_concurrency = true in environment.rb, I see a lot of "Error sending file /cygdrive/c/[snipped]/[default java scripts].js : Software caused connection abort" While these don't cause any harm, they are concerning... Also, I see the following error more often as well: Lost connection to MySQL server during query [ the exception traces vary but do involve routing; here is an example:] /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1112:in `write' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1162:in `finalizer' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:54:in `<<' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:548:in `generation_code_for' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in `method_missing' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:19:in `indent' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in `method_missing' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:545:in `generation_code_for' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:488:in `write_generation' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:482:in `write_generation' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:629:in `draw' #{RAILS_ROOT}/config/routes.rb:1 /usr/bin/mongrel_rails:18 When I see such page, refreshing once or twice typically works. With ActiveRecord::Base.allow_concurrency set to false (i.e. the default), everything chugs along pretty well. Don't know whether this problem is particular to cygwin environment or is generic when one turns on ActiveRecord::Base.allow_concurrency (or this is just my system...). Philip From jan.svitok at gmail.com Thu Aug 10 12:24:37 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Thu, 10 Aug 2006 18:24:37 +0200 Subject: [Mongrel] Software caused connection abort In-Reply-To: References: Message-ID: <8d9b3d920608100924m5ddd3a99pd485f9b03c6ce1e0@mail.gmail.com> On 8/10/06, Philip Lipu Tsai wrote: > Hi Zed or anyone that is also looking at Mongrel, > > Just want to report something that, although doesn't crash mongrel, is > rather annoying. > > I am running the latest Mongrel 0.3.13.3 - ruby version on cygwin > (yeah, poor me). When I start mongrel_rails with > ActiveRecord::Base.allow_concurrency = true in environment.rb, I see a > lot of > "Error sending file /cygdrive/c/[snipped]/[default java scripts].js > : Software caused connection abort" > > While these don't cause any harm, they are concerning... > Also, I see the following error more often as well: > > Lost connection to MySQL server during query > [ the exception traces vary but do involve routing; here is an example:] > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1112:in > `write' > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1162:in > `finalizer' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:54:in > `<<' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:548:in > `generation_code_for' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > `method_missing' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:19:in > `indent' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > `method_missing' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:545:in > `generation_code_for' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:488:in > `write_generation' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:482:in > `write_generation' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:629:in > `draw' > #{RAILS_ROOT}/config/routes.rb:1 > /usr/bin/mongrel_rails:18 > > When I see such page, refreshing once or twice typically works. > > With ActiveRecord::Base.allow_concurrency set to false (i.e. the > default), everything chugs along pretty well. Don't know whether > this problem is particular to cygwin environment or is generic when > one turns on ActiveRecord::Base.allow_concurrency (or this is just my > system...). mail by Zed from another thread (mongrel and multi apps): > Someone else can speak to Rails and whether it actually is threadsafe or not. > > However, you misunderstand Mongrel's handler for Rails. Take a look > at the source code. It's clean and easy to read. The Rails handler > has a single Rails application instance, and it has a mutex that it > uses to limit request processing within Rails to one at a time. The > use of this guard mutex can be disabled in the handler, if you want to > use Rails multithreaded, but Zed has a strongly worded warning against > doing that in the code. > Yes, also known as the Great Katana Suicide Warning. The name should probably tell that you shouldn't use it. From tsailipu at gmail.com Thu Aug 10 12:48:20 2006 From: tsailipu at gmail.com (Philip Lipu Tsai) Date: Thu, 10 Aug 2006 09:48:20 -0700 Subject: [Mongrel] Software caused connection abort In-Reply-To: <8d9b3d920608100924m5ddd3a99pd485f9b03c6ce1e0@mail.gmail.com> References: <8d9b3d920608100924m5ddd3a99pd485f9b03c6ce1e0@mail.gmail.com> Message-ID: Nice... I saw some discussion about why-not?'s of turning on this option, so thought of playing with this setting. Probably those "why-not? only applied to WEBrick. I just now found a thread where Zed replied with quite some details on this as well. http://rubyforge.org/pipermail/mongrel-users/2006-May/000302.html Thanks! On 8/10/06, Jan Svitok wrote: > On 8/10/06, Philip Lipu Tsai wrote: > > Hi Zed or anyone that is also looking at Mongrel, > > > > Just want to report something that, although doesn't crash mongrel, is > > rather annoying. > > > > I am running the latest Mongrel 0.3.13.3 - ruby version on cygwin > > (yeah, poor me). When I start mongrel_rails with > > ActiveRecord::Base.allow_concurrency = true in environment.rb, I see a > > lot of > > "Error sending file /cygdrive/c/[snipped]/[default java scripts].js > > : Software caused connection abort" > > > > While these don't cause any harm, they are concerning... > > Also, I see the following error more often as well: > > > > Lost connection to MySQL server during query > > [ the exception traces vary but do involve routing; here is an example:] > > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1112:in > > `write' > > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1162:in > > `finalizer' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:54:in > > `<<' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:548:in > > `generation_code_for' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > > `method_missing' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:19:in > > `indent' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > > `method_missing' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:545:in > > `generation_code_for' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:488:in > > `write_generation' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:482:in > > `write_generation' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:629:in > > `draw' > > #{RAILS_ROOT}/config/routes.rb:1 > > /usr/bin/mongrel_rails:18 > > > > When I see such page, refreshing once or twice typically works. > > > > With ActiveRecord::Base.allow_concurrency set to false (i.e. the > > default), everything chugs along pretty well. Don't know whether > > this problem is particular to cygwin environment or is generic when > > one turns on ActiveRecord::Base.allow_concurrency (or this is just my > > system...). > > mail by Zed from another thread (mongrel and multi apps): > > > Someone else can speak to Rails and whether it actually is threadsafe or not. > > > > However, you misunderstand Mongrel's handler for Rails. Take a look > > at the source code. It's clean and easy to read. The Rails handler > > has a single Rails application instance, and it has a mutex that it > > uses to limit request processing within Rails to one at a time. The > > use of this guard mutex can be disabled in the handler, if you want to > > use Rails multithreaded, but Zed has a strongly worded warning against > > doing that in the code. > > > > Yes, also known as the Great Katana Suicide Warning. > > The name should probably tell that you shouldn't use it. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From christopher.k.hall at gmail.com Thu Aug 10 13:03:04 2006 From: christopher.k.hall at gmail.com (Chris Hall) Date: Thu, 10 Aug 2006 13:03:04 -0400 Subject: [Mongrel] mongrel stops responding after period of no use In-Reply-To: <1155224931.5997.16.camel@localhost.localdomain> References: <1155224931.5997.16.camel@localhost.localdomain> Message-ID: thanks all, i will give the mysql timeout one a try first, see if that helps then go from there. Chris. On 8/10/06, Zed Shaw wrote: > On Thu, 2006-08-10 at 07:17 -0400, Chris Hall wrote: > > I just moved from apache2/fcgi to apache2.2/mongrel and everything > > seems to work great except for 2 issues, one being major and one > > minor. > > ActiveRecord::Base.verification_timeout = 14400 > > This is the option to try in environment.rb > > > -- > 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 lists at lastonepicked.com Thu Aug 10 13:25:13 2006 From: lists at lastonepicked.com (HH) Date: Thu, 10 Aug 2006 10:25:13 -0700 Subject: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster Message-ID: Howdy, I am using Apache 2.2 and Mongrel with great success. I have a mod_rewrite question and I am NO expert. I think it's really simple but I haven't nailed it. I was hoping someone here could help. I'm using Apache conf right out of the cluster example from the Mongrel site. I have a directory under my apps 'public' directory called 'sendto'. Files in that directory are accessible but I want to be able to provide a directory listing for when no specific file is requested. Right now, it seems that the requests to http://domain.com/sendto/ are being sent to the cluster. I am looking for a rewrite statement that basically tells Apache not to send that specific URL pattern to the cluster. Can anyone help? Hunter From kigsteronline at mac.com Thu Aug 10 13:28:26 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Thu, 10 Aug 2006 10:28:26 -0700 Subject: [Mongrel] Getting "Invalid HTTP format, parsing fails." from one client Message-ID: <9C06B0BB-D874-4E89-8499-5F7FE39C0507@mac.com> Hi! I am new to Mongrel but really like it so far. We've been running a single instance for our test server for about a week now. When one of our editors accesses the site, they receive a blank white page in Firefox and/or IE6/Win. In Mongrel logs we see this: Wed Aug 09 16:25:30 PDT 2006: BAD CLIENT (192.168.2.42): Invalid HTTP format, parsing fails. Wed Aug 09 16:25:31 PDT 2006: BAD CLIENT (192.168.2.42): Invalid HTTP format, parsing fails. Wed Aug 09 16:25:31 PDT 2006: BAD CLIENT (192.168.2.42): Invalid HTTP format, parsing fails. Wed Aug 09 16:25:31 PDT 2006: BAD CLIENT (192.168.2.42): Invalid HTTP format, parsing fails. No other computers experience this issue. When I start Webrick, she can access the pages using both Firefox and IE6. Does anyone have any clue as to what may be causing this, and is it possible to actually log the HTTP request details to a log file? I tried running Mongrel with -B (debug) but found not much useful info in the debug files to explain this behavior. Any pointers much appreciated! Thanks, Konstantin ???????????????????????????????????????????? Konstantin Gredeskoul Senior Software Engineer kig at blurb.com Blurb, Inc. 580 California St, Suite 300 San Francisco, CA 94104 415.364.6338 (direct) 415.362.2078 (fax) blurb.com ???????????????????????????????????????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060810/0e0e4df2/attachment-0001.html From mongrel at philip.pjkh.com Thu Aug 10 13:56:28 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 10 Aug 2006 12:56:28 -0500 (CDT) Subject: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster In-Reply-To: References: Message-ID: <20060810125443.U8800@bravo.pjkh.com> > Howdy, > > I am using Apache 2.2 and Mongrel with great success. > > I have a mod_rewrite question and I am NO expert. I think it's really simple > but I haven't nailed it. I was hoping someone here could help. > > I'm using Apache conf right out of the cluster example from the Mongrel > site. > > I have a directory under my apps 'public' directory called 'sendto'. Files > in that directory are accessible but I want to be able to provide a > directory listing for when no specific file is requested. > > Right now, it seems that the requests to http://domain.com/sendto/ are being > sent to the cluster. > > I am looking for a rewrite statement that basically tells Apache not to send > that specific URL pattern to the cluster. Add a rewrite condition to the rule that sends things to the cluster saying that if the url matches this, that's false so bail... I'm not good enough to write out the rule on the fly, but the docs should get you there.... From lists at lastonepicked.com Thu Aug 10 14:02:04 2006 From: lists at lastonepicked.com (HH) Date: Thu, 10 Aug 2006 11:02:04 -0700 Subject: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster In-Reply-To: <20060810125443.U8800@bravo.pjkh.com> Message-ID: Thanks, that's what I'm going for but just like you, not good enough to get there. Been messing with the docs for the past hour and no luck yet. I was hoping a guru could lend a hand. > From: Philip Hallstrom > Reply-To: > Date: Thu, 10 Aug 2006 12:56:28 -0500 (CDT) > To: Mongrel > Subject: Re: [Mongrel] Telling Apache Not to Send a Sub-Directory to the > Cluster > >> Howdy, >> >> I am using Apache 2.2 and Mongrel with great success. >> >> I have a mod_rewrite question and I am NO expert. I think it's really simple >> but I haven't nailed it. I was hoping someone here could help. >> >> I'm using Apache conf right out of the cluster example from the Mongrel >> site. >> >> I have a directory under my apps 'public' directory called 'sendto'. Files >> in that directory are accessible but I want to be able to provide a >> directory listing for when no specific file is requested. >> >> Right now, it seems that the requests to http://domain.com/sendto/ are being >> sent to the cluster. >> >> I am looking for a rewrite statement that basically tells Apache not to send >> that specific URL pattern to the cluster. > > Add a rewrite condition to the rule that sends things to the cluster > saying that if the url matches this, that's false so bail... > > I'm not good enough to write out the rule on the fly, but the docs should > get you there.... From jgeiger at gmail.com Thu Aug 10 14:12:00 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Thu, 10 Aug 2006 13:12:00 -0500 Subject: [Mongrel] Mongrel servers running in a subdirectory behind a proxy Message-ID: <466af3440608101112l7895ec4p617c4fdaab869cb6@mail.gmail.com> I was able to find some information about this in the list archives, but it ended with a possible patch being submitted for Mongrel. I tried to follow a few of the instructions, but I'm still kind of stuck, since I'm not sure if what I'm seeing is the proper results. I have an application running on a cluster of mongrel servers, which is behind pen, which in turn is behind an apache 1.3 mod_proxy. apache >> proxypass /app http://127.0.0.1:8000 >> pen(8000) >> mongrel_cluster (8001-3) I'm using mongrel_cluster, so I added "prefix: /app" into the cluster configuration, but I'm not sure if it's doing anything, as the routes generated by rails are still /user/index and not /app/user/index As part of the information in previous posts, I found this possible solution, but I wasn't sure if I need to do both at the same time. #make rails think it lives in /app ActionController::AbstractRequest.relative_url_root = "/app" Also the above setting has a bad side effect that if makes the images, stylesheets, javascripts think they are in /app, even when using the external host setting below. # Enable serving of images, stylesheets, and javascripts from an asset server config.action_controller.asset_host = "http://assets.example.com" Thanks for any help you can supply. From christophercyll at gmail.com Thu Aug 10 14:27:01 2006 From: christophercyll at gmail.com (Topher Cyll) Date: Thu, 10 Aug 2006 11:27:01 -0700 Subject: [Mongrel] mongrel and comet "implementation" In-Reply-To: <1155224164.5997.10.camel@localhost.localdomain> References: <2599499e0608092345n49b1071bl73e042623175616@mail.gmail.com> <1155224164.5997.10.camel@localhost.localdomain> Message-ID: <2599499e0608101127p7c0ac4f2xfbf7294e57c13967@mail.gmail.com> Zed, > You don't need the ";". That's only required if you add parameters to > the chunked encoding header. Just give the size (in hex). Good to know! > I've contemplated doing chunked encodings for Mongrel, but I still have > the problem that frameworks do their headers and body out of order, so > it gets ugly (and also most proxies don't grok chunked encoding). Ah, I noticed this didn't seem to work at work (we have a proxy). > That shouldn't happen. Mongrel isn't locking or anything when running, > so you should be able to server multiple requests. I'll take a look at > this further. Hmm, interesting. It would be cool if this could be used more generally. Let me know if you figure it out what's happening! Topher From mongrel at philip.pjkh.com Thu Aug 10 14:38:25 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 10 Aug 2006 13:38:25 -0500 (CDT) Subject: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster In-Reply-To: References: Message-ID: <20060810133807.N9775@bravo.pjkh.com> > Thanks, that's what I'm going for but just like you, not good enough to get > there. > > Been messing with the docs for the past hour and no luck yet. I was hoping a > guru could lend a hand. Turn up the log level for rewrite and watch it... that helps a lot when futzing with those things... > >> From: Philip Hallstrom >> Reply-To: >> Date: Thu, 10 Aug 2006 12:56:28 -0500 (CDT) >> To: Mongrel >> Subject: Re: [Mongrel] Telling Apache Not to Send a Sub-Directory to the >> Cluster >> >>> Howdy, >>> >>> I am using Apache 2.2 and Mongrel with great success. >>> >>> I have a mod_rewrite question and I am NO expert. I think it's really simple >>> but I haven't nailed it. I was hoping someone here could help. >>> >>> I'm using Apache conf right out of the cluster example from the Mongrel >>> site. >>> >>> I have a directory under my apps 'public' directory called 'sendto'. Files >>> in that directory are accessible but I want to be able to provide a >>> directory listing for when no specific file is requested. >>> >>> Right now, it seems that the requests to http://domain.com/sendto/ are being >>> sent to the cluster. >>> >>> I am looking for a rewrite statement that basically tells Apache not to send >>> that specific URL pattern to the cluster. >> >> Add a rewrite condition to the rule that sends things to the cluster >> saying that if the url matches this, that's false so bail... >> >> I'm not good enough to write out the rule on the fly, but the docs should >> get you there.... > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Thu Aug 10 15:06:06 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 10 Aug 2006 12:06:06 -0700 Subject: [Mongrel] Mongrel servers running in a subdirectory behind a proxy In-Reply-To: <466af3440608101112l7895ec4p617c4fdaab869cb6@mail.gmail.com> References: <466af3440608101112l7895ec4p617c4fdaab869cb6@mail.gmail.com> Message-ID: <1155236766.6001.1.camel@localhost.localdomain> On Thu, 2006-08-10 at 13:12 -0500, Joey Geiger wrote: > I was able to find some information about this in the list archives, > but it ended with a possible patch being submitted for Mongrel. > You need the pre-release 0.3.13.4 of mongrel which supports the --prefix option: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ With this you can then configure your mongrel servers with the --prefix option: mongrel_rails start -e production --prefix=/app I'll have to contact Bradley about how to get mongrel_cluster to use this though. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 10 15:07:46 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 10 Aug 2006 12:07:46 -0700 Subject: [Mongrel] Getting "Invalid HTTP format, parsing fails." from one client In-Reply-To: <9C06B0BB-D874-4E89-8499-5F7FE39C0507@mac.com> References: <9C06B0BB-D874-4E89-8499-5F7FE39C0507@mac.com> Message-ID: <1155236866.6001.4.camel@localhost.localdomain> On Thu, 2006-08-10 at 10:28 -0700, kigsteronline at mac.com wrote: > Hi! > > > I am new to Mongrel but really like it so far. We've been running a > single instance for our test server for about a week now. When one > of our editors accesses the site, they receive a blank white page in > Firefox and/or IE6/Win. If you have McAffee Security Center installed then you need to do two things: 1) Install the 0.3.13.4 pre-release of mongrel: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ 2) Contact McAffee and tell them why are they sending the aaaaaaaaaa: ++++++++ header since that does absolutely nothing at all and is pretty suspicious. Let me know if this works. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Thu Aug 10 15:12:06 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 10 Aug 2006 12:12:06 -0700 Subject: [Mongrel] mongrel and comet "implementation" In-Reply-To: <2599499e0608101127p7c0ac4f2xfbf7294e57c13967@mail.gmail.com> References: <2599499e0608092345n49b1071bl73e042623175616@mail.gmail.com> <1155224164.5997.10.camel@localhost.localdomain> <2599499e0608101127p7c0ac4f2xfbf7294e57c13967@mail.gmail.com> Message-ID: <1155237126.6001.7.camel@localhost.localdomain> On Thu, 2006-08-10 at 11:27 -0700, Topher Cyll wrote: > Zed, > > > That shouldn't happen. Mongrel isn't locking or anything when running, > > so you should be able to server multiple requests. I'll take a look at > > this further. > > Hmm, interesting. It would be cool if this could be used more > generally. Let me know if you figure it out what's happening! This won't happen for a very long time. So, if you want to get this working you'll have to pitch in and figure it out for yourself. Sorry but I've got to get Mongrel working for the normal usage before I jump into weirdness like comet. Keep trying though. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From christophercyll at gmail.com Thu Aug 10 15:50:24 2006 From: christophercyll at gmail.com (Topher Cyll) Date: Thu, 10 Aug 2006 12:50:24 -0700 Subject: [Mongrel] mongrel and comet "implementation" In-Reply-To: <1155237126.6001.7.camel@localhost.localdomain> References: <2599499e0608092345n49b1071bl73e042623175616@mail.gmail.com> <1155224164.5997.10.camel@localhost.localdomain> <2599499e0608101127p7c0ac4f2xfbf7294e57c13967@mail.gmail.com> <1155237126.6001.7.camel@localhost.localdomain> Message-ID: <2599499e0608101250xfb9e719t1c91a696e9bee140@mail.gmail.com> > This won't happen for a very long time. So, if you want to get this > working you'll have to pitch in and figure it out for yourself. Sorry > but I've got to get Mongrel working for the normal usage before I jump > into weirdness like comet. > > Keep trying though. Yeah, no worries. =) I'll poke around when I find some free time. -Toph From bradley at railsmachine.com Thu Aug 10 20:33:07 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Thu, 10 Aug 2006 20:33:07 -0400 Subject: [Mongrel] Mongrel servers running in a subdirectory behind a proxy In-Reply-To: <1155236766.6001.1.camel@localhost.localdomain> References: <466af3440608101112l7895ec4p617c4fdaab869cb6@mail.gmail.com> <1155236766.6001.1.camel@localhost.localdomain> Message-ID: On Aug 10, 2006, at 3:06 PM, Zed Shaw wrote: > > With this you can then configure your mongrel servers with the -- > prefix > option: > > mongrel_rails start -e production --prefix=/app > > I'll have to contact Bradley about how to get mongrel_cluster to use > this though. A mongrel_cluster release is coming soon (like tomorrow). It has the 'prefix' patch and other nice contributions. Unless, of course, Rails 1.1.7 comes out. -Bradley ------ 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/20060810/7870df5f/attachment-0001.html From kigsteronline at mac.com Thu Aug 10 21:09:05 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Thu, 10 Aug 2006 18:09:05 -0700 Subject: [Mongrel] Getting "Invalid HTTP format, parsing fails." from one client In-Reply-To: <1155236866.6001.4.camel@localhost.localdomain> References: <9C06B0BB-D874-4E89-8499-5F7FE39C0507@mac.com> <1155236866.6001.4.camel@localhost.localdomain> Message-ID: <0FE26229-68B3-4F4E-A400-E1B8A550C898@mac.com> Zed, I thought it had something to do with McAfee. You are right, she is using their Security Center... That thing has gotten so unruly that we are all switching to Norton (another beast). Ironic that anti- virus software often gets more intrusive than the viruses themselves :) Thanks for the heads up. Konstantin On Aug 10, 2006, at 12:07 PM, Zed Shaw wrote: > On Thu, 2006-08-10 at 10:28 -0700, kigsteronline at mac.com wrote: >> Hi! >> >> >> I am new to Mongrel but really like it so far. We've been running a >> single instance for our test server for about a week now. When one >> of our editors accesses the site, they receive a blank white page in >> Firefox and/or IE6/Win. > > If you have McAffee Security Center installed then you need to do two > things: > > 1) Install the 0.3.13.4 pre-release of mongrel: gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ > > 2) Contact McAffee and tell them why are they sending the aaaaaaaaaa: > ++++++++ header since that does absolutely nothing at all and is > pretty > suspicious. > > Let me know if this works. > > -- > 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 Regards, Konstantin __________________________________________ Blog on Tek, Art and Life @ http://tektastic.blogspot.com/ Download hi-res mp3s @ http://www.polygroovers.com/ Or order 2nd down-tempo album "Moods For Take Out" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060810/b5e8225e/attachment.html From wilsonb at gmail.com Fri Aug 11 00:02:27 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Fri, 11 Aug 2006 00:02:27 -0400 Subject: [Mongrel] Getting "Invalid HTTP format, parsing fails." from one client In-Reply-To: <0FE26229-68B3-4F4E-A400-E1B8A550C898@mac.com> References: <9C06B0BB-D874-4E89-8499-5F7FE39C0507@mac.com> <1155236866.6001.4.camel@localhost.localdomain> <0FE26229-68B3-4F4E-A400-E1B8A550C898@mac.com> Message-ID: On 8/10/06, kigsteronline at mac.com wrote: > > Zed, > > I thought it had something to do with McAfee. You are right, she is using > their Security Center... That thing has gotten so unruly that we are all > switching to Norton (another beast). Ironic that anti-virus software often > gets more intrusive than the viruses themselves :) > Danzig wrote this song about McAfee security software in 1988: http://darklyrics.com/lyrics/danzig/danzig.html#7 From christopher.k.hall at gmail.com Fri Aug 11 07:21:06 2006 From: christopher.k.hall at gmail.com (Chris Hall) Date: Fri, 11 Aug 2006 07:21:06 -0400 Subject: [Mongrel] mongrel still fails to write pid file when starting with config file Message-ID: upgraded to 0.3.13.4 this morning in order to correct the above titled problem but mongrel is still not writing the pid file when starting with a config file verified i am running 03.13.4 with --version if i run this command: mongrel_rails start -p 3000 -e production -d --user mongrel --group webdev mongrel DOES create the pid file if i run the same, and include -G config/mongrel.conf, the following is generated in the config file: --- :user: mongrel :host: 0.0.0.0 :mime_map: :prefix: :port: "3000" :daemon: true :cwd: /srv/www/railsapps/myapp :includes: - mongrel :environment: production :group: webdev :log_file: log/mongrel.log :timeout: 0 :config_script: :pid_file: log/mongrel.pid :num_processors: 1024 :debug: false :docroot: public i then run mongrel_rails start -C config/mongrel.conf and mongrel start, but the pid file is still not written. the log directory perms are 775 and owned by group webdev. in addition the mogrel.log file is being written. verfied this on 2 separate systems. i went and looked this up in the buglist and found http://rubyforge.org/tracker/?group_id=1306&atid=5145&func=detail&aid=5119 . i saw someone had submitted a diff for 03.13.3, but this fix is not in 0.3.13.4. i patched and now the pid file is written. Chris From pedro at pedrocr.net Fri Aug 11 11:05:11 2006 From: pedro at pedrocr.net (=?ISO-8859-1?Q?Pedro_C=F4rte-Real?=) Date: Fri, 11 Aug 2006 16:05:11 +0100 Subject: [Mongrel] Running some code right before the app is available to users Message-ID: <62e8012c0608110805s51b6ce97h6488a7e30b84b04d@mail.gmail.com> I do some indexing using acts_as_ferret in a rails app. I need to do some preloading of the index's sort fields so that the first request that sorts doesn't take 5 minutes to complete. I tried sticking my preload code in config/environment.rb and that worked but it gets ran in rake migrations, tests, etc, when it's not really needed. Is there anything specific to starting up to serve requests I could check for? Thanks, Pedro. From justin.h.chen at gmail.com Fri Aug 11 13:32:26 2006 From: justin.h.chen at gmail.com (Justin Chen) Date: Fri, 11 Aug 2006 12:32:26 -0500 Subject: [Mongrel] Fwd: Error on Solaris In-Reply-To: <1155225266.5997.18.camel@localhost.localdomain> References: <1155225266.5997.18.camel@localhost.localdomain> Message-ID: When installing the 0.3.13.4 pre-release on Solaris I got the same error as on the Joyent blog: http://joyeur.com/2006/07/21/a-mongrel-endorsement-and-a-manual-fix-for-installing-mongrel-on-solaris-1011 Fix #1 there got it working and so far mongrel has been working. Thanks, Justin On 8/10/06, Zed Shaw wrote: > > On Thu, 2006-08-10 at 17:53 +1000, Carl Woodward wrote: > > Sorry guys, I'm an idiot. Its in C. > > Also, try installing the pre-release as I've (hopefully) fixed things > that cause the Sun C compiler to blow up (because they couldn't read a > spec if it was filled with porn). > > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > > > -- > 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 > -- Justin Chen Two-Bit Operation LLC http://www.twobitoperation.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060811/47cb293c/attachment.html From zedshaw at zedshaw.com Fri Aug 11 13:51:06 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 11 Aug 2006 10:51:06 -0700 Subject: [Mongrel] Running some code right before the app is available to users In-Reply-To: <62e8012c0608110805s51b6ce97h6488a7e30b84b04d@mail.gmail.com> References: <62e8012c0608110805s51b6ce97h6488a7e30b84b04d@mail.gmail.com> Message-ID: <1155318666.5980.4.camel@localhost.localdomain> On Fri, 2006-08-11 at 16:05 +0100, Pedro C?rte-Real wrote: > I do some indexing using acts_as_ferret in a rails app. I need to do > some preloading of the index's sort fields so that the first request > that sorts doesn't take 5 minutes to complete. I tried sticking my > preload code in config/environment.rb and that worked but it gets ran > in rake migrations, tests, etc, when it's not really needed. Is there > anything specific to starting up to serve requests I could check for? You could put it in a mongrel.conf and just have Mongrel run it on start-up: mongrel_rails start -S mongrel.conf (Even though it ends in .conf it's actually Ruby code that gets run inside the Configurator.) -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 11 13:59:01 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 11 Aug 2006 10:59:01 -0700 Subject: [Mongrel] Fwd: Error on Solaris In-Reply-To: References: <1155225266.5997.18.camel@localhost.localdomain> Message-ID: <1155319141.5980.10.camel@localhost.localdomain> On Fri, 2006-08-11 at 12:32 -0500, Justin Chen wrote: > When installing the 0.3.13.4 pre-release on Solaris I got the same > error as on the Joyent blog: > http://joyeur.com/2006/07/21/a-mongrel-endorsement-and-a-manual-fix-for-installing-mongrel-on-solaris-1011 > > Fix #1 there got it working and so far mongrel has been working. Yeah, without their C compiler I doubt I could fix it in the source. Looks like it's more than just stray ; characters causing this. Just do what his instructions say so that you're using GCC (but I believe you have to make sure your ruby is compiled with that as well). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 11 14:26:13 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 11 Aug 2006 11:26:13 -0700 Subject: [Mongrel] mongrel still fails to write pid file when starting with config file In-Reply-To: References: Message-ID: <1155320773.5980.13.camel@localhost.localdomain> On Fri, 2006-08-11 at 07:21 -0400, Chris Hall wrote: > upgraded to 0.3.13.4 this morning in order to correct the above titled > problem but mongrel is still not writing the pid file when starting > with a config file Got it, stupid bug in an if statement. It should all be fixed up, but you need to change "log/mongrel.pid" and "log/mongrel.log" to use absolute paths. Previously mongrel would try to fix these up, but now it doesn't. Change them to be absolute to prevent future surprises. I'll post another pre-release update in 5 minutes. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 11 14:58:56 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 11 Aug 2006 11:58:56 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- PID Files Working Message-ID: <1155322736.5980.22.camel@localhost.localdomain> Hi Folks, An update to tell everyone to try out the pre-release again: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Nothing available for win32 yet, the next pre-release will have a win32 build to check that windows folks are OK. This release fixes the following problems: * PID files weren't being written when configured. Works now and logs messages better. * Small change to the HTTP parser to allow for headers that don't have a space after the ":" character, which is allowed by the RFC. -- Everyone using McAfee Security Center should contact them and tell them their product is a piece of crap. You should also consider not using it since they seem to be modifying people's HTTP requests in bogus ways and telling you that this is a "security" feature. This release is pretty close to becoming official. Everyone needs to test it out and shoot me any final problems. The current outstanding problems I have are: 55.BUG: test tom brice's upload app with keepalive 56.BUG: safari ganks on the deflate filter 57.BUG: look at Ben Moore's bug on ECONNABORTED 59.BUG: content-type not getting set If the folks mentioned could check this release against their problems then that will help quite a bit. Thanks! -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From anjan.bacchu at Summit.Fiserv.com Fri Aug 11 15:53:06 2006 From: anjan.bacchu at Summit.Fiserv.com (Bacchu, Anjan) Date: Fri, 11 Aug 2006 12:53:06 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- PID Files Wor king Message-ID: Hi All/Zed, win32 : Is there an Installer/setup for Mongrel along with rails(1.1.6 security patches included) ? Thank you, BR, ~A -----Original Message----- From: Zed Shaw [mailto:zedshaw at zedshaw.com] Sent: Friday, August 11, 2006 11:59 AM To: mongrel-users at rubyforge.org Cc: ruby-talk ML; rails at lists.rubyonrails.org Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- PID Files Working Hi Folks, An update to tell everyone to try out the pre-release again: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Nothing available for win32 yet, the next pre-release will have a win32 build to check that windows folks are OK. This release fixes the following problems: * PID files weren't being written when configured. Works now and logs messages better. * Small change to the HTTP parser to allow for headers that don't have a space after the ":" character, which is allowed by the RFC. -- Everyone using McAfee Security Center should contact them and tell them their product is a piece of crap. You should also consider not using it since they seem to be modifying people's HTTP requests in bogus ways and telling you that this is a "security" feature. This release is pretty close to becoming official. Everyone needs to test it out and shoot me any final problems. The current outstanding problems I have are: 55.BUG: test tom brice's upload app with keepalive 56.BUG: safari ganks on the deflate filter 57.BUG: look at Ben Moore's bug on ECONNABORTED 59.BUG: content-type not getting set If the folks mentioned could check this release against their problems then that will help quite a bit. 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 From tom at onidle.com Fri Aug 11 17:53:59 2006 From: tom at onidle.com (Tom Brice) Date: Fri, 11 Aug 2006 16:53:59 -0500 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- PID Files Working In-Reply-To: <1155322736.5980.22.camel@localhost.localdomain> Message-ID: On 8/11/06 1:58 PM, Zed Shaw wrote: > This release is pretty close to becoming official. Everyone needs to > test it out and shoot me any final problems. The current outstanding > problems I have are: > > 55.BUG: test tom brice's upload app with keepalive Zed, I tested the app I sent you and it appears to be fixed. I'm having a few "lags" here and there but the 4 mongrel's I'm running do not appear to lock or run forever. Have commented out "KeepAlive Off" in my virtual host section and my browser confirms "Keep-Alive timeout=5, max=100". I would like to figure out how to tweak those values but that is a question for the apache folks. My testing is by no means scientific but it seems to be resolved. Thanks, Tom From bradley at railsmachine.com Fri Aug 11 20:12:35 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Fri, 11 Aug 2006 20:12:35 -0400 Subject: [Mongrel] [ANN] Mongrel Cluster 0.2.1 prerelease with prefix! In-Reply-To: References: Message-ID: <46B5C6E8-AF37-4C26-B3C7-7B4D83219E56@railsmachine.com> Hi all: I have update the mongrel_cluster prerelease to support the new "prefix" option in the Mongrel prerelease and include a rc script for FreeBSD. Thanks for the contributions from Andrew Bennett, Nat Brown, and Neil Wilson. 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. (Neil Wilson) - Added rc script for FreeBSD in resources/mongrel_cluster.sh (Andrew Bennett) - Added support for --prefix including Capistrano tasks (Nat Brown) Known issues: - mongrel_rails complains about missing pid or log files when using relative paths despite specifying 'chdir'. To fix, edit your mongrel_cluster conf file to use absolute paths . I will investigate this further this weekend, but I wanted to get the 'prefix' support out. If you don't need to use 'prefix' and you store your configuration outside of 'RAILS_ROOT/config', please wait for the next one. To install: gem install mongrel_cluster --source http:// railsmachine.rubyforge.org/releases/ Please submit bugs, patches, and requests to the RubyForge tracker: http://rubyforge.org/tracker/?group_id=1336 Let me know how it goes. 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/20060811/e71f1a75/attachment.html From kraemer at webit.de Sat Aug 12 05:17:16 2006 From: kraemer at webit.de (Jens Kraemer) Date: Sat, 12 Aug 2006 11:17:16 +0200 Subject: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster In-Reply-To: References: Message-ID: <20060812091716.GC4149@cordoba.webit.de> Hi! On Thu, Aug 10, 2006 at 10:25:13AM -0700, HH wrote: > Howdy, > > I am using Apache 2.2 and Mongrel with great success. > > I have a mod_rewrite question and I am NO expert. I think it's really simple > but I haven't nailed it. I was hoping someone here could help. > > I'm using Apache conf right out of the cluster example from the Mongrel > site. I couldn't find that, so I'm assuming your rewrite rules look like this: RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule .* balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] > I have a directory under my apps 'public' directory called 'sendto'. Files > in that directory are accessible but I want to be able to provide a > directory listing for when no specific file is requested. > > Right now, it seems that the requests to http://domain.com/sendto/ are being > sent to the cluster. > > I am looking for a rewrite statement that basically tells Apache not to send > that specific URL pattern to the cluster. to achiee this, just add another RewriteCond line: RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/sendto RewriteRule .* balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] this excludes requests pointing to URIs starting with /sendto from being sent via the balancer. Instead these requests will be served by Apache, and directory listings can be allowed with something like Options Indexes hth, 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 luislavena at gmail.com Sat Aug 12 11:14:19 2006 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 12 Aug 2006 12:14:19 -0300 Subject: [Mongrel] Following your Mongrel thread In-Reply-To: References: Message-ID: <71166b3b0608120814n3372b42eod6e34954c078e9a@mail.gmail.com> On 8/11/06, Matthew Bass wrote: > Hello, Luis. I've been following your Mongrel thread here: > http://rubyforge.org/pipermail/mongrel-users/2006-May/000210.html > > I'm also running Win2K and have been trying to get Mongrel running as a > service, without much luck. I tried running daemon_test.rb like you said and > was able to get it to work, however, I had to add the lib directory to the > load path on the Ruby call, like so: > > ruby -I..\lib daemon_test.rb install > > Otherwise, I got an error about not being able to find win32/service. I'm > wondering if this has something to do with my problem running mongrel_rails > start? Every time I try to start the service, I get that message about it > "not starting in a timely manner." No error log or anything. > > I'd appreciate any advice you might have. > > Thanks, > Matt > > Hello Matt, I'm forwarding this to the list to everyone knows about it: win32-service (or win32/service) in its current state: sucks, but sucks badly. Part of the fault is ms side, their complex way to implement services is broken between releases of the NT OS. I maintain a few tools written in C as service for NT 4, later updated to 2000 and now XP (and 2003 server, if worth it). On all the 3-4 OS, it sometimes throw errors that make me look like an idiot. The other "guilty" is Ruby, with their protective green threads and their lack of scalability. Problems raises trying to get back from a C thread to ruby interpreter thread without breaking everything. A few weeks back, a patch was sent to Dan Berger to handle this in a pretty (or better) way... I cannot managed to make rails works good in it. Why? enter Thread-UN-Safety world! If I run a plain mongrel server, make it service and manage it... everything is ok. When you throw in all the fat Rails run... it crash... left threads behind... stop responding... I don't think is Rails fault! (this could be interpreted as a irony). Anyway, after all this mambo-jumbo, I guess will need to look into this. Call next week my "Solve the f*ckin win32-service problem so rails runs nicely on windows" week. Good weekend for everyone. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Sat Aug 12 11:28:04 2006 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 12 Aug 2006 12:28:04 -0300 Subject: [Mongrel] Getting "Invalid HTTP format, parsing fails." from one client In-Reply-To: <0FE26229-68B3-4F4E-A400-E1B8A550C898@mac.com> References: <9C06B0BB-D874-4E89-8499-5F7FE39C0507@mac.com> <1155236866.6001.4.camel@localhost.localdomain> <0FE26229-68B3-4F4E-A400-E1B8A550C898@mac.com> Message-ID: <71166b3b0608120828x1ddb305et49e82a8168f65fd1@mail.gmail.com> On 8/10/06, kigsteronline at mac.com wrote: > > Zed, > > I thought it had something to do with McAfee. You are right, she is using > their Security Center... That thing has gotten so unruly that we are all > switching to Norton (another beast). Ironic that anti-virus software often > gets more intrusive than the viruses themselves :) > > Thanks for the heads up. > Konstantin My suggestion is try NOD32 (www.eset.com) instead of Norton :) So far, been working with mongrel, rails, ruby on windows with NOD32 filtering HTTP and everything worked without problems. > > > On Aug 10, 2006, at 12:07 PM, Zed Shaw wrote: > > On Thu, 2006-08-10 at 10:28 -0700, kigsteronline at mac.com wrote: > Hi! > > > I am new to Mongrel but really like it so far. We've been running a > single instance for our test server for about a week now. When one > of our editors accesses the site, they receive a blank white page in > Firefox and/or IE6/Win. > > If you have McAffee Security Center installed then you need to do two > things: > > 1) Install the 0.3.13.4 pre-release of mongrel: gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ > > 2) Contact McAffee and tell them why are they sending the aaaaaaaaaa: > ++++++++ header since that does absolutely nothing at all and is pretty > suspicious. > > Let me know if this works. > > -- > 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 > > > Regards, > Konstantin > __________________________________________ > Blog on Tek, Art and Life @ http://tektastic.blogspot.com/ > Download hi-res mp3s @ http://www.polygroovers.com/ > Or order 2nd down-tempo album "Moods For Take Out" > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From carl.lerche at verizon.net Sat Aug 12 12:53:42 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 11:53:42 -0500 (CDT) Subject: [Mongrel] Help mongrel keeps crashing... Message-ID: <22914626.1581911155401622209.JavaMail.root@vms062.mailsrvcs.net> Alright, it seems that I am having a bit of a problem with mongrel. My mongrel processes have been crashing pretty often and twice last night. I'm really not sure why, but I really need to fix it. I am running 0.3.13.3. Here is the mongrel.log file. Any ideas, things to look at, etc... is appreciated. Thanks, Carl PS, do all the broken pipe lines mean Mongrel is serving the static media files? ** Daemonized, any open files are closed. Look at log/mongrel.8130.pid and log/mongrel.log for info. ** Starting Mongrel listening at 127.0.0.1:8130 ** Starting Rails with production environment ... ** Daemonized, any open files are closed. Look at log/mongrel.8131.pid and log/mongrel.log for info. ** Starting Mongrel listening at 127.0.0.1:8131 ** Starting Rails with production environment ... ** Daemonized, any open files are closed. Look at log/mongrel.8132.pid and log/mongrel.log for info. ** Starting Mongrel listening at 127.0.0.1:8132 ** Starting Rails with production environment ... ** Daemonized, any open files are closed. Look at log/mongrel.8133.pid and log/mongrel.log for info. ** Starting Mongrel listening at 127.0.0.1:8133 (... more initialization stuff. Just the usual ...) Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/40/13/431/media.wmv: Broken pipe /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 625:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 956:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 955:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:127: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 Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe (... a ton more broken pipe errors ...) Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 625:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 956:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 955:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:127: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 Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe (... a ton more broken pipe errors ...) Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ images/header.png: Broken pipe /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 625:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 956:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 955:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:127: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 Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/31/1013/media.flv: Broken pipe (... a ton more broken pipe errors ...) Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/83/1038/media.wmv: Broken pipe /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/83/1038/media.wmv: Broken pipe (... a ton more broken pipe errors ...) Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 625:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 956:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 955:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:127: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 Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/83/1038/media.wmv: Broken pipe /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 625:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 956:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 955:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:127: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 Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe jWl50ivOcGhTQzEh5h5mQystOI0U2oDa4hXZY0VrqCCPd3HX151wmBwBYtPR (... and a bunch more gibberish and broken pipe errors ...) SuiOuNQ+jr9nJly0zLJx6xc1bCzIcW8pbbaQhDRUoqIaQ2NAPYB7B163EMTf b0gNr5K/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 625:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 956:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 955:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:127: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 +acrI8k9prFuuKDrpZQUoUS5qoFQT+zvI0IA7DXqQherSISA0Y4/H 314aHIH59lY31UpcClFCdqgdVJ3akKBASQCe/RsUDBB7s3rcVHZ8vGmJZg6c (... and a bunch more gibberish and broken pipe errors ...) Y7a4lJCZCs6ZkAkpsyORvNrSIYa6OR6cZyFrXeaCFY6R2fEYCu3cXkSQhp8T IGDA5FSffjQye97tMzX2vO7Yt3jEawJ2v7yZNMvdvL0TSPhUUiXI9TNwy1M3 9uNa0JDKHRyop4vlHb/e5GhTrrpctDnxtVFLDzbyPa3/AError sending file /home2/ webapps/nfccms/releases/20060807071308/public/media/01/32/1023/media.flv: Broken pipe Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe (... a ton more broken pipe errors ...) Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/93/1039/image-6.jpg: Broken pipe /home2/webapps/nfccms/current/config/../app/controllers/media_controller.rb: 104: warning: Object#id will be deprecated; use Object#object_id Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe (... a ton more broken pipe errors ...) Error sending file /home2/webapps/nfccms/releases/20060807071308/public/ media/01/32/1023/media.flv: Broken pipe /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:582:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 582:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 636:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 625:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 956:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb: 955:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:127: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 K0f/TbrFtxG21uH AShA8dvBw7D8DhSyffClG7cO+TN3vDC+wTfs7oIhyX+u8ovpfoIWKPzPWeX+ (... and a bunch more gibberish till the end ...) From zedshaw at zedshaw.com Sat Aug 12 13:34:23 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 10:34:23 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <22914626.1581911155401622209.JavaMail.root@vms062.mailsrvcs.net> References: <22914626.1581911155401622209.JavaMail.root@vms062.mailsrvcs.net> Message-ID: <1155404063.6042.5.camel@localhost.localdomain> On Sat, 2006-08-12 at 11:53 -0500, Carl Lerche wrote: > Alright, it seems that I am having a bit of a problem with mongrel. My > mongrel processes have been crashing pretty often and twice last night. I'm > really not sure why, but I really need to fix it. I am running 0.3.13.3. Here > is the mongrel.log file. Any ideas, things to look at, etc... is appreciated. > Carl, try out the 0.3.13.14 pre-release when you get a chance: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Also remove sendfile: gem uninstall sendfile The broken pipe lines do mean that mongrel is serving static files, which isn't such a good way to set things up. Make sure you configure so that apache or lighttpd are serving the files. The gibberish looks like base64 encodings, which is really bothersome. You better be moved on to 1.1.6 by now. These could very well be someone trying to exploit your server. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From carl.lerche at verizon.net Sat Aug 12 13:49:42 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 12:49:42 -0500 (CDT) Subject: [Mongrel] Help mongrel keeps crashing... Message-ID: <8201328.1629911155404982484.JavaMail.root@vms069.mailsrvcs.net> Zed, Thanks for the suggestions. I will try out the pre-release and let you know how it goes. Also, I am using Apache 2.2.2 with mod_proxy_balancer (I probably should update to 2.2.3). I don't know what you mean by be on 1.1.6. I also don't have the sendfile gem as I know it is not recommended. As for mongrel serving static files, I will have to play with my mod_rewrite configuration as that is what seems to be the problem. I will include it here just in case anybody might have any suggestions for that. Thanks for all the help so far guys! -carl RewriteEngine On # Make sure people go to www.djforums.com, not djforums.com RewriteCond %{HTTP_HOST} ^djforums.com$ [NC] RewriteRule ^(.*)$ http://www.djforums.com.com$1 [R=301,L] # Yes, I've read no-www.com, but my site already has much Google-Fu on # www.blah.com. Feel free to comment this out. # Uncomment for rewrite debugging #RewriteLog logs/myapp_rewrite_log #RewriteLogLevel 9 # 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://djforums%{REQUEST_URI} [P,QSA,L] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?djforums.com.*$ [NC] RewriteRule .(gif|jpg|mov|flv|wmv|swf)$ - [F] From carl.lerche at verizon.net Sat Aug 12 14:10:00 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 13:10:00 -0500 (CDT) Subject: [Mongrel] Help mongrel keeps crashing... Message-ID: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> >Carl, try out the 0.3.13.14 pre-release when you get a chance: > >gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Ok, I'm probably doing something dumb, but for some reason mongrel isn't opening a log file (log/mongrel.log) anymore. I tried restarting a number of times (in production and development modes). Not having a log makes it hard to figure out what's going wrong. Any ideas? Thanks, Carl From zedshaw at zedshaw.com Sat Aug 12 14:24:14 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 11:24:14 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <8201328.1629911155404982484.JavaMail.root@vms069.mailsrvcs.net> References: <8201328.1629911155404982484.JavaMail.root@vms069.mailsrvcs.net> Message-ID: <1155407054.6042.11.camel@localhost.localdomain> On Sat, 2006-08-12 at 12:49 -0500, Carl Lerche wrote: > Zed, > > Thanks for the suggestions. I will try out the pre-release and let you know > how it goes. Also, I am using Apache 2.2.2 with mod_proxy_balancer (I > probably should update to 2.2.3). I don't know what you mean by be on 1.1.6. > I also don't have the sendfile gem as I know it is not recommended. "be on 1.1.6" means Rails 1.1.6. You MUST upgrade to this version of rails as there were serious security alerts because of an exploit that could destroy your whole application and probably get you fired AND I WILL NOT TALK TO YOU EVER AGAIN BECAUSE YOU WILL BE EMBARRASSING ME WAY TOO MUCH CARL. Sorry for the dramatics. Do that now. Now. Why are you reading this. Go! :-) -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Sat Aug 12 14:24:44 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 11:24:44 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> Message-ID: <1155407084.6042.12.camel@localhost.localdomain> On Sat, 2006-08-12 at 13:10 -0500, Carl Lerche wrote: > >Carl, try out the 0.3.13.14 pre-release when you get a chance: > > > >gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > Ok, I'm probably doing something dumb, but for some reason mongrel isn't > opening a log file (log/mongrel.log) anymore. I tried restarting a number of > times (in production and development modes). Not having a log makes it hard to > figure out what's going wrong. Any ideas? You'll have to edit your config files so that you set a full path. Zed From carl.lerche at verizon.net Sat Aug 12 15:17:07 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 14:17:07 -0500 (CDT) Subject: [Mongrel] Help mongrel keeps crashing... Message-ID: <18311170.1641351155410227933.JavaMail.root@vms069.mailsrvcs.net> >"be on 1.1.6" means Rails 1.1.6. You MUST upgrade to this version of >rails as there were serious security alerts because of an exploit that >could destroy your whole application and probably get you fired AND I >WILL NOT TALK TO YOU EVER AGAIN BECAUSE YOU WILL BE EMBARRASSING ME WAY >TOO MUCH CARL. Oh no... I'm a bad sys admin :( Anyway, I updated rails to 1.1.6, mongrel to the pre-release, removed the hot link protection from my mod_rewrite config which seems to send static files to apache now. The mongrel log file looks a lot healthier. I'll have to monitor it but I"m supposed to catch an international flight tonight, still haven't packed, still have to run errands AND get to the airport 4 hours early :-/ Better get workin... Thanks for all the help :) -carl From carl.lerche at verizon.net Sat Aug 12 16:10:44 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 13:10:44 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <1155407084.6042.12.camel@localhost.localdomain> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> Message-ID: <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> Alright, more trouble :( 2 mongrel processes have crashed since my last email. Here is the relevant mongrel.log bit: Sat Aug 12 14:32:02 CDT 2006: BAD CLIENT (127.0.0.1): HTTP element QUERY_STRING is longer than the (1024 * 10) allowed length. /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 597:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:597:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:664:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:664:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:651:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/configurator.rb:258:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/configurator.rb:257:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:128:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/command.rb:203:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:235 from /usr/local/bin/mongrel_rails:18 /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/callbacks.rb:347: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i386-freebsd6] /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 597:in `close': Invalid argument (Errno::EINVAL) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:597:in `process_client' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:664:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:664:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel.rb:651:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/configurator.rb:258:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/configurator.rb:257:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:128:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/command.rb:203:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:235 from /usr/local/bin/mongrel_rails:18 /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/callbacks.rb:347: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i386-freebsd6] From zedshaw at zedshaw.com Sat Aug 12 17:02:06 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 14:02:06 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> Message-ID: <1155416526.6042.15.camel@localhost.localdomain> What OS are you on Carl? It looks like Ruby sockets on *your* OS can throw yet another fantastic different exception in yet again another unusual situation that I have to cover all over again. I'll pump out a fix in five minutes, but let me know what OS you have (exact type, version, etc) so I can run more tests later. Zed On Sat, 2006-08-12 at 13:10 -0700, Carl Lerche wrote: > Alright, more trouble :( > > 2 mongrel processes have crashed since my last email. Here is the > relevant mongrel.log bit: > > Sat Aug 12 14:32:02 CDT 2006: BAD CLIENT (127.0.0.1): HTTP element > QUERY_STRING is longer than the (1024 * 10) allowed length. > /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: > 597:in `close': Invalid argument (Errno::EINVAL) > from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ > mongrel.rb:597:in `process_client' From zedshaw at zedshaw.com Sat Aug 12 18:01:42 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 15:01:42 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> Message-ID: <1155420102.6042.17.camel@localhost.localdomain> On Sat, 2006-08-12 at 13:10 -0700, Carl Lerche wrote: > Alright, more trouble :( > > 2 mongrel processes have crashed since my last email. Here is the > relevant mongrel.log bit: Alright Carl, should be fixed for good now. Try the pre-release AGAIN and report back to me. Thanks for the testing, you definately are the odd case here. gem install mongrel --source=http://mongrel.rubyforge.org/releases/ -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From carl.lerche at verizon.net Sat Aug 12 18:25:11 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 15:25:11 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <1155416526.6042.15.camel@localhost.localdomain> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> <1155416526.6042.15.camel@localhost.localdomain> Message-ID: <57AED5A8-7EDB-4036-B9FC-F49D91ECB0F9@verizon.net> Hey there, > uname -mrs FreeBSD 6.1-RELEASE i386 So, FreeBSD 6.1. I guess I jumped to 6 too early? Thanks, -carl On Aug 12, 2006, at 2:02 PM, Zed Shaw wrote: > What OS are you on Carl? It looks like Ruby sockets on *your* OS can > throw yet another fantastic different exception in yet again another > unusual situation that I have to cover all over again. > > I'll pump out a fix in five minutes, but let me know what OS you have > (exact type, version, etc) so I can run more tests later. > > Zed > > On Sat, 2006-08-12 at 13:10 -0700, Carl Lerche wrote: >> Alright, more trouble :( >> >> 2 mongrel processes have crashed since my last email. Here is the >> relevant mongrel.log bit: >> >> Sat Aug 12 14:32:02 CDT 2006: BAD CLIENT (127.0.0.1): HTTP element >> QUERY_STRING is longer than the (1024 * 10) allowed length. >> /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: >> 597:in `close': Invalid argument (Errno::EINVAL) >> from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ >> mongrel.rb:597:in `process_client' > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From maillist at steelskies.com Sat Aug 12 18:28:34 2006 From: maillist at steelskies.com (Jonathan del Strother) Date: Sat, 12 Aug 2006 23:28:34 +0100 Subject: [Mongrel] Mongrel 0.3.13.4 headers seem a bit broken... Message-ID: <4F4D08F6-3E55-4EBF-A804-E4A6E196A589@steelskies.com> I'm running a Rails (r4720) app on OS X 10.4.6. Mongrel 0.3.13.3 works perfectly for me. Mongrel 0.3.13.4, not so much. Redirects don't work, for one thing. This rails code : redirect_to :action => 'login' correctly redirects me on 0.3.13.3. Here's the header I get back : HTTP/1.1 302 Moved Temporarily Content-Length: 93 Connection: close Date: Sat, 12 Aug 2006 22:13:41 GMT Set-Cookie: _session_id=e554ff2d043cb79b961cc033b6718b5e; path=/ Status: 302 Found Cache-Control: no-cache Server: Mongrel 0.3.13.3 Content-Type: text/html location: http://localhost:3000/login On 0.3.13.4, I get the same body back, but it doesn't redirect me. Here's the header : HTTP/1.1 404 Not Found Connection: close Date: Sat, 12 Aug 2006 22:19:33 GMT Content-Length: 93 Hmm. Odd... Similarly, rjs responses don't work for me in 0.3.13.4. I get this header : Connection: close Date: Sat, 12 Aug 2006 22:19:13 GMT Content-Length: 4850 and the browser just sits there. In 0.3.13.3, I get this header : Content-Length: 334 Connection: close Date: Sat, 12 Aug 2006 22:10:50 GMT Set-Cookie: _session_id=8df9b662a48e72c90d96cb9da9792491; path=/ Status: 200 OK Cache-Control: no-cache Server: Mongrel 0.3.13.3 Content-Type: text/javascript which works fine. Did I miss some vital step somewhere? -------------- 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/20060812/f83dc80f/attachment.bin From zedshaw at zedshaw.com Sat Aug 12 18:35:17 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 15:35:17 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> Message-ID: <1155422117.6042.23.camel@localhost.localdomain> On Sat, 2006-08-12 at 13:10 -0700, Carl Lerche wrote: > Alright, more trouble :( > > 2 mongrel processes have crashed since my last email. Here is the > relevant mongrel.log bit: Carl, just to make sure, don't install these pre-releases in production just yet. I'm still working on them, just test them and let me know what happens. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From carl.lerche at verizon.net Sat Aug 12 18:46:22 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 15:46:22 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <1155420102.6042.17.camel@localhost.localdomain> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> <1155420102.6042.17.camel@localhost.localdomain> Message-ID: Zed, thanks for the quick response. I will try out the fix. Also, I didn't see my last email hit the mailing list yet. So, in case it didn't, I'm on FreeBSD 6.1-RELEASE i386 I'll let you know how the fix works. -carl On Aug 12, 2006, at 3:01 PM, Zed Shaw wrote: > On Sat, 2006-08-12 at 13:10 -0700, Carl Lerche wrote: >> Alright, more trouble :( >> >> 2 mongrel processes have crashed since my last email. Here is the >> relevant mongrel.log bit: > > Alright Carl, should be fixed for good now. Try the pre-release AGAIN > and report back to me. Thanks for the testing, you definately are the > odd case here. > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > > -- > 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 carl.lerche at verizon.net Sat Aug 12 19:03:48 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 16:03:48 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <1155422117.6042.23.camel@localhost.localdomain> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> <1155422117.6042.23.camel@localhost.localdomain> Message-ID: <9E937771-666D-40E9-9211-2E6F8C1FCBA9@verizon.net> Alright, will do. Anyway, I'm having the same problem that Jonathan del Strother just emailed in. The headers sent are 404 and then it just dumps the HTML source as text into the browser. Here are the headers I'm getting: HTTP/1.1 404 Not Found Date: Sat, 12 Aug 2006 23:02:52 GMT Content-Length: 35144 Content-Type: text/plain; charset=ISO-8859-1 -carl > > Carl, just to make sure, don't install these pre-releases in > production > just yet. I'm still working on them, just test them and let me know > what happens. > From zedshaw at zedshaw.com Sat Aug 12 19:29:37 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 16:29:37 -0700 Subject: [Mongrel] Mongrel 0.3.13.4 headers seem a bit broken... In-Reply-To: <4F4D08F6-3E55-4EBF-A804-E4A6E196A589@steelskies.com> References: <4F4D08F6-3E55-4EBF-A804-E4A6E196A589@steelskies.com> Message-ID: <1155425377.6042.28.camel@localhost.localdomain> On Sat, 2006-08-12 at 23:28 +0100, Jonathan del Strother wrote: > I'm running a Rails (r4720) app on OS X 10.4.6. Mongrel 0.3.13.3 > works perfectly for me. Mongrel 0.3.13.4, not so much. > > Redirects don't work, for one thing. This rails code : Yep, just caught that and fixed it up. Grab the pre-release again and test for me. Getting closer, but as usual don't run this in production just yet. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Sat Aug 12 19:30:22 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 12 Aug 2006 16:30:22 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> <1155420102.6042.17.camel@localhost.localdomain> Message-ID: <1155425422.6042.30.camel@localhost.localdomain> On Sat, 2006-08-12 at 15:46 -0700, Carl Lerche wrote: > Zed, thanks for the quick response. I will try out the fix. Also, I > didn't see my last email hit the mailing list yet. So, in case it > didn't, I'm on FreeBSD 6.1-RELEASE i386 > > I'll let you know how the fix works. Carl, ok, the redirect problem is fixed, grab the one I just posted (Aug 12, 4:30pm PDT). Let me know if the outcome. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From maillist at steelskies.com Sat Aug 12 21:37:03 2006 From: maillist at steelskies.com (Jonathan del Strother) Date: Sun, 13 Aug 2006 02:37:03 +0100 Subject: [Mongrel] Mongrel 0.3.13.4 headers seem a bit broken... In-Reply-To: <1155425377.6042.28.camel@localhost.localdomain> References: <4F4D08F6-3E55-4EBF-A804-E4A6E196A589@steelskies.com> <1155425377.6042.28.camel@localhost.localdomain> Message-ID: <1B6D39C7-0B12-4180-AD85-81B2772ABB45@steelskies.com> On 13 Aug 2006, at 00:29, Zed Shaw wrote: > On Sat, 2006-08-12 at 23:28 +0100, Jonathan del Strother wrote: >> I'm running a Rails (r4720) app on OS X 10.4.6. Mongrel 0.3.13.3 >> works perfectly for me. Mongrel 0.3.13.4, not so much. >> >> Redirects don't work, for one thing. This rails code : > > Yep, just caught that and fixed it up. Grab the pre-release again and > test for me. Nice work, seems to be all fixed now -------------- 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/20060813/165c4213/attachment.bin From carl.lerche at verizon.net Sun Aug 13 00:49:07 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 12 Aug 2006 21:49:07 -0700 Subject: [Mongrel] Help mongrel keeps crashing... In-Reply-To: <1155425422.6042.30.camel@localhost.localdomain> References: <5655007.1632801155406200972.JavaMail.root@vms069.mailsrvcs.net> <1155407084.6042.12.camel@localhost.localdomain> <23507832-3AA3-4784-90A8-951075BE946B@verizon.net> <1155420102.6042.17.camel@localhost.localdomain> <1155425422.6042.30.camel@localhost.localdomain> Message-ID: Zed, thanks for the quick fixes. I am running the latest pre-release and will let you know what happens. Thanks, Carl On Aug 12, 2006, at 4:30 PM, Zed Shaw wrote: > On Sat, 2006-08-12 at 15:46 -0700, Carl Lerche wrote: >> Zed, thanks for the quick response. I will try out the fix. Also, I >> didn't see my last email hit the mailing list yet. So, in case it >> didn't, I'm on FreeBSD 6.1-RELEASE i386 >> >> I'll let you know how the fix works. > > Carl, ok, the redirect problem is fixed, grab the one I just posted > (Aug > 12, 4:30pm PDT). Let me know if the outcome. > > > -- > 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 Mon Aug 14 03:02:03 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 00:02:03 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 -- PIDs Work, Win32 Gem Message-ID: <1155538923.15237.15.camel@localhost.localdomain> Alright, this time a small announce going out to *just* the mongrel list so I can get some early testing. There's a new pre-release of 0.3.13.4 out that includes the win32 version of the gem. ** WIN32 USERS SHOULD INSTALL THIS AND TEST.*** ***** BUT NOT ON PRODUCTION SYSTEMS. ****** As usual, you install it with: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And this time pick the *right* one for your system. CHANGES * All the outstanding bugs on the rubyforge bug list are now closed off. Reopen any that are not really fixed. * PID files are found when stop/restart and this is now part of the full test suite. * HTTP headers with no spacing at all are now accepted for real I promise and with a test to make sure. * Fixes a *major* problem with how output was processed and Rails locking (I blame the stupid Katana patch, but not really). * FreeBSD 6.1 now throws a brand new Errno exception for closed sockets that nobody else throws. This has caused me to sprinkle "rescue Object" after every socket.close to make sure that--yes--the socket really closes. If anyone wants to try and help changing Ruby's Socket from "Ultimate Errno Randomness Generator" into something sane then let me know because it's seriously pissing me the hell off. LOCKING Previously I was under the delusion that Mongrel was running rails and then sending the response outside of any locking. This wasn't really true for various complex reasons (mainly that I'm a dumbass) but now this is the case. Since most coders cannot get their heads around this to save their lives (myself included), I've done this diagram which seems to help: B-E-F-O-R-E 0.3.13.4 request -> lock -> rails -> response -> unlock -> done A-F-T-E-R 0.3.13.4 request -> lock -> rails -> unlock -> response -> done This also probably fixes people who's Mongrels would lock up sometimes as previously there was a rare chance that if a socket (remember the randomness) got stuck then the process would lock up. Now only one thread locks up (which is still a problem). Please test this release on everything you can and shoot me back results. -- 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 Aug 14 05:33:06 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Mon, 14 Aug 2006 11:33:06 +0200 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 -- PIDs Work, Win32 Gem In-Reply-To: <1155538923.15237.15.camel@localhost.localdomain> References: <1155538923.15237.15.camel@localhost.localdomain> Message-ID: <8d9b3d920608140233y7e395f4am8f1f851223a3b351@mail.gmail.com> On 8/14/06, Zed Shaw wrote: > Alright, this time a small announce going out to *just* the mongrel list > so I can get some early testing. > > There's a new pre-release of 0.3.13.4 out that includes the win32 > version of the gem. > > ** WIN32 USERS SHOULD INSTALL THIS AND TEST.*** > ***** BUT NOT ON PRODUCTION SYSTEMS. ****** > > As usual, you install it with: > > sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > And this time pick the *right* one for your system. Seems like the gem index (yaml) contains 0.3.12.4-win32 only. Could you update the index please? I'm checking the patch - now I've found that line line shouldn't be there. This is updated patch against current svn (325) (removes the line, and adds --startup-type) I haven't tested it yet today. Jano -------------- next part -------------- A non-text attachment was scrubbed... Name: diff Type: application/octet-stream Size: 2689 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060814/dda77de9/attachment.obj From jan.svitok at gmail.com Mon Aug 14 08:00:10 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Mon, 14 Aug 2006 14:00:10 +0200 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 -- PIDs Work, Win32 Gem In-Reply-To: <8d9b3d920608140233y7e395f4am8f1f851223a3b351@mail.gmail.com> References: <1155538923.15237.15.camel@localhost.localdomain> <8d9b3d920608140233y7e395f4am8f1f851223a3b351@mail.gmail.com> Message-ID: <8d9b3d920608140500h2c40b469u4445f21a4a7a366b@mail.gmail.com> On 8/14/06, Jan Svitok wrote: > On 8/14/06, Zed Shaw wrote: > > Alright, this time a small announce going out to *just* the mongrel list > > so I can get some early testing. > > > > There's a new pre-release of 0.3.13.4 out that includes the win32 > > version of the gem. > > > > ** WIN32 USERS SHOULD INSTALL THIS AND TEST.*** > > ***** BUT NOT ON PRODUCTION SYSTEMS. ****** > > > > As usual, you install it with: > > > > sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > > > And this time pick the *right* one for your system. > > Seems like the gem index (yaml) contains 0.3.12.4-win32 only. Could > you update the index please? I've downloaded the gem manually (0.3.13.4-win32), and it doesn't contain compiled extension. Do you cross-compile or do you use oneclick+ some compiler? (latest oneclick 1.8.4-20 is compiled by msvc and it complained about my vc7 compiler -- config.h line 2) J. From jgeiger at gmail.com Mon Aug 14 09:46:55 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Mon, 14 Aug 2006 08:46:55 -0500 Subject: [Mongrel] [ANN] Mongrel Cluster 0.2.1 prerelease with prefix! In-Reply-To: <46B5C6E8-AF37-4C26-B3C7-7B4D83219E56@railsmachine.com> References: <46B5C6E8-AF37-4C26-B3C7-7B4D83219E56@railsmachine.com> Message-ID: <466af3440608140646g46eab985h640e7ca688237d9f@mail.gmail.com> What changes would I need to make to my configuration file to enable the prefix support? Thanks. --- user: user cwd: /web/servers/website.com/rails port: "8001" environment: development group: group address: 127.0.0.1 pid_file: log/mongrel.pid servers: 3 On 8/11/06, Bradley Taylor wrote: > > Hi all: > > I have update the mongrel_cluster prerelease to support the new "prefix" > option in the Mongrel prerelease and include a rc script for FreeBSD. Thanks > for the contributions from Andrew Bennett, Nat Brown, and Neil Wilson. > > 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. (Neil > Wilson) > - Added rc script for FreeBSD in resources/mongrel_cluster.sh (Andrew > Bennett) > - Added support for --prefix including Capistrano tasks (Nat Brown) > > Known issues: > - mongrel_rails complains about missing pid or log files when using relative > paths despite specifying 'chdir'. To fix, edit your mongrel_cluster conf > file to use absolute paths . I will investigate this further this weekend, > but I wanted to get the 'prefix' support out. If you don't need to use > 'prefix' and you store your configuration outside of 'RAILS_ROOT/config', > please wait for the next one. > > To install: > gem install mongrel_cluster --source > http://railsmachine.rubyforge.org/releases/ > > Please submit bugs, patches, and requests to the RubyForge tracker: > http://rubyforge.org/tracker/?group_id=1336 > Let me know how it goes. > > 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 > > From bradley at railsmachine.com Mon Aug 14 11:42:57 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Mon, 14 Aug 2006 11:42:57 -0400 Subject: [Mongrel] [ANN] Mongrel Cluster 0.2.1- Last Call Message-ID: <531208C8-88B9-4A65-B236-FBEAE5003307@railsmachine.com> Hi all: Here's a pre-release for mongrel_cluster to support current Mongrel 0.3.13.4 pre-release. 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. (Neil Wilson) - Added rc script for FreeBSD in resources/mongrel_cluster.sh (Andrew Bennett) - Added support for --prefix including Capistrano tasks (Nat Brown) Thanks for the contributions from Andrew Bennett, Nat Brown, and Neil Wilson. To install: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ sudo gem install mongrel_cluster --source http:// railsmachine.rubyforge.org/releases/ Please submit bugs, patches, and requests to the RubyForge tracker: http://rubyforge.org/tracker/?group_id=1336 Let me know how it goes. 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/20060814/80b70a3e/attachment-0001.html From bradley at railsmachine.com Mon Aug 14 11:57:53 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Mon, 14 Aug 2006 11:57:53 -0400 Subject: [Mongrel] [ANN] Mongrel Cluster 0.2.1 prerelease with prefix! In-Reply-To: <466af3440608140646g46eab985h640e7ca688237d9f@mail.gmail.com> References: <46B5C6E8-AF37-4C26-B3C7-7B4D83219E56@railsmachine.com> <466af3440608140646g46eab985h640e7ca688237d9f@mail.gmail.com> Message-ID: <1F05CBCD-C7E8-4C17-B6A0-4BF510E6E9BC@railsmachine.com> On Aug 14, 2006, at 9:46 AM, Joey Geiger wrote: > What changes would I need to make to my configuration file to enable > the prefix support? > > Thanks. > > --- > user: user > cwd: /web/servers/website.com/rails > port: "8001" > environment: development > group: group > address: 127.0.0.1 > pid_file: log/mongrel.pid > servers: 3 > Add "prefix:" with the same value you that would pass to mongrel_rails on the command line. You could also rerun mongrel_rails cluster::configure and regenerate it. Thanks, Bradley ------ 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/20060814/caf9b6b0/attachment.html From jgeiger at gmail.com Mon Aug 14 12:21:30 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Mon, 14 Aug 2006 11:21:30 -0500 Subject: [Mongrel] [ANN] Mongrel Cluster 0.2.1- Last Call In-Reply-To: <531208C8-88B9-4A65-B236-FBEAE5003307@railsmachine.com> References: <531208C8-88B9-4A65-B236-FBEAE5003307@railsmachine.com> Message-ID: <466af3440608140921p2c7a76f4j81520cd191232efc@mail.gmail.com> I'm not sure if this is a bug, or a working as intended, but when I configure my application to server images/js/css from an external server like this: # Enable serving of images, stylesheets, and javascripts from an asset server config.action_controller.asset_host = "http://dev.website.com" The files as created by the rails commands: <%= stylesheet_link_tag 'main', 'mozilla-pc' %> <%= javascript_include_tag :defaults %> are then sent to the browser as: with the extra /app thrown in there. I would hope that if I'm using an external server, there is a way to disable having the prefix thrown into the urls. Otherwise so far it's working as expected for me. Thanks. From zedshaw at zedshaw.com Mon Aug 14 13:43:33 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 10:43:33 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 -- PIDs Work, Win32 Gem In-Reply-To: <8d9b3d920608140233y7e395f4am8f1f851223a3b351@mail.gmail.com> References: <1155538923.15237.15.camel@localhost.localdomain> <8d9b3d920608140233y7e395f4am8f1f851223a3b351@mail.gmail.com> Message-ID: <1155577413.6099.1.camel@localhost.localdomain> On Mon, 2006-08-14 at 11:33 +0200, Jan Svitok wrote: > On 8/14/06, Zed Shaw wrote: > Seems like the gem index (yaml) contains 0.3.12.4-win32 only. Could > you update the index please? > > >From my checks it's there: ~> gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Attempting local installation of 'mongrel' Local gem file not found: mongrel*.gem Attempting remote installation of 'mongrel' Select which gem to install for your platform (i486-linux) 1. mongrel 0.3.13.4 (ruby) 2. mongrel 0.3.12.4 (mswin32) 3. Cancel installation Maybe windows doesn't like it for some reason? I'll reload tonight and double check. > I'm checking the patch - now I've found that line line shouldn't be there. > This is updated patch against current svn (325) (removes the line, and > adds --startup-type) > I haven't tested it yet today. I'll try working this in today. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Aug 14 13:45:11 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 10:45:11 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 -- PIDs Work, Win32 Gem In-Reply-To: <8d9b3d920608140500h2c40b469u4445f21a4a7a366b@mail.gmail.com> References: <1155538923.15237.15.camel@localhost.localdomain> <8d9b3d920608140233y7e395f4am8f1f851223a3b351@mail.gmail.com> <8d9b3d920608140500h2c40b469u4445f21a4a7a366b@mail.gmail.com> Message-ID: <1155577511.6099.4.camel@localhost.localdomain> On Mon, 2006-08-14 at 14:00 +0200, Jan Svitok wrote: > On 8/14/06, Jan Svitok wrote: > I've downloaded the gem manually (0.3.13.4-win32), and it doesn't > contain compiled extension. Do you cross-compile or do you use > oneclick+ some compiler? (latest oneclick 1.8.4-20 is compiled by msvc > and it complained about my vc7 compiler -- config.h line 2) Oh, I see what's wrong now. I uploaded 0.3.12.4 on accident somehow. I'll fix it up and try the win32 release again. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Aug 14 13:47:10 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 10:47:10 -0700 Subject: [Mongrel] [ANN] Mongrel Cluster 0.2.1- Last Call In-Reply-To: <466af3440608140921p2c7a76f4j81520cd191232efc@mail.gmail.com> References: <531208C8-88B9-4A65-B236-FBEAE5003307@railsmachine.com> <466af3440608140921p2c7a76f4j81520cd191232efc@mail.gmail.com> Message-ID: <1155577630.6099.7.camel@localhost.localdomain> On Mon, 2006-08-14 at 11:21 -0500, Joey Geiger wrote: > I'm not sure if this is a bug, or a working as intended, but when I > configure my application to server images/js/css from an external > server like this: > with the extra /app thrown in there. I would hope that if I'm using an > external server, there is a way to disable having the prefix thrown > into the urls. Otherwise so far it's working as expected for me. That's a Rails thing, not a Mongrel thing. Basically you said mount at /app, so that's what it's doing. Most likely it goes through generating URLs such that /app is always included. I'd suggest just changing your asset host so you can stay on the rails. :-) -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Aug 14 17:20:10 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 14:20:10 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 -- All Praise Win32 Message-ID: <1155590410.6248.17.camel@localhost.localdomain> Hey Win32 folks, I messed up the win32 gem for my last Pre-Release announce. Please grab it again with: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And make sure your apps work with it. Nothing else has changed, but there will be another release for win32 tomorrow. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From carl.lerche at verizon.net Mon Aug 14 17:25:26 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Mon, 14 Aug 2006 14:25:26 -0700 Subject: [Mongrel] More mongrel pre-release crashes Message-ID: Alright, here are some more outputs of the log for the latest pre- release of mongrel. I'm just copying the relevant stuff: ERROR reading http body: Socket closed or read failure Mon Aug 14 00:00:02 CDT 2006: ERROR: undefined method `rewind' for nil:NilClass /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 221:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 555:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 664:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 664:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 651:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:267:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:266:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails: 127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ command.rb:203:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:233 /usr/local/bin/mongrel_rails:18 Mon Aug 14 10:39:55 CDT 2006: ERROR: failed to allocate memory /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 536:in `readpartial' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 536:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 664:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 664:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: 651:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:267:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:266:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails: 127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ command.rb:203:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:233 /usr/local/bin/mongrel_rails:18 [FATAL] failed to allocate memory Also, what does it mean when I see a bunch of gibberish in the log file like as follows? You mentioned base64 stuff, how is it sent to the log file? I tried to decode a line and I get the following: '"GIF89aM\0009\000\367\000\000\000\000\000\377\377\377\037\037 \203_d \304\227\235\246{\204\216kr\256\211\221\255\233\240\225nz\233u"' Thanks, -carl R0lGODlhTQA5APcAAAAAAP///x8fIINfZMSXnaZ7hI5rcq6Jka2boJVuept1 gUs2PqGCjm5QXF5BTp9zjoNtgY9/jol5iSMgIx8dH/nv+SAfINnX2R4YH3dl ehgTGZqJnaKRpWdaaisjLS4lMVRGWSsgMBsVHh8dIMnFy1tSYXpxgWtjcjky QKWerEdESnh1e1hWWk1GVh4YJl9VbX5yjn16gSUfLikjMjMuO42DnB0bICQi JywqL768wTUtQiwkO05EYEQ8VV1ZZRsaHbWvwTw6QEFAQ2dgeC8sNoeBlVhR a2xmfM/L2j4zXZeNtZybnx4ZLxgWH0dBWiknMH54kXRvhZOOo/f1/jo2SSAe KCYkLkRBUFRRYB0cIXh0hx8eI3x4izU0OWVkaa2ssWJfcGxqdTYyS1JOZnVw kbWt3U1KXCEgJuXj8B8dLCMhMCknNp2ZttvW+V5ca0lITy8sRWBcgUlGYi4s PGtnhyQjK4KAknJxeVhVdE9OWDAuThwbKSQjNGpnlyAfLD08S1BPX6Siv9LQ 8jo5VCopPKSi23FwjH9+ns/O+8vK8B8fSUBAahcXIyAgL4aGwxoaJDAwQCAg Kbu76YaGpx0dJI+PrJWVsx8fJampxXBwgG9vfn9/jiYmKiAgIzAwMx8fIRoa G46Okx0dHiUlJoeHif39//v7/Pj4+eDg4VxelJGSyE9QbMTF6bW21z0/XnZ5 tM/R/97g/7m6y0dKcHBzn1pcetPW/q+y0sTJ/Ly/2iUqUFNaiJae1sTG1O7w /1BWfauwy9jg/+Hn/szR49Le/9nb4fj5/O7v8tPU12ZwhiAlL7W2uNzl9O/1 /2JugOfw/uHv//Lz9OXm5/D6/8zOz/v+/+/+//T//xwdHfX29uvs7BwfHSU9 KRoxHTJKNRAoEj5XQAcgB/3+/YuOiXJzcPDy5uDjzOvu2cHDtC0uJd7ivvj6 6v7/9v7/8R4eHCAgH///+15eXf///v39/Pr6+aCbi9fTyoaBeSQcGuXe3R4a Gv7+/iAgIB8fHx4eHv///yH5BAEAAP8ALAAAAABNADkAAAj/ALsJ7PYtnEGD 3bhx88ZtYEKFDAkenEixosWL4b518waO4cKOAgsedEbS2ZUqVahoydGrUiYu dooAuQWkppQYJYI88eOnioWfQIP+HGHhk9Cg/DopPbMlzZwW1AIwqzXLUqAM IBbo2GEkkJSSzlZFATJMlhRDmGpEqRFIFpBKR67MqZOmyqdIPQUI6NdPr1+9 fM/IONP3794zjfxcGsUpyBssX4pZ0qUIzpwdOnoYMUKHzCRnyUhWilXpFy1L wNDkahWohiEoTpgwUbxl76dPffkW/qu7zgfCfy1QEDXCzwwP+oQskWbsmHNZ k7Qc6dDBSI8kcWbFqYUHz6pDwHbR/8KkypIlQ0aoqFEJKI3i3IAp6C6sG7C/ G11u+BMg6gcoUJ08QQQRVXgSTz1f2ANPAPsEEIA8F6zgAwhYkKFEGYkkUkst yRzSiyCs3DJJMnLAwcceaexBwyY+UMKXYQJQYFh9uvnDiQoeaKDBBF28wYIP LAx4BzLyBFBOOew4GMApqCzjwxeoVDBFG2WoosokmISISShu/AEJH2mk0cgZ /PjjyT1eYLMbjGz+9cMoIBChggkpfFHDCSCEoAIJ8hQpDzzyZHNBNKaIkw0y OVwgjSw1xNGHKoVgYgkUchCS4h57NKJpI528008695DjTj/8tNkmBiJoIAIK JXCQAwkRyP8lww0e5NCgkg5eQA098zgIzzFhvKEDHEnQUkghgECSKSBXpBGJ From john at fivesquaresoftware.com Mon Aug 14 17:33:16 2006 From: john at fivesquaresoftware.com (John Clayton) Date: Mon, 14 Aug 2006 14:33:16 -0700 Subject: [Mongrel] Mongrel loading wrong database environment (& a couple other bugs?) Message-ID: Hi There, I've got a mongrel cluster running on redhat 9 proxied behind an Apache 2.2 installation. I have run into a real stumbling block in that, while the rails app runs in production mode (you get a production.log file, for example, and I see this in the mongrel log: ** Starting Rails with production environment ... ), it always loads the development database configuration no matter what. I can re- config the file, move things around, with no effect. Has anyone else noticed this? I'm starting up mongrel using the mongrel_cluster_ctl script from /et/ init.d/mongrel_cluster as suggested in the docs. You can see my config file below. I've also noticed a couple other issues. 1. When specifying a pid file that's not in the default, you can start up mongrel fine and it writes the pid(s, this is clustered) to the correct location, say /tmp/mongrel.*.pid, but the stop command always tries to find the pid in /path/to/docroot/log/tmp/ mongrel.*.pid, basically appending the absolute path to the default location. This is handy if you want to move symlinks around and still have the ctl script find the pids. 2. the -r (--root) option and the :docroot yml pair don't seem to have any effect whatsoever. Thanks for any help you can offer, John Clayton My mongrel versions: mongrel (0.3.13.3) A small fast HTTP library and server that runs Rails, Camping, and Nitro apps. mongrel_cluster (0.2.0) Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes. My config file: --- user: mongrel cwd: /var/www/example.com/app/current/ port: "8000" environment: production debug: false group: instrument address: 127.0.0.1 pid_file: log/mongrel.pid servers: 3 From lists at lastonepicked.com Mon Aug 14 20:11:24 2006 From: lists at lastonepicked.com (HH) Date: Mon, 14 Aug 2006 17:11:24 -0700 Subject: [Mongrel] 0.3.13.4 w/ File Upload Progress? Message-ID: So, do these new shiny 0.3.13.4 releases have the previously mentioned upload progress stuff baked in and ready to use? H From zedshaw at zedshaw.com Mon Aug 14 20:13:59 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 17:13:59 -0700 Subject: [Mongrel] More mongrel pre-release crashes In-Reply-To: References: Message-ID: <1155600839.6158.8.camel@localhost.localdomain> On Mon, 2006-08-14 at 14:25 -0700, Carl Lerche wrote: > Alright, here are some more outputs of the log for the latest pre- > release of mongrel. I'm just copying the relevant stuff: > Carl, what the hell are you doing to my software. :-) Nah, this is good, but I'm really curious what your app is, it seems to really stretch boundaries. > ERROR reading http body: Socket closed or read failure > Mon Aug 14 00:00:02 CDT 2006: ERROR: undefined method `rewind' for > nil:NilClass Ah, right before this should have been a socket read failure message. Can you send that on to me. I've fixed this and will do another pre-release. Also, does this crash the server? It shouldn't. > > Mon Aug 14 10:39:55 CDT 2006: ERROR: failed to allocate memory > /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb: > 536:in `readpartial' Ok, you're on your own here. You've basically run out of ram so--kaboom! If you have rails actions that are loading tons of data, consider forcing that data =nil and call GC.start. Before and after filters are good for this. > Also, what does it mean when I see a bunch of gibberish in the log > file like as follows? You mentioned base64 stuff, how is it sent to > the log file? I tried to decode a line and I get the following: > '"GIF89aM\0009\000\367\000\000\000\000\000\377\377\377\037\037 \203_d > \304\227\235\246{\204\216kr\256\211\221\255\233\240\225nz\233u"' > Looks like it's sending an image, but I've no idea why it'd put that int here since I don't have the full log. It could mean that your configuration isn't setup properly since Mongrel seems to be serving files. I'd like to find out why you get this message, so if you can send me a zip of your logs and maybe a detailed description of what your app does then I can try to find out what causes those. Send it to me off list so that you can keep it a secret (if you need to). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Aug 14 20:18:27 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 17:18:27 -0700 Subject: [Mongrel] Mongrel loading wrong database environment (& a couple other bugs?) In-Reply-To: References: Message-ID: <1155601107.6158.12.camel@localhost.localdomain> On Mon, 2006-08-14 at 14:33 -0700, John Clayton wrote: > Hi There, > > I've got a mongrel cluster running on redhat 9 proxied behind an > Apache 2.2 installation. I have run into a real stumbling block in > that, while the rails app runs in production mode (you get a > production.log file, for example, and I see this in the mongrel log: > ** Starting Rails with production environment ... ), it always loads > the development database configuration no matter what. I can re- > config the file, move things around, with no effect. Has anyone else > noticed this? Not sure what Mongrel would do to cause this, and since many other people are running in production with Mongrel you should double check your database.yml config and your database config. Best thing to do is remove *everything* from database.yml except your production setup, and remove all databases except your production database. But, uh don't do this on real production, do it some test environment. If you do this then you'll quickly find out why it's wrong and can go fix your configuration. > 1. When specifying a pid file that's not in the default, you can > start up mongrel fine and it writes the pid(s, this is clustered) to > the correct location, say /tmp/mongrel.*.pid, but the stop command > always tries to find the pid in /path/to/docroot/log/tmp/ > mongrel.*.pid, basically appending the absolute path to the default > location. > This is fixed in the 0.3.13.4 pre-release. If you have a chance, double confirm it by installing the pre-release on your development or staging system: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > This is handy if you want to move symlinks around and still have the > ctl script find the pids. > > 2. the -r (--root) option and the :docroot yml pair don't seem to > have any effect whatsoever. > Can you describe this a bit better? Also tell me if you see this stil with the pre-release. Oh, one more thing, also make sure that your setup runs in production *without* mongrel_cluster and with webrick. If it works in plain mongrel then it might be a mongrel_cluster bug. If it works with webrick then it might be a mongrel bug. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From tgw529 at gmail.com Mon Aug 14 20:48:43 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Mon, 14 Aug 2006 20:48:43 -0400 Subject: [Mongrel] Start up error Message-ID: <1d6e22490608141748v165e003ck122c0832b04a5231@mail.gmail.com> I am a complete newbie and am having trouble getting mongrel started up. I cannot find any info about this error. If you can help at all, I would be very grateful. Here is the error I get when I try and start my rails app with mongrel. I have reomved and reinstalled Rails, Ruby, Daemons, and Mongrel based on some other articles I found on this list. PLEASE HELP! tim at rome:/www/app.tickspot.com$ sudo mongrel_rails start -e developement -p 80 ** Starting Mongrel listening at 0.0.0.0:80 ** Starting Rails with developement environment ... /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:168:in `read': No such file or directory - /www/app.tickspot.com/config/../config/environments/developement.rb (Errno::ENOENT) from /usr/lib/ruby/gems/1.8/gems/rails- 1.1.6/lib/initializer.rb:168:in `load_environment' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /usr/lib/ruby/gems/1.8/gems/rails- 1.1.6/lib/initializer.rb:165:in `load_environment' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:82:in `process' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in `run' from /www/app.tickspot.com/config/environment.rb:13 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/lib/mongrel/rails.rb:156:in`rails' from /usr/lib/ruby/gems/1.8/gems/mongrel- 0.3.13.2/bin/mongrel_rails:104:in `cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel- 0.3.13.2/lib/mongrel.rb:845:in `listener' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/bin/mongrel_rails:91:in `cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel- 0.3.13.2/lib/mongrel.rb:763:in `initialize' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2/bin/mongrel_rails:78:in`run' from /usr/lib/ruby/gems/1.8/gems/mongrel- 0.3.13.2/lib/mongrel/command.rb:211:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel- 0.3.13.2/bin/mongrel_rails:227 from /usr/bin/mongrel_rails:18 -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060814/1d8d029a/attachment.html From francois.beausoleil at gmail.com Mon Aug 14 21:02:50 2006 From: francois.beausoleil at gmail.com (Francois Beausoleil) Date: Mon, 14 Aug 2006 21:02:50 -0400 Subject: [Mongrel] Start up error In-Reply-To: <1d6e22490608141748v165e003ck122c0832b04a5231@mail.gmail.com> References: <1d6e22490608141748v165e003ck122c0832b04a5231@mail.gmail.com> Message-ID: <41d5fadf0608141802n4cc4a9c0m24301d5d23387a84@mail.gmail.com> Hello Timothy, 2006/8/14, Timothy Wright : > /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:168:in > `read': No such file or directory - > /www/app.tickspot.com/config/../config/environments/developement.rb > (Errno::ENOENT) Message says it all: No such file or directory Make sure that file exists, and if not, you'll need to create it. Hope that helps ! -- Fran?ois Beausoleil http://blog.teksol.info/ From tgw529 at gmail.com Mon Aug 14 21:04:45 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Mon, 14 Aug 2006 21:04:45 -0400 Subject: [Mongrel] Start up error In-Reply-To: <41d5fadf0608141802n4cc4a9c0m24301d5d23387a84@mail.gmail.com> References: <1d6e22490608141748v165e003ck122c0832b04a5231@mail.gmail.com> <41d5fadf0608141802n4cc4a9c0m24301d5d23387a84@mail.gmail.com> Message-ID: <1d6e22490608141804l7088bcd9yb07e2d92378f3f59@mail.gmail.com> Just got. It mispelled development On 8/14/06, Francois Beausoleil wrote: > > Hello Timothy, > > 2006/8/14, Timothy Wright : > > /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:168:in > > `read': No such file or directory - > > /www/app.tickspot.com/config/../config/environments/developement.rb > > (Errno::ENOENT) > > Message says it all: > > No such file or directory > > Make sure that file exists, and if not, you'll need to create it. > > Hope that helps ! > -- > Fran?ois Beausoleil > http://blog.teksol.info/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060814/9c56251d/attachment.html From zedshaw at zedshaw.com Mon Aug 14 21:18:10 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 14 Aug 2006 18:18:10 -0700 Subject: [Mongrel] 0.3.13.4 w/ File Upload Progress? In-Reply-To: References: Message-ID: <1155604690.6158.14.camel@localhost.localdomain> On Mon, 2006-08-14 at 17:11 -0700, HH wrote: > So, do these new shiny 0.3.13.4 releases have the previously mentioned > upload progress stuff baked in and ready to use? No, not yet. I've gotta pull that together and come up with the packaging and docs. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zackchandler at gmail.com Tue Aug 15 18:55:50 2006 From: zackchandler at gmail.com (Zack Chandler) Date: Tue, 15 Aug 2006 15:55:50 -0700 Subject: [Mongrel] mongrel_cluster not starting on reboot Message-ID: <33841ac70608151555g248359d8o3414dc2358b3ef42@mail.gmail.com> Hi, I'm in the process of moving my blog over from lighttpd -> apache 2.2 + mongrel. Everything works fine as long as I don't reboot :) On reboot apache comes up but mongrel_cluster doesn't start up the pooches... I have added the mongrel_cluster call to my startup scripts like so: www:/etc/init.d# update-rc.d mongrel_cluster defaults Adding system startup for /etc/init.d/mongrel_cluster ... /etc/rc0.d/K20mongrel_cluster -> ../init.d/mongrel_cluster /etc/rc1.d/K20mongrel_cluster -> ../init.d/mongrel_cluster /etc/rc6.d/K20mongrel_cluster -> ../init.d/mongrel_cluster /etc/rc2.d/S20mongrel_cluster -> ../init.d/mongrel_cluster /etc/rc3.d/S20mongrel_cluster -> ../init.d/mongrel_cluster /etc/rc4.d/S20mongrel_cluster -> ../init.d/mongrel_cluster /etc/rc5.d/S20mongrel_cluster -> ../init.d/mongrel_cluster www:/etc/init.d# Specs: mongrel 0.3.13.3 mongrel_cluster 0.2.0 on debian sarge (rimu). Any ideas? -- Zack Chandler http://depixelate.com From jason at joyent.com Tue Aug 15 19:23:35 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Tue, 15 Aug 2006 16:23:35 -0700 Subject: [Mongrel] mongrel_cluster not starting on reboot In-Reply-To: <33841ac70608151555g248359d8o3414dc2358b3ef42@mail.gmail.com> References: <33841ac70608151555g248359d8o3414dc2358b3ef42@mail.gmail.com> Message-ID: On Aug 15, 2006, at 3:55 PM, Zack Chandler wrote: > Hi, > > I'm in the process of moving my blog over from lighttpd -> apache 2.2 > + mongrel. Everything works fine as long as I don't reboot :) > > On reboot apache comes up but mongrel_cluster doesn't start up the > pooches... > > I have added the mongrel_cluster call to my startup scripts like so: > > www:/etc/init.d# update-rc.d mongrel_cluster defaults > Adding system startup for /etc/init.d/mongrel_cluster ... > /etc/rc0.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > /etc/rc1.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > /etc/rc6.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > /etc/rc2.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > /etc/rc3.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > /etc/rc4.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > /etc/rc5.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > www:/etc/init.d# > > Specs: > mongrel 0.3.13.3 > mongrel_cluster 0.2.0 on > debian sarge (rimu). > > Any ideas? What happens when you run that startup script on it's own? Often the problem with these (like cronjobs on reboot) is that you need full paths to everything. On reboot root will do things like use the sh shell to get things going and it doesn't know where to look. - J From zackchandler at gmail.com Tue Aug 15 20:26:09 2006 From: zackchandler at gmail.com (Zack Chandler) Date: Tue, 15 Aug 2006 17:26:09 -0700 Subject: [Mongrel] mongrel_cluster not starting on reboot In-Reply-To: References: <33841ac70608151555g248359d8o3414dc2358b3ef42@mail.gmail.com> Message-ID: <33841ac70608151726n292c51fpc38b35dec6f2ff6e@mail.gmail.com> On 8/15/06, Jason A. Hoffman wrote: > On Aug 15, 2006, at 3:55 PM, Zack Chandler wrote: > > Hi, > > > > I'm in the process of moving my blog over from lighttpd -> apache 2.2 > > + mongrel. Everything works fine as long as I don't reboot :) > > > > On reboot apache comes up but mongrel_cluster doesn't start up the > > pooches... > > > > I have added the mongrel_cluster call to my startup scripts like so: > > > > www:/etc/init.d# update-rc.d mongrel_cluster defaults > > Adding system startup for /etc/init.d/mongrel_cluster ... > > /etc/rc0.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > > /etc/rc1.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > > /etc/rc6.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > > /etc/rc2.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > > /etc/rc3.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > > /etc/rc4.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > > /etc/rc5.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > > www:/etc/init.d# > > > > Specs: > > mongrel 0.3.13.3 > > mongrel_cluster 0.2.0 on > > debian sarge (rimu). > > > > Any ideas? > > What happens when you run that startup script on it's own? > > Often the problem with these (like cronjobs on reboot) is that you > need full paths to everything. On reboot root will do things like use > the sh shell to get things going and it doesn't know where to look. > > - J > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Jason, >sudo /etc/init.d/mongrel_cluster start works fine from the command line. Any other ideas? -- Zack Chandler http://depixelate.com From jason at joyent.com Tue Aug 15 20:31:48 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Tue, 15 Aug 2006 17:31:48 -0700 Subject: [Mongrel] mongrel_cluster not starting on reboot In-Reply-To: <33841ac70608151726n292c51fpc38b35dec6f2ff6e@mail.gmail.com> References: <33841ac70608151555g248359d8o3414dc2358b3ef42@mail.gmail.com> <33841ac70608151726n292c51fpc38b35dec6f2ff6e@mail.gmail.com> Message-ID: > Jason, > >> sudo /etc/init.d/mongrel_cluster start > works fine from the command line. > > Any other ideas? What are the permissions on the file (ls -aol /etc/init.d/ mongrel_cluster) and the contents? - J From jason at joyent.com Tue Aug 15 20:46:30 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Tue, 15 Aug 2006 17:46:30 -0700 Subject: [Mongrel] mongrel_cluster not starting on reboot In-Reply-To: <33841ac70608151726n292c51fpc38b35dec6f2ff6e@mail.gmail.com> References: <33841ac70608151555g248359d8o3414dc2358b3ef42@mail.gmail.com> <33841ac70608151726n292c51fpc38b35dec6f2ff6e@mail.gmail.com> Message-ID: <9271BB62-DAF8-4EC5-9BF1-98BCC19E2D9C@joyent.com> On Aug 15, 2006, at 5:26 PM, Zack Chandler wrote: > On 8/15/06, Jason A. Hoffman wrote: >> On Aug 15, 2006, at 3:55 PM, Zack Chandler wrote: >>> Hi, >>> >>> I'm in the process of moving my blog over from lighttpd -> apache >>> 2.2 >>> + mongrel. Everything works fine as long as I don't reboot :) >>> >>> On reboot apache comes up but mongrel_cluster doesn't start up the >>> pooches... >>> >>> I have added the mongrel_cluster call to my startup scripts like >>> so: >>> >>> www:/etc/init.d# update-rc.d mongrel_cluster defaults >>> Adding system startup for /etc/init.d/mongrel_cluster ... >>> /etc/rc0.d/K20mongrel_cluster -> ../init.d/mongrel_cluster >>> /etc/rc1.d/K20mongrel_cluster -> ../init.d/mongrel_cluster >>> /etc/rc6.d/K20mongrel_cluster -> ../init.d/mongrel_cluster >>> /etc/rc2.d/S20mongrel_cluster -> ../init.d/mongrel_cluster >>> /etc/rc3.d/S20mongrel_cluster -> ../init.d/mongrel_cluster >>> /etc/rc4.d/S20mongrel_cluster -> ../init.d/mongrel_cluster >>> /etc/rc5.d/S20mongrel_cluster -> ../init.d/mongrel_cluster >>> www:/etc/init.d# You know what, looking at this the rc6.d (from what I recall, I'm a solaris/BSD person) is that run level 6 is the System reboot runtime for debian, and when something is a "K" it disables the service and keeps it stopped. 2,3,4,5 are probably all multiuser and they're "S", that's why it works from the command line once it's up. Maybe rename all the K20mongrel_cluster ones to S20mongrel_cluster. - Jason From steven at lumos.us Tue Aug 15 21:09:25 2006 From: steven at lumos.us (Steven Lumos) Date: Tue, 15 Aug 2006 18:09:25 -0700 Subject: [Mongrel] Fwd: Error on Solaris References: <1155225266.5997.18.camel@localhost.localdomain> Message-ID: <86fyfx8p16.fsf@bitty.lumos.us> Zed Shaw writes: > On Thu, 2006-08-10 at 17:53 +1000, Carl Woodward wrote: >> Sorry guys, I'm an idiot. Its in C. > > Also, try installing the pre-release as I've (hopefully) fixed things > that cause the Sun C compiler to blow up (because they couldn't read a > spec if it was filled with porn). > > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Sun C does not blow up, it emits some warnings. The warnings aren't errors, they are warnings. That's what the word "warning" at the beginning of those lines means. Empty declarations really are illegal in C99. They really are syntax errors. I wonder where you differ from Sun on the spec. I'd like to see your derivation of ';' from the grammar in Annex A.2.2. If anyone is inordinately bothered by the warnings, they can get rid of them by adding -xc99=%none to their compiler flags. Then an empty decl will be converted to 'int;' like C89 and GCC do. Better to fix the bug (as has already been done) however. Granted, using the word "error" in the body of a warning is confusing to people who miss the word "warning" immediately preceding it. That's why I used phrases like "Mostly just FYI", and "I get some warnings" in my bug report. The single remaining warning is also a warning. GCC will also emit this warning, but they hide this feature behind -Wunreachable-code. Try it (3.4.3 here) and you will learn why they hide it. It flags over 100 lines. I removed the crazy #line directives (1,106,24,110,26,114?) from the generated C file (0.3.13.3) and compiled to find that the warning is on line 297. That line really is unreachable. The warning really should be there. Having unreachable lines isn't exactly a crime for a parser generator. If anyone is inordinately bothered by the warning they can add -erroff=E_STATEMENT_NOT_REACHED to their compiler flags. Mongrel runs great when compiled with Sun C! So does Ruby. Maybe I should have noted in my bug report that I was using it with great success, would love to buy you a beverage, etc. GCC is periodically broken in horrible ways on SPARC. They even managed to break printf("%.2lf", x). I haven't caught up on whether they ever succeeded in correctly implementing the standard calling convention. Steve From tgw529 at gmail.com Tue Aug 15 22:34:45 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Tue, 15 Aug 2006 22:34:45 -0400 Subject: [Mongrel] mongrel lighttpd and ssl Message-ID: <1d6e22490608151934i16a7cc50u3c955c3ac66d80c@mail.gmail.com> I am wanting to one run instance of lighttpd, many many instances of mongrel. I also need ssl but only for one of my sites. I understand that Mongrel does not play with SSL so I am forced to use Lighttpd. I think that lighttpd only handles ssl or non-ssl on any given instance. Is there a way for me to accomplish my goal of one lighttpd with multiple mongrels and the occasional ssl connection? -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060815/d52dd420/attachment.html From zackchandler at gmail.com Tue Aug 15 23:22:58 2006 From: zackchandler at gmail.com (Zack Chandler) Date: Tue, 15 Aug 2006 20:22:58 -0700 Subject: [Mongrel] mongrel_cluster not starting on reboot In-Reply-To: <9271BB62-DAF8-4EC5-9BF1-98BCC19E2D9C@joyent.com> References: <33841ac70608151555g248359d8o3414dc2358b3ef42@mail.gmail.com> <33841ac70608151726n292c51fpc38b35dec6f2ff6e@mail.gmail.com> <9271BB62-DAF8-4EC5-9BF1-98BCC19E2D9C@joyent.com> Message-ID: <33841ac70608152022y29a07bces397a4287121e4c6d@mail.gmail.com> On 8/15/06, Jason A. Hoffman wrote: > On Aug 15, 2006, at 5:26 PM, Zack Chandler wrote: > > On 8/15/06, Jason A. Hoffman wrote: > >> On Aug 15, 2006, at 3:55 PM, Zack Chandler wrote: > >>> Hi, > >>> > >>> I'm in the process of moving my blog over from lighttpd -> apache > >>> 2.2 > >>> + mongrel. Everything works fine as long as I don't reboot :) > >>> > >>> On reboot apache comes up but mongrel_cluster doesn't start up the > >>> pooches... > >>> > >>> I have added the mongrel_cluster call to my startup scripts like > >>> so: > >>> > >>> www:/etc/init.d# update-rc.d mongrel_cluster defaults > >>> Adding system startup for /etc/init.d/mongrel_cluster ... > >>> /etc/rc0.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > >>> /etc/rc1.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > >>> /etc/rc6.d/K20mongrel_cluster -> ../init.d/mongrel_cluster > >>> /etc/rc2.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > >>> /etc/rc3.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > >>> /etc/rc4.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > >>> /etc/rc5.d/S20mongrel_cluster -> ../init.d/mongrel_cluster > >>> www:/etc/init.d# > > You know what, looking at this the rc6.d (from what I recall, I'm a > solaris/BSD person) is that run level 6 is the System reboot runtime > for debian, and when something is a "K" it disables the service and > keeps it stopped. > > 2,3,4,5 are probably all multiuser and they're "S", that's why it > works from the command line once it's up. Maybe rename all the > K20mongrel_cluster ones to S20mongrel_cluster. > > - Jason > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > Jason, I found out Rimuhosting supports console-over-ssh. That is sweet! Once I logged in I noticed this line: command not found: mongrel_cluster_ctl I guess /usr/local/bin is not in the boot PATH. I symlinked the following ln -s /usr/local/bin/mongrel_cluster_ctl mongrel_cluster_ctl ln -s /usr/local/bin/mongrel_rails mongrel_rails and it worked like a charm. Thanks! -- Zack Chandler http://depixelate.com From emho.verger at gmail.com Wed Aug 16 00:06:12 2006 From: emho.verger at gmail.com (Emho Verger) Date: Wed, 16 Aug 2006 12:06:12 +0800 Subject: [Mongrel] New subscriber, new question Message-ID: Hi all, I?m new to the list. I've working with mongrel for the last week and have some quetion about mongrel cluster: Is this (being executed from the application folder): # mongrel_rails start -d -p 3001 -e production # mongrel_rails start -d -p 3002 -e production # mongrel_rails start -d -p 3003 -e production the same as: # mongrel_rails cluster::configure -e production -p 3001 -N 3 -c /var/www/apps/testapp # mongrel_rails cluster::start Im not familiar with clusters, and since the load balance is being done by the Apache proxy balancer, I wonder what is the difference of executing that set of commands and the cluster::start. thanks to all, Emho From neil at aldur.co.uk Wed Aug 16 00:25:21 2006 From: neil at aldur.co.uk (Neil Wilson) Date: Wed, 16 Aug 2006 05:25:21 +0100 Subject: [Mongrel] Debian Apache 2.2 package available on experimental Message-ID: Finally! See http://people.debian.org/~terpstra/message/20060815.194742.e85b8143.en.html For all those Debianites wanting to try mod_proxy_balancer with Mongrel -- Neil Wilson (neil at aldur.co.uk) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060816/6fcee72b/attachment.html From scott at sigkill.org Wed Aug 16 01:06:27 2006 From: scott at sigkill.org (Scott Laird) Date: Tue, 15 Aug 2006 22:06:27 -0700 Subject: [Mongrel] Debian Apache 2.2 package available on experimental In-Reply-To: References: Message-ID: <14b7e5ef0608152206y6d4d00bcndc31772b1e146002@mail.gmail.com> Wow! I was starting to think they'd abandoned Apache. Scott On 8/15/06, Neil Wilson wrote: > Finally! > > See > http://people.debian.org/~terpstra/message/20060815.194742.e85b8143.en.html > > For all those Debianites wanting to try mod_proxy_balancer with Mongrel > > -- > Neil Wilson (neil at aldur.co.uk) > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From tgw529 at gmail.com Wed Aug 16 08:53:31 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Wed, 16 Aug 2006 08:53:31 -0400 Subject: [Mongrel] Mongrel Lighttpd and SSL Message-ID: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> I am wanting to one run instance of lighttpd, many many instances of mongrel. I also need ssl but only for one of my sites. I understand that Mongrel does not play with SSL so I am forced to use Lighttpd. I think that lighttpd only handles ssl or non-ssl on any given instance. Is there a way for me to accomplish my goal of one lighttpd with multiple mongrels and the occasional ssl connection? -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060816/76c00966/attachment-0001.html From jamesludlow at gmail.com Wed Aug 16 09:21:01 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Wed, 16 Aug 2006 08:21:01 -0500 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> Message-ID: On 8/16/06, Timothy Wright wrote: > > I am wanting to one run instance of lighttpd, many many instances of > mongrel. I also need ssl but only for one of my sites. I understand that > Mongrel does not play with SSL so I am forced to use Lighttpd. I think that > lighttpd only handles ssl or non-ssl on any given instance. Is there a way > for me to accomplish my goal of one lighttpd with multiple mongrels and the > occasional ssl connection? I know that this doesn't answer your question at all, but have you considered pound -> mongrel_cluster -> tons-o-mongrels ? -- James From tgw529 at gmail.com Wed Aug 16 09:24:37 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Wed, 16 Aug 2006 09:24:37 -0400 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> Message-ID: <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> I am doing admin work for a guy and he really wants to keep things with just lighty and mongrel. I have thought about it and if this does not work I will suggest it. On 8/16/06, James Ludlow wrote: > > On 8/16/06, Timothy Wright wrote: > > > > I am wanting to one run instance of lighttpd, many many instances of > > mongrel. I also need ssl but only for one of my sites. I understand that > > Mongrel does not play with SSL so I am forced to use Lighttpd. I think > that > > lighttpd only handles ssl or non-ssl on any given instance. Is there a > way > > for me to accomplish my goal of one lighttpd with multiple mongrels and > the > > occasional ssl connection? > > I know that this doesn't answer your question at all, but have you > considered pound -> mongrel_cluster -> tons-o-mongrels ? > > > -- James > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060816/a094a379/attachment.html From zackchandler at gmail.com Wed Aug 16 10:57:59 2006 From: zackchandler at gmail.com (Zack Chandler) Date: Wed, 16 Aug 2006 07:57:59 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> Message-ID: <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> On 8/16/06, Timothy Wright wrote: > I am doing admin work for a guy and he really wants to keep things with just > lighty and mongrel. I have thought about it and if this does not work I will > suggest it. > > > > On 8/16/06, James Ludlow wrote: > > On 8/16/06, Timothy Wright wrote: > > > > > > I am wanting to one run instance of lighttpd, many many instances of > > > mongrel. I also need ssl but only for one of my sites. I understand that > > > Mongrel does not play with SSL so I am forced to use Lighttpd. I think > that > > > lighttpd only handles ssl or non-ssl on any given instance. Is there a > way > > > for me to accomplish my goal of one lighttpd with multiple mongrels and > the > > > occasional ssl connection? > > > > I know that this doesn't answer your question at all, but have you > > considered pound -> mongrel_cluster -> tons-o-mongrels ? > > > > > > -- James > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > -- > Grace and Peace, > Timothy G. Wright > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > If you just want it lighty + mongrel then you probably need to use mod_proxy_core. It's brand new so you'll be on the bleeding edge. http://blog.lighttpd.net/articles/2006/07/15/the-new-mod_proxy_core -- Zack Chandler http://depixelate.com From bryan at galisys.com Wed Aug 16 11:10:48 2006 From: bryan at galisys.com (Bryan Thompson) Date: Wed, 16 Aug 2006 10:10:48 -0500 Subject: [Mongrel] (no subject) Message-ID: <8619B931-FEA1-47B7-9B75-23CDC83A9FA5@galisys.com> Hi everybody, We are developing several applications on a single server and I'm looking for a way to use mongrel with each of them. Right now, http://testapp.com/ is being served on that machine through apache and mongrel. Here's what a part of my apache config looks like: BalancerMember http://127.0.0.1:8000 BalancerMember http://127.0.0.1:8001 BalancerMember http://127.0.0.1:8002 ServerName testapp.com ServerAlias testapp.com ProxyPass / balancer://testappcluster/ ProxyPassReverse / balancer://testappcluster/ It works great, but I want to move this app to http://testapp.com/foo and have another app at http://testapp.com/bar. Any tips? I was able to get my apps served separately with subdomains, however, I would prefer to keep them all on the same domain and just use /foo and /bar. Thanks! Bryan Thompson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060816/813dac7d/attachment.html From ezmobius at gmail.com Wed Aug 16 11:30:11 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Wed, 16 Aug 2006 08:30:11 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> Message-ID: <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> On Aug 16, 2006, at 7:57 AM, Zack Chandler wrote: > On 8/16/06, Timothy Wright wrote: >> I am doing admin work for a guy and he really wants to keep things >> with just >> lighty and mongrel. I have thought about it and if this does not >> work I will >> suggest it. >> >> >> >> On 8/16/06, James Ludlow wrote: >>> On 8/16/06, Timothy Wright wrote: >>>> >>>> I am wanting to one run instance of lighttpd, many many >>>> instances of >>>> mongrel. I also need ssl but only for one of my sites. I >>>> understand that >>>> Mongrel does not play with SSL so I am forced to use Lighttpd. I >>>> think >> that >>>> lighttpd only handles ssl or non-ssl on any given instance. Is >>>> there a >> way >>>> for me to accomplish my goal of one lighttpd with multiple >>>> mongrels and >> the >>>> occasional ssl connection? >>> >>> I know that this doesn't answer your question at all, but have you >>> considered pound -> mongrel_cluster -> tons-o-mongrels ? >>> >>> >>> -- James >>> _______________________________________________ >>> Mongrel-users mailing list >>> Mongrel-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/mongrel-users >>> >> >> >> >> -- >> Grace and Peace, >> Timothy G. Wright >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> >> > > If you just want it lighty + mongrel then you probably need to use > mod_proxy_core. It's brand new so you'll be on the bleeding edge. > > http://blog.lighttpd.net/articles/2006/07/15/the-new-mod_proxy_core > > -- > Zack Chandler > http://depixelate.com I have been playing with the pre releases of lighty with the new mod_proxy_core and mongrel_cluster and its working very nice. I haven't run into any issues with it yet and it solves most all of the issues that lighty's previous mod_proxy had. -Ezra From tgw529 at gmail.com Wed Aug 16 11:35:25 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Wed, 16 Aug 2006 11:35:25 -0400 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> Message-ID: <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> Ezra, Would you mind sharing your lighttpd.conf file with me? I would like to see how you have it set up. Thanks. Tim On 8/16/06, Ezra Zygmuntowicz wrote: > > > On Aug 16, 2006, at 7:57 AM, Zack Chandler wrote: > > > On 8/16/06, Timothy Wright wrote: > >> I am doing admin work for a guy and he really wants to keep things > >> with just > >> lighty and mongrel. I have thought about it and if this does not > >> work I will > >> suggest it. > >> > >> > >> > >> On 8/16/06, James Ludlow wrote: > >>> On 8/16/06, Timothy Wright wrote: > >>>> > >>>> I am wanting to one run instance of lighttpd, many many > >>>> instances of > >>>> mongrel. I also need ssl but only for one of my sites. I > >>>> understand that > >>>> Mongrel does not play with SSL so I am forced to use Lighttpd. I > >>>> think > >> that > >>>> lighttpd only handles ssl or non-ssl on any given instance. Is > >>>> there a > >> way > >>>> for me to accomplish my goal of one lighttpd with multiple > >>>> mongrels and > >> the > >>>> occasional ssl connection? > >>> > >>> I know that this doesn't answer your question at all, but have you > >>> considered pound -> mongrel_cluster -> tons-o-mongrels ? > >>> > >>> > >>> -- James > >>> _______________________________________________ > >>> Mongrel-users mailing list > >>> Mongrel-users at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/mongrel-users > >>> > >> > >> > >> > >> -- > >> Grace and Peace, > >> Timothy G. Wright > >> _______________________________________________ > >> Mongrel-users mailing list > >> Mongrel-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/mongrel-users > >> > >> > > > > If you just want it lighty + mongrel then you probably need to use > > mod_proxy_core. It's brand new so you'll be on the bleeding edge. > > > > http://blog.lighttpd.net/articles/2006/07/15/the-new-mod_proxy_core > > > > -- > > Zack Chandler > > http://depixelate.com > > > I have been playing with the pre releases of lighty with the new > mod_proxy_core and mongrel_cluster and its working very nice. I > haven't run into any issues with it yet and it solves most all of the > issues that lighty's previous mod_proxy had. > > -Ezra > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060816/45bda0ff/attachment-0001.html From jan.svitok at gmail.com Wed Aug 16 11:47:23 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Wed, 16 Aug 2006 17:47:23 +0200 Subject: [Mongrel] (no subject) In-Reply-To: <8619B931-FEA1-47B7-9B75-23CDC83A9FA5@galisys.com> References: <8619B931-FEA1-47B7-9B75-23CDC83A9FA5@galisys.com> Message-ID: <8d9b3d920608160847j2453a269s6611367e7a0a89d1@mail.gmail.com> On 8/16/06, Bryan Thompson wrote: > > Hi everybody, > > We are developing several applications on a single server and I'm looking > for a way to use mongrel with each of them. Right now, http://testapp.com/ > is being served on that machine through apache and mongrel. Here's what a > part of my apache config looks like: > > > > > BalancerMember http://127.0.0.1:8000 > BalancerMember http://127.0.0.1:8001 > BalancerMember http://127.0.0.1:8002 > > > > ServerName testapp.com > ServerAlias testapp.com > ProxyPass / balancer://testappcluster/ > ProxyPassReverse / balancer://testappcluster/ > > It works great, but I want to move this app to http://testapp.com/foo and > have another app at http://testapp.com/bar. > > Any tips? I was able to get my apps served separately with subdomains, > however, I would prefer to keep them all on the same domain and just use > /foo and /bar. > > Thanks! > > Bryan Thompson Hi, It's not possible to run more apps within one mongrel (for details see former thread "[Mongrel] Mongrel and multi apps"). For subdirectories, start your mongrel with --prefix /foo (or you can put it in the mongrel config file) From ezmobius at gmail.com Wed Aug 16 12:05:13 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Wed, 16 Aug 2006 09:05:13 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> Message-ID: <02A7BCE2-A52E-4908-9AA7-AF9C60519A0D@gmail.com> On Aug 16, 2006, at 8:35 AM, Timothy Wright wrote: > Ezra, Would you mind sharing your lighttpd.conf file with me? I > would like to see how you have it set up. > Thanks. > Tim > > Sure. Its really simple. THis conf file sends all requests to mongrel though including static. I'm working on the rewrite rules for letting lighty serve the static content and I will post that once I'm finished. But this config works great and is dead simple. server.port = 80 server.bind = "0.0.0.0" server.document-root = "/var/www" # These modules need to be loaded for just plain old proxy. server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", "mod_proxy_core") $HTTP["host"] = "\.foo\.com" { proxy-core.balancer = "round-robin" proxy-core.protocol = "http" proxy-core.backends = ( "127.0.0.1:3000", "127.0.0.1:3001", "127.0.0.1:3002") } I left out the mime-type assign list, I'm sure you have that somewhere. Cheers- -Ezra From bryan at galisys.com Wed Aug 16 12:08:25 2006 From: bryan at galisys.com (Bryan Thompson) Date: Wed, 16 Aug 2006 11:08:25 -0500 Subject: [Mongrel] (no subject) In-Reply-To: <8d9b3d920608160847j2453a269s6611367e7a0a89d1@mail.gmail.com> References: <8619B931-FEA1-47B7-9B75-23CDC83A9FA5@galisys.com> <8d9b3d920608160847j2453a269s6611367e7a0a89d1@mail.gmail.com> Message-ID: I can run more than one cluster at a time, so shouldn't I be able to have apache separate app /foo into traffic to balancer://foocluster and /foo to balancer://barcluster? I have gotten the following to work with apache2, however, it isn't exactly what I want: Root: http://testapp.com/ -- shows static html apache 'it worked' page. App one: http://foo.testapp.com/ -- uses balancer://foocluster App two: http://bar.testapp.com/ -- uses balancer://barcluster So, it should be possbible to use: Root: http://testapp.com/ -- show static html apache 'it worked' page. App one: http://testapp.com/foo -- use balancer://foocluster App two: http://testapp.com/bar -- use balancer://barcluster Bryan > It's not possible to run more apps within one mongrel (for details see > former thread "[Mongrel] Mongrel and multi apps"). > > For subdirectories, start your mongrel with --prefix /foo (or you can > put it in the mongrel config file) From tgw529 at gmail.com Wed Aug 16 12:09:30 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Wed, 16 Aug 2006 12:09:30 -0400 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <02A7BCE2-A52E-4908-9AA7-AF9C60519A0D@gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> <02A7BCE2-A52E-4908-9AA7-AF9C60519A0D@gmail.com> Message-ID: <1d6e22490608160909s394092desadc36b5edfa1833b@mail.gmail.com> Thanks a ton I will get working on that and see what happens. Tim On 8/16/06, Ezra Zygmuntowicz wrote: > > > On Aug 16, 2006, at 8:35 AM, Timothy Wright wrote: > > > Ezra, Would you mind sharing your lighttpd.conf file with me? I > > would like to see how you have it set up. > > Thanks. > > Tim > > > > > > Sure. Its really simple. THis conf file sends all requests to > mongrel though including static. I'm working on the rewrite rules for > letting lighty serve the static content and I will post that once I'm > finished. But this config works great and is dead simple. > > server.port = 80 > server.bind = "0.0.0.0" > server.document-root = "/var/www" > > # These modules need to be loaded for just plain old proxy. > server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", > "mod_proxy_core") > > > $HTTP["host"] = "\.foo\.com" { > proxy-core.balancer = "round-robin" > proxy-core.protocol = "http" > proxy-core.backends = ( "127.0.0.1:3000", "127.0.0.1:3001", > "127.0.0.1:3002") > } > > > > I left out the mime-type assign list, I'm sure you have that > somewhere. > > Cheers- > -Ezra > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060816/da0aa976/attachment.html From jan.svitok at gmail.com Wed Aug 16 12:52:29 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Wed, 16 Aug 2006 18:52:29 +0200 Subject: [Mongrel] (no subject) In-Reply-To: References: <8619B931-FEA1-47B7-9B75-23CDC83A9FA5@galisys.com> <8d9b3d920608160847j2453a269s6611367e7a0a89d1@mail.gmail.com> Message-ID: <8d9b3d920608160952i70d4ddf4ob3f81d5f98718bb2@mail.gmail.com> On 8/16/06, Bryan Thompson wrote: > I can run more than one cluster at a time, so shouldn't I be able to > have apache separate app /foo into traffic to balancer://foocluster > and /foo to balancer://barcluster? > > I have gotten the following to work with apache2, however, it isn't > exactly what I want: > > Root: http://testapp.com/ -- shows static html apache 'it worked' page. > App one: http://foo.testapp.com/ -- uses balancer://foocluster > App two: http://bar.testapp.com/ -- uses balancer://barcluster > > So, it should be possbible to use: > > Root: http://testapp.com/ -- show static html apache 'it worked' page. > App one: http://testapp.com/foo -- use balancer://foocluster > App two: http://testapp.com/bar -- use balancer://barcluster right. From lists at chrisdo.org Wed Aug 16 16:51:40 2006 From: lists at chrisdo.org (Christof Dorner) Date: Wed, 16 Aug 2006 22:51:40 +0200 Subject: [Mongrel] New subscriber, new question In-Reply-To: References: Message-ID: <04D4EE3A-6D25-4670-B436-2078E2CF949E@chrisdo.org> Yes, I think this is the same, but it's easier to handle this with mongrel_cluster. Am 16.08.2006 um 06:06 schrieb Emho Verger: > Hi all, > > I?m new to the list. I've working with mongrel for the last week and > have some quetion about mongrel cluster: > > Is this (being executed from the application folder): > # mongrel_rails start -d -p 3001 -e production > # mongrel_rails start -d -p 3002 -e production > # mongrel_rails start -d -p 3003 -e production > > the same as: > > # mongrel_rails cluster::configure -e production -p 3001 -N 3 -c > /var/www/apps/testapp > # mongrel_rails cluster::start > > Im not familiar with clusters, and since the load balance is being > done by the Apache proxy balancer, I wonder what is the difference of > executing that set of commands and the cluster::start. > > thanks to all, > > Emho > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From carl.lerche at verizon.net Wed Aug 16 18:09:48 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Wed, 16 Aug 2006 18:09:48 -0400 Subject: [Mongrel] Memory leak with the pre-release? Message-ID: <809B3B7D-4F2D-47E7-83F1-79A9C995EF90@verizon.net> Hello, I'm just wondering if there could possibly be a memory leak with the latest pre-release? When I run it, the processes keep increasing in memory size and easily pass 200MB and eventually crash due to a lack of memory. Is anybody else having this problem? Thanks, -carl PS, Zed, I sent you two emails directly to your address with logs and other stuff. Let me know if you didn't get them. From joenoon at gmail.com Wed Aug 16 18:00:28 2006 From: joenoon at gmail.com (Joe Noon) Date: Wed, 16 Aug 2006 15:00:28 -0700 Subject: [Mongrel] New subscriber, new question In-Reply-To: <04D4EE3A-6D25-4670-B436-2078E2CF949E@chrisdo.org> References: <04D4EE3A-6D25-4670-B436-2078E2CF949E@chrisdo.org> Message-ID: <619B8CDD-B14D-47F9-8342-A909BB79B180@gmail.com> On Aug 16, 2006, at 1:51 PM, Christof Dorner wrote: > Yes, I think this is the same, but it's easier to handle this with > mongrel_cluster. > > Am 16.08.2006 um 06:06 schrieb Emho Verger: > >> Hi all, >> >> I?m new to the list. I've working with mongrel for the last week and >> have some quetion about mongrel cluster: >> >> Is this (being executed from the application folder): >> # mongrel_rails start -d -p 3001 -e production >> # mongrel_rails start -d -p 3002 -e production >> # mongrel_rails start -d -p 3003 -e production >> >> the same as: >> >> # mongrel_rails cluster::configure -e production -p 3001 -N 3 -c >> /var/www/apps/testapp >> # mongrel_rails cluster::start I run each port separately, close to as you have described. I do it this way so I can run each as a daemontools service. I then have a separate daemontools service script that periodically checks each mongrel for functionality and terms/kills it if needed. Its a nice setup and allows me to not worry about anything being down for more than a minute or so. Probably overkill for general needs though. From ezmobius at gmail.com Wed Aug 16 19:06:52 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Wed, 16 Aug 2006 16:06:52 -0700 Subject: [Mongrel] Memory leak with the pre-release? In-Reply-To: <809B3B7D-4F2D-47E7-83F1-79A9C995EF90@verizon.net> References: <809B3B7D-4F2D-47E7-83F1-79A9C995EF90@verizon.net> Message-ID: <8FC0D7C4-A565-420A-AD05-4C2CFA3A007D@gmail.com> On Aug 16, 2006, at 3:09 PM, Carl Lerche wrote: > Hello, > > I'm just wondering if there could possibly be a memory leak with the > latest pre-release? When I run it, the processes keep increasing in > memory size and easily pass 200MB and eventually crash due to a lack > of memory. Is anybody else having this problem? > > Thanks, > -carl > > PS, Zed, I sent you two emails directly to your address with logs and > other stuff. Let me know if you didn't get them. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Hey Carl- I have been seeing memory leaks with the new version of rails out right now as well as edge. I don't think its mongrel related. But to be sure, can you test your app with webrick and see if you still get the leak? My bet is you do still get it. I haven'tbeen able to pinpoint it but it is very annoying. My app runs fine in production biut in dev mode with mongrel or webrick it keeps eating memory until it fails to allocate with a fatal error and kills the processes. Do let me know if anyone figures out why the hell dev mode is leaking again. I though this was fixed a while ago but its happening again. I think it may have something to do with the new reloading code in dev mode but i haven't been able to pinpoint it. Cheers- -Ezra From zedshaw at zedshaw.com Wed Aug 16 19:09:21 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 16 Aug 2006 16:09:21 -0700 Subject: [Mongrel] Memory leak with the pre-release? In-Reply-To: <809B3B7D-4F2D-47E7-83F1-79A9C995EF90@verizon.net> References: <809B3B7D-4F2D-47E7-83F1-79A9C995EF90@verizon.net> Message-ID: <1155769761.6122.2.camel@localhost.localdomain> On Wed, 2006-08-16 at 18:09 -0400, Carl Lerche wrote: > Hello, > > I'm just wondering if there could possibly be a memory leak with the > latest pre-release? When I run it, the processes keep increasing in > memory size and easily pass 200MB and eventually crash due to a lack > of memory. Is anybody else having this problem? > > Thanks, > -carl > > PS, Zed, I sent you two emails directly to your address with logs and > other stuff. Let me know if you didn't get them. Yes I got them carl, I'm looking them over when I get the chance. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Wed Aug 16 19:53:26 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 16 Aug 2006 16:53:26 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- QUERY_STRING Fixed Message-ID: <1155772406.6122.11.camel@localhost.localdomain> Hello Everyone, I just posted another pre-release of Mongrel that fixes a bug which caused Mongrel to claim it was getting parsing errors because the QUERY_STRINGs were too long. In actuality it was shift in the parser that made empty queries (/test?) become negative. This is fixed up now. Here's the full list of changes: * It has a couple of fixes for win32, but I still have to apply a few more patches from Jan Svitok. This will happen tonight. * The parser is fixed up to allow at least 10k QUERY_STRINGS. * There is a new debugging feature. You can now send any Mongrel process a USR1 signal and it'll start dumping the full text and parameters of any request it considers "bad". More on this below. * Tests were enhanced to test for the empty query string. * The mongrel_cluster work from Bradley Taylor is now part of Mongrel and will be maintained together so it'll get released at the same time as mongrel. * Timeout errors now include the reason mongrel timed out the thread in the exception description. That's all for now. Please grab this release with: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And verify your application still works. USR1 BAD CLIENT DEBUGGING As mentioned above, if you're seeing BAD CLIENT messages or parsing errors from Mongrel then you can send your mongrel process a USR1 signal (unix only) and Mongrel will start dumping the full text and parameters of what it received before aborting the client. When you hit a parsing error, really make sure the client is correct, then if you're positive it's right, send me the snippet from your log (not all of your log) and I'll look at it. When you're done, then simply hit the processes with another USR1 to toggle it off. The downside is I'm not sure of the security implications of this change, but there's only a performance hit if the client is bad so it's not that bad to leave it on. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From carl.lerche at verizon.net Wed Aug 16 20:10:18 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Wed, 16 Aug 2006 20:10:18 -0400 Subject: [Mongrel] Memory leak with the pre-release? In-Reply-To: <8FC0D7C4-A565-420A-AD05-4C2CFA3A007D@gmail.com> References: <809B3B7D-4F2D-47E7-83F1-79A9C995EF90@verizon.net> <8FC0D7C4-A565-420A-AD05-4C2CFA3A007D@gmail.com> Message-ID: On Aug 16, 2006, at 7:06 PM, Ezra Zygmuntowicz wrote: > > Hey Carl- > > I have been seeing memory leaks with the new version of rails out > right now as well as edge. I don't think its mongrel related. But to > be sure, can you test your app with webrick and see if you still get > the leak? My bet is you do still get it. I haven'tbeen able to > pinpoint it but it is very annoying. My app runs fine in production > biut in dev mode with mongrel or webrick it keeps eating memory until > it fails to allocate with a fatal error and kills the processes. > > Do let me know if anyone figures out why the hell dev mode is > leaking again. I though this was fixed a while ago but its happening > again. I think it may have something to do with the new reloading > code in dev mode but i haven't been able to pinpoint it. I'm running it in production mode right now and I get the memory leaks. I also haven't noticed a problem with memory leaks before I started using the pre-release. Maybe it's related to rails 1.1.6? I just don't know. -carl From zedshaw at zedshaw.com Wed Aug 16 20:14:34 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 16 Aug 2006 17:14:34 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- QUERY_STRING Fixed In-Reply-To: <1155772406.6122.11.camel@localhost.localdomain> References: <1155772406.6122.11.camel@localhost.localdomain> Message-ID: <1155773674.6122.13.camel@localhost.localdomain> On Wed, 2006-08-16 at 16:53 -0700, Zed Shaw wrote: > Hello Everyone, > > I just posted another pre-release of Mongrel that fixes a bug which > caused Mongrel to claim it was getting parsing errors because the > QUERY_STRINGs were too long. In actuality it was shift in the parser > that made empty queries (/test?) become negative. This is fixed up now. Correction, NOW the win32 gems are up. I really gotta either get vmware or wine going for cross builds so I can automate this. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Wed Aug 16 20:16:12 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 16 Aug 2006 17:16:12 -0700 Subject: [Mongrel] Memory leak with the pre-release? In-Reply-To: References: <809B3B7D-4F2D-47E7-83F1-79A9C995EF90@verizon.net> <8FC0D7C4-A565-420A-AD05-4C2CFA3A007D@gmail.com> Message-ID: <1155773772.6122.15.camel@localhost.localdomain> On Wed, 2006-08-16 at 20:10 -0400, Carl Lerche wrote: > On Aug 16, 2006, at 7:06 PM, Ezra Zygmuntowicz wrote: > > > > Hey Carl- > > > > I have been seeing memory leaks with the new version of rails out > > right now as well as edge. I don't think its mongrel related. But to > > be sure, can you test your app with webrick and see if you still get > > the leak? My bet is you do still get it. I haven'tbeen able to > > pinpoint it but it is very annoying. My app runs fine in production > > biut in dev mode with mongrel or webrick it keeps eating memory until > > it fails to allocate with a fatal error and kills the processes. > > > > Do let me know if anyone figures out why the hell dev mode is > > leaking again. I though this was fixed a while ago but its happening > > again. I think it may have something to do with the new reloading > > code in dev mode but i haven't been able to pinpoint it. > > I'm running it in production mode right now and I get the memory > leaks. I also haven't noticed a problem with memory leaks before I > started using the pre-release. Maybe it's related to rails 1.1.6? I > just don't know. Just a quick thought, but why don't you put: GC.start Into an after filter on your application controller (the base controller you have for all your other ones). Simply forcing the GC this way might fix it magically. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From tgw529 at gmail.com Wed Aug 16 21:36:27 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Wed, 16 Aug 2006 21:36:27 -0400 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1d6e22490608160909s394092desadc36b5edfa1833b@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> <02A7BCE2-A52E-4908-9AA7-AF9C60519A0D@gmail.com> <1d6e22490608160909s394092desadc36b5edfa1833b@mail.gmail.com> Message-ID: <1d6e22490608161836v7ac82cfaiaa16e62fdac88376@mail.gmail.com> Ezra, In my effort to move to the bleeding edge, I am unable to install lighttpd. Here is the error that I get. Any thoughts? I am new at this so if it si an obvious one, I am sorry. Tim tim at rome:~/lighttpd-merge-1.4.x$ sudo ./autogen.sh ./autogen.sh: running `libtoolize --copy --force' You should update your `aclocal.m4' by running aclocal. ./autogen.sh: running `aclocal' ./autogen.sh: running `autoheader' ./autogen.sh: running `automake --add-missing --copy' src/Makefile.am:77: Libtool library used but `LIBTOOL' is undefined src/Makefile.am:77: src/Makefile.am:77: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL' src/Makefile.am:77: to `configure.in' and run `aclocal' and `autoconf' again. tim at rome:~/lighttpd-merge-1.4.x$ ./configure -bash: ./configure: No such file or directory On 8/16/06, Timothy Wright wrote: > > Thanks a ton > I will get working on that and see what happens. > Tim > > On 8/16/06, Ezra Zygmuntowicz wrote: > > > > > On Aug 16, 2006, at 8:35 AM, Timothy Wright wrote: > > > > > Ezra, Would you mind sharing your lighttpd.conf file with me? I > > > would like to see how you have it set up. > > > Thanks. > > > Tim > > > > > > > > > > Sure. Its really simple. THis conf file sends all requests to > > mongrel though including static. I'm working on the rewrite rules for > > letting lighty serve the static content and I will post that once I'm > > finished. But this config works great and is dead simple. > > > > server.port = 80 > > server.bind = " 0.0.0.0" > > server.document-root = "/var/www" > > > > # These modules need to be loaded for just plain old proxy. > > server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", > > "mod_proxy_core") > > > > > > $HTTP["host"] = "\.foo\.com" { > > proxy-core.balancer = "round-robin" > > proxy-core.protocol = "http" > > proxy-core.backends = ( " 127.0.0.1:3000", "127.0.0.1:3001", > > "127.0.0.1:3002") > > } > > > > > > > > I left out the mime-type assign list, I'm sure you have that > > somewhere. > > > > Cheers- > > -Ezra > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > -- > > Grace and Peace, > Timothy G. Wright > -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060816/3bfc8a26/attachment.html From emho.verger at gmail.com Wed Aug 16 23:21:05 2006 From: emho.verger at gmail.com (Emho Verger) Date: Thu, 17 Aug 2006 11:21:05 +0800 Subject: [Mongrel] New subscriber, new question In-Reply-To: References: Message-ID: Hi, I'd just like to share a weird problem and solution that was slowing down the browsing of the company website ... I had declared something like this (where www1.thewebname.com and www2.thewebname.com were accessible, and the IP was declared in the public DNS's): BalancerMember http://www1.thewebname.com:8000 BalancerMember http://www1.thewebname.com:8001 BalancerMember http://www1.thewebname.com:8002 BalancerMember http://www2.thewebname.com:8000 BalancerMember http://www2.thewebname.com:8001 BalancerMember http://www2.thewebname.com:8002 However, things were very very very slow ... Then, I decided to try out changing the names for the IP's themselves ... and things fly now ... fast as I was expecting with mongrel :) It took me sometime to realice of that and I still think it is kind of weird (it was unacceptable slow before) hope it helps someone, regards, Emho From ezmobius at gmail.com Wed Aug 16 23:31:12 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Wed, 16 Aug 2006 20:31:12 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1d6e22490608161836v7ac82cfaiaa16e62fdac88376@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> <02A7BCE2-A52E-4908-9AA7-AF9C60519A0D@gmail.com> <1d6e22490608160909s394092desadc36b5edfa1833b@mail.gmail.com> <1d6e22490608161836v7ac82cfaiaa16e62fdac88376@mail.gmail.com> Message-ID: On Aug 16, 2006, at 6:36 PM, Timothy Wright wrote: > Ezra, > In my effort to move to the bleeding edge, I am unable to install > lighttpd. Here is the error that I get. Any thoughts? I am new at > this so if it si an obvious one, I am sorry. > Tim > > tim at rome:~/lighttpd-merge-1.4.x$ sudo ./autogen.sh > ./autogen.sh: running `libtoolize --copy --force' > You should update your `aclocal.m4' by running aclocal. > ./autogen.sh: running `aclocal' > ./autogen.sh: running `autoheader' > ./autogen.sh: running `automake --add-missing --copy' > src/Makefile.am:77: Libtool library used but `LIBTOOL' is undefined > src/Makefile.am:77: > src/Makefile.am:77: The usual way to define `LIBTOOL' is to add > `AC_PROG_LIBTOOL' > src/Makefile.am:77: to `configure.in' and run `aclocal' and > `autoconf' again. > tim at rome:~/lighttpd-merge-1.4.x$ ./configure > -bash: ./configure: No such file or directory > Did you check it out of svn? I had problems compiling from svn as well. So I used the prerelease here: http://www.lighttpd.net/download/lighttpd-1.4.12-20060724-0947.tar.gz then its just a ./configure && make && sudo make install -Ezra From mail at flydown.org Thu Aug 17 04:12:18 2006 From: mail at flydown.org (Michele) Date: Thu, 17 Aug 2006 10:12:18 +0200 Subject: [Mongrel] Apache Proxy Error + Mongrel dying Message-ID: Hi, I've got to active project both running on the last Apache 2.2 and on Mongrel 0.3.13.3. One is running perfectly, the other gets (always on the same pages, but not after each request, it seems to be random) a ProxyError every now and then which leads to the mongrel process being called to die and subsequently slowing down the whole web site. I have to restart the mongrel cluster and then it starts working well again, but after a while, I get the same error again. I know of the Apache bug and put this in my httpd.conf: #Fix for Apache bug 39499 SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 It seemed to work at first, but now I'm getting the errors again. Would using 0.3.14 fix this? is it ready for production? Thanks for your help, - Michele Finotto From mrueckert at suse.de Thu Aug 17 05:18:18 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Thu, 17 Aug 2006 11:18:18 +0200 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> Message-ID: <20060817091818.GN6949@suse.de> On 2006-08-16 08:30:11 -0700, Ezra Zygmuntowicz wrote: > I have been playing with the pre releases of lighty with the new > mod_proxy_core and mongrel_cluster and its working very nice. I > haven't run into any issues with it yet and it solves most all of the > issues that lighty's previous mod_proxy had. As a lighttpd developer i would like to mention: DONT USE THE CURRENT SVN STATE. especially not in production environments. If you do it anyway, dont expect support. Thanks in advance darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From jgeiger at gmail.com Thu Aug 17 09:11:35 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Thu, 17 Aug 2006 08:11:35 -0500 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- QUERY_STRING Fixed In-Reply-To: <1155773674.6122.13.camel@localhost.localdomain> References: <1155772406.6122.11.camel@localhost.localdomain> <1155773674.6122.13.camel@localhost.localdomain> Message-ID: <466af3440608170611h698caa2bwe784d830df7768bf@mail.gmail.com> Are you including the mongrel_cluster code in the mongrel gem, or just releasing them at the same time? On 8/16/06, Zed Shaw wrote: > On Wed, 2006-08-16 at 16:53 -0700, Zed Shaw wrote: > > Hello Everyone, > > > > I just posted another pre-release of Mongrel that fixes a bug which > > caused Mongrel to claim it was getting parsing errors because the > > QUERY_STRINGs were too long. In actuality it was shift in the parser > > that made empty queries (/test?) become negative. This is fixed up now. > > Correction, NOW the win32 gems are up. > > I really gotta either get vmware or wine going for cross builds so I can > automate this. > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.railsmachine.com/ -- Need Mongrel support? > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From spig at spig.net Thu Aug 17 09:54:18 2006 From: spig at spig.net (Steve Spigarelli) Date: Thu, 17 Aug 2006 07:54:18 -0600 Subject: [Mongrel] mongrel lighttpd and ssl In-Reply-To: <1d6e22490608151934i16a7cc50u3c955c3ac66d80c@mail.gmail.com> References: <1d6e22490608151934i16a7cc50u3c955c3ac66d80c@mail.gmail.com> Message-ID: <76d9cfcf0608170654g332bf281mfceda84638bc58a3@mail.gmail.com> I'm not sure where you got the impression that you can only do ssl or non-ssl. Just add an ssl section to lightty's conf for ssl. The SSL documentation at http://trac.lighttpd.net/trac/wiki/Docs%3ASSL only says that you have to use IP-based virtual hosting if you want to use one instance of lightty. With no mention of mongrel in this post, I feel bad even posting a response here. It's probably much more of a lightty question than a mongrel one. I hope my answers help in some way.. BTW, my configuration looks very similar to what is posted on the lightty ssl documentation I referenced above. I have my other hosts in the same file for standard port 80 traffic. Steve Spigarelli On 8/15/06, Timothy Wright wrote: > I am wanting to one run instance of lighttpd, many many instances of > mongrel. I also need ssl but only for one of my sites. I understand that > Mongrel does not play with SSL so I am forced to use Lighttpd. I think that > lighttpd only handles ssl or non-ssl on any given instance. Is there a way > for me to accomplish my goal of one lighttpd with multiple mongrels and the > occasional ssl connection? > > -- > Grace and Peace, > Timothy G. Wright > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From bradley at railsmachine.com Thu Aug 17 10:12:18 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Thu, 17 Aug 2006 10:12:18 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- QUERY_STRING Fixed In-Reply-To: <466af3440608170611h698caa2bwe784d830df7768bf@mail.gmail.com> References: <1155772406.6122.11.camel@localhost.localdomain> <1155773674.6122.13.camel@localhost.localdomain> <466af3440608170611h698caa2bwe784d830df7768bf@mail.gmail.com> Message-ID: Hi Joey: On Aug 17, 2006, at 9:11 AM, Joey Geiger wrote: > Are you including the mongrel_cluster code in the mongrel gem, or just > releasing them at the same time? > Its still a different gem, but now the source/gem lives in the Mongrel project (instead of railsmachine) and will get built with the Mongrel build. Thanks, Bradley ------ 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/20060817/c469c556/attachment.html From zedshaw at zedshaw.com Thu Aug 17 15:00:06 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 17 Aug 2006 12:00:06 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <20060817091818.GN6949@suse.de> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <20060817091818.GN6949@suse.de> Message-ID: <1155841206.5778.1.camel@localhost.localdomain> On Thu, 2006-08-17 at 11:18 +0200, Marcus Rueckert wrote: > On 2006-08-16 08:30:11 -0700, Ezra Zygmuntowicz wrote: > > I have been playing with the pre releases of lighty with the new > > mod_proxy_core and mongrel_cluster and its working very nice. I > > haven't run into any issues with it yet and it solves most all of the > > issues that lighty's previous mod_proxy had. > > As a lighttpd developer i would like to mention: > > DONT USE THE CURRENT SVN STATE. Marcus, why is that? Is it in flux or did you guys find something? -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From snacktime at gmail.com Thu Aug 17 15:14:08 2006 From: snacktime at gmail.com (snacktime) Date: Thu, 17 Aug 2006 12:14:08 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> Message-ID: <1f060c4c0608171214n51519070o3016958cc5429377@mail.gmail.com> Here is an example of doing ssl and non ssl in the same instance. Note the use of $SERVER["socket"] and HTTP["host"]. You can use both of those for one virtual host like I did below. The host setting sets the options that are common to both ssl and non ssl, and the socket settings are port specific. Lots of different combinations are possible. var.base = "/tmp/" server.document-root = var.base server.modules = ( "mod_rewrite", "mod_accesslog", "mod_fastcgi", "mod_compress", "mod_expire" ) compress.filetype = ( "text/plain", "text/html", "text/css", "text/javascript" ) expire.url = ( "/favicon.ico" => "access 3 days", "/javascripts/" => "access 3 days" ) var.app1 = "/usr/local/www/seca/web/" $HTTP["host"] == "test.domain.com" { fastcgi.server = ( ".fcgi" => ( "localhost" => ( "min-procs" => 1, "max-procs" => 1, "socket" => var.app1 + "tmp/sockets/fcgi.socket", "bin-path" => var.app1 + "public/dispatch.fcgi", "bin-environment" => ( "RAILS_ENV" => "development" ) ) ) ) } $SERVER["socket"] == "72.25.136.58:80" { server.name = "test.domain.com" server.error-handler-404 = "/dispatch.fcgi" accesslog.filename = var.app1 + "log/lighttpd.access.log" compress.cache-dir = var.app1 + "tmp/cache" } $SERVER["socket"] == "72.25.136.58:443" { ssl.ca-file = var.app1 + "ssl/ca.pem" server.name = "test.domain.com" server.error-handler-404 = "/dispatch.fcgi" server.document-root = var.app1 + "public/" server.errorlog = var.app1 + "log/lighttpd.error.log" accesslog.filename = var.app1 + "log/lighttpd.access.log" compress.cache-dir = var.app1 + "tmp/cache" } var.app2 = "/usr/local/cart/jdonline/web/" $SERVER["socket"] == "72.25.136.54:80" { server.name = "domain2.com" server.error-handler-404 = "/dispatch.fcgi" server.document-root = var.app2 + "public/" server.errorlog = var.app2 + "log/lighttpd.error.log" accesslog.filename = var.app2 + "log/lighttpd.access.log" compress.cache-dir = var.app2 + "tmp/cache" fastcgi.server = ( ".fcgi" => ( "localhost" => ( "min-procs" => 1, "max-procs" => 1, "socket" => var.app2 + "tmp/sockets/fcgi.socket", "bin-path" => var.app2 + "public/dispatch.fcgi", "bin-environment" => ( "RAILS_ENV" => "development" ) ) ) ) } From snacktime at gmail.com Thu Aug 17 15:22:19 2006 From: snacktime at gmail.com (snacktime) Date: Thu, 17 Aug 2006 12:22:19 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1f060c4c0608171214n51519070o3016958cc5429377@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> <1f060c4c0608171214n51519070o3016958cc5429377@mail.gmail.com> Message-ID: <1f060c4c0608171222i2e7087es1646fffd2db474a5@mail.gmail.com> Not sure why they didn't paste correctly, but the following two lines were supposed to be in the section for port 443. ssl.engine = "enable" ssl.pemfile = var.app1 + "ssl/ra.pem" From mrueckert at suse.de Thu Aug 17 15:33:51 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Thu, 17 Aug 2006 21:33:51 +0200 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1155841206.5778.1.camel@localhost.localdomain> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <20060817091818.GN6949@suse.de> <1155841206.5778.1.camel@localhost.localdomain> Message-ID: <20060817193350.GY6949@suse.de> On 2006-08-17 12:00:06 -0700, Zed Shaw wrote: > > As a lighttpd developer i would like to mention: > > > > DONT USE THE CURRENT SVN STATE. > > Marcus, why is that? Is it in flux or did you guys find something? it is no in the shape for that so far. mod_proxy_core and some real core changes need some fine tuning first. just watch the lighty blog :) darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From kigsteronline at mac.com Thu Aug 17 21:34:24 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Thu, 17 Aug 2006 18:34:24 -0700 Subject: [Mongrel] error starting mongrel: undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) In-Reply-To: <86fyfx8p16.fsf@bitty.lumos.us> References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> Message-ID: <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> $ mongrel_rails start ** Starting Mongrel listening at 0.0.0.0:3000 /usr/local/ruby-1.8.4/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/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/lib/mongrel.rb:850:in `uri' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/lib/mongrel.rb:1018:in `debug' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/lib/mongrel.rb:1016:in `debug' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/bin/mongrel_rails:108:in `cloaker_' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/lib/mongrel.rb:832:in `listener' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/bin/mongrel_rails:96:in `cloaker_' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/lib/mongrel.rb:750:in `initialize' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/bin/mongrel_rails:83:in `run' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/lib/mongrel/command.rb:199:in `run' from /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/ mongrel-0.3.13.3/bin/mongrel_rails:235 from /usr/local/ruby/bin/mongrel_rails:18 What am I missing? I installed it using "sudo gem install mongrel --include-dependencies" Thanks! Konstantin From kigsteronline at mac.com Thu Aug 17 21:45:16 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Thu, 17 Aug 2006 18:45:16 -0700 Subject: [Mongrel] Avoiding sudo when starting/stopping mongrel_cluster In-Reply-To: <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> Message-ID: <3C76966F-984C-4337-95A7-DCCA29F787DA@mac.com> Hello! I apologize for newbie questions, but I am setting up capistrano and mongrel_cluster for the first time on Linux RS2. During "cap cold_deploy" from a development machine to a production box, I see the following: ** transaction: commit * executing task restart * executing task restart_mongrel_cluster * executing task stop_mongrel_cluster * executing "sudo mongrel_rails cluster::stop -C /data/apps/blurby/ current/config/mongrel_cluster.yml" I am running remote user as special application user, not root. Since mongrel cluster does not need privileged port, I would prefer if I didn't need to use SUDO to start/stop the cluster. Is there a way to remove "sudo" from the above command and run cluster as application user? Thanks for any input, Konstantin From nicksieger at gmail.com Thu Aug 17 21:49:48 2006 From: nicksieger at gmail.com (Nick Sieger) Date: Thu, 17 Aug 2006 20:49:48 -0500 Subject: [Mongrel] Avoiding sudo when starting/stopping mongrel_cluster In-Reply-To: <3C76966F-984C-4337-95A7-DCCA29F787DA@mac.com> References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> <3C76966F-984C-4337-95A7-DCCA29F787DA@mac.com> Message-ID: On 8/17/06, kigsteronline at mac.com wrote: > > Is there a way to remove "sudo" from the above command and run > cluster as application user? "set :use_sudo, false" in your cap recipes file. Cheers, /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060817/47f6dc00/attachment.html From nicksieger at gmail.com Thu Aug 17 21:52:17 2006 From: nicksieger at gmail.com (Nick Sieger) Date: Thu, 17 Aug 2006 20:52:17 -0500 Subject: [Mongrel] error starting mongrel: undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) In-Reply-To: <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> Message-ID: On 8/17/06, kigsteronline at mac.com wrote: > > $ mongrel_rails start > ** Starting Mongrel listening at 0.0.0.0:3000 > /usr/local/ruby-1.8.4/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) > > What am I missing? > > I installed it using "sudo gem install mongrel --include-dependencies" Go back and install again and watch for errors. The most likely culprit is that the /usr/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/mongrel- 0.3.13.3/ext/http11/http11.so didn't get moved to /usr/local/ruby-1.8.4 /lib/ruby/gems/1.8/gems /mongrel-0.3.13.3/lib/http11.so during the installation process. HTH, /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060817/61ce1e50/attachment.html From spig at spig.net Thu Aug 17 22:02:41 2006 From: spig at spig.net (Steve Spigarelli) Date: Thu, 17 Aug 2006 20:02:41 -0600 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. Message-ID: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> I'm not sure what's happening so I'll try and explain what I know. I am getting the error "Thu Aug 17 20:01:57 MDT 2006: BAD CLIENT (xx.xx.xx.xx): Invalid HTTP format, parsing fails." I'm running mongrel 0.3.13.4 from gem source, and running on a Macbook Pro. I am running rails in development mode and if I switch to running webrick, all requests come through as normal and return valid responses. So, the only problem I have is using a windows machine to access portions of the site. So far, I can consistently reproduce the problem in Firefox 1.0.7. I also can reproduce this in IE. One windows machine is a Parallels VM with a base, Win XP system. The other had Zonealarm firewall, but I have disabled that due to the thread that mentioned Mcafee security center. So, what are some ideas and is it possible that I am missing something critical that I have overlooked? Thanks for any help, Steve Spigarelli From _ at whats-your.name Thu Aug 17 22:08:36 2006 From: _ at whats-your.name (carmen) Date: Fri, 18 Aug 2006 02:08:36 +0000 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. In-Reply-To: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> References: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> Message-ID: <20060818020836.GE27460@replic.net> On Thu Aug 17, 2006 at 08:02:41PM -0600, Steve Spigarelli wrote: > I'm not sure what's happening so I'll try and explain what I know. > > > I am getting the error "Thu Aug 17 20:01:57 MDT 2006: BAD CLIENT > (xx.xx.xx.xx): Invalid HTTP format, parsing fails." it would be helpful to know what HTTP request is being sent. on windows this util can tell you: http://www.analogx.com/files/pmoni.exe or you could make mongrel spit the request to stderr.. From tgw529 at gmail.com Thu Aug 17 22:10:18 2006 From: tgw529 at gmail.com (Timothy Wright) Date: Thu, 17 Aug 2006 22:10:18 -0400 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1f060c4c0608171214n51519070o3016958cc5429377@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> <1f060c4c0608171214n51519070o3016958cc5429377@mail.gmail.com> Message-ID: <1d6e22490608171910wf64351ax99feda74ad8d0504@mail.gmail.com> Snacktime, I am sorry to say that I am bit confused by what you are saying. I am new at this so I am sorry. Please clairfy as much as possible. Is that what your file looks like or do I need to add in alot of my own info. The Var.appexpression is an include of some sort? Sorry for the lack of understanding on my part. Tim On 8/17/06, snacktime wrote: > > Here is an example of doing ssl and non ssl in the same instance. > Note the use of $SERVER["socket"] and HTTP["host"]. You can use both > of those for one virtual host like I did below. The host setting sets > the options that are common to both ssl and non ssl, and the socket > settings are port specific. Lots of different combinations are > possible. > > > > var.base = "/tmp/" > server.document-root = var.base > server.modules = ( "mod_rewrite", "mod_accesslog", > "mod_fastcgi", "mod_compress", "mod_expire" ) > > > compress.filetype = ( "text/plain", "text/html", "text/css", > "text/javascript" ) > > expire.url = ( "/favicon.ico" => "access 3 days", > "/javascripts/" => "access 3 days" ) > > var.app1 = "/usr/local/www/seca/web/" > $HTTP["host"] == "test.domain.com" { > fastcgi.server = ( ".fcgi" => ( "localhost" => ( > "min-procs" => 1, > "max-procs" => 1, > "socket" => var.app1 + "tmp/sockets/fcgi.socket", > "bin-path" => var.app1 + "public/dispatch.fcgi", > "bin-environment" => ( "RAILS_ENV" => "development" ) > ) ) ) > } > > $SERVER["socket"] == "72.25.136.58:80" { > server.name = "test.domain.com" > server.error-handler-404 = "/dispatch.fcgi" > accesslog.filename = var.app1 + "log/lighttpd.access.log" > compress.cache-dir = var.app1 + "tmp/cache" > } > $SERVER["socket"] == "72.25.136.58:443" { > ssl.ca-file = var.app1 + "ssl/ca.pem" > server.name = "test.domain.com" > server.error-handler-404 = "/dispatch.fcgi" > server.document-root = var.app1 + "public/" > server.errorlog = var.app1 + "log/lighttpd.error.log" > accesslog.filename = var.app1 + "log/lighttpd.access.log" > compress.cache-dir = var.app1 + "tmp/cache" > } > > var.app2 = "/usr/local/cart/jdonline/web/" > $SERVER["socket"] == "72.25.136.54:80" { > server.name = "domain2.com" > server.error-handler-404 = "/dispatch.fcgi" > server.document-root = var.app2 + "public/" > server.errorlog = var.app2 + "log/lighttpd.error.log" > accesslog.filename = var.app2 + "log/lighttpd.access.log" > compress.cache-dir = var.app2 + "tmp/cache" > fastcgi.server = ( ".fcgi" => ( "localhost" => ( > "min-procs" => 1, > "max-procs" => 1, > "socket" => var.app2 + "tmp/sockets/fcgi.socket", > "bin-path" => var.app2 + "public/dispatch.fcgi", > "bin-environment" => ( "RAILS_ENV" => "development" ) > ) ) ) > } > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Grace and Peace, Timothy G. Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060817/f7a910af/attachment.html From spig at spig.net Thu Aug 17 22:16:48 2006 From: spig at spig.net (Steve Spigarelli) Date: Thu, 17 Aug 2006 20:16:48 -0600 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. In-Reply-To: <20060818020836.GE27460@replic.net> References: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> <20060818020836.GE27460@replic.net> Message-ID: <76d9cfcf0608171916i2e2f40c6rda2dc6686b285fe9@mail.gmail.com> Is there an easy configuration to do that, or should I modify the gem source? On 8/17/06, carmen <_ at whats-your.name> wrote: > On Thu Aug 17, 2006 at 08:02:41PM -0600, Steve Spigarelli wrote: > > I'm not sure what's happening so I'll try and explain what I know. > > > > > > I am getting the error "Thu Aug 17 20:01:57 MDT 2006: BAD CLIENT > > (xx.xx.xx.xx): Invalid HTTP format, parsing fails." > > it would be helpful to know what HTTP request is being sent. on windows this util can tell you: http://www.analogx.com/files/pmoni.exe > > or you could make mongrel spit the request to stderr.. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From spig at spig.net Thu Aug 17 23:00:00 2006 From: spig at spig.net (Steve Spigarelli) Date: Thu, 17 Aug 2006 21:00:00 -0600 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. In-Reply-To: <76d9cfcf0608171916i2e2f40c6rda2dc6686b285fe9@mail.gmail.com> References: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> <20060818020836.GE27460@replic.net> <76d9cfcf0608171916i2e2f40c6rda2dc6686b285fe9@mail.gmail.com> Message-ID: <76d9cfcf0608172000k3b1da594ld6176bcefbd618dd@mail.gmail.com> Looks like the request is coming in as: delete /member/main/delete_favorite/12 HTTP/1.1\r\n ... standard headers and content.. Any ideas? I am sending "delete" as the method instead of get or post but I might be doing something that really isn't supported or that I just don't understand quite yet.. I think I'll see what other ways I can find to do this. I was trying to get a little more restian and I thought Rails converted the delete method to a "post" but I guess I'll have to work on this a little more. Thanks for the help, Steve On 8/17/06, Steve Spigarelli wrote: > Is there an easy configuration to do that, or should I modify the gem source? > > > On 8/17/06, carmen <_ at whats-your.name> wrote: > > On Thu Aug 17, 2006 at 08:02:41PM -0600, Steve Spigarelli wrote: > > > I'm not sure what's happening so I'll try and explain what I know. > > > > > > > > > I am getting the error "Thu Aug 17 20:01:57 MDT 2006: BAD CLIENT > > > (xx.xx.xx.xx): Invalid HTTP format, parsing fails." > > > > it would be helpful to know what HTTP request is being sent. on windows this util can tell you: http://www.analogx.com/files/pmoni.exe > > > > or you could make mongrel spit the request to stderr.. > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > From spig at spig.net Thu Aug 17 23:32:00 2006 From: spig at spig.net (Steve Spigarelli) Date: Thu, 17 Aug 2006 21:32:00 -0600 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. In-Reply-To: <76d9cfcf0608172000k3b1da594ld6176bcefbd618dd@mail.gmail.com> References: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> <20060818020836.GE27460@replic.net> <76d9cfcf0608171916i2e2f40c6rda2dc6686b285fe9@mail.gmail.com> <76d9cfcf0608172000k3b1da594ld6176bcefbd618dd@mail.gmail.com> Message-ID: <76d9cfcf0608172032w24c9645dk9d29afce1edf06e2@mail.gmail.com> >From windows boxes I was having problems with link_to and the :method => 'delete'. In my controller I was then checking for request.delete?. I have changed this back to :method => 'post' and request.post? and things are working again across all platforms. I'm not sure where the problem is but I assume that mongrel is not aware of how to handle the 'delete' method as webrick was able to handle the request. Am I missing something? Am I out of date with something that I need to get the latest source code on? Steve On 8/17/06, Steve Spigarelli wrote: > Looks like the request is coming in as: > > delete /member/main/delete_favorite/12 HTTP/1.1\r\n ... standard > headers and content.. > > > Any ideas? I am sending "delete" as the method instead of get or post > but I might be doing something that really isn't supported or that I > just don't understand quite yet.. I think I'll see what other ways I > can find to do this. I was trying to get a little more restian and I > thought Rails converted the delete method to a "post" but I guess I'll > have to work on this a little more. > > Thanks for the help, > > Steve > > On 8/17/06, Steve Spigarelli wrote: > > Is there an easy configuration to do that, or should I modify the gem source? > > > > > > On 8/17/06, carmen <_ at whats-your.name> wrote: > > > On Thu Aug 17, 2006 at 08:02:41PM -0600, Steve Spigarelli wrote: > > > > I'm not sure what's happening so I'll try and explain what I know. > > > > > > > > > > > > I am getting the error "Thu Aug 17 20:01:57 MDT 2006: BAD CLIENT > > > > (xx.xx.xx.xx): Invalid HTTP format, parsing fails." > > > > > > it would be helpful to know what HTTP request is being sent. on windows this util can tell you: http://www.analogx.com/files/pmoni.exe > > > > > > or you could make mongrel spit the request to stderr.. > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > From _ at whats-your.name Thu Aug 17 23:39:04 2006 From: _ at whats-your.name (carmen) Date: Fri, 18 Aug 2006 03:39:04 +0000 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. In-Reply-To: <76d9cfcf0608172032w24c9645dk9d29afce1edf06e2@mail.gmail.com> References: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> <20060818020836.GE27460@replic.net> <76d9cfcf0608171916i2e2f40c6rda2dc6686b285fe9@mail.gmail.com> <76d9cfcf0608172000k3b1da594ld6176bcefbd618dd@mail.gmail.com> <76d9cfcf0608172032w24c9645dk9d29afce1edf06e2@mail.gmail.com> Message-ID: <20060818033904.GF27460@replic.net> > Am I missing something? Am I out of date with something that I need > to get the latest source code on? probably not. Mongrel is significantly more RFC congruous than webrick. you might want to check out ActiveResource in rails 1.2 to see how methods are mapped to GET, PUT, DELETE, and POST.. From zedshaw at zedshaw.com Fri Aug 18 00:03:47 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 17 Aug 2006 21:03:47 -0700 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. In-Reply-To: <76d9cfcf0608171916i2e2f40c6rda2dc6686b285fe9@mail.gmail.com> References: <76d9cfcf0608171902i23d5d73bocece49ce988b4e9@mail.gmail.com> <20060818020836.GE27460@replic.net> <76d9cfcf0608171916i2e2f40c6rda2dc6686b285fe9@mail.gmail.com> Message-ID: <1155873827.6112.2.camel@localhost.localdomain> On Thu, 2006-08-17 at 20:16 -0600, Steve Spigarelli wrote: > Is there an easy configuration to do that, or should I modify the gem source? > Hey Steve, What you can do is run your app under mongrel, then hit all your mongrel processes with the USR1 signal: killall -USR1 mongrel_rails After you do this, your log/mongrel.log should say it's gonna start logging clients, and then when you get a BAD CLIENT it'll spit out the full data it received and the params it had before it booted the client. Run that and then shoot me the logs (off list!). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From snacktime at gmail.com Fri Aug 18 01:11:32 2006 From: snacktime at gmail.com (snacktime) Date: Thu, 17 Aug 2006 22:11:32 -0700 Subject: [Mongrel] Mongrel Lighttpd and SSL In-Reply-To: <1d6e22490608171910wf64351ax99feda74ad8d0504@mail.gmail.com> References: <1d6e22490608160553j3be0b017p23493d4bff33f718@mail.gmail.com> <1d6e22490608160624q7f74865et40286a4eaaf30375@mail.gmail.com> <33841ac70608160757n63fa4991n510d7a6a9efaeb1c@mail.gmail.com> <748A8EBD-2652-45CE-9C43-2D0BDB164FBB@brainspl.at> <1d6e22490608160835g2c90ef13ne3771b536944f4d6@mail.gmail.com> <1f060c4c0608171214n51519070o3016958cc5429377@mail.gmail.com> <1d6e22490608171910wf64351ax99feda74ad8d0504@mail.gmail.com> Message-ID: <1f060c4c0608172211w2767062dh3c13e2441decb319@mail.gmail.com> On 8/17/06, Timothy Wright wrote: > Snacktime, > I am sorry to say that I am bit confused by what you are saying. I am new at > this so I am sorry. Please clairfy as much as possible. Is that what your > file looks like or do I need to add in alot of my own info. The Var.app > expression is an include of some sort? Sorry for the lack of understanding > on my part. The Var.app is just a variable to store base paths in, etc.. $HTTP["host"] matches hostnames. $SERVER["socket"] matches an ip address/port combination. I set things that are common to the whole hostname using the host, and use the socket to set the per port configs. One thing that might have thrown you is that for the host config I used the hostname, while the socket sections used the ip address. The config I posted is complete, there are no includes. Chris From maillist at steelskies.com Fri Aug 18 05:50:18 2006 From: maillist at steelskies.com (Jonathan del Strother) Date: Fri, 18 Aug 2006 10:50:18 +0100 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- QUERY_STRING Fixed In-Reply-To: <1155772406.6122.11.camel@localhost.localdomain> References: <1155772406.6122.11.camel@localhost.localdomain> Message-ID: I'm quite often losing mysql connections during requests, when using mongrel. Doesn't happen with lighty. This is on OS X 10.4.6, mysql 4.1.16, and a recent rails. Is there any other useful information I can supply? On 17 Aug 2006, at 00:53, Zed Shaw wrote: > Hello Everyone, > > I just posted another pre-release of Mongrel that fixes a bug which > caused Mongrel to claim it was getting parsing errors because the > QUERY_STRINGs were too long. In actuality it was shift in the parser > that made empty queries (/test?) become negative. This is fixed up > now. > > Here's the full list of changes: > > * It has a couple of fixes for win32, but I still have to apply a few > more patches from Jan Svitok. This will happen tonight. > * The parser is fixed up to allow at least 10k QUERY_STRINGS. > * There is a new debugging feature. You can now send any Mongrel > process a USR1 signal and it'll start dumping the full text and > parameters of any request it considers "bad". More on this below. > * Tests were enhanced to test for the empty query string. > * The mongrel_cluster work from Bradley Taylor is now part of Mongrel > and will be maintained together so it'll get released at the same time > as mongrel. > * Timeout errors now include the reason mongrel timed out the > thread in > the exception description. > > That's all for now. Please grab this release with: > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > And verify your application still works. > > > USR1 BAD CLIENT DEBUGGING > > As mentioned above, if you're seeing BAD CLIENT messages or parsing > errors from Mongrel then you can send your mongrel process a USR1 > signal > (unix only) and Mongrel will start dumping the full text and > parameters > of what it received before aborting the client. > > When you hit a parsing error, really make sure the client is correct, > then if you're positive it's right, send me the snippet from your log > (not all of your log) and I'll look at it. > > When you're done, then simply hit the processes with another USR1 to > toggle it off. > > The downside is I'm not sure of the security implications of this > change, but there's only a performance hit if the client is bad so > it's > not that bad to leave it on. > > > -- > 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: smime.p7s Type: application/pkcs7-signature Size: 2114 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060818/7d40d830/attachment.bin From mail at flydown.org Fri Aug 18 08:59:13 2006 From: mail at flydown.org (Michele) Date: Fri, 18 Aug 2006 14:59:13 +0200 Subject: [Mongrel] Apache Proxy Error + Mongrel dying In-Reply-To: References: Message-ID: <65FCC3F2-0058-414B-BEEA-CB6148741005@flydown.org> If I run Mongrel 0.3.13.4 in debug mode, I get this error before the process dies: "Illegal instruction: 4 (core dumped)". What could it be? Is there a way which instruction is causing the error? Thanks, - Michele On Aug 17, 2006, at 10:12 , Michele wrote: > Hi, > > I've got to active project both running on the last Apache 2.2 and on > Mongrel 0.3.13.3. > > One is running perfectly, the other gets (always on the same pages, > but not after each request, it seems to be random) a ProxyError every > now and then which leads to the mongrel process being called to die > and subsequently slowing down the whole web site. > I have to restart the mongrel cluster and then it starts working well > again, but after a while, I get the same error again. > > I know of the Apache bug and put this in my httpd.conf: > #Fix for Apache bug 39499 > SetEnv force-proxy-request-1.0 1 > SetEnv proxy-nokeepalive 1 > > It seemed to work at first, but now I'm getting the errors again. > > Would using 0.3.14 fix this? is it ready for production? > > Thanks for your help, > - Michele Finotto > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From bassnode at gmail.com Fri Aug 18 10:09:07 2006 From: bassnode at gmail.com (Ed Hickey) Date: Fri, 18 Aug 2006 09:09:07 -0500 Subject: [Mongrel] error starting mongrel: undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) In-Reply-To: References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> Message-ID: <733f56120608180709t4404a932r6eb0ae4898f191f2@mail.gmail.com> i believe i had this problem and it was because i didn't install gcc. make sure you have the gcc package installed, uninstall mogrel, install mongrel and try again. ed On 8/17/06, Nick Sieger wrote: > > On 8/17/06, kigsteronline at mac.com wrote: > > > $ mongrel_rails start > ** Starting Mongrel listening at 0.0.0.0:3000 > /usr/local/ruby-1.8.4/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) > > What am I missing? > > I installed it using "sudo gem install mongrel --include-dependencies" > > Go back and install again and watch for errors. The most likely culprit > is that the /usr/local/ruby- 1.8.4/lib/ruby/gems/1.8/gems/mongrel- > 0.3.13.3/ext/http11/http11.so didn't get moved to /usr/local/ruby-1.8.4 > /lib/ruby/gems/1.8/gems > /mongrel- 0.3.13.3/lib/http11.so during the installation process. > > HTH, > /Nick > > > _______________________________________________ > 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/20060818/5f8b25da/attachment.html From gusxedge at gmail.com Fri Aug 18 10:12:04 2006 From: gusxedge at gmail.com (Guillaume Carbonneau) Date: Fri, 18 Aug 2006 10:12:04 -0400 Subject: [Mongrel] Mongrel setting with Mysql error Message-ID: <3f4ebe010608180712u4e4d2d3er9d33b6924020b15f@mail.gmail.com> Hi, I'm pretty newb at Rails deployement stuff. I'm setting up a Mongrel web server on windows following the tutorial on the official site. My app works except when there's interaction with MySQL. I get this error : "Uninitialized constant Mysql" Now i'm pretty lost and i'm sure i'm doing something wrong. I've tried searching google, ruby and rails mailing list but didn't find anything. I'd appreciate if you guys could point me to the right direction. Like what steps I have to do to make mysql interact with Mongrel/Ruby. Thanks Guillaume Carbonneau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060818/90d6401e/attachment.html From mongrel at philip.pjkh.com Fri Aug 18 11:43:30 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Fri, 18 Aug 2006 10:43:30 -0500 (CDT) Subject: [Mongrel] Mongrel setting with Mysql error In-Reply-To: <3f4ebe010608180712u4e4d2d3er9d33b6924020b15f@mail.gmail.com> References: <3f4ebe010608180712u4e4d2d3er9d33b6924020b15f@mail.gmail.com> Message-ID: <20060818104230.O1536@bravo.pjkh.com> > Hi, > > I'm pretty newb at Rails deployement stuff. > I'm setting up a Mongrel web server on windows following the tutorial on the > official site. > My app works except when there's interaction with MySQL. I get this error : > > "Uninitialized constant Mysql" > > Now i'm pretty lost and i'm sure i'm doing something wrong. I've tried > searching google, ruby and rails mailing list but didn't find anything. > I'd appreciate if you guys could point me to the right direction. Like what > steps I have to do to make mysql interact with Mongrel/Ruby. Can you use mysql from straight ruby? If you do "gem list" do you see the following: mysql (2.7) MySQL/Ruby provides the same functions for Ruby programs that the MySQL C API provides for C programs. If not, you should... I could be wrong, but I think that message means you don't have the ruby/mysql part hooked up. "gem install mysql" should get it for you From me at seebq.com Fri Aug 18 13:43:31 2006 From: me at seebq.com (Charles Brian Quinn) Date: Fri, 18 Aug 2006 13:43:31 -0400 Subject: [Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster Message-ID: <3a2de0cd0608181043j4f5d6701x52af72309a48c033@mail.gmail.com> Hi mongrel users! I just posted a bad-ass capistrano file that automates *everything* for setting up an apache2+mod_proxy_balancer and mongrel+mongrel_cluster -- including apache2 setups. It's based off Coda Hale's guide and all Bradley's work at fluxura and RailsMachine (thanks Coda and Bradley!). It's, well, bad-ass, if I must say so myself. My favorite part: (0..mongrel_servers-1).each { |server| apache2_rails_conf += " BalancerMember http://127.0.0.1:#{mongrel_start_port + server}\n" } It's on our newest Slingshot Hosting image, but you can download it here: http://www.slingshothosting.com/files/apache2_2_mongrel_deploy.rb Deployment just got a whole lot easier. And, is about to get even easier: http://cleanair.highgroove.com/articles/2006/08/18/heartbeat-sneak-preview -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com From snacktime at gmail.com Fri Aug 18 13:55:01 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 18 Aug 2006 10:55:01 -0700 Subject: [Mongrel] error starting mongrel: undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) In-Reply-To: <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> Message-ID: <1f060c4c0608181055x26c51cc5k95a046007995a46b@mail.gmail.com> There is something wrong with that version of mongrel. I had this exact same issue. Downgrade it work fine, upgrade to pre release it work fine. stay at 0.3.13.3 I get that error. clean out everything try again same result. That was on freebsd 6.1. Tried it on two different 6.1 servers same result. From kigsteronline at mac.com Fri Aug 18 13:54:28 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Fri, 18 Aug 2006 10:54:28 -0700 Subject: [Mongrel] error starting mongrel: undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) In-Reply-To: <733f56120608180709t4404a932r6eb0ae4898f191f2@mail.gmail.com> References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> <733f56120608180709t4404a932r6eb0ae4898f191f2@mail.gmail.com> Message-ID: <4308BB46-89CB-427E-A0D1-987BC94F4707@mac.com> This was some weird permissions problem... I've rebuilt everything from scratch and made sure that /usr/local/ruby was readable by all users, and now it's all working. Thanks for the help! K On Aug 18, 2006, at 7:09 AM, Ed Hickey wrote: > i believe i had this problem and it was because i didn't install > gcc. make sure you have the gcc package installed, uninstall > mogrel, install mongrel and try again. > > ed > > On 8/17/06, Nick Sieger wrote: > On 8/17/06, kigsteronline at mac.com < kigsteronline at mac.com> wrote: > $ mongrel_rails start > ** Starting Mongrel listening at 0.0.0.0:3000 > /usr/local/ruby-1.8.4/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) > > What am I missing? > > I installed it using "sudo gem install mongrel --include-dependencies" > > Go back and install again and watch for errors. T he most likely > culprit is that the /usr/local/ruby- 1.8.4/lib/ruby/gems/1.8/gems/ > mongrel-0.3.13.3/ext/http11/http11.so didn't get moved to /usr/ > local/ruby- 1.8.4/lib/ruby/gems/1.8/gems > /mongrel- 0.3.13.3/lib/http11.so during the installation process. > > HTH, > /Nick > > > _______________________________________________ > 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/20060818/cf412578/attachment.html From tdreyno at gmail.com Fri Aug 18 14:42:45 2006 From: tdreyno at gmail.com (Thomas Reynolds) Date: Fri, 18 Aug 2006 11:42:45 -0700 Subject: [Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster In-Reply-To: <3a2de0cd0608181043j4f5d6701x52af72309a48c033@mail.gmail.com> References: <3a2de0cd0608181043j4f5d6701x52af72309a48c033@mail.gmail.com> Message-ID: <1ccc71a80608181142h292748abj8bdef821e0a8b37c@mail.gmail.com> Oh my fucking god, you have made my life so much better. Tweaking .conf files was starting to drive me mad. -Thomas Reynolds On 8/18/06, Charles Brian Quinn wrote: > > Hi mongrel users! > > I just posted a bad-ass capistrano file that automates *everything* > for setting up an apache2+mod_proxy_balancer and > mongrel+mongrel_cluster -- including apache2 setups. It's based off > Coda Hale's guide and all Bradley's work at fluxura and RailsMachine > (thanks Coda and Bradley!). > > It's, well, bad-ass, if I must say so myself. My favorite part: > > (0..mongrel_servers-1).each { |server| > apache2_rails_conf += " BalancerMember > http://127.0.0.1:#{mongrel_start_port + server}\n" > } > > It's on our newest Slingshot Hosting image, but you can download it here: > > http://www.slingshothosting.com/files/apache2_2_mongrel_deploy.rb > > Deployment just got a whole lot easier. > > And, is about to get even easier: > > http://cleanair.highgroove.com/articles/2006/08/18/heartbeat-sneak-preview > > -- > Charles Brian Quinn > self-promotion: www.seebq.com > highgroove studios: www.highgroove.com > slingshot hosting: www.slingshothosting.com > > > -- > Charles Brian Quinn > self-promotion: www.seebq.com > highgroove studios: www.highgroove.com > slingshot hosting: www.slingshothosting.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/20060818/100b1ef5/attachment.html From jacob at jacobatzen.dk Fri Aug 18 15:01:29 2006 From: jacob at jacobatzen.dk (Jacob Atzen) Date: Fri, 18 Aug 2006 21:01:29 +0200 Subject: [Mongrel] Apache Proxy Error + Mongrel dying In-Reply-To: <65FCC3F2-0058-414B-BEEA-CB6148741005@flydown.org> References: <65FCC3F2-0058-414B-BEEA-CB6148741005@flydown.org> Message-ID: <20060818190128.GA13275@nezbo.dhcp.aub.dk> On Fri, Aug 18, 2006 at 02:59:13PM +0200, Michele wrote: > If I run Mongrel 0.3.13.4 in debug mode, I get this error before the > process dies: "Illegal instruction: 4 (core dumped)". > > What could it be? Is there a way which instruction is causing the error? > > Thanks, > - Michele > > On Aug 17, 2006, at 10:12 , Michele wrote: > > > Hi, > > > > I've got to active project both running on the last Apache 2.2 and on > > Mongrel 0.3.13.3. > > > > One is running perfectly, the other gets (always on the same pages, > > but not after each request, it seems to be random) a ProxyError every > > now and then which leads to the mongrel process being called to die > > and subsequently slowing down the whole web site. > > I have to restart the mongrel cluster and then it starts working well > > again, but after a while, I get the same error again. > > > > I know of the Apache bug and put this in my httpd.conf: > > #Fix for Apache bug 39499 > > SetEnv force-proxy-request-1.0 1 > > SetEnv proxy-nokeepalive 1 > > > > It seemed to work at first, but now I'm getting the errors again. > > > > Would using 0.3.14 fix this? is it ready for production? Hello list, I'm seeing something like the same problem. Mongrels who suddenly stop responding. I'm running an Apache mod_proxy with Mongrel backends setup. And from time to time I'll get the following in the Apache error log file: [Fri Aug 18 20:28:53 2006] [error] [client xxx.xxx.xxx.xxx] proxy: error reading status line from remote server 127.0.0.1 Fri Aug 18 20:28:53 2006] [error] [client xxx.xxx.xxx.xxx] proxy: Error reading from remote server returned by ... Additionally I'm experiencing Mongrels locking up hard. The only thing to do to them is a kill -9. I'm also seeing Mongrels disappearing without a trace in mongrel.log. The problem seems to increase when the load is high, and I have a feeling that increasing the number of mongrels somewhat increases the time interval between lockups. Right now I'm running 20 mongrels and haven't seen the problem for a while. It should be noted that the application is not severely loaded. The Rails production log seems to indicate something like 10 reqs/sec and the requests processing time goes from 1 r/s and up to ~1000 r/s with the majority running way above 10 r/s. I haven't seen any core dumps even with debug turned on for Mongrel. I'm on FreeBSD 6.1, Apache 2.2.3, Mongrel 0.3.13.4 (as I had another issue and was advised to upgrade by Zed Shaw) and Rails 1.1.6 and deploying with Mongrel_cluster and Capistrano. Unfortunately I will not be able to provide further info for the next 2 weeks, but I do hope somebody will be able to figure out what is going on with what little info is given. -- Thanks, - Jacob Atzen From zedshaw at zedshaw.com Fri Aug 18 15:50:40 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 18 Aug 2006 12:50:40 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- QUERY_STRING Fixed In-Reply-To: References: <1155772406.6122.11.camel@localhost.localdomain> Message-ID: <1155930640.6117.10.camel@localhost.localdomain> On Fri, 2006-08-18 at 10:50 +0100, Jonathan del Strother wrote: > I'm quite often losing mysql connections during requests, when using > mongrel. Doesn't happen with lighty. > This is on OS X 10.4.6, mysql 4.1.16, and a recent rails. Is there > any other useful information I can supply? Do you mean FastCGI and lighty? Because "lighty" doesn't run rails. If so, then I'll need more information than this. For example: 1) When does this happen? 2) Where's your mysql database? 3) Do you have enough ram? 4) Have you done a packet trace to see what might cause it? These are very informative, although it sucks to have to resort to this. 5) What's the exception you get? 6) Are you opening a bunch of files? 7) Do you have lots of cache() statements in your templates? Those open lots of files. 8) Are you using the default rails pure ruby driver or the compiled driver? If you can get me more info I might be able to figure it out. Otherwise most folks seem to have upgraded to the latest driver and not had this problem. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 18 15:53:08 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 18 Aug 2006 12:53:08 -0700 Subject: [Mongrel] Apache Proxy Error + Mongrel dying In-Reply-To: <65FCC3F2-0058-414B-BEEA-CB6148741005@flydown.org> References: <65FCC3F2-0058-414B-BEEA-CB6148741005@flydown.org> Message-ID: <1155930788.6117.14.camel@localhost.localdomain> On Fri, 2006-08-18 at 14:59 +0200, Michele wrote: > If I run Mongrel 0.3.13.4 in debug mode, I get this error before the > process dies: "Illegal instruction: 4 (core dumped)". > > What could it be? Is there a way which instruction is causing the error? What operating system and version? How'd you build your ruby? After how long does this happen? Does it tell you line number of where it happens? Is the line number consistent? Try running it under gdb, then when it dies type: backtrace and send me the output. That or run the program under strace and give me the last bit of the output before it died. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 18 15:54:30 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 18 Aug 2006 12:54:30 -0700 Subject: [Mongrel] error starting mongrel: undefined method `resolve' for nil:Mongrel::URIClassifier (NoMethodError) In-Reply-To: <733f56120608180709t4404a932r6eb0ae4898f191f2@mail.gmail.com> References: <1155225266.5997.18.camel@localhost.localdomain> <86fyfx8p16.fsf@bitty.lumos.us> <7141A7E5-03E8-4977-99BD-5C4A3D271EB0@mac.com> <733f56120608180709t4404a932r6eb0ae4898f191f2@mail.gmail.com> Message-ID: <1155930870.6117.15.camel@localhost.localdomain> On Fri, 2006-08-18 at 09:09 -0500, Ed Hickey wrote: > i believe i had this problem and it was because i didn't install gcc. > make sure you have the gcc package installed, uninstall mogrel, > install mongrel and try again. Yep, the ever present "gems installs even if nothing builds" problem. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 18 15:56:20 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 18 Aug 2006 12:56:20 -0700 Subject: [Mongrel] Mongrel setting with Mysql error In-Reply-To: <3f4ebe010608180712u4e4d2d3er9d33b6924020b15f@mail.gmail.com> References: <3f4ebe010608180712u4e4d2d3er9d33b6924020b15f@mail.gmail.com> Message-ID: <1155930980.6117.18.camel@localhost.localdomain> On Fri, 2006-08-18 at 10:12 -0400, Guillaume Carbonneau wrote: > Hi, > > I'm pretty newb at Rails deployement stuff. > I'm setting up a Mongrel web server on windows following the tutorial > on the official site. > My app works except when there's interaction with MySQL. I get this > error : > > "Uninitialized constant Mysql" > > Now i'm pretty lost and i'm sure i'm doing something wrong. I've tried > searching google, ruby and rails mailing list but didn't find > anything. > I'd appreciate if you guys could point me to the right direction. Like > what steps I have to do to make mysql interact with Mongrel/Ruby. > Haven't seen this from people who use win32, so I'm thinking your setup is wrong somehow. Have you tried installing the win32 mysql gem? gem install mysql I believe that'll intall it but you have to pick win32. If you've already done this then maybe remove it and see if you get the error. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 18 15:59:48 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 18 Aug 2006 12:59:48 -0700 Subject: [Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster In-Reply-To: <3a2de0cd0608181043j4f5d6701x52af72309a48c033@mail.gmail.com> References: <3a2de0cd0608181043j4f5d6701x52af72309a48c033@mail.gmail.com> Message-ID: <1155931188.6117.21.camel@localhost.localdomain> On Fri, 2006-08-18 at 13:43 -0400, Charles Brian Quinn wrote: > Hi mongrel users! > > I just posted a bad-ass capistrano file that automates *everything* > for setting up an apache2+mod_proxy_balancer and > mongrel+mongrel_cluster -- including apache2 setups. It's based off > Coda Hale's guide and all Bradley's work at fluxura and RailsMachine > (thanks Coda and Bradley!). Cool, did you make sure it runs with the latest pre-release? That's coming down as the official release very soon, as soon as I route out or rule out a bug. The main change for your stuff is that it's better to specify the log and pid file paths as absolute paths just to make sure they get set right. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Fri Aug 18 16:06:04 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 18 Aug 2006 13:06:04 -0700 Subject: [Mongrel] Apache Proxy Error + Mongrel dying In-Reply-To: <20060818190128.GA13275@nezbo.dhcp.aub.dk> References: <65FCC3F2-0058-414B-BEEA-CB6148741005@flydown.org> <20060818190128.GA13275@nezbo.dhcp.aub.dk> Message-ID: <1155931564.6117.26.camel@localhost.localdomain> On Fri, 2006-08-18 at 21:01 +0200, Jacob Atzen wrote: > On Fri, Aug 18, 2006 at 02:59:13PM +0200, Michele wrote: > Hello list, > > I'm seeing something like the same problem. Mongrels who suddenly stop > responding. I'm running an Apache mod_proxy with Mongrel backends setup. > And from time to time I'll get the following in the Apache error log > file: > Make sure you are running the latest pre-release: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And then if you still have the same error report *anything* you have in the mongrel.log, there should be some exceptions at least. > I'm on FreeBSD 6.1, Apache 2.2.3, Mongrel 0.3.13.4 (as I had another > issue and was advised to upgrade by Zed Shaw) and Rails 1.1.6 and > deploying with Mongrel_cluster and Capistrano. FreeBSD 6.1 seems to be the common factor for everyone having these problems. I'm guessing that FBSD 6.1 changed something subtle about how sockets work and now Mongrel is paying the penalty. Until I get one of these machines to play one I won't have a chance to fix this though (or even figure out if I'm right or not). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From gusxedge at gmail.com Fri Aug 18 20:56:59 2006 From: gusxedge at gmail.com (Guillaume Carbonneau) Date: Fri, 18 Aug 2006 20:56:59 -0400 Subject: [Mongrel] Mongrel setting with Mysql error In-Reply-To: <1155930980.6117.18.camel@localhost.localdomain> References: <3f4ebe010608180712u4e4d2d3er9d33b6924020b15f@mail.gmail.com> <1155930980.6117.18.camel@localhost.localdomain> Message-ID: <3f4ebe010608181756i45d34f27v1482f80ba9c9b77f@mail.gmail.com> On 8/18/06, Zed Shaw wrote: > > On Fri, 2006-08-18 at 10:12 -0400, Guillaume Carbonneau wrote: > > Hi, > > > > I'm pretty newb at Rails deployement stuff. > > I'm setting up a Mongrel web server on windows following the tutorial > > on the official site. > > My app works except when there's interaction with MySQL. I get this > > error : > > > > "Uninitialized constant Mysql" > > > > Now i'm pretty lost and i'm sure i'm doing something wrong. I've tried > > searching google, ruby and rails mailing list but didn't find > > anything. > > I'd appreciate if you guys could point me to the right direction. Like > > what steps I have to do to make mysql interact with Mongrel/Ruby. > > > > Haven't seen this from people who use win32, so I'm thinking your setup is > wrong somehow. > > Have you tried installing the win32 mysql gem? > > gem install mysql > > I believe that'll intall it but you have to pick win32. If you've > already done this then maybe remove it and see if you get the error. > > > -- > 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 I updated my gems I tried removing / reinstalling the mysql gem and i'm still getting the error. I always pick the mswin32 btw... I noticed a pattern when I start the mongrel server.. 1st request generates this error : uninitialized constant Mysql 2nd and further errors : uninitialized constant ActiveRecord::Mysql Still getting errors. I tried with dead simple apps and it generates the same errors Thanks for your answers so far... Guillaume Carbonneau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060818/9e438a9b/attachment.html From zedshaw at zedshaw.com Sat Aug 19 00:49:48 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 18 Aug 2006 21:49:48 -0700 Subject: [Mongrel] [ANN] Experiment in Online Mongrel Chat Support Message-ID: <1155962988.6175.5.camel@localhost.localdomain> Hi Folks, I was playing with Lingr today (http://www.lingr.com) and kind of like it, so I thought I'd setup a little room and see how it works for answering Mongrel questions. http://www.lingr.com/room/3yXhqKbfPy8 I'll be hanging there for a while and we'll see how it works out. If it works well, and doesn't turn into a nastier-than-IRC situation then I may turn it into a permanent thing. And no, lingr isn't paying me to use them, I'm not endorsing them, and they don't use Mongrel, they use FastCGI with comet: http://blog.lingr.com/2006/08/lingr_under_the.html So no whining or yelling out nasty words like "whore". That's not nice. ;-) -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From me at seebq.com Sat Aug 19 00:51:08 2006 From: me at seebq.com (Charles Brian Quinn) Date: Sat, 19 Aug 2006 00:51:08 -0400 Subject: [Mongrel] New automated Capistrano setup for Apache2.1+ and mongrel_cluster In-Reply-To: <1155931188.6117.21.camel@localhost.localdomain> References: <3a2de0cd0608181043j4f5d6701x52af72309a48c033@mail.gmail.com> <1155931188.6117.21.camel@localhost.localdomain> Message-ID: <3a2de0cd0608182151r71687278oe16fde8125f4fe46@mail.gmail.com> On 8/18/06, Zed Shaw wrote: > Cool, did you make sure it runs with the latest pre-release? That's > coming down as the official release very soon, as soon as I route out or > rule out a bug. The main change for your stuff is that it's better to > specify the log and pid file paths as absolute paths just to make sure > they get set right. I just updated my script, and made it work with the new mongrel pre-release. It has options to specify the prefix as a capistrano setting. It's totally improved and tried and tested to be able to run multiple mongrel_clusters on multiple vhosts simultaneously (and takes care of all ports). Some things to note that I forgot to mention last time: You'll need to have a line in your apache2 that says: Include /etc/rails/*.conf to pickup all the conf files for the multiple mongrel_clusters you're running You'll also want to have the line: NameVirtualHost *:80 to be able to serve up all your different named virtualhost servers for each app. Also one more thing, I put the amazingly feature-barren proxy-balancer manager on mongrel_start_port + 81, which ends up being 8081, so another cluster on 8100 would put it on port 8181. Just FYI. It could be configurable one day too, though. Newest version is here again: http://www.slingshothosting.com/files/apache2_2_mongrel_deploy.rb p.s. Zed I sent you some Apache2 best practices documents for the mongrel site. Did you receive them? Should I post the webgen files on rubyforge, or just submit a patch to current mongrel svn? p.p.s. a crazy mongrel: http://www.flickr.com/photos/cassi007/211404555/ -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com From jan.svitok at gmail.com Sat Aug 19 02:38:30 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Sat, 19 Aug 2006 08:38:30 +0200 Subject: [Mongrel] Mongrel setting with Mysql error In-Reply-To: <3f4ebe010608181756i45d34f27v1482f80ba9c9b77f@mail.gmail.com> References: <3f4ebe010608180712u4e4d2d3er9d33b6924020b15f@mail.gmail.com> <1155930980.6117.18.camel@localhost.localdomain> <3f4ebe010608181756i45d34f27v1482f80ba9c9b77f@mail.gmail.com> Message-ID: <8d9b3d920608182338v1ee3eec9ya9f34f9ee4df8efc@mail.gmail.com> On 8/19/06, Guillaume Carbonneau wrote: > > > > On 8/18/06, Zed Shaw wrote: > > On Fri, 2006-08-18 at 10:12 -0400, Guillaume Carbonneau wrote: > > > Hi, > > > > > > I'm pretty newb at Rails deployement stuff. > > > I'm setting up a Mongrel web server on windows following the tutorial > > > on the official site. > > > My app works except when there's interaction with MySQL. I get this > > > error : > > > > > > "Uninitialized constant Mysql" > > > > > > Now i'm pretty lost and i'm sure i'm doing something wrong. I've tried > > > searching google, ruby and rails mailing list but didn't find > > > anything. > > > I'd appreciate if you guys could point me to the right direction. Like > > > what steps I have to do to make mysql interact with Mongrel/Ruby. > > > > > > > Haven't seen this from people who use win32, so I'm thinking your setup is > wrong somehow. > > > > Have you tried installing the win32 mysql gem? > > > > gem install mysql > > > > I believe that'll intall it but you have to pick win32. If you've > > already done this then maybe remove it and see if you get the error. > > > > > > -- > > 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 > > > I updated my gems > I tried removing / reinstalling the mysql gem and i'm still getting the > error. > I always pick the mswin32 btw... > > I noticed a pattern when I start the mongrel server.. > 1st request generates this error : uninitialized constant Mysql > 2nd and further errors : uninitialized constant ActiveRecord::Mysql > Still getting errors. I tried with dead simple apps and it generates the > same errors > > Thanks for your answers so far... > > Guillaume Carbonneau 1. in c:\ruby\lib\gems\gems\activerecord-x.x.x\lib\activerecord\connection_adapters\ (or similar) you should have mysql_adapter.rb. try a little test: just create instance of it, even without any configuration: require 'activerecord/adapters/mysql_adapter' ActiveRecord::ConnectionAdapters::MysqlAdapter.new() to see if it complains about the constant. 2. in c:\ruby\lib\gems\gems\activerecord-x.x.x\lib\activerecord\vendor\ you should have file mysql.rb - the pure rb mysql driver that is used if the binary one is not used. 3. change your ruby association temporarily to "c:\ruby\bin\ruby.exe" -dw "%1" %* to see all the exceptions and warnings. J. From jay.turpin at gmail.com Sat Aug 19 10:18:03 2006 From: jay.turpin at gmail.com (Jay Turpin) Date: Sat, 19 Aug 2006 07:18:03 -0700 Subject: [Mongrel] IIS and response timeout Message-ID: <4eda9d210608190718y207f3be8o70e00bbf41293eff@mail.gmail.com> I apologize if this has been covered before, I checked the archives and didn't see anything over the last few months. I am running IIS6 with IsapiRewriter and a single mongrel service for each Rails application. One of my apps does a long query to the database to produce a CSV file. After the request has gone beyond 30 seconds, the user get a 500 Internal Server Error. I've looked around for ways to adjust the response timeout, either in IIS or mongrel, but haven't found anything yet. Any ideas? -- -- Jay Turpin "One test is worth a thousand expert opinions." - Bill Nye (The Science Guy) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060819/92bcc485/attachment.html From will at hotgazpacho.com Sat Aug 19 10:37:37 2006 From: will at hotgazpacho.com (Will Green) Date: Sat, 19 Aug 2006 10:37:37 -0400 Subject: [Mongrel] IIS and response timeout In-Reply-To: <4eda9d210608190718y207f3be8o70e00bbf41293eff@mail.gmail.com> References: <4eda9d210608190718y207f3be8o70e00bbf41293eff@mail.gmail.com> Message-ID: <44E72231.9030507@hotgazpacho.com> For long running tasks, you should look into Ezra's BackgrounDRb: http://brainspl.at/articles/2006/07/02/backgroundrb-updated == Will Jay Turpin wrote: > I apologize if this has been covered before, I checked the archives > and didn't see anything over the last few months. > > I am running IIS6 with IsapiRewriter and a single mongrel service for > each Rails application. One of my apps does a long query to the > database to produce a CSV file. After the request has gone beyond 30 > seconds, the user get a 500 Internal Server Error. > > I've looked around for ways to adjust the response timeout, either in > IIS or mongrel, but haven't found anything yet. Any ideas? > > -- > -- Jay Turpin > "One test is worth a thousand expert opinions." - Bill Nye (The > Science Guy) > >------------------------------------------------------------------------ > >_______________________________________________ >Mongrel-users mailing list >Mongrel-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/mongrel-users > From mail at flydown.org Sat Aug 19 15:29:53 2006 From: mail at flydown.org (Michele) Date: Sat, 19 Aug 2006 21:29:53 +0200 Subject: [Mongrel] Apache Proxy Error + Mongrel dying In-Reply-To: <1155930788.6117.14.camel@localhost.localdomain> References: <65FCC3F2-0058-414B-BEEA-CB6148741005@flydown.org> <1155930788.6117.14.camel@localhost.localdomain> Message-ID: Zed, I got it: there was a piece of code trying to redirect_to(nil) every now and then. What I don't understand is I got a normal Rails error while in development (Stack level too deep), but Mongrel crashed in production, thus not writing the error to the log. - Michele On Aug 18, 2006, at 21:53 , Zed Shaw wrote: > On Fri, 2006-08-18 at 14:59 +0200, Michele wrote: >> If I run Mongrel 0.3.13.4 in debug mode, I get this error before the >> process dies: "Illegal instruction: 4 (core dumped)". >> >> What could it be? Is there a way which instruction is causing the >> error? > > What operating system and version? How'd you build your ruby? After > how > long does this happen? Does it tell you line number of where it > happens? Is the line number consistent? > > Try running it under gdb, then when it dies type: backtrace and > send me > the output. That or run the program under strace and give me the last > bit of the output before it died. > > > -- > 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 scarydog at mac.com Sun Aug 20 03:25:06 2006 From: scarydog at mac.com (Nathan Donaldson) Date: Sun, 20 Aug 2006 19:25:06 +1200 Subject: [Mongrel] Problem with: service mongrel_cluster start Message-ID: <57AB69ED-924B-4652-80E8-658EB33D38E2@mac.com> Hi all, I am having trouble transitioning from fastcgi to Mongrel. I have it all working apart from one small part, I can't get the service to start on boot. I have followed the instructions and if I call the script directly: i.e. "/etc/init.d/mongrel_cluster start" it works fine, but if I call it using "service mongrel_cluster start" it fails with the following error: Starting all mongrel_clusters... /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21: command not found: mongrel_rails cluster::start -c sonar_radiant.yml mongrel_rails cluster::start returned an error. I can see what is happening, it is calling mongrel_rails cluster::start -c config_file_without the directory. It should say: mongrel_rails cluster::start -c /etc/mongrel_cluster/sonar_radiant.yml Anyone know what I can do to fix this? Regards Nathan From lapomme00 at gmail.com Sun Aug 20 03:53:30 2006 From: lapomme00 at gmail.com (Brett Walker) Date: Sun, 20 Aug 2006 15:53:30 +0800 Subject: [Mongrel] Version number in log file... Message-ID: I have one small suggestion, after just upgrading to the 0.13.4 pre-release. What about putting the version number in the log? This way it's easy to verify what version we're running. Maybe Starting Mongrel (v0.13.4) listening at 127.0.0.1:8000 or something. Cheers, Brett From snacktime at gmail.com Sun Aug 20 05:50:27 2006 From: snacktime at gmail.com (snacktime) Date: Sun, 20 Aug 2006 02:50:27 -0700 Subject: [Mongrel] http parser Message-ID: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> Just thought I'd let you know that your http parser worked great for creating an http protocol handler for Eventmachine. It wouldn't take that much effort to use Eventmachine for Mongrel, might be worth a shot just to see how it does. A few things would need to be restructered, like HttpRequest where you read the rest of the body, and calling the handler. But it wouldn't be all that much work I don't think. Took me about an hour to create a working http server with Eventmachine, your parser, and subclassing HttpRequest to get rid of the socket reading. I'll spend some more time on it tommorrow and see how it progresses. Chris From ezmobius at gmail.com Sun Aug 20 15:26:01 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Sun, 20 Aug 2006 12:26:01 -0700 Subject: [Mongrel] http parser In-Reply-To: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> Message-ID: On Aug 20, 2006, at 2:50 AM, snacktime wrote: > Just thought I'd let you know that your http parser worked great for > creating an http protocol handler for Eventmachine. It wouldn't take > that much effort to use Eventmachine for Mongrel, might be worth a > shot just to see how it does. A few things would need to be > restructered, like HttpRequest where you read the rest of the body, > and calling the handler. But it wouldn't be all that much work I > don't think. Took me about an hour to create a working http server > with Eventmachine, your parser, and subclassing HttpRequest to get rid > of the socket reading. I'll spend some more time on it tommorrow and > see how it progresses. > > Chris > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Hey Chris- I would love to see your code for this. I have been working with eventmachine on some similar stuff. -Ezra From zedshaw at zedshaw.com Sun Aug 20 16:08:27 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 20 Aug 2006 13:08:27 -0700 Subject: [Mongrel] http parser In-Reply-To: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> Message-ID: <1156104507.6252.16.camel@localhost.localdomain> On Sun, 2006-08-20 at 02:50 -0700, snacktime wrote: > Just thought I'd let you know that your http parser worked great for > creating an http protocol handler for Eventmachine. It wouldn't take > that much effort to use Eventmachine for Mongrel, might be worth a > shot just to see how it does. A few things would need to be > restructered, like HttpRequest where you read the rest of the body, > and calling the handler. But it wouldn't be all that much work I > don't think. Took me about an hour to create a working http server > with Eventmachine, your parser, and subclassing HttpRequest to get rid > of the socket reading. I'll spend some more time on it tommorrow and > see how it progresses. The EventMachine stuff doesn't really buy you much since they use Ruby's select still to process connections. That means you're still stuck with 1024 max files and still stuck with Ruby's threads. All they do is then move IO processing out to a *large* amount of convoluted C++ code. I'm sure you'll love security auditing that. :-) They are also working on their Mongrel competitor, but being in true open source NIH form couldn't be bothered to borrow the parser I wrote and decided to write their own by hand (it's like I don't even say anything). For whatever reason I've always thought those guys were a little on the shady side. Not sure why, they just seem desperate for cash or something. I'd say play around with it and if you get something interesting working then that's cool, but in the end adding even more compiled code that I'd have to distribute that's then tied to a group of developers who're obviously trying to make bank off my work isn't going to go over well. FYI, I'm also working on a different approach that moves all of the HTTP processing into an ultra fast ucontext/poll based IO system. I'm hoping it'll work with any language too (Python baby). But don't let this discourage you, Mongrel is open source so people can try these things out. You never know, it could end up being the bee's knees on a platform like win32. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From snacktime at gmail.com Sun Aug 20 16:38:42 2006 From: snacktime at gmail.com (snacktime) Date: Sun, 20 Aug 2006 13:38:42 -0700 Subject: [Mongrel] http parser In-Reply-To: References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> Message-ID: <1f060c4c0608201338j56962604xeb2d8ff7910e0860@mail.gmail.com> Here is a quick and dirty example of how to use the parser. Notice that the server isn't sending a valid reply to the client, and the handler doesn't exist, I added that just as an example for others of how you might use the Eventmachine thread pool to run the handler. But you should get the general idea. Zed correct me if I am wrong, but nparsed returns the length of the headers that were parsed, so if the parser finishes nparsed is the header length. Then I just add the content length to that and keep reading until we get all the content. I also subclassed HttpRequest since in mongrel that's where the rest of the body is read, but in eventmachine it's not. To use EM in mongrel you would need to find the best way to only run one handler at a time. An array of connections in process_request together with a state variable might work. New requests get pushed onto a list, and process_request takes the first request in the list, sets the state to busy, then when it's done sets the state to idle and checks the array for more request to process before finishing. Need to think that one through a bit more. require 'rubygems' require 'mongrel' require 'eventmachine' class Mongrel::HttpRequest attr_reader :body, :params # You don't really call this. It's made for you. # Main thing it does is hook up the params, and store any remaining # body data into the HttpRequest.body attribute. # # TODO: Implement tempfile removal when the request is done. def initialize(params, initial_body) @params = params end class Server < EventMachine::Connection def initialize *args super @linebuffer = "" end def post_init @parser = Mongrel::HttpParser.new @params = {} @nparsed = 0 @request = nil @request_len = nil #start_tls end def unbind puts "Connection Closed\r\n" end def process_request(request) # Run the handler in a thread. Not implemented just put here to show how to use # EventMachine.defer to run the handler in EventMachine's thread pool. start = proc {run_handler} stop = proc {|r| send_data r close_connection } EventMachine.defer(start,stop) end def receive_data data @linebuffer << data @nparsed = @parser.execute(@params, @linebuffer, @nparsed) p "nparsed=#{@nparsed}" if @parser.finished? if @request_len.nil? @request = Mongrel::HttpRequest.new(@params, at linebuffer) @request_len = @nparsed + @request.params[Mongrel::Const::CONTENT_LENGTH].to_i if @linebuffer.length >= @request_len process_request(@request) end elsif @linebuffer.length >= @request_len process_request(@request) end end end end EventMachine::run { EventMachine::start_server "127.0.0.1", 80, Server } From snacktime at gmail.com Sun Aug 20 16:50:03 2006 From: snacktime at gmail.com (snacktime) Date: Sun, 20 Aug 2006 13:50:03 -0700 Subject: [Mongrel] http parser In-Reply-To: <1156104507.6252.16.camel@localhost.localdomain> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> Message-ID: <1f060c4c0608201350g44c3d886geb70eac8602bd58a@mail.gmail.com> On 8/20/06, Zed Shaw wrote: > On Sun, 2006-08-20 at 02:50 -0700, snacktime wrote: > > Just thought I'd let you know that your http parser worked great for > > creating an http protocol handler for Eventmachine. It wouldn't take > > that much effort to use Eventmachine for Mongrel, might be worth a > > shot just to see how it does. A few things would need to be > > restructered, like HttpRequest where you read the rest of the body, > > and calling the handler. But it wouldn't be all that much work I > > don't think. Took me about an hour to create a working http server > > with Eventmachine, your parser, and subclassing HttpRequest to get rid > > of the socket reading. I'll spend some more time on it tommorrow and > > see how it progresses. > > The EventMachine stuff doesn't really buy you much since they use Ruby's > select still to process connections. I didn't realize that. I thought they used a native select. If that's the case then EM would actually perform worse, since you are always grabbing threads from a pool to run blocking operations and then jumping back into the event loop. I do like how you did your parser though, it would be easy to drop that into pretty much any ruby project that needs an http parser. Chris From garbagecat10 at gmail.com Sun Aug 20 17:04:41 2006 From: garbagecat10 at gmail.com (Francis Cianfrocca) Date: Sun, 20 Aug 2006 17:04:41 -0400 Subject: [Mongrel] http parser In-Reply-To: <1156104507.6252.16.camel@localhost.localdomain> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> Message-ID: <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> On 8/20/06, Zed Shaw wrote: > The EventMachine stuff doesn't really buy you much since they use Ruby's > select still to process connections. That means you're still stuck with > 1024 max files and still stuck with Ruby's threads. All they do is then > move IO processing out to a *large* amount of convoluted C++ code. I'm > sure you'll love security auditing that. :-) > > They are also working on their Mongrel competitor, but being in true > open source NIH form couldn't be bothered to borrow the parser I wrote > and decided to write their own by hand (it's like I don't even say > anything). For whatever reason I've always thought those guys were a > little on the shady side. Not sure why, they just seem desperate for > cash or something. > > I'd say play around with it and if you get something interesting working > then that's cool, but in the end adding even more compiled code that I'd > have to distribute that's then tied to a group of developers who're > obviously trying to make bank off my work isn't going to go over well. > > FYI, I'm also working on a different approach that moves all of the HTTP > processing into an ultra fast ucontext/poll based IO system. I'm hoping > it'll work with any language too (Python baby). > > But don't let this discourage you, Mongrel is open source so people can > try these things out. You never know, it could end up being the bee's > knees on a platform like win32. It's hard to know how to answer this, given that I've felt the Ruby community has generally been about looking for good answers to technical problems, and not about making unsupported statements that have a strong odor of suspicion and insecurity about them. EventMachine is not and has never been fundamentally about HTTP. It started out as a general framework for writing fast, event-driven programs without having to use threads, and it wasn't designed only for working with Ruby. It is stuck with a limit of the number of descriptors when used with Ruby because we hook Ruby's select implementation in order to interoperate with Ruby threads, which EM does with no problems whatsoever. I wrote the EM I/O engine in C++ for two primary reasons: first because this code base builds on more than ten years of experience with extremely high-speed network servers on a range of different platforms. And second, because when I wrote it (last April), Ruby didn't have proper nonblocking I/O. The Ruby-core guys generously added proper nonblocking support at the end of May, and at this point EM has a nearly-complete pure Ruby implementation, that has an identical API and will be used transparently on platforms where the extension fails to compile. I just checked EM's C++ code, and it's only 4200 lines. That's not a *large* amount of code. It's a *small* amount of code. If you think it's "convoluted," then I have to say you probably haven't tried to read it. (It's also possible that you're not that strong a C++ programmer.) I've been through some hard-core source-code audits in my time, and I'm confident this code would pass without an abnormal amount of effort. And at any rate, it's wide open on Rubyforge SCM, so anyone and everyone is invited to take a crack at finding the security holes in it. We'll gratefully accept any patch correcting security flaws. Working on a Mongrel competitor: I'm not particularly interested in competing against Mongrel for a couple of reasons. Most importantly, I'm not entirely sure what Mongrel's goal in life is. It seems nice to have a better-performing Webrick, but you've also said that you expect Mongrel to be deployed in conjunction with Apache or Lighty, so I'm left assuming the primary value-added is that people can save the trouble of configuring FastCGI or such stuff. Also, it seems nice to be able to cluster Rails instances intelligently. And you have said to me yourself that adding faster I/O to Rails is of limited value because there are so many performance problems in Rails itself. And none of those are problems I'm interested in solving any differently than you have. I'm not quite sure what you think anything I'm working on is that might be competitive to Mongrel. I know that Mongrel has an HTTP parser in it, and we have one too, but that's not a whole lot of overlap. I've read your statements on parsing HTTP, and I'm not terribly convinced by your approach, which seems to be all about implementing a very complex RFC as completely and strictly as possible. I've been writing practical high-speed HTTP parsers for almost ten years now, and I know a lot about which parts of the standard(s) really matter and which matter less, and also about which parts should be treated in a relaxed way. You and I are trying to solve different problems, and for my problem-domain, your chosen approach isn't too interesting. You're trying to write a well-behaved proxying layer between Rails and standard web servers. I'm trying to write a general framework for event-driven applications that can easily incoroporate a range of different protocols. Speed and ease of development matter a lot more to me than strict conformance with RFC 2616. >>>For whatever reason I've always thought those guys were a little on the shady side. Not sure why, they just seem desperate for cash or something.<<< This borders on libel. I challenge you to produce the evidence on the basis of which you make these statements. I've been a senior technology executive and investor for quite a long time. I don't contribute to open-source projects in order to make a living. Are you willing to make the same statement in regard to yourself? >>>but in the end adding even more compiled code that I'd have to distribute that's then tied to a group of developers who're obviously trying to make bank off my work isn't going to go over well.<<< To my knowledge, no one in my group is trying to induce you to add anything, compiled or otherwise, to your code base. Your statement sounds like more than just protesting too much: it sounds insecure. I can't speak for your motivations, but the rest of us just want to work with the best possible technology, and investigate new ideas to see if they lead to interesting places. Zed, you're an important guy in the community and you've written some impressive technology. But you're showing a personal side that is quite disappointing. From garbagecat10 at gmail.com Sun Aug 20 17:21:12 2006 From: garbagecat10 at gmail.com (Francis Cianfrocca) Date: Sun, 20 Aug 2006 17:21:12 -0400 Subject: [Mongrel] http parser In-Reply-To: <1f060c4c0608201350g44c3d886geb70eac8602bd58a@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <1f060c4c0608201350g44c3d886geb70eac8602bd58a@mail.gmail.com> Message-ID: <3a94cf510608201421n56f540acjc0ba08b2f9281d9a@mail.gmail.com> On 8/20/06, snacktime wrote: > > > I didn't realize that. I thought they used a native select. If > that's the case then EM would actually perform worse, since you are > always grabbing threads from a pool to run blocking operations and > then jumping back into the event loop. I do like how you did your > parser though, it would be easy to drop that into pretty much any ruby > project that needs an http parser. Read the code, Chris. We use a native select loop built in the normal (native) way, using fully nonblocking I/O. There are no threads anywhere inside of EventMachine (except for the thread pool accessed by #defer which you and I have already corresponded about). When EM is built for a Ruby environment, it hooks Ruby's thread scheduler to give Ruby a chance to run its threads. It's not any slower. You've already seen that EM can make 1000 TCP client connections in well under a second. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060820/a0f61357/attachment.html From zedshaw at zedshaw.com Sun Aug 20 18:32:11 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 20 Aug 2006 15:32:11 -0700 Subject: [Mongrel] http parser In-Reply-To: <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> Message-ID: <1156113131.7991.50.camel@localhost.localdomain> On Sun, 2006-08-20 at 17:04 -0400, Francis Cianfrocca wrote: > On 8/20/06, Zed Shaw wrote: While a public forum might not be the place to air my thoughts, since you replied here, I'll comment here. Feel free to contact me off list so we can possibly patch this up. Let's skip all the technical stuff for now, and focus on this one area: > >>>For whatever reason I've always thought those guys were a > little on the shady side. Not sure why, they just seem desperate for > cash or something.<<< > This borders on libel. I challenge you to produce the evidence on the > basis of which you make these statements. I've been a senior > technology executive and investor for quite a long time. I don't > contribute to open-source projects in order to make a living. Are you > willing to make the same statement in regard to yourself? > > >>>but in the end adding even more compiled code that I'd > have to distribute that's then tied to a group of developers who're > obviously trying to make bank off my work isn't going to go over well.<<< > To my knowledge, no one in my group is trying to induce you to add > anything, compiled or otherwise, to your code base. Your statement > sounds like more than just protesting too much: it sounds insecure. I > can't speak for your motivations, but the rest of us just want to work > with the best possible technology, and investigate new ideas to see if > they lead to interesting places. You know what man, you're right, that was uncalled for. You aren't shady (no irony here, I'm seriously apologizing). But, let's go over what behaviors you're doing that make me think you're not completely honest in your intentions. Then you can explain them to me and we can come to an understanding. First off, if we're going to throw out legal challenges then lets compare project names. You have a very nasty habit of picking project names that are very similar to names of already established or more famous projects. Let's compare: * Ruby/EventMachine -- http://rubyforge.org/projects/eventmachine/ * Ruby/Event -- http://www.zedshaw.com/projects/ruby_event/ * monorail -- http://rubyforge.org/projects/monorail/ * monorail -- http://www.castleproject.org/index.php/MonoRail * Which is really similar to "mongrel rails", but let's just say that wasn't your intention. Then, you also have a habit of creating these to be similar to existing ones, pimping them in what seems like an attempt to wipe out the existing projects: "Monorail is the lightweight, fast, scalable and SECURE alternative to Ajax-application frameworks. Its native-HTTP server incorporates SSL and auth/az services natively. Page development is Rails-like but simpler." It looks like you're capitalizing on Rails fame and Mongrel fame at the same time, then telling people that your framework is more SECURE. Yet, you have this in your monorail:http.cpp file: // This processing depends on the fact that the end // of the data buffer we receive will have a null terminator // just after the last byte indicated by the length parameter. Anyone worth his SECURE salt knows that using \0 buffer termination is *not* secure. Not to mention this gem of a buffer overflow: else if (!strncasecmp (header, "cookie:", 7)) { const char *s = header + 7; while (*s && ((*s==' ') || (*s=='\t'))) s++; setenv ("HTTP_COOKIE", s, true); } (HINT: A while loop that waits for a \0 terminator is always wrong.) Finally, in every communication I've had with you, you've never contributed anything to Mongrel or any of my work. You've been very adamant about me using *your* work, and me *doing the work* to use your stuff, but you've never contributed. Mr. snacktime has done more to get Mongrel working with EventMachine than you have. In fact, I've contributed more to your software than you have to mine: http://rubyforge.org/forum/forum.php?forum_id=6607 Which means, in my *opinion* you take and do not give. In fact, I wrote this: http://mongrel.rubyforge.org/not_mongrel.html Partially in response to your behavior. If you remember you e-mailed me repeatedly asking me to use your Ruby/EventMachine to power Mongrel, despite my concerns about your licensing, copyright and motivations (which I told you then). In summary, the fact that you: * Create competitive projects that are closely named to mine. * Make false security claims about your work. * Imply that your work is more secure than mine (yet without a security testing policy, unlike Mongrel). * Use my advice and work to further your own means without contributing back in kind. * AND accuse me of libel (which only a profit motivated "open source" person would do). All point to why I don't much appreciate your behavior and don't think highly of your true motivations. Now, I don't know you personally, you may be a great guy for all I know. But I am basing my *opinion* of your business practices on the above evidence. If there's a misunderstanding in how you behave and act toward me then feel free to talk to me about it off list. Until then, I'd appreciate it if you'd stop naming your projects after mine, stop pimping your projects on *my* mailing list, and stop accusing me of libel when I have supporting evidence of my opinion. You're free to compete with Mongrel, but don't use my project to further your gains. Thanks for your time. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From garbagecat10 at gmail.com Sun Aug 20 19:49:30 2006 From: garbagecat10 at gmail.com (Francis Cianfrocca) Date: Sun, 20 Aug 2006 19:49:30 -0400 Subject: [Mongrel] http parser In-Reply-To: <1156113131.7991.50.camel@localhost.localdomain> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> <1156113131.7991.50.camel@localhost.localdomain> Message-ID: <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> On 8/20/06, Zed Shaw wrote: > > First off, if we're going to throw out legal challenges then lets > compare project names. You have a very nasty habit of picking project > names that are very similar to names of already established or more > famous projects. Let's compare: > > * Ruby/EventMachine -- http://rubyforge.org/projects/eventmachine/ > * Ruby/Event -- http://www.zedshaw.com/projects/ruby_event/ I picked the name for EventMachine before I was aware of yours. I used the word "Ruby" in my title because EM doesn't work only with Ruby, and that was intended to indicate a version that had Ruby bindings. As far as "Event" is concerned, there are plenty of projects with that word in their titles (libevent for one), that have primacy over yours. But no one is trying to make money off this, so where's the issue? * monorail -- http://rubyforge.org/projects/monorail/ > * monorail -- http://www.castleproject.org/index.php/MonoRail > * Which is really similar to "mongrel rails", but let's just say that > wasn't your intention. "Monorail" was picked out of the air by a guy who works for me as we were thinking about a lighter-weight version of Rails. You've evidently researched this project, which is gratifying, but it's not a released project, and anyway has evolved a great deal. It's no longer a lighter Rails, but something else entirely, and not competitive to Rails. As far as competing against Mongrel in this connection, I have to smile at your self-importance, but Mongrel wasn't even on our radar. In regard to the Castle guys, we became aware a couple of weeks ago that they were using "Monorail," and we're still looking into whether we have priority over the name (our first pub was last April, and theirs is a recent name change). If it turns out theirs was published before ours, we'll change ours. Then, you also have a habit of creating these to be similar to existing > ones, pimping them in what seems like an attempt to wipe out the > existing projects: I create a lot of projects, Zed, and I (and the guys who work for me) make up a lot of code names. They can't all be unique gems, especially not for the open source ones where the point isn't to make any money. I spend a lot of time (and money) coming up with well-researched names for my commercial projects. And if you think I have it in mind to wipe out Rails, all I can say is that I have far more realistic goals in life, nor do I think Rails, which benefits a lot of people, deserves to be wiped out. But if you think I have in mind to wipe out Mongrel, then I have to laugh and ask you why you're afraid of me! > > // This processing depends on the fact that the end > // of the data buffer we receive will have a null terminator > // just after the last byte indicated by the length parameter. > > Anyone worth his SECURE salt knows that using \0 buffer termination is > *not* secure. In the first place, Zed, this comment is in code that is NOT in the EventMachine, but in a project based on it. Note the code in EM that creates the buffers that are passed to the code path where the comment you quoted appears. There is specific language in there specifying a guaranteed behavior that all buffers generated by EM for passing to user code will have an extra appended null terminator. > Not to mention this gem of a buffer overflow: > > else if (!strncasecmp (header, "cookie:", 7)) { > const char *s = header + 7; > while (*s && ((*s==' ') || (*s=='\t'))) > s++; > setenv ("HTTP_COOKIE", s, true); > } > > (HINT: A while loop that waits for a \0 terminator is always wrong.) You're reaching, Zed, and it's not impressing me. That while loop stops when it finds a character that isn't blank or tab. Obviously it's also going to stop if it hits the end of the string. It would be far less safe (not to mention wrong) if it didn't. Also notice the (only) call to this (private) method that contains this code path. The line immediately preceding it ensures the null terminator is present. On contributing to your work: you have it pretty well under control, so what help do you need from me? I wrote to you back in April or May to ask if you had an interest in it, and you made it quite clear that you didn't. So I didn't bother to ask the question again. That's no problem for you or for me. But if you think I was "adamant" about you using my work, all I can say to that is that I'm an experienced technology salesman, and I try to convince people by being persuasive, not adamant. Again, you made it clear you weren't interested, so that's the end of that story. As far as you contributing to my work, you pointed out that you had had a problem with your Event library that I hadn't tested for. You also said you hadn't been able to solve it. I solved it, then solved it again in a better way. I acknowledged you for pointing out the problem, which I do with everyone who helps me out, but your point here would be a lot more compelling if you had actually contributed a solution. But again, this is open-source freeware, Zed. We're all supposed to be helping each other, and no one is trying to take food out of anyone's mouth. None of us are involved in this for money. You really need to lighten up. * Imply that your work is more secure than mine (yet without a security > testing policy, unlike Mongrel). > * Use my advice and work to further your own means without contributing > back in kind. You're really giving the game up here, Zed. I've never so much as mentioned Mongrel in any public communication that I'm aware of, much less implied that an unpublished product in a totally different space is more secure than yours. This isn't personal, Zed. The fact that you're making it personal really makes me wonder about you. * AND accuse me of libel (which only a profit motivated "open source" > person would do). I said your statements "border on libel." You stated that my friends and I are somewhat shady in your opinion, and perhaps desperate for cash. Libel is a written statement of disparaging character that is not substantiated by facts, and you haven't provided any. I don't let ANYONE mess with me the way you did. > it if you'd stop naming your projects after mine, stop pimping your > projects on *my* mailing list, I'll name my projects however I wish, but I already do make a practice of not knowingly infringing on other people's marks. I've paid enough money to trademark lawyers over the years to know where the lines are. I have never ONCE written a single thing on your mailing list until this afternoon, and that was in answer to your unwarranted and borderline-libelous comments about me, not to "pimp" anything. Once again, you need to lighten up. You're free to compete with Mongrel, > but don't use my project to further your gains. If I had any interest in competing against Mongrel, believe me, you'd know it. If you think I am getting "gains" from giving away open-source freeware, then you flatter me unduly. If you think I'm stealing from you, you're flattering yourself unduly. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060820/d97c718f/attachment.html From zedshaw at zedshaw.com Sun Aug 20 20:56:14 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 20 Aug 2006 17:56:14 -0700 Subject: [Mongrel] http parser In-Reply-To: <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> <1156113131.7991.50.camel@localhost.localdomain> <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> Message-ID: <1156121774.6076.20.camel@localhost.localdomain> On Sun, 2006-08-20 at 19:49 -0400, Francis Cianfrocca wrote: When you have statements like this: > Libel is a written statement of disparaging character that is not > substantiated by facts, and you haven't provided any. I don't let > ANYONE mess with me the way you did. (You forgot "that causes damages", of which you have none). ...is when I get worried. I'll of course take it personally when you take an off-handed sentence as a reason to make threats like the above. I take threats of lawsuit very seriously. *This* is the reason nobody should trust you. You are a stated "technology salesman" who has threatened a free project developer with a law suit in public for a few sentences in an e-mail. It doesn't get much more predatory than that. Feel free to file your lawsuit with the stated damages from the above e-mail exchange. I'll gladly give you my lawyer's number so you can file the complaint. I'm sure everyone will love you for shutting down a popular open source project. Or, we can end this here with you accepting my apology for saying you're shady (yes, that was wrong), and for you apologizing for threatening me with legal action (twice). Even mentioning "libel" in this world is cause for threat. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From garbagecat10 at gmail.com Sun Aug 20 21:38:27 2006 From: garbagecat10 at gmail.com (Francis Cianfrocca) Date: Sun, 20 Aug 2006 21:38:27 -0400 Subject: [Mongrel] http parser In-Reply-To: <1156121774.6076.20.camel@localhost.localdomain> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> <1156113131.7991.50.camel@localhost.localdomain> <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> <1156121774.6076.20.camel@localhost.localdomain> Message-ID: <3a94cf510608201838h3cdf047nb1e3da7510fc85ae@mail.gmail.com> On 8/20/06, Zed Shaw wrote: > On Sun, 2006-08-20 at 19:49 -0400, Francis Cianfrocca wrote: > > > Libel is a written statement of disparaging character that is not > > substantiated by facts, and you haven't provided any. I don't let > > ANYONE mess with me the way you did. > (You forgot "that causes damages", of which you have none). > > ...is when I get worried. > I didn't threaten you, Zed, not at any point. You made statements not substantiated by facts that are potentially damaging to my reputation, and I take that seriously. You apologized for calling me and my friends shady. Accepted. But what was your basis and your evidence for saying that we are desperate for cash? Especially since neither you nor I make our livings from our freeware Ruby projects! I can't understand your motivations but I think any reasonable person would read your statements, in a forum that you control and in which you are well-respected, as intended to cast doubt on (and thus impair the value of) a project that I have contributed a great deal of time and effort to. If that wasn't your intention, then say so and we're done. This is your list, so you can also tell me to pound sand and not post here again, and I'll respect that too. From zedshaw at zedshaw.com Mon Aug 21 00:36:20 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 20 Aug 2006 21:36:20 -0700 Subject: [Mongrel] http parser In-Reply-To: <3a94cf510608201838h3cdf047nb1e3da7510fc85ae@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> <1156113131.7991.50.camel@localhost.localdomain> <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> <1156121774.6076.20.camel@localhost.localdomain> <3a94cf510608201838h3cdf047nb1e3da7510fc85ae@mail.gmail.com> Message-ID: <1156134980.5788.20.camel@localhost.localdomain> On Sun, 2006-08-20 at 21:38 -0400, Francis Cianfrocca wrote: > On 8/20/06, Zed Shaw wrote: > > On Sun, 2006-08-20 at 19:49 -0400, Francis Cianfrocca wrote: > > > > > Libel is a written statement of disparaging character that is not > > > substantiated by facts, and you haven't provided any. I don't let > > > ANYONE mess with me the way you did. > > (You forgot "that causes damages", of which you have none). > > > > ...is when I get worried. > > > > I didn't threaten you, Zed, not at any point. You made statements not > substantiated by facts that are potentially damaging to my reputation, > and I take that seriously. > Don't even mention the word "libel" again unless you file a suit. You're free to say what you want about me, and anyone I know, but don't threaten me ever again or even imply the threat of lawsuit. Since you refuse to apologize this will be my last e-mail on the topic with you. > If that wasn't your intention, then say so and we're done. This is > your list, so you can also tell me to pound sand and not post here > again, and I'll respect that too. I don't believe in censoring people who have a difference of opinion with me, I feel that everyone has a right to express their opinions in an open forum and censoring you would be wrong. Like I said before, I've got no problem with you since I don't know you, I have a problem with your behavior. That's the difference, I would have handled the same situation by e-mailing you personally and ask you to retract your statements, not attack you in your own backyard. I'd assume that maybe you were having a bad day and give you a chance make amends. I wouldn't go on a Freudian innuendo rampage about your insecurities and toss around empty threats of "libel". Have a good day Francis. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From zedshaw at zedshaw.com Mon Aug 21 08:26:34 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 21 Aug 2006 05:26:34 -0700 Subject: [Mongrel] The Public Appology To Francis Cianfrocca Message-ID: <1156163194.8358.13.camel@localhost.localdomain> Dear Mongrel Users, It appears that Francis still isn't satisfied with my attempts to apologize and he's now asked me privately to retract my statements. So, just to be sure he finally gets it: I retract my statements that Francis and his friends are "shady" and "desperate for cash". He is in no way a shady guy, having dealt with this situation with the utmost of professionalism and courtesy with me. He is also obviously not threatened by any of my work and feels no pressure to compete with me, infect his work into mine, or any of the other statements he so quickly felt slighted by. And again, sincere apologies all around to anyone who's felt he was in the right and I'm a bad guy. I shall use my power to influence people more appropriately with rational technical comparisons from now on. Hopefully, this will put a final end to any misconceptions as to the depth of my remorse for having said that Francis is shady or desperate for cash. My heart felt apologies. Zed From zedshaw at zedshaw.com Mon Aug 21 08:28:30 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 21 Aug 2006 05:28:30 -0700 Subject: [Mongrel] http parser In-Reply-To: <3a94cf510608201838h3cdf047nb1e3da7510fc85ae@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> <1156113131.7991.50.camel@localhost.localdomain> <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> <1156121774.6076.20.camel@localhost.localdomain> <3a94cf510608201838h3cdf047nb1e3da7510fc85ae@mail.gmail.com> Message-ID: <1156163310.8358.15.camel@localhost.localdomain> On Sun, 2006-08-20 at 21:38 -0400, Francis Cianfrocca wrote: > On 8/20/06, Zed Shaw wrote: > > On Sun, 2006-08-20 at 19:49 -0400, Francis Cianfrocca wrote: > > > > > Libel is a written statement of disparaging character that is not > > > substantiated by facts, and you haven't provided any. I don't let > > > ANYONE mess with me the way you did. > > (You forgot "that causes damages", of which you have none). > > > > ...is when I get worried. > > > > I didn't threaten you, Zed, not at any point. You made statements not > substantiated by facts that are potentially damaging to my reputation, > and I take that seriously. > > You apologized for calling me and my friends shady. Accepted. But what > was your basis and your evidence for saying that we are desperate for > cash? Especially since neither you nor I make our livings from our > freeware Ruby projects! I can't understand your motivations but I > think any reasonable person would read your statements, in a forum > that you control and in which you are well-respected, as intended to > cast doubt on (and thus impair the value of) a project that I have > contributed a great deal of time and effort to. > > If that wasn't your intention, then say so and we're done. This is > your list, so you can also tell me to pound sand and not post here > again, and I'll respect that too. Now, will you please leave me alone? I have to get another release of Mongrel out so that Apple can include it in their next release of OSX. Sent to the list just now, so please take it as a full retraction and apology, and again if you're not satisfied then from now on have your lawyer talk to me instead. ----- Dear Mongrel Users, It appears that Francis still isn't satisfied with my attempts to apologize and he's now asked me privately to retract my statements. So, just to be sure he finally gets it: I retract my statements that Francis and his friends are "shady" and "desperate for cash". He is in no way a shady guy, having dealt with this situation with the utmost of professionalism and courtesy with me. He is also obviously not threatened by any of my work and feels no pressure to compete with me, infect his work into mine, or any of the other statements he so quickly felt slighted by. And again, sincere apologies all around to anyone who's felt he was in the right and I'm a bad guy. I shall use my power to influence people more appropriately with rational technical comparisons from now on. Hopefully, this will put a final end to any misconceptions as to the depth of my remorse for having said that Francis is shady or desperate for cash. My heart felt apologies. Zed From garbagecat10 at gmail.com Mon Aug 21 08:58:41 2006 From: garbagecat10 at gmail.com (Francis Cianfrocca) Date: Mon, 21 Aug 2006 08:58:41 -0400 Subject: [Mongrel] The Public Appology To Francis Cianfrocca In-Reply-To: <1156163194.8358.13.camel@localhost.localdomain> References: <1156163194.8358.13.camel@localhost.localdomain> Message-ID: <3a94cf510608210558q40e20f84n165b05733ca9be0@mail.gmail.com> On 8/21/06, Zed Shaw wrote: > Dear Mongrel Users, > > It appears that Francis still isn't satisfied with my attempts to > apologize and he's now asked me privately to retract my statements. > > So, just to be sure he finally gets it: > > I retract my statements that Francis and his friends are "shady" and > "desperate for cash". He is in no way a shady guy, having dealt with > this situation with the utmost of professionalism and courtesy with me. > He is also obviously not threatened by any of my work and feels no > pressure to compete with me, infect his work into mine, or any of the > other statements he so quickly felt slighted by. > > And again, sincere apologies all around to anyone who's felt he was in > the right and I'm a bad guy. I shall use my power to influence people > more appropriately with rational technical comparisons from now on. > > Hopefully, this will put a final end to any misconceptions as to the > depth of my remorse for having said that Francis is shady or desperate > for cash. > > My heart felt apologies. > > Zed > Your statements have had the (perhaps inadvertent) effect of maligning not only myself but also several well-respected members of the Ruby Community who have contributed to the EventMachine project generously and without thought of recompense. Their names are listed on the Rubyforge project page and at various points in the EM source code. On behalf of all those people, I accept your gracious and sincere apology. From drewr at pobox.com Mon Aug 21 12:31:55 2006 From: drewr at pobox.com (Drew Raines) Date: Mon, 21 Aug 2006 11:31:55 -0500 Subject: [Mongrel] Problem with: service mongrel_cluster start References: <57AB69ED-924B-4652-80E8-658EB33D38E2@mac.com> Message-ID: Nathan Donaldson wrote: > Starting all mongrel_clusters... > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21: > command not found: mongrel_rails cluster::start -c sonar_radiant.yml > mongrel_rails cluster::start returned an error. > > I can see what is happening, it is calling mongrel_rails > cluster::start -c config_file_without the directory. No, "command not found" is being reported by the shell that runs mongrel_cluster_ctl from /etc/init.d/mongrel_cluster. You need get mongrel_rails into its PATH. Try something like: ln -s `find /usr/local -type f -name mongrel_rails 2>/dev/null | head -1` /usr/local/bin > It should say: > > mongrel_rails cluster::start -c /etc/mongrel_cluster/sonar_radiant.yml The path to the config file doesn't need to be fully qualified. mongrel_cluster_ctl changes to CONF_DIR before executing the mongrel_railses. -Drew From kraemer at webit.de Mon Aug 21 16:20:26 2006 From: kraemer at webit.de (Jens Kraemer) Date: Mon, 21 Aug 2006 22:20:26 +0200 Subject: [Mongrel] http parser In-Reply-To: <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> <1156113131.7991.50.camel@localhost.localdomain> <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> Message-ID: <20060821202026.GA22036@cordoba.webit.de> Hi, regarding the 'monorail' name: I remember having investigated the castle project 10 months ago or so. I still have this download lying around: 2005-09-27 12:01 downloads/Castle.MonoRail.beta-4.zip so it seems the castle guis claimed that name somewhat earlier... Jens On Sun, Aug 20, 2006 at 07:49:30PM -0400, Francis Cianfrocca wrote: > On 8/20/06, Zed Shaw wrote: [..] > > * monorail -- http://rubyforge.org/projects/monorail/ > >* monorail -- http://www.castleproject.org/index.php/MonoRail > >* Which is really similar to "mongrel rails", but let's just say that > >wasn't your intention. > > "Monorail" was picked out of the air by a guy who works for me as we were > thinking about a lighter-weight version of Rails. [..] > In regard to the > Castle guys, we became aware a couple of weeks ago that they were using > "Monorail," and we're still looking into whether we have priority over the > name (our first pub was last April, and theirs is a recent name change). If > it turns out theirs was published before ours, we'll change ours. [..] -- 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 garbagecat10 at gmail.com Mon Aug 21 16:46:10 2006 From: garbagecat10 at gmail.com (Francis Cianfrocca) Date: Mon, 21 Aug 2006 16:46:10 -0400 Subject: [Mongrel] http parser In-Reply-To: <20060821202026.GA22036@cordoba.webit.de> References: <1f060c4c0608200250l12030574q426e070b64aa6dfa@mail.gmail.com> <1156104507.6252.16.camel@localhost.localdomain> <3a94cf510608201404h2f020bc2rfc70159fc7f8d310@mail.gmail.com> <1156113131.7991.50.camel@localhost.localdomain> <3a94cf510608201649q19cbc55gdd680e59b744fe2c@mail.gmail.com> <20060821202026.GA22036@cordoba.webit.de> Message-ID: <3a94cf510608211346uc112b17l26c83eef2c824b94@mail.gmail.com> On 8/21/06, Jens Kraemer wrote: > Hi, > > regarding the 'monorail' name: I remember having investigated the castle > project 10 months ago or so. I still have this download lying around: > > 2005-09-27 12:01 downloads/Castle.MonoRail.beta-4.zip > > so it seems the castle guis claimed that name somewhat earlier... > > Jens Thanks, Jens, I appreciate you running that down. If that information checks out, we'll change the name of our project. From nick.snels at gmail.com Tue Aug 22 05:58:51 2006 From: nick.snels at gmail.com (Nick Snels) Date: Tue, 22 Aug 2006 11:58:51 +0200 Subject: [Mongrel] Problem getting Mongrel to start at startup Message-ID: <857ffc970608220258k6fd18e57vb5e462f12f2ea919@mail.gmail.com> Hi, I'm running CentOS 4.3 and the latest Mongrel (0.3.13.3) and mongrel_cluster (0.2.0). I have set up a cluster, following the instructions at http://mongrel.rubyforge.org/docs/mongrel_cluster.html . I created a symbolic link in the directory /etc/mongrel_cluster . When I run mongrel_rails cluster::start -c test.yml, the mongrel servers start up. But at boot, the command '/sbin/service mongrel_cluster start' gets run, when I run it I get the error: Starting all mongrel_clusters... /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: command not found: mongrel_rails cluster::start -c test.yml mongrel_rails cluster::start returned an error. I have tried many things, but nothing works. I hope somebody can help me out. Thanks. Kind regards, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060822/37b9a021/attachment-0001.html From nick.snels at gmail.com Tue Aug 22 06:56:00 2006 From: nick.snels at gmail.com (Nick Snels) Date: Tue, 22 Aug 2006 12:56:00 +0200 Subject: [Mongrel] Problem getting Mongrel to start at startup In-Reply-To: <857ffc970608220258k6fd18e57vb5e462f12f2ea919@mail.gmail.com> References: <857ffc970608220258k6fd18e57vb5e462f12f2ea919@mail.gmail.com> Message-ID: <857ffc970608220356i7e95b48cld29372350de90c13@mail.gmail.com> Hi, I found the problem. I had ruby installed from source and it ended up in /usr/local/bin, so I had to create the following extra symbolic links to get it working. ln -s /usr/local/bin/ruby /usr/bin/ruby ln -s /usr/local/bin/mongrel_cluster_ctl /usr/bin/mongrel_cluster_ctl ln -s /usr/local/bin/mongrel_rails /usr/bin/mongrel_rails Kind regards, Nick On 8/22/06, Nick Snels wrote: > > Hi, > > I'm running CentOS 4.3 and the latest Mongrel (0.3.13.3) and > mongrel_cluster (0.2.0). I have set up a cluster, following the > instructions at http://mongrel.rubyforge.org/docs/mongrel_cluster.html . I > created a symbolic link in the directory /etc/mongrel_cluster . When I run > mongrel_rails cluster::start -c test.yml, the mongrel servers start up. > But at boot, the command '/sbin/service mongrel_cluster start' gets run, > when I run it I get the error: > > Starting all mongrel_clusters... > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: command > not found: mongrel_rails cluster::start -c test.yml > mongrel_rails cluster::start returned an error. > > I have tried many things, but nothing works. I hope somebody can help me > out. Thanks. > > Kind regards, > > Nick > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060822/9910c456/attachment.html From jay.turpin at gmail.com Tue Aug 22 09:05:02 2006 From: jay.turpin at gmail.com (Jay Turpin) Date: Tue, 22 Aug 2006 06:05:02 -0700 Subject: [Mongrel] Mongrel and Service behave differently Message-ID: <4eda9d210608220605k37d89abcid4a2fcdd15a7e49b@mail.gmail.com> I have a rails application running under the latest version of Mogrel Win32. Seems to run just fine. However, when I attempt to run it under the Win32 Mongrel service, it appears to hand after hitting certain controller actions. I'm sure there is a bug in my code that's causing this - but I just am not sure what it is yet. Is there anything about the mongrel-service that would cause an application to behave differently? Besides the -B option to turn on debugging, are there any other tricks for me to get visibility to what is going on underneath the covers? If I can't track down this issue, is there any to using mongrel_rails from a scheduler instead of the service? Thanks! -- -- Jay Turpin "One test is worth a thousand expert opinions." - Bill Nye (The Science Guy) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060822/8be429b2/attachment.html From hax at cheaphacks.info Tue Aug 22 11:47:30 2006 From: hax at cheaphacks.info (hax) Date: Tue, 22 Aug 2006 11:47:30 -0400 Subject: [Mongrel] Multiple mongrels for one app Message-ID: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> Hi mongrel-users, This is my first post, so I'm not sure if it's been asked before, but I can't find an answer anywhere. If I have one rails application running, one processor I'm running it on, and mongrel is multi-threaded, why should I have more than one mongrel running? Everyone seems to agree on 3-5 mongrels per rails app, but why? I must be missing something, sorry if it's obvious. TIA --hax From jarkko at jlaine.net Tue Aug 22 12:01:39 2006 From: jarkko at jlaine.net (Jarkko Laine) Date: Tue, 22 Aug 2006 19:01:39 +0300 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> Message-ID: <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> On 22.8.2006, at 18.47, hax wrote: > Hi mongrel-users, > > This is my first post, so I'm not sure if it's been asked before, but > I can't find an answer anywhere. > > If I have one rails application running, one processor I'm running it > on, and mongrel is multi-threaded, why should I have more than one > mongrel running? > > Everyone seems to agree on 3-5 mongrels per rails app, but why? Rails is not threadsafe. http://rubyforge.org/pipermail/mongrel-users/2006-August/000930.html //jarkko -- Jarkko Laine http://jlaine.net http://odesign.fi From mongrel at philip.pjkh.com Tue Aug 22 12:31:21 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Tue, 22 Aug 2006 11:31:21 -0500 (CDT) Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> Message-ID: <20060822112934.H19989@bravo.pjkh.com> > This is my first post, so I'm not sure if it's been asked before, but > I can't find an answer anywhere. > > If I have one rails application running, one processor I'm running it > on, and mongrel is multi-threaded, why should I have more than one > mongrel running? > > Everyone seems to agree on 3-5 mongrels per rails app, but why? Performance... somewhere Zed has an article on how to benchmark things.. something along the lines of benchmark a blank static html page. That's as fast as your server will go. Then create a simple action that renders "Hello" as text say, with one mongrel. Benchmark that. Keep increasing the number of mongrels until you don't get any more performance improvements. For us, it was 4. -philip From defeated2k4 at gmail.com Tue Aug 22 14:05:58 2006 From: defeated2k4 at gmail.com (Ed C.) Date: Tue, 22 Aug 2006 14:05:58 -0400 Subject: [Mongrel] IIS and response timeout In-Reply-To: <4eda9d210608190718y207f3be8o70e00bbf41293eff@mail.gmail.com> References: <4eda9d210608190718y207f3be8o70e00bbf41293eff@mail.gmail.com> Message-ID: <736593a0608221105o43787c58u270f0d28860560cf@mail.gmail.com> Are you using SQL Server? I think the connection times-out after 30s, so you're probably seeing a SQL Timeout error. On 8/19/06, Jay Turpin wrote: > I apologize if this has been covered before, I checked the archives and > didn't see anything over the last few months. > > I am running IIS6 with IsapiRewriter and a single mongrel service for each > Rails application. One of my apps does a long query to the database to > produce a CSV file. After the request has gone beyond 30 seconds, the user > get a 500 Internal Server Error. > > I've looked around for ways to adjust the response timeout, either in IIS or > mongrel, but haven't found anything yet. Any ideas? > > -- > -- Jay Turpin > "One test is worth a thousand expert opinions." - Bill Nye (The Science Guy) > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From hax at cheaphacks.info Tue Aug 22 15:11:16 2006 From: hax at cheaphacks.info (hax) Date: Tue, 22 Aug 2006 15:11:16 -0400 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> Message-ID: > Rails is not threadsafe. > > http://rubyforge.org/pipermail/mongrel-users/2006-August/000930.html > > //jarkko So what happens when the mongrel gets more than one request at a time? When I run httpref against it, the mongrel process can serve up large number of rails pages before it gets bogged down. And when it does break, it says "mongrel timed out this thread: too many open files". So it must be doing some threading, even if rails isn't threadsafe. If it was 1 request per mongrel process, 1 process shouldn't be able to serve up very many per second. httpref tells me its prettty fast though. Thoughts? --hax From snacktime at gmail.com Tue Aug 22 15:29:38 2006 From: snacktime at gmail.com (snacktime) Date: Tue, 22 Aug 2006 12:29:38 -0700 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> Message-ID: <1f060c4c0608221229k4dd30da8ka0f0853a696cf227@mail.gmail.com> > So what happens when the mongrel gets more than one request at a time? > When I run httpref against it, the mongrel process can serve up large > number of rails pages before it gets bogged down. > And when it does break, it says "mongrel timed out this thread: too > many open files". So it must be doing some threading, even if rails > isn't threadsafe. > If it was 1 request per mongrel process, 1 process shouldn't be able > to serve up very many per second. httpref tells me its prettty fast > though. > > Thoughts? It will accept multiple connections but it will only feed one connection at a time through the rails handler, because as others have stated rails is not thread safe. From wyhaines at gmail.com Tue Aug 22 15:30:22 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Tue, 22 Aug 2006 13:30:22 -0600 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> Message-ID: On 8/22/06, hax wrote: > So what happens when the mongrel gets more than one request at a time? > When I run httpref against it, the mongrel process can serve up large > number of rails pages before it gets bogged down. > And when it does break, it says "mongrel timed out this thread: too > many open files". So it must be doing some threading, even if rails > isn't threadsafe. > If it was 1 request per mongrel process, 1 process shouldn't be able > to serve up very many per second. httpref tells me its prettty fast > though. Take a look at the Rails handler. It's pretty easy code to read. There is a guard mutex that makes sure that the Rails handler only processes a single request through Rails at a time. So, Mongrel receives your requests and Mongrel multithreads them, but the Rails handler only eats them one at a time. If Rails could safely multithread, then the guard mutex and it's synchronization (which you can turn off already if you really want to) wouldn't be required, and overall performance on a single Mongrel, for Rails, should be better. Kirk Haines From mongrel at philip.pjkh.com Tue Aug 22 15:37:33 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Tue, 22 Aug 2006 14:37:33 -0500 (CDT) Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> Message-ID: <20060822143616.I24460@bravo.pjkh.com> >> >> http://rubyforge.org/pipermail/mongrel-users/2006-August/000930.html >> >> //jarkko > > So what happens when the mongrel gets more than one request at a time? > When I run httpref against it, the mongrel process can serve up large > number of rails pages before it gets bogged down. > And when it does break, it says "mongrel timed out this thread: too > many open files". So it must be doing some threading, even if rails > isn't threadsafe. > If it was 1 request per mongrel process, 1 process shouldn't be able > to serve up very many per second. httpref tells me its prettty fast > though. Search the lists... I don't remember the exact details but basically mongrel is threaded... right up till it hands the request off to rails, then it locks, does the rails request, gets the response, and goes back into threaded mode. So technically you can't process more than 1 rails request at a time, but since many requests are way under a second you get the appearance that you can. Or something like that :) From eule at space.ch Tue Aug 22 16:00:35 2006 From: eule at space.ch (Kaspar Schiess) Date: Tue, 22 Aug 2006 22:00:35 +0200 Subject: [Mongrel] Mongrel crashes - bad doggie Message-ID: Hello List, I have a production machine with very low ram (Xen Virtual Server) that runs mysql and lighty->pound->mongrel (2 instances). About once a day, one of the mongrels just locks up, leaving that in its log files: *** glibc detected *** /usr/bin/ruby: free(): invalid next size (fast): 0x0a744780 *** That process (mongrel) will stay locked, not answer any connections anymore and just generally behave bad; for instance kill -s SIGKILL PID will give me a 'Permission denied', even though I am impersonating root. The only real solution I have had is to reboot the server, which is obviously very bad. Has this behavior been observed before? If not, what can I do to help tracking down this bug? Is it even a mongrel bug? I mean it could be that mongrel gets back at me because I feed it not enough RAM. But even so, It should remain sigkillable, should it not? Thank you, kaspar ruby 1.8.4 (2005-12-24) [i386-linux] mongrel (0.3.13.3) Rails 1.1.6 From eule at space.ch Tue Aug 22 16:04:54 2006 From: eule at space.ch (Kaspar Schiess) Date: Tue, 22 Aug 2006 22:04:54 +0200 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> Message-ID: Hi I'll have a shot ;) > If I have one rails application running, one processor I'm running it > on, and mongrel is multi-threaded, why should I have more than one > mongrel running? Mongrel might be internally multi threaded, but it only serves one request at any given moment. So all your web users will have to be serialized through this rather small .. tube. By setting up load balancing via pound to a few mongrels, you can take better advantage of your CPU, running things in parallel. Large-scale rails applications are deployed this way, mostly on more than one machine even to distribute the load across many CPU's and disks. Hope that explains... kaspar neotrivium.com - the swiss ruby shop From zedshaw at zedshaw.com Tue Aug 22 18:13:39 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 22 Aug 2006 15:13:39 -0700 Subject: [Mongrel] Mongrel and Service behave differently In-Reply-To: <4eda9d210608220605k37d89abcid4a2fcdd15a7e49b@mail.gmail.com> References: <4eda9d210608220605k37d89abcid4a2fcdd15a7e49b@mail.gmail.com> Message-ID: <1156284819.6038.4.camel@localhost.localdomain> On Tue, 2006-08-22 at 06:05 -0700, Jay Turpin wrote: > I have a rails application running under the latest version of Mogrel > Win32. Seems to run just fine. However, when I attempt to run it under > the Win32 Mongrel service, it appears to hand after hitting certain > controller actions. I'm sure there is a bug in my code that's causing > this - but I just am not sure what it is yet. > > Is there anything about the mongrel-service that would cause an > application to behave differently? Besides the -B option to turn on > debugging, are there any other tricks for me to get visibility to what > is going on underneath the covers? > > If I can't track down this issue, is there any to using mongrel_rails > from a scheduler instead of the service? Hey Jay, Yeah actually the win32-service stuff has a few bugs that Dan Berger has fixed. I'll be cooking up a new gem for him soon and hopefully working with him to get all his stuff "gemified". Until then, can you look for exception reports in your logs and send them to me (off-list). Thanks. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Tue Aug 22 18:15:00 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 22 Aug 2006 15:15:00 -0700 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: <20060822112934.H19989@bravo.pjkh.com> References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> <20060822112934.H19989@bravo.pjkh.com> Message-ID: <1156284900.6038.6.camel@localhost.localdomain> On Tue, 2006-08-22 at 11:31 -0500, Philip Hallstrom wrote: > > This is my first post, so I'm not sure if it's been asked before, but > > I can't find an answer anywhere. > > > > If I have one rails application running, one processor I'm running it > > on, and mongrel is multi-threaded, why should I have more than one > > mongrel running? > > > > Everyone seems to agree on 3-5 mongrels per rails app, but why? > > Performance... somewhere Zed has an article on how to benchmark things.. > something along the lines of benchmark a blank static html page. That's > as fast as your server will go. Then create a simple action that renders > "Hello" as text say, with one mongrel. Benchmark that. Keep increasing > the number of mongrels until you don't get any more performance > improvements. > > For us, it was 4. Wow, someone listened. Nice job Philip. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Tue Aug 22 18:21:16 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 22 Aug 2006 15:21:16 -0700 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> Message-ID: <1156285276.6038.12.camel@localhost.localdomain> On Tue, 2006-08-22 at 11:47 -0400, hax wrote: > Hi mongrel-users, > > This is my first post, so I'm not sure if it's been asked before, but > I can't find an answer anywhere. > > If I have one rails application running, one processor I'm running it > on, and mongrel is multi-threaded, why should I have more than one > mongrel running? > > Everyone seems to agree on 3-5 mongrels per rails app, but why? > > I must be missing something, sorry if it's obvious. You've got three things you're dealing with when you do this: 1) Ruby uses a select() function to make it seem like it has threads. This is called "green threads" in the Java world. When you put about 2-4 mongrels per CPU on your machine, you get a slightly better utilization. 2) Rails isn't thread safe (as lots of people have said) so requests come in to mongrel, get threaded up, and then queued behind Rails. Once Rails is done then threads send the response out. If you have a small site and most of your rails actions are quick then don't worry about it. If you need more concurrency then you have to use more processes. 3) Because ruby uses select() it has a OS kernel level limit for the number of files it can handle. Usually that's 1024 but it can be 256 on some systems. If you have one mongrel process then you'll really quickly run out of these when serving files, doing fragment/action caching, etc. You have to add more processes to be able to handle more open files concurrently. That's the why. If you're site is small then just do one. It's easier. Then slowly expand it out and get more "hardcore" as you need it. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Tue Aug 22 18:26:03 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 22 Aug 2006 15:26:03 -0700 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> Message-ID: <1156285563.6038.18.camel@localhost.localdomain> On Tue, 2006-08-22 at 15:11 -0400, hax wrote: > > Rails is not threadsafe. > > > > http://rubyforge.org/pipermail/mongrel-users/2006-August/000930.html > > > > //jarkko > > So what happens when the mongrel gets more than one request at a time? > When I run httpref against it, the mongrel process can serve up large > number of rails pages before it gets bogged down. > And when it does break, it says "mongrel timed out this thread: too > many open files". So it must be doing some threading, even if rails > isn't threadsafe. > If it was 1 request per mongrel process, 1 process shouldn't be able > to serve up very many per second. httpref tells me its prettty fast > though. You actually can find out for yourself right now. I have the latest pre-release up with a new debugging feature just for folks like you. First, install the pre-release like this: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Then run your application in production mode like normal. Right after it starts up, do this: killall -USR1 mongrel_rails Go look at the log/mongrel.log and you'll see that it says it set $mongrel_debug_client to true. The USR1 signal toggles this "client debugging" true/false. When it's true Mongrel will print out log messages that help you debug client interactions: * BAD CLIENT is only logged now when USR1 is on. * Full request data is printed out when there's an HTTP parsing error so you can see what the problem is. * It will print the number of threads waiting for rails on 10 second intervals. * It prints stack traces for exceptions found (I'm expanding this more). It's also very light, so you could enable it all the time if you want. Now, what you want to do is hit your app with httperf like this: httperf --server 127.0.0.1 --port 3000 --uri /some/rails/uri --num-conns 1000 --rate 100 And then watch your mongrel.log print out the request counts as they pile up behind rails and then move out. Play with num-conns and rate until you can choke mongrel, find the sweet spot, etc. Have fun and let me know if you find bugs. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Tue Aug 22 18:39:09 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 22 Aug 2006 15:39:09 -0700 Subject: [Mongrel] Mongrel crashes - bad doggie In-Reply-To: References: Message-ID: <1156286349.6038.23.camel@localhost.localdomain> On Tue, 2006-08-22 at 22:00 +0200, Kaspar Schiess wrote: > Hello List, > > I have a production machine with very low ram (Xen Virtual Server) that > runs mysql and lighty->pound->mongrel (2 instances). About once a day, > one of the mongrels just locks up, leaving that in its log files: > > *** glibc detected *** /usr/bin/ruby: free(): invalid next size (fast): > 0x0a744780 *** That's super deep in the ruby interpreter. My thinking is that you've just run out of ram and this is what happens to ruby when a malloc fails. Try out the latest pre-release to see if you still have the lock-ups: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ But the ram problem is only solved by adding more ram or swap. http://www.netadmintools.com/art1.html -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Tue Aug 22 20:09:52 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Tue, 22 Aug 2006 17:09:52 -0700 Subject: [Mongrel] Recommendation: Install The Real MySQL Driver Message-ID: <1156291792.7885.4.camel@localhost.localdomain> Hi Folks, I've been receiving lots of reports of the following problems: 1) Huge pauses. 2) Slow response on heavy queries. 3) Lost MySQL connections. 4) General database failures. What I've been able to confirm is that this is almost always caused by people using the default mysql.rb that comes with rails in their production setups. ****** Please, if you run your Rails application in production then install the compiled mysql gem for your platform: gem install mysql And make sure you always have the latest. A lot of these problems turn out because of differences in the protocol of more recent mysql and the mysql.rb implementation in Rails. Mongrel is just making them worse because it's able to stress the driver more (at least I think so). Thanks a bunch. And please stop by the Lingr room if you have potential bug reports (link in my signature). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jay.turpin at gmail.com Wed Aug 23 00:31:41 2006 From: jay.turpin at gmail.com (Jay Turpin) Date: Tue, 22 Aug 2006 21:31:41 -0700 Subject: [Mongrel] IIS and response timeout In-Reply-To: <736593a0608221105o43787c58u270f0d28860560cf@mail.gmail.com> References: <4eda9d210608190718y207f3be8o70e00bbf41293eff@mail.gmail.com> <736593a0608221105o43787c58u270f0d28860560cf@mail.gmail.com> Message-ID: <4eda9d210608222131w3fc83c5dw55cbf0236a5cd943@mail.gmail.com> I think the timeouts were occurring becasue of a combination of IsapiRewriter being configured incorrectly and security settings on the files prompting users for login/passwords. Once I got both of those things straighted out, everything is working great! Thanks for the advice! -- -- Jay Turpin "One test is worth a thousand expert opinions." - Bill Nye (The Science Guy) On 8/22/06, Ed C. wrote: > > Are you using SQL Server? I think the connection times-out after 30s, > so you're probably seeing a SQL Timeout error. > > On 8/19/06, Jay Turpin wrote: > > I apologize if this has been covered before, I checked the archives and > > didn't see anything over the last few months. > > > > I am running IIS6 with IsapiRewriter and a single mongrel service for > each > > Rails application. One of my apps does a long query to the database to > > produce a CSV file. After the request has gone beyond 30 seconds, the > user > > get a 500 Internal Server Error. > > > > I've looked around for ways to adjust the response timeout, either in > IIS or > > mongrel, but haven't found anything yet. Any ideas? > > > > -- > > -- Jay Turpin > > "One test is worth a thousand expert opinions." - Bill Nye (The Science > Guy) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060822/6c636624/attachment.html From eule at space.ch Wed Aug 23 03:00:34 2006 From: eule at space.ch (Kaspar Schiess) Date: Wed, 23 Aug 2006 09:00:34 +0200 Subject: [Mongrel] Mongrel crashes - bad doggie In-Reply-To: <1156286349.6038.23.camel@localhost.localdomain> References: <1156286349.6038.23.camel@localhost.localdomain> Message-ID: Hi Zed, Thanks for the quick answer. > That's super deep in the ruby interpreter. My thinking is that you've > just run out of ram and this is what happens to ruby when a malloc > fails. > > Try out the latest pre-release to see if you still have the lock-ups: > > sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ I am now running the prerelease. I will keep you posted on what I find or not. Since this is a pretty hard to trace bug/problem (except that we both suspect its because of low ram), I can't promise any results. > But the ram problem is only solved by adding more ram or swap. > > http://www.netadmintools.com/art1.html I have enough swap, but it seems that I can't ever use all of it, since the ram is very scarce (128mb). kaspar neotrivium.com - the swiss ruby shop From david at splinter.com Wed Aug 23 04:21:39 2006 From: david at splinter.com (David Benjamin) Date: Wed, 23 Aug 2006 18:21:39 +1000 Subject: [Mongrel] Mongrel and Service behave differently In-Reply-To: <1156284819.6038.4.camel@localhost.localdomain> References: <4eda9d210608220605k37d89abcid4a2fcdd15a7e49b@mail.gmail.com> <1156284819.6038.4.camel@localhost.localdomain> Message-ID: <44EC1013.5040101@splinter.com> Zed Shaw wrote: > On Tue, 2006-08-22 at 06:05 -0700, Jay Turpin wrote: > >> I have a rails application running under the latest version of Mogrel >> Win32. Seems to run just fine. However, when I attempt to run it under >> the Win32 Mongrel service, it appears to hand after hitting certain >> controller actions. I'm sure there is a bug in my code that's causing >> this - but I just am not sure what it is yet. >> >> Is there anything about the mongrel-service that would cause an >> application to behave differently? Besides the -B option to turn on >> debugging, are there any other tricks for me to get visibility to what >> is going on underneath the covers? >> >> If I can't track down this issue, is there any to using mongrel_rails >> from a scheduler instead of the service? >> > > Hey Jay, > > Yeah actually the win32-service stuff has a few bugs that Dan Berger has > fixed. I'll be cooking up a new gem for him soon and hopefully working > with him to get all his stuff "gemified". > > Until then, can you look for exception reports in your logs and send > them to me (off-list). Thanks. > > > Hi Jay, We also had difficulties with opaque "Application Error" screens on some of our controller actions and not others when running as a service. The only hammer I have to hit this screen is permission problems, so we edited the service "Properties -> Log On -> Log on as: " property to be a different, slightly more powerful, but not too powerful, account. This may only help you if your app is accessing files and other windows resources. Sorry to not be more specific, we're not exactly sure whats aggravating using the default service settings either. You're question was a good one. The win32 support is much appreciated, thanks a lot Luis Lavena! Dave From tperrett at butlerandtanner.com Wed Aug 23 05:07:42 2006 From: tperrett at butlerandtanner.com (Tim Perrett) Date: Wed, 23 Aug 2006 10:07:42 +0100 Subject: [Mongrel] Optimal Configuration Message-ID: Hey all First off, ive just switched to using mongrel_cluster and pound - its working a treat! Its far far faster than fast-cgi: operations that took a few seconds on fcgi now are almost instant with mongrel. Excellent! However, I've been trying to decide how best to utilise my equipment most effectively. I have a dual pro 3Ghz Xenon with 2GB RAM, and the server will be running a few different applications - some rails, some php. Seeing as I was using lighty before I switched im keeping my PHP on lighty and proxying through pound but my rails apps are now on mongrel, but how many instances would deliver the best performance on what im running? I wasn't sure if mongrel got busy would it hog a lot of ram or something like that. What would people suggest from there own experiences? Cheers Tim Perrett ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ From zedshaw at zedshaw.com Wed Aug 23 05:41:19 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 23 Aug 2006 02:41:19 -0700 Subject: [Mongrel] Optimal Configuration In-Reply-To: References: Message-ID: <1156326079.6061.7.camel@localhost.localdomain> On Wed, 2006-08-23 at 10:07 +0100, Tim Perrett wrote: > Hey all > > First off, ive just switched to using mongrel_cluster and pound - its > working a treat! Its far far faster than fast-cgi: operations that took a > few seconds on fcgi now are almost instant with mongrel. Excellent! > > However, I've been trying to decide how best to utilise my equipment most > effectively. I have a dual pro 3Ghz Xenon with 2GB RAM, and the server will > be running a few different applications - some rails, some php. Seeing as I > was using lighty before I switched im keeping my PHP on lighty and proxying > through pound but my rails apps are now on mongrel, but how many instances > would deliver the best performance on what im running? I wasn't sure if > mongrel got busy would it hog a lot of ram or something like that. The best way to find your "utilization sweet spot" is to do something like the following: 1) Write a simple rails app with a test controller that just returns the word "test" with render text. This is the fastest little rails action you could have, so make sure your configuration is tight an this is the fastest. Do this with just one mongrel and measure it using ab or httperf. 2) Once you have a single mongrel running well, proceed to add mongrels and retest (make sure you increase the concurrency too) until adding mongrels doesn't improve performance of this fastest action. 3) This is probably your sweet spot, now just run these tests on the various actions you have in your real app and see how everything works for ram and cpu usage. After that you'll have to get into different configs, tuning your OS, etc. but at least you'll have found a good start. Also, retest this same scenario when new versions of rails come out or you deploy a new version of your app. Every time the conditions of your last test change you need to re-run them. It's just like unit testing, you gotta keep doing it or it's pointless. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From hax at cheaphacks.info Wed Aug 23 08:29:37 2006 From: hax at cheaphacks.info (hax) Date: Wed, 23 Aug 2006 08:29:37 -0400 Subject: [Mongrel] Multiple mongrels for one app In-Reply-To: <1156285563.6038.18.camel@localhost.localdomain> References: <6E290A95-7FD9-4251-9495-18986FF39F79@cheaphacks.info> <724A8D0F-91A4-4D83-A391-FD82DA5C26BD@jlaine.net> <1156285563.6038.18.camel@localhost.localdomain> Message-ID: <75784264-B078-46C0-836D-ECA987EBA43B@cheaphacks.info> > > You actually can find out for yourself right now. I have the latest > pre-release up with a new debugging feature just for folks like you. > > First, install the pre-release like this: > > sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ > > Then run your application in production mode like normal. Right after > it starts up, do this: > > killall -USR1 mongrel_rails > > Go look at the log/mongrel.log and you'll see that it says it set > $mongrel_debug_client to true. The USR1 signal toggles this "client > debugging" true/false. When it's true Mongrel will print out log > messages that help you debug client interactions: > > * BAD CLIENT is only logged now when USR1 is on. > * Full request data is printed out when there's an HTTP parsing > error so > you can see what the problem is. > * It will print the number of threads waiting for rails on 10 second > intervals. > * It prints stack traces for exceptions found (I'm expanding this > more). > > It's also very light, so you could enable it all the time if you want. > > Now, what you want to do is hit your app with httperf like this: > > httperf --server 127.0.0.1 --port 3000 --uri /some/rails/uri --num- > conns > 1000 --rate 100 > > And then watch your mongrel.log print out the request counts as they > pile up behind rails and then move out. Play with num-conns and rate > until you can choke mongrel, find the sweet spot, etc. > > Have fun and let me know if you find bugs. Wow, amazing responses, that answers every question I could have possibly had plus more :) Thanks everyone! Also, Zed, you rock :) --hax From mongrel at philip.pjkh.com Wed Aug 23 12:42:16 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Wed, 23 Aug 2006 11:42:16 -0500 (CDT) Subject: [Mongrel] Optimal Configuration In-Reply-To: References: Message-ID: <20060823114207.H65656@bravo.pjkh.com> > First off, ive just switched to using mongrel_cluster and pound - its > working a treat! Its far far faster than fast-cgi: operations that took a > few seconds on fcgi now are almost instant with mongrel. Excellent! > > However, I've been trying to decide how best to utilise my equipment most > effectively. I have a dual pro 3Ghz Xenon with 2GB RAM, and the server will > be running a few different applications - some rails, some php. Seeing as I > was using lighty before I switched im keeping my PHP on lighty and proxying > through pound but my rails apps are now on mongrel, but how many instances > would deliver the best performance on what im running? I wasn't sure if > mongrel got busy would it hog a lot of ram or something like that. > > What would people suggest from there own experiences? http://rubyforge.org/pipermail/mongrel-users/2006-May/000200.html From imtall at gmail.com Wed Aug 23 14:47:09 2006 From: imtall at gmail.com (John Butler) Date: Wed, 23 Aug 2006 11:47:09 -0700 Subject: [Mongrel] Excessive CLOSE_WAIT sockets, pound Message-ID: <4808ec820608231147l79404b05waef9b05f1c372e5e@mail.gmail.com> Hello, I'm experiencing a strange, but very bad behavior with Mongrel 0.3.13.4 and Pound 1.8. Every 6 hours or so one of our nine (not consistent on which one) application servers ( each one running several mongrel processes ) will start leaving lots of socket connections with pound open. This leads to "Too many open files" errors. I've set pound to close connections after 60 seconds ( after doing analysis of our Rails logs and finding that all requests end under 60 seconds, and only 0.12% take over 1 second ). Pound closes these, but mongrel apparently isn't getting the message and I end up with rapidly increasing socket connections on the app server all left in CLOSE_WAIT state ( which is when the remote end, pound, closes the connection, and the OS is waiting for the app, mongrel, to close it on its end ). Before setting Pound to kill these, one app server could effectively take out our web server, because of "Too many open files". The plagued app server still responds, and has low load, CPU usage, and memory usage. I can even access the mongrels on their individual ports. Nothing ( I could see ) shows up in the mongrel log and the Rails logs all show it completing requests in a very timely manner. Therefore I don't think its a code issue or resource issue. But it's very odd and disturbing. One other person ( http://poocs.net/articles/2006/03/27/the-adventures-of-scaling-stage-3 ) had a similar problem with lighttpd and FastCGI, so I'm not sure if the problem is Mongrel or maybe just Ruby. That person just set up something to restart the plagued FastCGI processes, and that's what I'm doing for Mongrel right now. Has anyone else had this problem? Is there something I can do to fix it? Thanks for any insight. Thanks so much! -John Butler From zedshaw at zedshaw.com Wed Aug 23 16:59:47 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 23 Aug 2006 13:59:47 -0700 Subject: [Mongrel] Excessive CLOSE_WAIT sockets, pound In-Reply-To: <4808ec820608231147l79404b05waef9b05f1c372e5e@mail.gmail.com> References: <4808ec820608231147l79404b05waef9b05f1c372e5e@mail.gmail.com> Message-ID: <1156366787.6144.2.camel@localhost.localdomain> On Wed, 2006-08-23 at 11:47 -0700, John Butler wrote: > Hello, > > I'm experiencing a strange, but very bad behavior with Mongrel > 0.3.13.4 and Pound 1.8. Every 6 hours or so one of our nine (not > consistent on which one) application servers ( each one running > several mongrel processes ) will start leaving lots of socket > connections with pound open. This leads to "Too many open files" > errors. I've set pound to close connections after 60 seconds ( after > doing analysis of our Rails logs and finding that all requests end > under 60 seconds, and only 0.12% take over 1 second ). Pound closes > these, but mongrel apparently isn't getting the message and I end up > with rapidly increasing socket connections on the app server all left > in CLOSE_WAIT state ( which is when the remote end, pound, closes the > connection, and the OS is waiting for the app, mongrel, to close it on > its end ). Before setting Pound to kill these, one app server could > effectively take out our web server, because of "Too many open files". > The plagued app server still responds, and has low load, CPU usage, > and memory usage. I can even access the mongrels on their individual > ports. Nothing ( I could see ) shows up in the mongrel log and the > Rails logs all show it completing requests in a very timely manner. > Therefore I don't think its a code issue or resource issue. But it's > very odd and disturbing. Hey Jon, is it possible for you to come trouble shoot this with me in the unofficial mongrel support room: http://www.lingr.com/room/3yXhqKbfPy8 It'll be easier for me to have you run through some tests that way. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From hax at cheaphacks.info Thu Aug 24 01:36:18 2006 From: hax at cheaphacks.info (hax) Date: Thu, 24 Aug 2006 01:36:18 -0400 Subject: [Mongrel] apache2.2 mod_proxy, mongrel, and my poor rails code Message-ID: <667FC3F2-ABA5-4151-8DE3-6C0A1CF74BBA@cheaphacks.info> Hi mongrel-users, Just a heads up for apache2.2 mod_proxy + mongrel + rails users: If you have a line like this in your source (because you've done a poor job maintaining your code and reading the API docs): render 'foo', :layout => 'bar' You might expect it to do what it says... but it actually sets deprecated_status and ends up setting "Status: layoutbar" as a header. This wouldn't be a problem other than an RFC violation, if Apache didn't pick up on it and deliver anything with an invalid Status header as text/plain (as it should). But it does it without warning (as it shouldn't), which I've told the #apache people about, and they say they'll patch in a debug message or something. But for reference, If your symptoms are: - Mongrel == works - Mongrel + Apache mod_proxy == fails - Webrick + Apache mod_proxy == works - Mongrel + Pen == works Then check your status headers, as I could see this becoming a common mistake as more users do the switch to this configuration. I hope it's okay for me to post something I consider 'informational' here, but it had me stumped for hours, and I figure others should know about it. Hope thats helpful, --hax From jb at rightcart.com Thu Aug 24 02:55:58 2006 From: jb at rightcart.com (Jeff Behl) Date: Wed, 23 Aug 2006 23:55:58 -0700 Subject: [Mongrel] Excessive CLOSE_WAIT sockets, pound In-Reply-To: <1156366787.6144.2.camel@localhost.localdomain> References: <4808ec820608231147l79404b05waef9b05f1c372e5e@mail.gmail.com> <1156366787.6144.2.camel@localhost.localdomain> Message-ID: we're running 0.3.13 and had this pop up just the other day. we're running 4 instances for our app behind apache/mod_proxy_balancer and this is the first time it has happened (we've been running for a month or two). the app was not under heavy load at the time ( < 10 req/s). Linux XXX 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux Apache/2.2.0 mongrel (0.3.13) rails (1.1.6) ruby 1.8.4 (2005-12-24) [x86_64-linux] jeff On 8/23/06, Zed Shaw wrote: > > On Wed, 2006-08-23 at 11:47 -0700, John Butler wrote: > > Hello, > > > > I'm experiencing a strange, but very bad behavior with Mongrel > > 0.3.13.4 and Pound 1.8. Every 6 hours or so one of our nine (not > > consistent on which one) application servers ( each one running > > several mongrel processes ) will start leaving lots of socket > > connections with pound open. This leads to "Too many open files" > > errors. I've set pound to close connections after 60 seconds ( after > > doing analysis of our Rails logs and finding that all requests end > > under 60 seconds, and only 0.12% take over 1 second ). Pound closes > > these, but mongrel apparently isn't getting the message and I end up > > with rapidly increasing socket connections on the app server all left > > in CLOSE_WAIT state ( which is when the remote end, pound, closes the > > connection, and the OS is waiting for the app, mongrel, to close it on > > its end ). Before setting Pound to kill these, one app server could > > effectively take out our web server, because of "Too many open files". > > The plagued app server still responds, and has low load, CPU usage, > > and memory usage. I can even access the mongrels on their individual > > ports. Nothing ( I could see ) shows up in the mongrel log and the > > Rails logs all show it completing requests in a very timely manner. > > Therefore I don't think its a code issue or resource issue. But it's > > very odd and disturbing. > > Hey Jon, is it possible for you to come trouble shoot this with me in > the unofficial mongrel support room: > > http://www.lingr.com/room/3yXhqKbfPy8 > > It'll be easier for me to have you run through some tests that way. > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > 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/20060823/0c4445bd/attachment-0001.html From eule at space.ch Thu Aug 24 03:19:46 2006 From: eule at space.ch (Kaspar Schiess) Date: Thu, 24 Aug 2006 09:19:46 +0200 Subject: [Mongrel] Mongrel crashes - bad doggie In-Reply-To: <1156286349.6038.23.camel@localhost.localdomain> References: <1156286349.6038.23.camel@localhost.localdomain> Message-ID: > Try out the latest pre-release to see if you still have the lock-ups: > > sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ Now I get /usr/lib/ruby/1.8/erb.rb:781: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i386-linux] That might mean that I'm onto something that has some connection to mongrel ;) kaspar From sbrittain at kalivo.com Thu Aug 24 11:13:41 2006 From: sbrittain at kalivo.com (Scott R Brittain) Date: Thu, 24 Aug 2006 10:13:41 -0500 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? Message-ID: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> In our app we've a number of singleton ruby classes that cache static data in hashes, things like string values, system config params, etc). In a webbrick environment this works ok, but we find in production we have a problem because we have 4 caches, one for each mongrel instance. This also isn't a BIG problem, but our cache.reload() methods are kinda useless now, because we can't direct this call to a specific mongrel/rails instance. Any suggestions? In the long term, we'll be redesigning the cache to be shared, but we'd like to fix this now. Had considered writing a quicky "broadcaster" that would iterate over our known mongrel ports and hit them directly. But we're not sure if (a) that would work and (b) the best way to read the current running ports. Thanks in advance. Brittain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/2f88ccf3/attachment.html From wyhaines at gmail.com Thu Aug 24 11:44:52 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Thu, 24 Aug 2006 09:44:52 -0600 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> Message-ID: On 8/24/06, Scott R Brittain wrote: > > In our app we've a number of singleton ruby classes that cache static data > in hashes, things like > string values, system config params, etc). In a webbrick environment this > works ok, but we find > in production we have a problem because we have 4 caches, one for each > mongrel instance. > > This also isn't a BIG problem, but our cache.reload() methods are kinda > useless now, because > we can't direct this call to a specific mongrel/rails instance. Keep a local cache. Every minute or five minutes or whatever ask a master cache shared via drb if it has changed, and if it has, update the local cache from it. Kirk Haines From ezmobius at gmail.com Thu Aug 24 11:53:46 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 24 Aug 2006 08:53:46 -0700 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> Message-ID: On Aug 24, 2006, at 8:13 AM, Scott R Brittain wrote: > In our app we've a number of singleton ruby classes that cache > static data in hashes, things like > string values, system config params, etc). In a webbrick > environment this works ok, but we find > in production we have a problem because we have 4 caches, one for > each mongrel instance. > > This also isn't a BIG problem, but our cache.reload() methods are > kinda useless now, because > we can't direct this call to a specific mongrel/rails instance. > > Any suggestions? In the long term, we'll be redesigning the cache > to be shared, but we'd like to > fix this now. > > Had considered writing a quicky "broadcaster" that would iterate > over our known mongrel ports > and hit them directly. But we're not sure if (a) that would work > and (b) the best way to read the > current running ports. > > Thanks in advance. > > Brittain Hey Scott- Well you can use pound to setup sticky sessions or session affinity but I don't reccomend that as its fragile. I would say your best option is to make a very simple drb server to run your singleton in and then all mongrels can talk to the one instance over drb. -Ezra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/5611a13a/attachment.html From imtall at gmail.com Thu Aug 24 12:35:57 2006 From: imtall at gmail.com (John Butler) Date: Thu, 24 Aug 2006 09:35:57 -0700 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> Message-ID: <20E2F121-A7E3-473A-AD7F-8F1FE80C60E5@gmail.com> On Aug 24, 2006, at 8:13 AM, Scott R Brittain wrote: > In our app we've a number of singleton ruby classes that cache > static data in hashes, things like > string values, system config params, etc). In a webbrick > environment this works ok, but we find > in production we have a problem because we have 4 caches, one for > each mongrel instance. > > This also isn't a BIG problem, but our cache.reload() methods are > kinda useless now, because > we can't direct this call to a specific mongrel/rails instance. > > Any suggestions? In the long term, we'll be redesigning the cache > to be shared, but we'd like to > fix this now. > > Had considered writing a quicky "broadcaster" that would iterate > over our known mongrel ports > and hit them directly. But we're not sure if (a) that would work > and (b) the best way to read the > current running ports. > > Thanks in advance. > > Brittain Although Drb will probably work, for performance check out memcache: "memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load." http://www.danga.com/memcached/ Ruby library: http://www.deveiate.org/projects/RMemCache/ More info: http://wiki.rubyonrails.org/rails/pages/MemCached -John From mongrel at philip.pjkh.com Thu Aug 24 12:45:53 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 24 Aug 2006 11:45:53 -0500 (CDT) Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> Message-ID: <20060824114505.H19895@bravo.pjkh.com> > In our app we've a number of singleton ruby classes that cache static data > in hashes, things like > string values, system config params, etc). In a webbrick environment this > works ok, but we find > in production we have a problem because we have 4 caches, one for each > mongrel instance. > > This also isn't a BIG problem, but our cache.reload() methods are kinda > useless now, because > we can't direct this call to a specific mongrel/rails instance. Why can't you make request directly to http://localhost:3000 (and 3001, 3002, 3003, etc.) for each mongrel? > Any suggestions? In the long term, we'll be redesigning the cache to be > shared, but we'd like to > fix this now. Look at memcache... works great for us. > > Had considered writing a quicky "broadcaster" that would iterate over our > known mongrel ports > and hit them directly. But we're not sure if (a) that would work and (b) > the best way to read the > current running ports. > > Thanks in advance. > > Brittain > From zedshaw at zedshaw.com Thu Aug 24 13:54:49 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 24 Aug 2006 10:54:49 -0700 Subject: [Mongrel] Mongrel crashes - bad doggie In-Reply-To: References: <1156286349.6038.23.camel@localhost.localdomain> Message-ID: <1156442089.6206.3.camel@localhost.localdomain> On Thu, 2006-08-24 at 09:19 +0200, Kaspar Schiess wrote: > > Try out the latest pre-release to see if you still have the lock-ups: > > > > sudo gem install mongrel > > --source=http://mongrel.rubyforge.org/releases/ > Now I get > > /usr/lib/ruby/1.8/erb.rb:781: [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [i386-linux] > > That might mean that I'm onto something that has some connection to > mongrel ;) Hopefully you're joking since that's in erb.rb (not a mongrel file). Also, you're the only person hitting these so you should look at what software you have that others might not have. Run you program under gdb and do a backtrace when it crashes to see what might cause it. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From mrueckert at suse.de Thu Aug 24 15:38:44 2006 From: mrueckert at suse.de (Marcus Rueckert) Date: Thu, 24 Aug 2006 21:38:44 +0200 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> Message-ID: <20060824193844.GC10101@suse.de> On 2006-08-24 08:53:46 -0700, Ezra Zygmuntowicz wrote: > Well you can use pound to setup sticky sessions or session affinity > but I don't reccomend that as its fragile. I would say your best > option is to make a very simple drb server to run your singleton in > and then all mongrels can talk to the one instance over drb. why not memcached? darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From ezmobius at gmail.com Thu Aug 24 16:33:26 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 24 Aug 2006 13:33:26 -0700 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <20060824193844.GC10101@suse.de> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> <20060824193844.GC10101@suse.de> Message-ID: <65FE83AD-B22D-47D5-A360-CDC1CA6416BB@gmail.com> On Aug 24, 2006, at 12:38 PM, Marcus Rueckert wrote: > On 2006-08-24 08:53:46 -0700, Ezra Zygmuntowicz wrote: >> Well you can use pound to setup sticky sessions or session affinity >> but I don't reccomend that as its fragile. I would say your best >> option is to make a very simple drb server to run your singleton in >> and then all mongrels can talk to the one instance over drb. > > why not memcached? > > darix > > -- > openSUSE - SUSE Linux is my linux > openSUSE is good for you > www.opensuse.org > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Memcached is indeed another option. Although it sounded like for just one Singleton object cache that memcached would be overkill and require yet another dependency for the app. DRb is built into ruby and is very simple to use. So simple that he could most likely take his singleton class and turn it into a drb server in about 4 lines of code. -Ezra From ross.singer at library.gatech.edu Thu Aug 24 18:27:55 2006 From: ross.singer at library.gatech.edu (Ross Singer) Date: Thu, 24 Aug 2006 18:27:55 -0400 Subject: [Mongrel] Invalid HTTP format, parsing fails Message-ID: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> Hi, I am having a bit of a problem with my app that is using mongrel. For a particular vendor we use, they are generating links that look like: http://umlaut.library.gatech.edu/resolve?genre=article&issn=00224898&title=Journal+of+Terramechanics&volume=43&issue=4&date=20061001&atitle=Requirements+and+system+design+for+a+robot+performing+selective+cleaning+in+young+forest+stands.&spage=505&sid=EBSCO:aph&pid=Vestlund%2c+Karin%3bHellstr%c3%b6m%2c+Thomas >>2183092720061001aph (pardon the awfulness of OpenURL query strings) Which for IE gives the user: Thu Aug 24 18:12:48 EDT 2006: BAD CLIENT (127.0.0.1): Invalid HTTP format, parsing fails. I am not entirely sure, but I think too many of these eventually bring mongrel down completely (mongrel keeps stopping, it may or may not be related). Firefox and its ilk properly escape these query strings, so those users aren't affected by it (except, of course, when mongrel goes down completely). Removing the ">>" eliminates the problem in IE. I've placed a call to the vendor in question to please stop doing this, but I don't know if I'll get any response, and, besides, it's quite possible I'll see more invalid characters from other sources in the future. Webrick also fails in exactly the same way on the same queries. FastCGI doesn't (as far as I can tell), but I also haven't had any luck getting FastCGI working with this app. I'm using mongrel 0.3.13.3 in production and 0.3.13.4 in development (the link above). Thanks for any help you can offer on this, -Ross. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/6d316ecb/attachment.html From fanoflinux at gmail.com Thu Aug 24 18:28:05 2006 From: fanoflinux at gmail.com (linux user) Date: Thu, 24 Aug 2006 17:28:05 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service Message-ID: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> Hi All I am using version 0.3.13.3 and since there is no logging support for win32 application. I was wondering if it was possible to get any kind of logging at all. I have tried to these two options 1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot -p 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel-1.log" The console print the output stream and the mongrel-1.log file shows no content except the content generated after I kill the server with Ctrl-C. 2. win32 service "mongrel_rails service::install -N snapshot1 -c C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the -l (log_file) option can't be used so where do I see the output/error logs?? So I am basically lost on a very simple thing. Please help TIA -daya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/7b3d6648/attachment.html From fanoflinux at gmail.com Thu Aug 24 18:32:57 2006 From: fanoflinux at gmail.com (linux user) Date: Thu, 24 Aug 2006 17:32:57 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> Message-ID: <99efa47b0608241532u7ad1b5acm44bfaad70022c97f@mail.gmail.com> On 8/24/06, linux user wrote: > > Hi All > > I am using version 0.3.13.3 and since there is no logging support for > win32 application. I was wondering if it was possible to get any kind of > logging at all. > > I have tried to these two options > > 1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot -p > 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel-1.log" > > The console print the output stream and the mongrel-1.log file shows no > content except the content generated after I kill the server with Ctrl-C. > > 2. win32 service "mongrel_rails service::install -N snapshot1 -c > C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the -l > (log_file) option can't be used so where do I see the output/error logs?? > > So I am basically lost on a very simple thing. > > Please help > > > TIA > -daya > > oh BTW I also tried separate output and error stream redirections using "2> myapp2.log 1>myapp1.log" but both these files donot get any content until and unless mongrel gets interrrupted by Ctrl-C which mean that all the stream content is being kept memory. This is a big problem and I don't know how to solve it. TIA -daya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/a69769c4/attachment.html From david at vrensk.com Thu Aug 24 18:52:51 2006 From: david at vrensk.com (David Vrensk) Date: Fri, 25 Aug 2006 00:52:51 +0200 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <65FE83AD-B22D-47D5-A360-CDC1CA6416BB@gmail.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> <20060824193844.GC10101@suse.de> <65FE83AD-B22D-47D5-A360-CDC1CA6416BB@gmail.com> Message-ID: <81b453920608241552w4f182738h88f0eece42740808@mail.gmail.com> On 8/24/06, Ezra Zygmuntowicz wrote: > > > Memcached is indeed another option. Although it sounded like for > just one Singleton object cache that memcached would be overkill and > require yet another dependency for the app. DRb is built into ruby > and is very simple to use. So simple that he could most likely take > his singleton class and turn it into a drb server in about 4 lines of > code. I bet I'm not the only person who would like to see those four lines of code. Pretty please? With a cherry on top? /David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/290a165d/attachment.html From luislavena at gmail.com Thu Aug 24 18:58:15 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 24 Aug 2006 19:58:15 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> Message-ID: <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> On 8/24/06, linux user wrote: > > Hi All > > I am using version 0.3.13.3 and since there is no logging support for win32 > application. I was wondering if it was possible to get any kind of logging > at all. > > I have tried to these two options > > 1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot -p > 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel-1.log" > > The console print the output stream and the mongrel-1.log file shows no > content except the content generated after I kill the server with Ctrl-C. > > 2. win32 service "mongrel_rails service::install -N snapshot1 -c > C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the -l > (log_file) option can't be used so where do I see the output/error logs?? > Have you tried check log/mongrel.log and log/production.log? there is where mongrel outs the information. > So I am basically lost on a very simple thing. > > Please help > > > TIA > -daya > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From technoweenie at gmail.com Thu Aug 24 18:59:18 2006 From: technoweenie at gmail.com (Rick Olson) Date: Thu, 24 Aug 2006 17:59:18 -0500 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <81b453920608241552w4f182738h88f0eece42740808@mail.gmail.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> <20060824193844.GC10101@suse.de> <65FE83AD-B22D-47D5-A360-CDC1CA6416BB@gmail.com> <81b453920608241552w4f182738h88f0eece42740808@mail.gmail.com> Message-ID: <48fe25b0608241559pa41df60na3b9e8e09412ede2@mail.gmail.com> > I bet I'm not the only person who would like to see those four lines of > code. Pretty please? With a cherry on top? > > /David drb is incredibly easy: http://www.chadfowler.com/ruby/drb.html http://segment7.net/projects/ruby/drb/ -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com From zackchandler at gmail.com Thu Aug 24 19:11:29 2006 From: zackchandler at gmail.com (Zack Chandler) Date: Thu, 24 Aug 2006 16:11:29 -0700 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) Message-ID: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> Hi. I'm using Apache2.2 built from source + mod-proxy + ssl + svn. Everything works fine but I'm sure you I could disable a ton of modules during the build process and in httpd.conf to speed things up and run a tighter memory footprint. Has anyone bothered building Apache2.2 from source disabling all the unneeded modules. I am planning on going through the Apache docs but I thought I'd shoot off a quick email in case someone had already gone through the hassle. Thanks, Zack Chandler From wyhaines at gmail.com Thu Aug 24 19:32:11 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Thu, 24 Aug 2006 17:32:11 -0600 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <81b453920608241552w4f182738h88f0eece42740808@mail.gmail.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> <20060824193844.GC10101@suse.de> <65FE83AD-B22D-47D5-A360-CDC1CA6416BB@gmail.com> <81b453920608241552w4f182738h88f0eece42740808@mail.gmail.com> Message-ID: On 8/24/06, David Vrensk wrote: > On 8/24/06, Ezra Zygmuntowicz wrote: > > > > > Memcached is indeed another option. Although it sounded like for > > just one Singleton object cache that memcached would be overkill and > > require yet another dependency for the app. DRb is built into ruby > > and is very simple to use. So simple that he could most likely take > > his singleton class and turn it into a drb server in about 4 lines of > > code. > > I bet I'm not the only person who would like to see those four lines of > code. Pretty please? With a cherry on top? That's the lovely thing about DRb. It is so very simple to use. server.rb ----- require 'drb' config = {:foo => 1, :bar => 'I am a config'} DRb.start_service('drbunix://var/run/drbdemo.sock',config) DRb.thread.join ----- client.rb ----- require 'drb' config = DRbObject.new_with_uri('drbunix://var/run/drbdemo.sock') puts config[:foo] puts config[:bar] ----- If I were doing this, I'd leave it nearly that simple if the site was low use. DRb is pretty fast. I have serveral sites with applications which share some common, low use resources in exactly this way, and it works wonderfully. However, if it were going to see a lot of hits, I'd just keep using a local cache, as I mentioned, and setup a thread to wake up and run every so often to sync the local cache to the remote one. If the config object in the drb server has a reload() method or something like that, any of the clients could trigger a config reload by just calling it on the DRb object. Very, very easy to implement. Works well, and is standard in Ruby. There's something to be said for that. Kirk Haines From ezmobius at gmail.com Thu Aug 24 19:36:52 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 24 Aug 2006 16:36:52 -0700 Subject: [Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance? In-Reply-To: <81b453920608241552w4f182738h88f0eece42740808@mail.gmail.com> References: <002c01c6c78f$e310d620$6601a8c0@forwardvue.com> <20060824193844.GC10101@suse.de> <65FE83AD-B22D-47D5-A360-CDC1CA6416BB@gmail.com> <81b453920608241552w4f182738h88f0eece42740808@mail.gmail.com> Message-ID: On Aug 24, 2006, at 3:52 PM, David Vrensk wrote: > On 8/24/06, Ezra Zygmuntowicz wrote: > > Memcached is indeed another option. Although it sounded > like for > just one Singleton object cache that memcached would be overkill and > require yet another dependency for the app. DRb is built into ruby > and is very simple to use. So simple that he could most likely take > his singleton class and turn it into a drb server in about 4 lines of > code. > > I bet I'm not the only person who would like to see those four > lines of code. Pretty please? With a cherry on top? > > /David Hey David- Ok you asked for it ;) Lets make a fake little singleton class to simulate what the OP has: require 'singleton' require 'drb' class SingletonDRbCache include Singleton include DRbUndumped # rest of code here end DRb.start_service("druby://localhost:11111", SingletonDRbCache.instance) DRb.thread.join And here is the code you would need to put in environment.rb require "drb" DRb.start_service SingletonDRbCache = DRbObject.new(nil, "druby://localhost:11111") Thats pretty much it. -Ezra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/96b8cff0/attachment-0001.html From luislavena at gmail.com Thu Aug 24 19:40:49 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 24 Aug 2006 20:40:49 -0300 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> Message-ID: <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> On 8/24/06, Zack Chandler wrote: > Hi. > > I'm using Apache2.2 built from source + mod-proxy + ssl + svn. > > Everything works fine but I'm sure you I could disable a ton of > modules during the build process and in httpd.conf to speed things up > and run a tighter memory footprint. > > Has anyone bothered building Apache2.2 from source disabling all the > unneeded modules. > > I am planning on going through the Apache docs but I thought I'd shoot > off a quick email in case someone had already gone through the hassle. > > Thanks, > Zack Chandler You're forced to use apache? if not, try nginx as suggested by Ezra: http://www.brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster Hope that helps, -- 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 jeremy at bitsweat.net Thu Aug 24 20:14:55 2006 From: jeremy at bitsweat.net (Jeremy Kemper) Date: Thu, 24 Aug 2006 17:14:55 -0700 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> Message-ID: <69a2885c0608241714v445614a8j4ae60616dd4ea45a@mail.gmail.com> On 8/24/06, Luis Lavena wrote: > > On 8/24/06, Zack Chandler wrote: > > Hi. > > > > I'm using Apache2.2 built from source + mod-proxy + ssl + svn. > > > > Everything works fine but I'm sure you I could disable a ton of > > modules during the build process and in httpd.conf to speed things up > > and run a tighter memory footprint. > > > > Has anyone bothered building Apache2.2 from source disabling all the > > unneeded modules. > > > > I am planning on going through the Apache docs but I thought I'd shoot > > off a quick email in case someone had already gone through the hassle. > > > > Thanks, > > Zack Chandler > > You're forced to use apache? if not, try nginx as suggested by Ezra: > > http://www.brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster He has a working deployment and you're suggesting a whole new platform because of a blog post pimping the next hotness. Pinch me :) jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/dd9c1acc/attachment.html From luislavena at gmail.com Thu Aug 24 20:22:56 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 24 Aug 2006 21:22:56 -0300 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <69a2885c0608241714v445614a8j4ae60616dd4ea45a@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> <69a2885c0608241714v445614a8j4ae60616dd4ea45a@mail.gmail.com> Message-ID: <71166b3b0608241722r764c9b0bha41c8156569564af@mail.gmail.com> On 8/24/06, Jeremy Kemper wrote: > On 8/24/06, Luis Lavena wrote: > > > On 8/24/06, Zack Chandler wrote: > > > Hi. > > > > > > I'm using Apache2.2 built from source + mod-proxy + ssl + svn. > > > > > > Everything works fine but I'm sure you I could disable a ton of > > > modules during the build process and in httpd.conf to speed things up > > > and run a tighter memory footprint. > > > > > > Has anyone bothered building Apache2.2 from source disabling all the > > > unneeded modules. > > > > > > I am planning on going through the Apache docs but I thought I'd shoot > > > off a quick email in case someone had already gone through the hassle. > > > > > > Thanks, > > > Zack Chandler > > > > You're forced to use apache? if not, try nginx as suggested by Ezra: > > > http://www.brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster > > > He has a working deployment and you're suggesting a whole new platform > because of a blog post pimping the next hotness. Pinch me :) Jeremy, excuse my if I didn't see the "we are running in production now" sentence in that mail... His concerns aren't drop everything or try something new: its about memory use and resources... why not try something different? I don't understand the "pinch me" sentence... what that means? (excuse me, I'm not a native english speaker). > > jeremy > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From jeremy at bitsweat.net Thu Aug 24 20:33:16 2006 From: jeremy at bitsweat.net (Jeremy Kemper) Date: Thu, 24 Aug 2006 17:33:16 -0700 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <71166b3b0608241722r764c9b0bha41c8156569564af@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> <69a2885c0608241714v445614a8j4ae60616dd4ea45a@mail.gmail.com> <71166b3b0608241722r764c9b0bha41c8156569564af@mail.gmail.com> Message-ID: <69a2885c0608241733i548c9f8cj2988053fd330b36@mail.gmail.com> On 8/24/06, Luis Lavena wrote: > > On 8/24/06, Jeremy Kemper wrote: > > He has a working deployment and you're suggesting a whole new platform > > because of a blog post pimping the next hotness. Pinch me :) > > Jeremy, excuse my if I didn't see the "we are running in production > now" sentence in that mail... > > His concerns aren't drop everything or try something new: its about > memory use and resources... why not try something different? Because it's trading something that works fine but could use a bit of tweaking for something totally unknown. That sounds fun and interesting, but the time could be better spent working on your app. I don't understand the "pinch me" sentence... what that means? (excuse > me, I'm not a native english speaker). People say 'pinch me' because if it hurts, you know you aren't dreaming ;) jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/89508a94/attachment.html From fanoflinux at gmail.com Thu Aug 24 20:34:46 2006 From: fanoflinux at gmail.com (linux user) Date: Thu, 24 Aug 2006 19:34:46 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> Message-ID: <99efa47b0608241734s20789b47tea70a1b041b84f1f@mail.gmail.com> On 8/24/06, Luis Lavena wrote: > > On 8/24/06, linux user wrote: > > > > Hi All > > > > I am using version 0.3.13.3 and since there is no logging support for > win32 > > application. I was wondering if it was possible to get any kind of > logging > > at all. > > > > I have tried to these two options > > > > 1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot > -p > > 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel-1.log" > > > > The console print the output stream and the mongrel-1.log file shows no > > content except the content generated after I kill the server with > Ctrl-C. > > > > 2. win32 service "mongrel_rails service::install -N snapshot1 -c > > C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the -l > > (log_file) option can't be used so where do I see the output/error > logs?? > > > > Have you tried check log/mongrel.log and log/production.log? there is > where mongrel outs the information. Is this in the root of the application folder or in the current working directory? > So I am basically lost on a very simple thing. > > > > Please help > > > > > > TIA > > -daya > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060824/739ac918/attachment.html From luislavena at gmail.com Thu Aug 24 20:45:58 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 24 Aug 2006 21:45:58 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608241734s20789b47tea70a1b041b84f1f@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608241734s20789b47tea70a1b041b84f1f@mail.gmail.com> Message-ID: <71166b3b0608241745u1dfa7ce8uc8afdfd56e2f6b7f@mail.gmail.com> On 8/24/06, linux user wrote: > On 8/24/06, Luis Lavena wrote: > > > On 8/24/06, linux user wrote: > > > > > > Hi All > > > > > > I am using version 0.3.13.3 and since there is no logging support for > win32 > > > application. I was wondering if it was possible to get any kind of > logging > > > at all. > > > > > > I have tried to these two options > > > > > > 1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot > -p > > > 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel-1.log" > > > > > > The console print the output stream and the mongrel-1.log file shows no > > > content except the content generated after I kill the server with > Ctrl-C. > > > > > > 2. win32 service "mongrel_rails service::install -N snapshot1 -c > > > C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the -l > > > (log_file) option can't be used so where do I see the output/error > logs?? > > > > > > > Have you tried check log/mongrel.log and log/production.log? there is > > where mongrel outs the information. > > > Is this in the root of the application folder or in the current working > directory? The application root directory, specified by the -c option. Mongrel with Chdir into it, and start rails using it as current directory. > > > > So I am basically lost on a very simple thing. > > > > > > Please help > > > > > > > > > TIA > > > -daya > > > > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > > > > -- > > Luis Lavena > > Multimedia systems > > - > > Leaders are made, they are not born. They are made by hard effort, > > which is the price which all of us must pay to achieve any goal that > > is worthwhile. > > Vince Lombardi > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Thu Aug 24 20:51:39 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 24 Aug 2006 21:51:39 -0300 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <69a2885c0608241733i548c9f8cj2988053fd330b36@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> <69a2885c0608241714v445614a8j4ae60616dd4ea45a@mail.gmail.com> <71166b3b0608241722r764c9b0bha41c8156569564af@mail.gmail.com> <69a2885c0608241733i548c9f8cj2988053fd330b36@mail.gmail.com> Message-ID: <71166b3b0608241751q3a4ba113w296ba8d79277dea@mail.gmail.com> On 8/24/06, Jeremy Kemper wrote: > On 8/24/06, Luis Lavena wrote: > > > > On 8/24/06, Jeremy Kemper wrote: > > He has a working deployment and you're suggesting a whole new platform > > because of a blog post pimping the next hotness. Pinch me :) > > Jeremy, excuse my if I didn't see the "we are running in production > now" sentence in that mail... > > His concerns aren't drop everything or try something new: its about > memory use and resources... why not try something different? > > Because it's trading something that works fine but could use a bit of > tweaking for something totally unknown. That sounds fun and interesting, but > the time could be better spent working on your app. > Oh, its like "don't reinvent the wheel", often seen ALL around software developments, concepts and ideas... Also, the time you spent on working in these "new things" is valuable too, making it work faster isn't something valuable? Just my point of view, of course. > > > I don't understand the "pinch me" sentence... what that means? (excuse > > me, I'm not a native english speaker). > > > People say 'pinch me' because if it hurts, you know you aren't dreaming ;) > Oh I see, though I was translating it as "you deserve a kick for your stupid comment.", glad you explained it to me ;-) > jeremy > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From dan.kubb at autopilotmarketing.com Thu Aug 24 22:17:40 2006 From: dan.kubb at autopilotmarketing.com (Dan Kubb) Date: Thu, 24 Aug 2006 19:17:40 -0700 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Zack, > Has anyone bothered building Apache2.2 from source disabling all the > unneeded modules. I spent one rainy afternoon going through every flag and explicitly enabling or disabling each module in Apache 2.2 that I could find. I paired it down to the bare minimum to meet my needs. I'll save you this pain. Here's what my configure line in my Apache installation script looks like: ./configure \ --with-mpm=worker \ --with-ssl \ --enable-alias \ --enable-cache \ --enable-auth-basic \ --enable-auth-digest \ --enable-authn-anon \ --enable-authn-default \ --enable-authn-file \ --enable-authz-default \ --enable-authz-host \ --enable-authz-user \ --enable-dir \ --enable-disk-cache \ --enable-expires \ --enable-mime \ --enable-mem-cache \ --enable-negotiation \ --enable-deflate \ --enable-http \ --enable-headers \ --enable-include \ --enable-log-config \ --enable-proxy \ --enable-proxy-balancer \ --enable-proxy-http \ --enable-rewrite \ --enable-setenvif \ --enable-so \ --enable-ssl \ --enable-threads \ --disable-actions \ --disable-asis \ --disable-authn-alias \ --disable-authn-dbd \ --disable-authn-dbm \ --disable-authz-dbm \ --disable-authz-groupfile \ --disable-authz-ldap \ --disable-authz-owner \ --disable-autoindex \ --disable-bucketeer \ --disable-case-filter \ --disable-case-filter-in \ --disable-cern-meta \ --disable-cgi \ --disable-cgid \ --disable-charset-lite \ --disable-dav \ --disable-dav-ds \ --disable-dav-lock \ --disable-distcache \ --disable-dbd \ --disable-dumpio \ --disable-echo \ --disable-env \ --disable-example \ --disable-ext-filter \ --disable-file-cache \ --disable-filter \ --disable-index \ --disable-indent \ --disable-imagemap \ --disable-imap \ --disable-info \ --disable-isapi \ --disable-ldap \ --disable-log-forensic \ --disable-logio \ --disable-mime-magic \ --disable-nw-ssl \ --disable-optional-fn-export \ --disable-optional-fn-import \ --disable-optional-hook-export \ --disable-optional-hook-import \ --disable-proxy-ajp \ --disable-proxy-connect \ --disable-proxy-ftp \ --disable-speling \ --disable-status \ --disable-suexec \ --disable-unique-id \ --disable-userdir \ --disable-usertrack \ --disable-version \ --disable-vhost-alias While this works for my case, you may need a bit of tweaking for your system -- I actually think there might be a few things in there I don't need anymore too. BTW I would highly encourage you to script out the apache installation process while finding the right configuration. It'll save you alot of time if you have to repeat anything, and you'll have something that can quickly and easily install apache when you move it into production. - -- 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) iD8DBQFE7l3E4DfZD7OEWk0RAlC9AKCmKJ3K5J2nNu6MCEduQR+OP4kAMACgtAL/ 2SWHiJYiskVAGtyG80dJddA= =Q/pT -----END PGP SIGNATURE----- From eule at space.ch Fri Aug 25 03:01:22 2006 From: eule at space.ch (Kaspar Schiess) Date: Fri, 25 Aug 2006 09:01:22 +0200 Subject: [Mongrel] Mongrel crashes - bad doggie In-Reply-To: <1156442089.6206.3.camel@localhost.localdomain> References: <1156286349.6038.23.camel@localhost.localdomain> <1156442089.6206.3.camel@localhost.localdomain> Message-ID: > Hopefully you're joking since that's in erb.rb (not a mongrel file). > Also, you're the only person hitting these so you should look at what > software you have that others might not have. Run you program under gdb > and do a backtrace when it crashes to see what might cause it. I was joking - halfway. But since the error changes when I change mongrel version, it can't be wholly unrelated neither. I don't think I will find that error, even though I would like. Since the application it happens in is rather stable otherwise and it only seems to surface when memory runs out, it is rather hard to get to the bottom of this. gdb won't help me there. Anyway, thanks for your help. Since nobody has hit on this before, I will continue to tweak variables until I'm out of danger zone. (Not config variables, meaning it more in the sense of a physical experiment) best regards, kaspar From al-mongrelusers at none.at Fri Aug 25 03:40:39 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Fri, 25 Aug 2006 09:40:39 +0200 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> <71166b3b0608241640x22796ca2m5071538b6df06e93@mail.gmail.com> Message-ID: <20060825074039.GA21466@none.at> On Don 24.08.2006 20:40, Luis Lavena wrote: >On 8/24/06, Zack Chandler wrote: > >You're forced to use apache? if not, try nginx as suggested by Ezra: > http://www.brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster Thanks for link ;-)) Regards Alex From snacktime at gmail.com Fri Aug 25 03:43:56 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 25 Aug 2006 00:43:56 -0700 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> Message-ID: <1f060c4c0608250043k36052df2q416e1bf8d83cde4b@mail.gmail.com> I'm not sure how what the syntax is with apache2, I think it's something like --enable-static-modname, to compile apache with modules linked statically instead of as a DSO. Depends on the module, but in some cases there is a significant performance boost. It will use a bit less memory also. Downside is that you have to recompile the whole server every time you need to update a module. Also, you don't gain anything by not compiling DSO's. In other words, the difference between compiling a DSO module and then commenting it out in httpd.conf so it's not loaded, is the same as never compiling it in the first place. Statically linking everything can be a real pain. You will probably get what you want by just commenting out the modules you don't need in httpd.conf. Chris From snacktime at gmail.com Fri Aug 25 03:53:23 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 25 Aug 2006 00:53:23 -0700 Subject: [Mongrel] Mongrel crashes - bad doggie In-Reply-To: References: Message-ID: <1f060c4c0608250053h1efc1803rabf65f3ca7a7ba5b@mail.gmail.com> I'd post that on the Xen mailing list or your hosting provider and see what they say. Linux isn't exactly known for handling out of memory conditions very well, so who knows what might happen with Xen added to the picture in a case like this. I'll bet it's come up before though and someone familiar with Xen would have a clue what's going on. From ross.singer at library.gatech.edu Fri Aug 25 07:19:25 2006 From: ross.singer at library.gatech.edu (Ross Singer) Date: Fri, 25 Aug 2006 07:19:25 -0400 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> Message-ID: <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> Well, the urgency of this has waned a bit, since I successfully got lighty/fcgi working last night. Still, I've been pretty fond on mongrel, so far, so I'd like to migrate back to it eventually. Thanks, -Ross. On 8/24/06, Ross Singer wrote: > > Hi, > > I am having a bit of a problem with my app that is using mongrel. > > For a particular vendor we use, they are generating links that look like: > http://umlaut.library.gatech.edu/resolve?genre=article&issn=00224898&title=Journal+of+Terramechanics&volume=43&issue=4&date=20061001&atitle=Requirements+and+system+design+for+a+robot+performing+selective+cleaning+in+young+forest+stands.&spage=505&sid=EBSCO:aph&pid=Vestlund%2c+Karin%3bHellstr%c3%b6m%2c+Thomas > >>2183092720061001aph > > (pardon the awfulness of OpenURL query strings) > > Which for IE gives the user: > Thu Aug 24 18:12:48 EDT 2006: BAD CLIENT (127.0.0.1): Invalid HTTP format, > parsing fails. > > I am not entirely sure, but I think too many of these eventually bring > mongrel down completely (mongrel keeps stopping, it may or may not be > related). > > Firefox and its ilk properly escape these query strings, so those users > aren't affected by it (except, of course, when mongrel goes down > completely). > > Removing the ">>" eliminates the problem in IE. > > I've placed a call to the vendor in question to please stop doing this, > but I don't know if I'll get any response, and, besides, it's quite possible > I'll see more invalid characters from other sources in the future. > > Webrick also fails in exactly the same way on the same queries. FastCGI > doesn't (as far as I can tell), but I also haven't had any luck getting > FastCGI working with this app. > > I'm using mongrel 0.3.13.3 in production and 0.3.13.4 in development (the > link above). > > Thanks for any help you can offer on this, > -Ross. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/6665e5fd/attachment.html From fanoflinux at gmail.com Fri Aug 25 09:17:39 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 08:17:39 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> Message-ID: <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> On 8/24/06, Luis Lavena wrote: > > On 8/24/06, linux user wrote: > > > > Hi All > > > > I am using version 0.3.13.3 and since there is no logging support for > win32 > > application. I was wondering if it was possible to get any kind of > logging > > at all. > > > > I have tried to these two options > > > > 1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot > -p > > 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel-1.log" > > > > The console print the output stream and the mongrel-1.log file shows no > > content except the content generated after I kill the server with > Ctrl-C. > > > > 2. win32 service "mongrel_rails service::install -N snapshot1 -c > > C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the -l > > (log_file) option can't be used so where do I see the output/error > logs?? > > > > Have you tried check log/mongrel.log and log/production.log? there is > where mongrel outs the information. No these files are not there. I tried to locate mongrel.log in production.log, but its not there. I only have log/production.log but that was created by rails script when the application root was created and log/production.log is 0KB after load testing mongrel for 1 hour. I am on Windows 2000 SP4. please help -daya > So I am basically lost on a very simple thing. > > > > Please help > > > > > > TIA > > -daya > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/3a6ed020/attachment.html From jec at ml1.jesc.ch Fri Aug 25 09:45:55 2006 From: jec at ml1.jesc.ch (Jean-Eric Cuendet (ML)) Date: Fri, 25 Aug 2006 15:45:55 +0200 Subject: [Mongrel] Multi apps in one Mongrel instance Message-ID: <44EEFF13.8080302@ml1.jesc.ch> Hi, It would be nice if Mongrel would do multiapps in one Mongrel instance. For the moment, I have one Mongrel for each app of my server, each on a different port. For example: http://server:8080/app1 http://server:8080/app2 instead of: http://server:8080/ http://server:8081/ Is that planned? Thanks. -jec -- JeSC - Software et Consulting Jean-Eric Cuendet Ing?nieur HES en t?l?communications 1168 Villars-sous-Yens Web : http://jesc.ch Tel : +41 21 800 3343 Mobile : +41 76 222 3343 -------------------------------------------------------- From luislavena at gmail.com Fri Aug 25 09:59:03 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 10:59:03 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> Message-ID: <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> On 8/25/06, linux user wrote: > > On 8/24/06, Luis Lavena wrote: > > On 8/24/06, linux user wrote: > > > > > > Hi All > > > > > > I am using version 0.3.13.3 and since there is no logging support for > win32 > > > application. I was wondering if it was possible to get any kind of > logging > > > at all. > > > > > > I have tried to these two options > > > > > > 1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot > -p > > > 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel- 1.log" > > > > > > The console print the output stream and the mongrel-1.log file shows no > > > content except the content generated after I kill the server with > Ctrl-C. > > > > > > 2. win32 service "mongrel_rails service::install -N snapshot1 -c > > > C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the -l > > > (log_file) option can't be used so where do I see the output/error > logs?? > > > > > > > Have you tried check log/mongrel.log and log/production.log? there is > > where mongrel outs the information. > > > > No these files are not there. > > I tried to locate mongrel.log in production.log, but its not there. I only > have log/production.log but that was created by rails script when the > application root was created and log/production.log is 0KB after load > testing mongrel for 1 hour. > > I am on Windows 2000 SP4. > > please help Daya, first of: post this to one mailing list, do not "cross-post" to rails and mongrel, the correct place, in this case, is mongrel one. Now, why you don't try the following? open a Command prompt window. C: cd C:\myspace\snapshot mongrel_rails start -e production wait until it is running... now check using windows explorer for log/*.log files inside that folder. They should be there, I see them here when running in my app, with both prerelease and stable. > -daya > > > > > So I am basically lost on a very simple thing. > > > > > > Please help > > > > > > > > > TIA > > > -daya > > > > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > > > > -- > > Luis Lavena > > Multimedia systems > > - > > Leaders are made, they are not born. They are made by hard effort, > > which is the price which all of us must pay to achieve any goal that > > is worthwhile. > > Vince Lombardi > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Fri Aug 25 10:12:16 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 11:12:16 -0300 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: <44EEFF13.8080302@ml1.jesc.ch> References: <44EEFF13.8080302@ml1.jesc.ch> Message-ID: <71166b3b0608250712t40e1c074p26c15cd07a9f1ce0@mail.gmail.com> On 8/25/06, Jean-Eric Cuendet (ML) wrote: > Hi, > It would be nice if Mongrel would do multiapps in one Mongrel instance. > For the moment, I have one Mongrel for each app of my server, each on a > different port. > For example: > http://server:8080/app1 > http://server:8080/app2 > instead of: > http://server:8080/ > http://server:8081/ > Is that planned? Hello Jean-Eric, The prefixing of rails application is available, too many asked about that. Regarding running multiple Rails application from one Mongrel instance, is like playing with a *loaded* gun. Rails isn't thread-safe, that range from two concurrent threads that try to access the CGI dispatcher or running two different application in the same context. Neither way is planned, or will be supported (AFAIK) because trying to debug simple concurrency problems is a real pain... imagine do that for 2 instances running concurrently. Hope this answer your question, the best I could write with my poor english. Regards, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From jarkko at jlaine.net Fri Aug 25 10:18:16 2006 From: jarkko at jlaine.net (Jarkko Laine) Date: Fri, 25 Aug 2006 17:18:16 +0300 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: <44EEFF13.8080302@ml1.jesc.ch> References: <44EEFF13.8080302@ml1.jesc.ch> Message-ID: On 25.8.2006, at 16.45, Jean-Eric Cuendet (ML) wrote: > Hi, > It would be nice if Mongrel would do multiapps in one Mongrel > instance. > For the moment, I have one Mongrel for each app of my server, each > on a > different port. > For example: > http://server:8080/app1 > http://server:8080/app2 > instead of: > http://server:8080/ > http://server:8081/ > Is that planned? No offense, Jean-Eric, but you already asked this two weeks ago [1] and got 7 responses, including one from Zed himself [2]. The answer: You can't do that as long as Rails is not thread-safe, in other words not any time soon. //jarkko [1] http://rubyforge.org/pipermail/mongrel-users/2006-August/000924.html [2] http://rubyforge.org/pipermail/mongrel-users/2006-August/000932.html -- Jarkko Laine http://jlaine.net http://odesign.fi From fanoflinux at gmail.com Fri Aug 25 10:22:30 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 09:22:30 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> Message-ID: <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > > > > On 8/24/06, Luis Lavena wrote: > > > On 8/24/06, linux user wrote: > > > > > > > > Hi All > > > > > > > > I am using version 0.3.13.3 and since there is no logging support > for > > win32 > > > > application. I was wondering if it was possible to get any kind of > > logging > > > > at all. > > > > > > > > I have tried to these two options > > > > > > > > 1. Stream redirection using "mongrel_rails start -c > C:/myspace/snapshot > > -p > > > > 4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel- > 1.log" > > > > > > > > The console print the output stream and the mongrel-1.log file shows > no > > > > content except the content generated after I kill the server with > > Ctrl-C. > > > > > > > > 2. win32 service "mongrel_rails service::install -N snapshot1 -c > > > > C:\myspace\snapshot -p 4111 -e production -t 70". Now ofcourse the > -l > > > > (log_file) option can't be used so where do I see the output/error > > logs?? > > > > > > > > > > Have you tried check log/mongrel.log and log/production.log? there is > > > where mongrel outs the information. > > > > > > > > No these files are not there. > > > > I tried to locate mongrel.log in production.log, but its not there. I > only > > have log/production.log but that was created by rails script when the > > application root was created and log/production.log is 0KB after load > > testing mongrel for 1 hour. > > > > I am on Windows 2000 SP4. > > > > please help > > Daya, first of: post this to one mailing list, do not "cross-post" to > rails and mongrel, the correct place, in this case, is mongrel one. > > Now, why you don't try the following? > > open a Command prompt window. > C: > cd C:\myspace\snapshot > mongrel_rails start -e production > > wait until it is running... now check using windows explorer for > log/*.log files inside that folder. > > They should be there, I see them here when running in my app, with > both prerelease and stable. Hi Luis I just tried your suggestion and although mongrel starts at port 3000 by default the logs are still not created. I did a full scan of application root for *.log and there are no log files that are created by mongrel. I also tried running mongrel -B (debug) option and now I get in log/mongrel_debug folder files.log, objects.log, params.log, rails.log and thread.log, these as we know are not the logs I am interested in. I had installed mongrel through gems and since I didn't include --include-dependencies at that time, the installation process prompted me to select which mongrel I wanted installed I selected the first option for win32 which was 0.3.13.3. May be I need to re-install mongrel? I appreciate your help but I am lost in this simple problem. -daya > -daya > > > > > > > > So I am basically lost on a very simple thing. > > > > > > > > Please help > > > > > > > > > > > > TIA > > > > -daya > > > > > > > > _______________________________________________ > > > > Mongrel-users mailing list > > > > Mongrel-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > > > > > > > > > -- > > > Luis Lavena > > > Multimedia systems > > > - > > > Leaders are made, they are not born. They are made by hard effort, > > > which is the price which all of us must pay to achieve any goal that > > > is worthwhile. > > > Vince Lombardi > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/fed8f839/attachment.html From luislavena at gmail.com Fri Aug 25 10:42:44 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 11:42:44 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> Message-ID: <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> On 8/25/06, linux user wrote: [snip] > > > No these files are not there. > > > > > > I tried to locate mongrel.log in production.log, but its not there. I > only > > > have log/production.log but that was created by rails script when the > > > application root was created and log/production.log is 0KB after load > > > testing mongrel for 1 hour. > > > > > > I am on Windows 2000 SP4. > > > > > > please help > > > > Daya, first of: post this to one mailing list, do not "cross-post" to > > rails and mongrel, the correct place, in this case, is mongrel one. > > > > Now, why you don't try the following? > > > > open a Command prompt window. > > C: > > cd C:\myspace\snapshot > > mongrel_rails start -e production > > > > wait until it is running... now check using windows explorer for > > log/*.log files inside that folder. > > > > They should be there, I see them here when running in my app, with > > both prerelease and stable. > > > > Hi Luis > > I just tried your suggestion and although mongrel starts at port 3000 by > default the logs are still not created. I did a full scan of application > root for *.log and there are no log files that are created by mongrel. > > I also tried running mongrel -B (debug) option and now I get in > log/mongrel_debug folder files.log, objects.log, params.log, rails.log and > thread.log, these as we know are not the logs I am interested in. > > I had installed mongrel through gems and since I didn't include > --include-dependencies at that time, the installation process prompted me to > select which mongrel I wanted installed I selected the first option for > win32 which was 0.3.13.3. May be I need to re-install mongrel? > > I appreciate your help but I am lost in this simple problem. > Ok Daya, I tried the same here, with a empty rails application and with a working one. my logs are created, on development or production environment... Please, start a fresh rails application, set the database and clear the log folder (delete *.log from there). Start mongrel with the same sentence I put previously and check the logs created. If they got created, is somehow your application, if not... too weird for friday... -- 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 fanoflinux at gmail.com Fri Aug 25 11:07:29 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 10:07:29 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> Message-ID: <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > [snip] > > > > No these files are not there. > > > > > > > > I tried to locate mongrel.log in production.log, but its not there. > I > > only > > > > have log/production.log but that was created by rails script when > the > > > > application root was created and log/production.log is 0KB after > load > > > > testing mongrel for 1 hour. > > > > > > > > I am on Windows 2000 SP4. > > > > > > > > please help > > > > > > Daya, first of: post this to one mailing list, do not "cross-post" to > > > rails and mongrel, the correct place, in this case, is mongrel one. > > > > > > Now, why you don't try the following? > > > > > > open a Command prompt window. > > > C: > > > cd C:\myspace\snapshot > > > mongrel_rails start -e production > > > > > > wait until it is running... now check using windows explorer for > > > log/*.log files inside that folder. > > > > > > They should be there, I see them here when running in my app, with > > > both prerelease and stable. > > > > > > > > Hi Luis > > > > I just tried your suggestion and although mongrel starts at port 3000 by > > default the logs are still not created. I did a full scan of application > > root for *.log and there are no log files that are created by mongrel. > > > > I also tried running mongrel -B (debug) option and now I get in > > log/mongrel_debug folder files.log, objects.log, params.log, rails.logand > > thread.log, these as we know are not the logs I am interested in. > > > > I had installed mongrel through gems and since I didn't include > > --include-dependencies at that time, the installation process prompted > me to > > select which mongrel I wanted installed I selected the first option for > > win32 which was 0.3.13.3. May be I need to re-install mongrel? > > > > I appreciate your help but I am lost in this simple problem. > > > > Ok Daya, > > I tried the same here, with a empty rails application and with a working > one. > > my logs are created, on development or production environment... > > Please, start a fresh rails application, set the database and clear > the log folder (delete *.log from there). Start mongrel with the same > sentence I put previously and check the logs created. > > If they got created, is somehow your application, if not... too weird > for friday... > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Luis I tried this too an fresh rails application and use the following command to start mongrel mongrel_rails start -c C:/temp/snap -e production the only log file I get in the log folder are development.log mongrel_debug\files.log production.log server.log test.log and BTW I also re-installed mongrel 0.3.13.3 win32 and mongrel-service but still no solution. I am begining to think its platform related Win2K SP4, I don't have access to XP. May be I need to re-install ruby & rails ?? but that would be ridiculous. -daya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/3a1a839b/attachment-0001.html From luislavena at gmail.com Fri Aug 25 11:18:34 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 12:18:34 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> Message-ID: <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> On 8/25/06, linux user wrote: [snip] > > Luis > > I tried this too an fresh rails application and use the following command to > start mongrel > > mongrel_rails start -c C:/temp/snap -e production > > the only log file I get in the log folder are > development.log > mongrel_debug\files.log > production.log > server.log > test.log > Before start rails you removed the empty logs? (the ones rails created by default). If they get created again, mongrel should be logging there, check production.log for a the timestamp of the last logged event (after you hit your webbrowser). > and BTW I also re-installed mongrel 0.3.13.3 win32 and mongrel-service but > still no solution. > > I am begining to think its platform related Win2K SP4, I don't have access > to XP. May be I need to re-install ruby & rails ?? but that would be > ridiculous. > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. -- 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 francois.beausoleil at gmail.com Fri Aug 25 11:26:50 2006 From: francois.beausoleil at gmail.com (Francois Beausoleil) Date: Fri, 25 Aug 2006 11:26:50 -0400 Subject: [Mongrel] SVN security hole explained Message-ID: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> Hi all, If you are using Pound / Pen or another load balancer, I believe you should read this: http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel My article refers to Dan Benjamin's http://hivelogic.com/articles/2006/04/30/preventing_svn_exposure My point is that even though we are preventing Apache from serving anything except a select few file extensions, Mongrel is serving up the files behind the scenes. So, http://myrailsapp.com/.svn/entries exposes Subversion metadata. Go and read the posts, well worth the time: http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel Bye ! -- Fran?ois Beausoleil http://blog.teksol.info/ From wilsonb at gmail.com Fri Aug 25 11:29:38 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Fri, 25 Aug 2006 11:29:38 -0400 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> Message-ID: On 8/25/06, Luis Lavena wrote: > On 8/25/06, linux user wrote: > > > > I am begining to think its platform related Win2K SP4, I don't have access > > to XP. May be I need to re-install ruby & rails ?? but that would be > > ridiculous. > > > > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on > XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. > I've never seen Mongrel save a log file on Win32, and I use it every day on Windows XP. From zackchandler at gmail.com Fri Aug 25 11:29:56 2006 From: zackchandler at gmail.com (Zack Chandler) Date: Fri, 25 Aug 2006 08:29:56 -0700 Subject: [Mongrel] [slightly offtopic] A small, fast Apache2.2 (if there is such a thing) In-Reply-To: <1f060c4c0608250043k36052df2q416e1bf8d83cde4b@mail.gmail.com> References: <33841ac70608241611ye72307an12c0c67118ac4c7a@mail.gmail.com> <1f060c4c0608250043k36052df2q416e1bf8d83cde4b@mail.gmail.com> Message-ID: <33841ac70608250829i52a04549jb29cf3543e279641@mail.gmail.com> On 8/25/06, snacktime wrote: > I'm not sure how what the syntax is with apache2, I think it's > something like --enable-static-modname, to compile apache with modules > linked statically instead of as a DSO. Depends on the module, but in > some cases there is a significant performance boost. It will use a > bit less memory also. Downside is that you have to recompile the > whole server every time you need to update a module. Also, you don't > gain anything by not compiling DSO's. In other words, the difference > between compiling a DSO module and then commenting it out in > httpd.conf so it's not loaded, is the same as never compiling it in > the first place. > > Statically linking everything can be a real pain. You will probably > get what you want by just commenting out the modules you don't need in > httpd.conf. > > Chris > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Chris, I was wondering about compiling w/ options vs. simply commenting out the LoadModule directives... if you have a reference on this (in terms of how it effects memory usage and speed) please send the link. Thanks, Zack From luislavena at gmail.com Fri Aug 25 11:56:07 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 12:56:07 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> Message-ID: <71166b3b0608250856u1cc930c5vee45141bad89c7d7@mail.gmail.com> On 8/25/06, Wilson Bilkovich wrote: > On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > > > > > > I am begining to think its platform related Win2K SP4, I don't have access > > > to XP. May be I need to re-install ruby & rails ?? but that would be > > > ridiculous. > > > > > > > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on > > XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. > > > > I've never seen Mongrel save a log file on Win32, and I use it every > day on Windows XP. Ok, what are you expect mongrel log? each file request like apache (ala http logging)? the process and render time of the request? What? -- 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 ezmobius at gmail.com Fri Aug 25 11:57:08 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 25 Aug 2006 08:57:08 -0700 Subject: [Mongrel] SVN security hole explained In-Reply-To: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> Message-ID: <4F47E778-C18F-412E-8FDD-DE68A9A4FD0A@brainspl.at> On Aug 25, 2006, at 8:26 AM, Francois Beausoleil wrote: > Hi all, > > If you are using Pound / Pen or another load balancer, I believe you > should read this: > > http://blog.teksol.info/articles/2006/08/25/subversion-metadata- > exposure-on-mongrel > > My article refers to Dan Benjamin's > http://hivelogic.com/articles/2006/04/30/preventing_svn_exposure > > My point is that even though we are preventing Apache from serving > anything except a select few file extensions, Mongrel is serving up > the files behind the scenes. > > So, http://myrailsapp.com/.svn/entries exposes Subversion metadata. > > Go and read the posts, well worth the time: > http://blog.teksol.info/articles/2006/08/25/subversion-metadata- > exposure-on-mongrel > > Bye ! > -- > Fran?ois Beausoleil > http://blog.teksol.info/ Yup this is a problem with capistrano's default deploy.rb file. It uses svn co so all the .svn meta data is there by default. I personally always set set :checkout, "export" in my deploy.rb files so this cannot happen just like you mention on your blog. I feel its worth the trade off of not being able to hot patch your current deployment. -Ezra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/38691456/attachment.html From fanoflinux at gmail.com Fri Aug 25 11:57:48 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 10:57:48 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> Message-ID: <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > [snip] > > > > Luis > > > > I tried this too an fresh rails application and use the following > command to > > start mongrel > > > > mongrel_rails start -c C:/temp/snap -e production > > > > the only log file I get in the log folder are > > development.log > > mongrel_debug\files.log > > production.log > > server.log > > test.log > > > > Before start rails you removed the empty logs? (the ones rails created > by default). > > If they get created again, mongrel should be logging there, check > production.log for a the timestamp of the last logged event (after you > hit your webbrowser). > > > and BTW I also re-installed mongrel 0.3.13.3 win32 and mongrel-service > but > > still no solution. > > > > I am begining to think its platform related Win2K SP4, I don't have > access > > to XP. May be I need to re-install ruby & rails ?? but that would be > > ridiculous. > > > > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on > XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Luis I should have checked the timestamp of production.log last time when I started mongrel -e production. Thanks I think I have solved the problem and I have found the conflicting option, but I have no decent explaination for it. Here is what I did 1. In my original application I deleted all log file and mongrel_debug folder and restarted mongrel in my config/environment/production.rb I have config.log_level = :debug config.log_path = 'log/production_debug.log' At this time the log folder has only one log file 'production_debug.log' and folder 'mongrel_debug' with 'files.log'. So I get all the output from logger (at debug level) in 'log/production_debug.log'. But I still get the output from 'puts, p, print' on the console and nowhere in any log file. 2. If I remove the logger configuration from my config/environments/production.rb, I still get output from 'puts, p, print' on the console. The only content on production.log at this time is (mostly statistical) Processing SnapshotController#print_letters (for 127.0.0.1 at 2006-08-25 10:51:17) [GET] Session ID: 022a23172e2328c2ba29f36a65e1ecbe Parameters: {"action"=>"print_letters", "controller"=>"snapshot"} Redirected to http://localhost:4111/snapshot/letter/list Completed in 0.00010 (10000 reqs/sec) | DB: 0.00000 (0%) | 302 Found [ http://localhost/snapshot/snapshot/print_letters] I still need to capture the output on console to a log file, don't know how to do it. Are you able to capture output from 'puts, p, print' on the console to a log file??? thanx a megaton for helping me. -daya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/20582c2f/attachment-0001.html From fanoflinux at gmail.com Fri Aug 25 12:01:10 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 11:01:10 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> Message-ID: <99efa47b0608250901x485a527ci80f530a456644146@mail.gmail.com> On 8/25/06, Wilson Bilkovich wrote: > > On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > > > > > > I am begining to think its platform related Win2K SP4, I don't have > access > > > to XP. May be I need to re-install ruby & rails ?? but that would be > > > ridiculous. > > > > > > > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on > > XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. > > > > I've never seen Mongrel save a log file on Win32, and I use it every > day on Windows XP. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > I would have to agree with you Wilson to the point of -l (log_file) option http://mongrel.rubyforge.org/docs/howto.html. But by default mongrel does write stuff top log/your-environment.log file. The problem that I am facing is that the output from 'puts, p, print' on the console are not captured in this log file. -daya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/6ac4aadd/attachment.html From fanoflinux at gmail.com Fri Aug 25 12:04:07 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 11:04:07 -0500 Subject: [Mongrel] SVN security hole explained In-Reply-To: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> Message-ID: <99efa47b0608250904t25ad623tcb563ed7240a272c@mail.gmail.com> On 8/25/06, Francois Beausoleil wrote: > > Hi all, > > If you are using Pound / Pen or another load balancer, I believe you > should read this: > > > http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel > > My article refers to Dan Benjamin's > http://hivelogic.com/articles/2006/04/30/preventing_svn_exposure > > My point is that even though we are preventing Apache from serving > anything except a select few file extensions, Mongrel is serving up > the files behind the scenes. > > So, http://myrailsapp.com/.svn/entries exposes Subversion metadata. > > Go and read the posts, well worth the time: > > http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel > > Bye ! > -- > Fran?ois Beausoleil > http://blog.teksol.info/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users Yup confirmed it on my application http://localhost:4111/.svn/README.txt shows This is a Subversion working copy administrative directory. Visit http://subversion.tigris.org/ for more information. -daya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/4eb6a808/attachment.html From fanoflinux at gmail.com Fri Aug 25 12:06:08 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 11:06:08 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250856u1cc930c5vee45141bad89c7d7@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <71166b3b0608250856u1cc930c5vee45141bad89c7d7@mail.gmail.com> Message-ID: <99efa47b0608250906s7c6b8c54v1741a9ee44637c60@mail.gmail.com> On 8/25/06, Luis Lavena wrote: > > On 8/25/06, Wilson Bilkovich wrote: > > On 8/25/06, Luis Lavena wrote: > > > On 8/25/06, linux user wrote: > > > > > > > > I am begining to think its platform related Win2K SP4, I don't have > access > > > > to XP. May be I need to re-install ruby & rails ?? but that would be > > > > ridiculous. > > > > > > > > > > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on > > > XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. > > > > > > > I've never seen Mongrel save a log file on Win32, and I use it every > > day on Windows XP. > > Ok, what are you expect mongrel log? each file request like apache > (ala http logging)? the process and render time of the request? > > What? > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > The problem that I am facing is that the output from 'puts, p, print' on the console are not captured in the mongrel log file (in my case production.log) on Win2K SP4. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/dc35ca52/attachment.html From luislavena at gmail.com Fri Aug 25 12:14:49 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 13:14:49 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> Message-ID: <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> On 8/25/06, linux user wrote: [snip] > > Luis > > > I should have checked the timestamp of production.log last time when I > started mongrel -e production. > Thanks I think I have solved the problem and I have found the conflicting > option, but I have no decent explaination for it. Here is what I did > > 1. In my original application I deleted all log file and mongrel_debug > folder and restarted mongrel > > in my config/environment/production.rb I have > config.log_level = :debug > config.log_path = 'log/production_debug.log' > > At this time the log folder has only one log file 'production_debug.log' and > folder 'mongrel_debug' with 'files.log'. So I get all the output from logger > (at debug level) in 'log/production_debug.log'. > > But I still get the output from 'puts, p, print' on the console and nowhere > in any log file. > > 2. If I remove the logger configuration from my > config/environments/production.rb, I still get output from > 'puts, p, print' on the console. The only content on production.log at this > time is (mostly statistical) > Processing SnapshotController#print_letters (for 127.0.0.1 > at 2006-08-25 10:51:17) [GET] > Session ID: 022a23172e2328c2ba29f36a65e1ecbe > Parameters: {"action"=>"print_letters", "controller"=>"snapshot"} > Redirected to http://localhost:4111/snapshot/letter/list > Completed in 0.00010 (10000 reqs/sec) | DB: 0.00000 (0%) | 302 Found [ > http://localhost/snapshot/snapshot/print_letters] > > I still need to capture the output on console to a log file, don't know how > to do it. > > Are you able to capture output from 'puts, p, print' on the console to a log > file??? > puts, p and print are directed to STDOUT, so a simple redirect in your production.rb will do: STDOUT.reopen("log/request.log", 'a+') STDOUT.sync=true That will do, unless mongrel is using STDERR to output to console, which I doubt. Are you plaining serve mongrel directly to the world? why not apache or lighty? or even nginx? > thanx a megaton for helping me. > A suggestion: stop cross-posting between rails and mongrel list. If the problem is mongrel related, post here, if rails related, there, but try one place at a time. -- 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 imtall at gmail.com Fri Aug 25 12:22:32 2006 From: imtall at gmail.com (John Butler) Date: Fri, 25 Aug 2006 09:22:32 -0700 Subject: [Mongrel] SVN security hole explained In-Reply-To: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> Message-ID: <4808ec820608250922s7290a525u88bbd0123fd11caf@mail.gmail.com> > If you are using Pound / Pen or another load balancer, I believe you > should read this: > > http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel > > My article refers to Dan Benjamin's > http://hivelogic.com/articles/2006/04/30/preventing_svn_exposure > > My point is that even though we are preventing Apache from serving > anything except a select few file extensions, Mongrel is serving up > the files behind the scenes. > > So, http://myrailsapp.com/.svn/entries exposes Subversion metadata. > > Go and read the posts, well worth the time: > http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel > Thanks for pointing that one out! If you do use Pound and don't want to change your deploy method, just add this to your pound.cfg after ListenHTTP(S): Service URL "\\.svn" end That will give a 503 to anyone trying to access it. This assumes pound is running in front. Note this will block anything with ".svn" in the URL. -John From wyhaines at gmail.com Fri Aug 25 12:22:56 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Fri, 25 Aug 2006 10:22:56 -0600 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: References: <44EEFF13.8080302@ml1.jesc.ch> Message-ID: On 8/25/06, Jarkko Laine wrote: > No offense, Jean-Eric, but you already asked this two weeks ago [1] > and got 7 responses, including one from Zed himself [2]. > > The answer: You can't do that as long as Rails is not thread-safe, in > other words not any time soon. Some time ago on ruby-talk there was a little discussion about using fork() as a sort of crude mark and sweep heap manager. The basic idea is that on certain OSes, fork() can be very, very fast because a copy-on-write is done on the memory image. Disable GC as soon as the fork is completed, do your thing, and let the forked process die. The memory of this discussion jumped out at me the other day when someone was asking about Mongrel and multiple Rails requests. I'm not going to do the work because I have more than enough other work in progress right now, but here's the idea: Change Mongrel and the Rails handler so that one has the option of forking instead of spawning a new thread to handle the request. It might be a usably fast way to get multiple Rails requests out of a single Mongrel. On my test server (a pretty modest AMD based box running a 2.4 Linux kernel), I can fork a little over 200 7Mb processes a second in a simple test. Kirk Haines From fanoflinux at gmail.com Fri Aug 25 12:23:15 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 11:23:15 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> Message-ID: <99efa47b0608250923v4dff8b3fte5f23da3aab81fa5@mail.gmail.com> On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > [snip] > > > > Luis > > > > > > I should have checked the timestamp of production.log last time when I > > started mongrel -e production. > > Thanks I think I have solved the problem and I have found the > conflicting > > option, but I have no decent explaination for it. Here is what I did > > > > 1. In my original application I deleted all log file and mongrel_debug > > folder and restarted mongrel > > > > in my config/environment/production.rb I have > > config.log_level = :debug > > config.log_path = 'log/production_debug.log' > > > > At this time the log folder has only one log file 'production_debug.log' > and > > folder 'mongrel_debug' with 'files.log'. So I get all the output from > logger > > (at debug level) in 'log/production_debug.log'. > > > > But I still get the output from 'puts, p, print' on the console and > nowhere > > in any log file. > > > > 2. If I remove the logger configuration from my > > config/environments/production.rb, I still get output from > > 'puts, p, print' on the console. The only content on production.log at > this > > time is (mostly statistical) > > Processing SnapshotController#print_letters (for 127.0.0.1 > > at 2006-08-25 10:51:17) [GET] > > Session ID: 022a23172e2328c2ba29f36a65e1ecbe > > Parameters: {"action"=>"print_letters", "controller"=>"snapshot"} > > Redirected to http://localhost:4111/snapshot/letter/list > > Completed in 0.00010 (10000 reqs/sec) | DB: 0.00000 (0%) | 302 Found [ > > http://localhost/snapshot/snapshot/print_letters] > > > > I still need to capture the output on console to a log file, don't know > how > > to do it. > > > > Are you able to capture output from 'puts, p, print' on the console to a > log > > file??? > > > > puts, p and print are directed to STDOUT, so a simple redirect in your > production.rb will do: > > STDOUT.reopen("log/request.log", 'a+') > STDOUT.sync=true I will try this, but since all my 4 mongrels on a single machine start from the same application-root, this would cause out of sequence statements in log/request.log. It would have been so much better to have logging on win32 where each mongrel will have its own log. Or may be I should just start each mongrel from a different application-root folder but for that I will have use ActiveRecordStore for session synchronization and I can't use file store anymore. That will do, unless mongrel is using STDERR to output to console, > which I doubt. > > Are you plaining serve mongrel directly to the world? why not apache > or lighty? or even nginx? I do have lighty in front of 4 mongrels. nginx is not supported on win32. > thanx a megaton for helping me. > > > > A suggestion: stop cross-posting between rails and mongrel list. If > the problem is mongrel related, post here, if rails related, there, > but try one place at a time. I am not cross posting atleast not in the last 4-5 replies. -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/8b70e584/attachment-0001.html From ezmobius at gmail.com Fri Aug 25 12:28:02 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 25 Aug 2006 09:28:02 -0700 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608250906s7c6b8c54v1741a9ee44637c60@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <71166b3b0608250856u1cc930c5vee45141bad89c7d7@mail.gmail.com> <99efa47b0608250906s7c6b8c54v1741a9ee44637c60@mail.gmail.com> Message-ID: <312074F6-697D-4BC7-874D-B9177D7DA299@gmail.com> > > > The problem that I am facing is that the output from 'puts, p, > print' on the console are not captured in the mongrel log file (in > my case production.log) on Win2K SP4. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users Hey- You should never use puts, print or p in a rails app. It is not tha way to do things. And it will cause bugs and crashes in your applications. If you want something to be weritten to the log then use the logger interface like it is supposed to be used. logger.debug "hey Im in the log!" PLease save yourself the trouble of debugging this later and *do not* use puts, print or p in a rails app *ever* -Ezra From ezmobius at gmail.com Fri Aug 25 12:34:07 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 25 Aug 2006 09:34:07 -0700 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: References: <44EEFF13.8080302@ml1.jesc.ch> Message-ID: <3543F97C-AC34-453B-97B2-E973D022B2F9@brainspl.at> On Aug 25, 2006, at 9:22 AM, Kirk Haines wrote: > On 8/25/06, Jarkko Laine wrote: > >> No offense, Jean-Eric, but you already asked this two weeks ago [1] >> and got 7 responses, including one from Zed himself [2]. >> >> The answer: You can't do that as long as Rails is not thread-safe, in >> other words not any time soon. > > Some time ago on ruby-talk there was a little discussion about using > fork() as a sort of crude mark and sweep heap manager. > > The basic idea is that on certain OSes, fork() can be very, very fast > because a copy-on-write is done on the memory image. Disable GC as > soon as the fork is completed, do your thing, and let the forked > process die. > > The memory of this discussion jumped out at me the other day when > someone was asking about Mongrel and multiple Rails requests. > > I'm not going to do the work because I have more than enough other > work in progress right now, but here's the idea: > > Change Mongrel and the Rails handler so that one has the option of > forking instead of spawning a new thread to handle the request. It > might be a usably fast way to get multiple Rails requests out of a > single Mongrel. On my test server (a pretty modest AMD based box > running a 2.4 Linux kernel), I can fork a little over 200 7Mb > processes a second in a simple test. > > > Kirk Haines This is certainly an interesting idea but the problem I see with this is ActiveRecord's database connection hates fork. Most of the time if you use fork in a rails app you will immediately get the "Mysql server has gone away" error. THere is a workaround you can use but its not pretty. fork do # whatever code you wanted to do in the fork # but make sure the last thing you dlo in the fork is this: Kernel.exec "echo -n" end The trick being Kernel.exec "echo -n" as the last thing you do in the fork. This keeps the database connection from being dropped on the floor for some odd reason. -Ezra From luislavena at gmail.com Fri Aug 25 12:34:56 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 13:34:56 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608250923v4dff8b3fte5f23da3aab81fa5@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> <99efa47b0608250923v4dff8b3fte5f23da3aab81fa5@mail.gmail.com> Message-ID: <71166b3b0608250934s734a2fa3o12290b35a1611bfb@mail.gmail.com> On 8/25/06, linux user wrote: [snip] > I will try this, but since all my 4 mongrels on a single machine start from > the same application-root, this would cause out of sequence statements in > log/request.log. It would have been so much better to have logging on win32 > where each mongrel will have its own log. > > Or may be I should just start each mongrel from a different application-root > folder but for that I will have use ActiveRecordStore for session > synchronization and I can't use file store anymore. > Do WEBrick log request to the log file? or it do that on *nix? By logging do you mean this? 127.0.0.1 - - [25/Aug/2006:13:25:15 SA Eastern Standard Time] "GET / HTTP/1.1" 200 7552- -> / 127.0.0.1 - - [25/Aug/2006:13:25:16 SA Eastern Standard Time] "GET /javascripts/prototype.js HTTP/1.1" 200 55149 http://localhost:3000/ -> /javascripts/prototype.js 127.0.0.1 - - [25/Aug/2006:13:25:16 SA Eastern Standard Time] "GET /javascripts/effects.js HTTP/1.1" 200 32871 http://localhost:3000/ -> /javascripts/effects.js 127.0.0.1 - - [25/Aug/2006:13:25:16 SA Eastern Standard Time] "GET /images/rails.png HTTP/1.1" 200 1787 http://localhost:3000/ -> /images/rails.png If so, mongrel nor webrick do that, so the problem could be the rails logging mechanism. Maybe I'm to tired to think clearly in this problem... > I do have lighty in front of 4 mongrels. nginx is not supported on win32. > I know, I know, too tired to provide good comments, sorry. > > > > thanx a megaton for helping me. > > > > > > > A suggestion: stop cross-posting between rails and mongrel list. If > > the problem is mongrel related, post here, if rails related, there, > > but try one place at a time. > > > > I am not cross posting atleast not in the last 4-5 replies. copied from the headers: From: linux user Mailed-By: rubyforge.org Reply-To: rails at lists.rubyonrails.org, mongrel-users at rubyforge.org -- 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 fanoflinux at gmail.com Fri Aug 25 12:40:59 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 11:40:59 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250934s734a2fa3o12290b35a1611bfb@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> <99efa47b0608250923v4dff8b3fte5f23da3aab81fa5@mail.gmail.com> <71166b3b0608250934s734a2fa3o12290b35a1611bfb@mail.gmail.com> Message-ID: <99efa47b0608250940u55e8d139g83b5abf3fa1817ea@mail.gmail.com> On 8/25/06, Luis Lavena wrote: > On 8/25/06, linux user wrote: > [snip] > > I will try this, but since all my 4 mongrels on a single machine start > from > > the same application-root, this would cause out of sequence statements > in > > log/request.log. It would have been so much better to have logging on > win32 > > where each mongrel will have its own log. > > > > Or may be I should just start each mongrel from a different > application-root > > folder but for that I will have use ActiveRecordStore for session > > synchronization and I can't use file store anymore. > > > > Do WEBrick log request to the log file? or it do that on *nix? > > By logging do you mean this? > > 127.0.0.1 - - [25/Aug/2006:13:25:15 SA Eastern Standard Time] "GET / > HTTP/1.1" 200 7552- -> / > 127.0.0.1 - - [25/Aug/2006:13:25:16 SA Eastern Standard Time] "GET > /javascripts/prototype.js HTTP/1.1" 200 55149 http://localhost:3000/ > -> /javascripts/prototype.js > 127.0.0.1 - - [25/Aug/2006:13:25:16 SA Eastern Standard Time] "GET > /javascripts/effects.js HTTP/1.1" 200 32871 http://localhost:3000/ -> > /javascripts/effects.js > 127.0.0.1 - - [25/Aug/2006:13:25:16 SA Eastern Standard Time] "GET > /images/rails.png HTTP/1.1" 200 1787 http://localhost:3000/ -> > /images/rails.png No by logging I mean capturing all output on console whether generated by puts,p,print or by mongrel in a log file. > If so, mongrel nor webrick do that, so the problem could be the rails > logging mechanism. > > Maybe I'm to tired to think clearly in this problem... I appreciate your help and I know the problem is kinda subtle and may be stupid too and I guess the only way out is get rid of my puts, p and print everywhere and just logger.debug statements. > I do have lighty in front of 4 mongrels. nginx is not supported on win32. > > > > I know, I know, too tired to provide good comments, sorry. > > > > > > > thanx a megaton for helping me. > > > > > > > > > > A suggestion: stop cross-posting between rails and mongrel list. If > > > the problem is mongrel related, post here, if rails related, there, > > > but try one place at a time. > > > > > > > > I am not cross posting atleast not in the last 4-5 replies. > > copied from the headers: > > From: linux user Mailed-By: rubyforge.org > Reply-To: rails at lists.rubyonrails.org, mongrel-users at rubyforge.org > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/b1bc7d06/attachment.html From luislavena at gmail.com Fri Aug 25 12:45:57 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 25 Aug 2006 13:45:57 -0300 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608250940u55e8d139g83b5abf3fa1817ea@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> <99efa47b0608250923v4dff8b3fte5f23da3aab81fa5@mail.gmail.com> <71166b3b0608250934s734a2fa3o12290b35a1611bfb@mail.gmail.com> <99efa47b0608250940u55e8d139g83b5abf3fa1817ea@mail.gmail.com> Message-ID: <71166b3b0608250945g5fef568fyeb6c9bd2729ddb3c@mail.gmail.com> On 8/25/06, linux user wrote: [snip] > > No by logging I mean capturing all output on console whether generated by > puts,p,print or by mongrel in a log file. Ohhh, you're trying to debug your app using puts, print and p? bad Idea, follow Ezra suggestion, doing that could brake your ERb renders or something worse... > > I appreciate your help and I know the problem is kinda subtle and may be > stupid too and I guess the only way out is get rid of my puts, p and print > everywhere and just logger.debug statements. > Thats sounds better :-) Regards, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From _ at whats-your.name Fri Aug 25 13:11:01 2006 From: _ at whats-your.name (carmen) Date: Fri, 25 Aug 2006 17:11:01 +0000 Subject: [Mongrel] SVN security hole explained In-Reply-To: <99efa47b0608250904t25ad623tcb563ed7240a272c@mail.gmail.com> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> <99efa47b0608250904t25ad623tcb563ed7240a272c@mail.gmail.com> Message-ID: <20060825171101.GB20153@replic.net> > This is a Subversion working copy administrative directory. > Visit http://subversion.tigris.org/ for more information. is there actualy anything important in there? i mean if you authenticate with SSH keys, and even if you dont, i dont think it caches passwords? and it surely doesnt cache the entire history ora nything (like a .git dir) so they wont be able to see all the embarassing oneline 'oops, working now' commits.. > > -daya > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From snacktime at gmail.com Fri Aug 25 14:52:34 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 25 Aug 2006 11:52:34 -0700 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> Message-ID: <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> You can't really blame mongrel for a bug in someone elses code. Zed is very clear on the website that the parser is strict. Properly urlencoding the query string is basic web programming 101 stuff. If it was me I would be nice but make it clear to your vendor that this is really just not acceptable and you expect to have it fixed asap. Chris From shanev at gmail.com Fri Aug 25 14:57:08 2006 From: shanev at gmail.com (Shane Vitarana) Date: Fri, 25 Aug 2006 13:57:08 -0500 Subject: [Mongrel] SVN security hole explained In-Reply-To: <20060825171101.GB20153@replic.net> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> <99efa47b0608250904t25ad623tcb563ed7240a272c@mail.gmail.com> <20060825171101.GB20153@replic.net> Message-ID: <4ab757a40608251157p454b486fkc0d349037fdfbaec@mail.gmail.com> I don't see why this is a huge security issue either. At the worst someone can view your commit history by viewing the .svn/entries file. The password auth files are stored in the repository itself, not in the .svn directories in the working copy. Shane Vitarana shanesbrian.net On 8/25/06, carmen <_ at whats-your.name> wrote: > > This is a Subversion working copy administrative directory. > > Visit http://subversion.tigris.org/ for more information. > > is there actualy anything important in there? i mean if you authenticate with SSH keys, and even if you dont, i dont think it caches passwords? and it surely doesnt cache the entire history ora nything (like a .git dir) so they wont be able to see all the embarassing oneline 'oops, working now' commits.. > > > > > -daya > > > _______________________________________________ > > 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 fanoflinux at gmail.com Fri Aug 25 15:40:54 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 14:40:54 -0500 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <71166b3b0608250945g5fef568fyeb6c9bd2729ddb3c@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> <99efa47b0608250923v4dff8b3fte5f23da3aab81fa5@mail.gmail.com> <71166b3b0608250934s734a2fa3o12290b35a1611bfb@mail.gmail.com> <99efa47b0608250940u55e8d139g83b5abf3fa1817ea@mail.gmail.com> <71166b3b0608250945g5fef568fyeb6c9bd2729ddb3c@mail.gmail.com> Message-ID: <99efa47b0608251240w7418123ey6b574713f2510a0c@mail.gmail.com> On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > [snip] > > > > No by logging I mean capturing all output on console whether generated > by > > puts,p,print or by mongrel in a log file. > > Ohhh, you're trying to debug your app using puts, print and p? > > bad Idea, follow Ezra suggestion, doing that could brake your ERb > renders or something worse... is that because Rails is not threadsafe? > > > I appreciate your help and I know the problem is kinda subtle and may be > > stupid too and I guess the only way out is get rid of my puts, p and > print > > everywhere and just logger.debug statements. > > > > Thats sounds better :-) > > Regards, > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > 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/20060825/b00d05c0/attachment.html From fanoflinux at gmail.com Fri Aug 25 15:43:26 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 14:43:26 -0500 Subject: [Mongrel] running multiple mongrels from same application root - is it safe? Message-ID: <99efa47b0608251243r2f638fddhb1b9d5681a060cd4@mail.gmail.com> Hi All I was wondering if I run multiple mongrels from same application root (one physical path) on the same machine is it safe as far as logging is concerned. I mean won't there be race conditions or file locks and out of sequence logging statements? TIA -daya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/0ac73777/attachment.html From ross.singer at library.gatech.edu Fri Aug 25 15:49:25 2006 From: ross.singer at library.gatech.edu (Ross Singer) Date: Fri, 25 Aug 2006 15:49:25 -0400 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> Message-ID: <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> While I agree with this fundamentally, pragmatically this is an unrealistic expectation. I get this vendor to fix it, another vendor pops up with another dumb unescaped character. You can type these characters into the query string on IE or Safari and get the same result, it wouldn't have to be vendor provided. I am not 'blaming' anybody. I'm just pointing out that it's a pretty chaotic world and, as a result, it's fairly important that (within reason) a webserver can handle the things that are thrown at it. My webserver is the one thing that /I/ can control. -Ross. On 8/25/06, snacktime wrote: > > You can't really blame mongrel for a bug in someone elses code. Zed > is very clear on the website that the parser is strict. Properly > urlencoding the query string is basic web programming 101 stuff. If > it was me I would be nice but make it clear to your vendor that this > is really just not acceptable and you expect to have it fixed asap. > > Chris > _______________________________________________ > 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/20060825/dd45ad81/attachment.html From ezmobius at gmail.com Fri Aug 25 16:50:35 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 25 Aug 2006 13:50:35 -0700 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <99efa47b0608251240w7418123ey6b574713f2510a0c@mail.gmail.com> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <99efa47b0608250857l23728053p30a7d67f7844a1ec@mail.gmail.com> <71166b3b0608250914i10c3e0b0w9477dcaee50607d0@mail.gmail.com> <99efa47b0608250923v4dff8b3fte5f23da3aab81fa5@mail.gmail.com> <71166b3b0608250934s734a2fa3o12290b35a1611bfb@mail.gmail.com> <99efa47b0608250940u55e8d139g83b5abf3fa1817ea@mail.gmail.com> <71166b3b0608250945g5fef568fyeb6c9bd2729ddb3c@mail.gmail.com> <99efa47b0608251240w7418123ey6b574713f2510a0c@mail.gmail.com> Message-ID: <6EA9C103-6EDA-485E-992F-EBEFD350A045@brainspl.at> On Aug 25, 2006, at 12:40 PM, linux user wrote: > > > On 8/25/06, Luis Lavena wrote: > On 8/25/06, linux user wrote: > [snip] > > > > No by logging I mean capturing all output on console whether > generated by > > puts,p,print or by mongrel in a log file. > > Ohhh, you're trying to debug your app using puts, print and p? > > bad Idea, follow Ezra suggestion, doing that could brake your ERb > renders or something worse... > > is that because Rails is not threadsafe? Nope its got nothing to do with threading. Its just that within the context of a web application stdout doesn't mean what you think it means. THats why you should just use the logger. Erb does its own thing with stdout so puts and print in rails is a nono. -Ezra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/e1d9f409/attachment.html From snacktime at gmail.com Fri Aug 25 17:25:42 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 25 Aug 2006 14:25:42 -0700 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> Message-ID: <1f060c4c0608251425w20813b0akc329fdedd1947e73@mail.gmail.com> On 8/25/06, Ross Singer wrote: > While I agree with this fundamentally, pragmatically this is an unrealistic > expectation. I get this vendor to fix it, another vendor pops up with > another dumb unescaped character. For you maybe. I am actually using the parser in another project specifically because I like how strict it is. In the end it's up to Zed though. From snacktime at gmail.com Fri Aug 25 17:30:18 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 25 Aug 2006 14:30:18 -0700 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: <3543F97C-AC34-453B-97B2-E973D022B2F9@brainspl.at> References: <44EEFF13.8080302@ml1.jesc.ch> <3543F97C-AC34-453B-97B2-E973D022B2F9@brainspl.at> Message-ID: <1f060c4c0608251430l5255a8ao45dce73ac8fc71b@mail.gmail.com> On 8/25/06, Ezra Zygmuntowicz wrote: > > This is certainly an interesting idea but the problem I see with > this is ActiveRecord's database connection hates fork. Most of the > time if you use fork in a rails app you will immediately get the > "Mysql server has gone away" error. THere is a workaround you can use > but its not pretty. Not that it would be worth the effort, but you could create a process pool and load rails in the children instead of the parent. Chris From mongrel at philip.pjkh.com Fri Aug 25 17:37:59 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Fri, 25 Aug 2006 16:37:59 -0500 (CDT) Subject: [Mongrel] SVN security hole explained In-Reply-To: <4ab757a40608251157p454b486fkc0d349037fdfbaec@mail.gmail.com> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> <99efa47b0608250904t25ad623tcb563ed7240a272c@mail.gmail.com> <20060825171101.GB20153@replic.net> <4ab757a40608251157p454b486fkc0d349037fdfbaec@mail.gmail.com> Message-ID: <20060825163654.K73908@bravo.pjkh.com> > I don't see why this is a huge security issue either. At the worst > someone can view your commit history by viewing the .svn/entries file. > The password auth files are stored in the repository itself, not in > the .svn directories in the working copy. Maybe not huge, but that file gives you logins. Which then helps attack in other ways... and it also let's them know you're running subversion and how... so gives them a host to attack perhaps... 2 more cents... > > Shane Vitarana > shanesbrian.net > > On 8/25/06, carmen <_ at whats-your.name> wrote: >>> This is a Subversion working copy administrative directory. >>> Visit http://subversion.tigris.org/ for more information. >> >> is there actualy anything important in there? i mean if you authenticate with SSH keys, and even if you dont, i dont think it caches passwords? and it surely doesnt cache the entire history ora nything (like a .git dir) so they wont be able to see all the embarassing oneline 'oops, working now' commits.. >> >>> >>> -daya >> >>> _______________________________________________ >>> 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 asa at caltech.edu Fri Aug 25 18:08:49 2006 From: asa at caltech.edu (Asa Hopkins) Date: Fri, 25 Aug 2006 15:08:49 -0700 Subject: [Mongrel] really a GemPlugin/mongrel_cluster question Message-ID: Hi folks, I'd like to run the Mongrel prerelease (0.3.13.4 prerelease) and mongrel_cluster 0.2.1 on my shared host (which doesn't want to install prerelease software for all to use). I can install the gems in my own directory, and run mongrel 0.3.13.4 with --prefix just fine. However, I think due to the GemPlugin structure, even my new mongrel_rails loads up mongrel_cluster 0.2.0, which doesn't support -- prefix. If I try telling rubygems to ignore the other installed gems (in the main gem structure), it loses track of itself (gem environment fails, for example). Ideas? 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/20060825/b3f88431/attachment-0001.html From zedshaw at zedshaw.com Fri Aug 25 18:57:12 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 15:57:12 -0700 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> Message-ID: <1156546632.6093.17.camel@localhost.localdomain> On Fri, 2006-08-25 at 07:19 -0400, Ross Singer wrote: > Well, the urgency of this has waned a bit, since I successfully got > lighty/fcgi working last night. > > Still, I've been pretty fond on mongrel, so far, so I'd like to > migrate back to it eventually. Hey Ross, I missed this. Here's what you do to let me see if the client really is wrong: 1) get the latest 0.3.13.4 pre-release: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ 2) Start your mongrel application 3) Before you make your request, hit with a USR1 signal: killall -USR1 mongrel_rails (don't do killall if you've got other ones running you want to leave alone). 4) Hit your web page like normal, and now Mongrel will dump the full data it received and the params it parsed before it complained. Send me the logs and I'll take a look. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 18:58:36 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 15:58:36 -0700 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: <44EEFF13.8080302@ml1.jesc.ch> References: <44EEFF13.8080302@ml1.jesc.ch> Message-ID: <1156546716.6093.19.camel@localhost.localdomain> On Fri, 2006-08-25 at 15:45 +0200, Jean-Eric Cuendet (ML) wrote: > Hi, > It would be nice if Mongrel would do multiapps in one Mongrel instance. > For the moment, I have one Mongrel for each app of my server, each on a > different port. > For example: > http://server:8080/app1 > http://server:8080/app2 > instead of: > http://server:8080/ > http://server:8081/ > Is that planned? Unfortunately Rails can't do this. You can run multiple Camping apps in Mongrel no problem, but not Rails. Rails is the king of the world so it owns everything. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:00:57 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:00:57 -0700 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: <44EEFF13.8080302@ml1.jesc.ch> References: <44EEFF13.8080302@ml1.jesc.ch> Message-ID: <1156546857.6093.22.camel@localhost.localdomain> On Fri, 2006-08-25 at 15:45 +0200, Jean-Eric Cuendet (ML) wrote: > Hi, > It would be nice if Mongrel would do multiapps in one Mongrel instance. > For the moment, I have one Mongrel for each app of my server, each on a > different port. > For example: > http://server:8080/app1 > http://server:8080/app2 > instead of: > http://server:8080/ > http://server:8081/ > Is that planned? Ah, but you can simulate this. I should mention that 0.3.13.4 pre-release has the --prefix options, which will mount a Rails application at a different path. You could then put apache in front of two different mongrel instances ran with: mongrel_rails start -e production --prefix=/app1 mongrel_rails start -e production --prefix=/app2 And it'd work about the same. You can install the pre-release with: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:07:49 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:07:49 -0700 Subject: [Mongrel] SVN security hole explained In-Reply-To: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> Message-ID: <1156547269.6093.27.camel@localhost.localdomain> On Fri, 2006-08-25 at 11:26 -0400, Francois Beausoleil wrote: > Hi all, > > If you are using Pound / Pen or another load balancer, I believe you > should read this: > > http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel > > My article refers to Dan Benjamin's > http://hivelogic.com/articles/2006/04/30/preventing_svn_exposure > > My point is that even though we are preventing Apache from serving > anything except a select few file extensions, Mongrel is serving up > the files behind the scenes. > > So, http://myrailsapp.com/.svn/entries exposes Subversion metadata. > > Go and read the posts, well worth the time: > http://blog.teksol.info/articles/2006/08/25/subversion-metadata-exposure-on-mongrel Good points all around, but that's not really a Mongrel security hole, that's an svn security hole. The fact that it puts tons of crap into your directories along with all the files it's managing is always a bad idea. It's also the reason I use svk and don't like putting svn online. But, now with everyone using Capistrano I can see this as a pretty big problem. I wonder if you could just modify the cap tasks to simply delete all the .svn directories after the app is deployed? find . -name ".svn" -exec rm -rf {} \; And then problem is permanently solved. I believe this would work with capistrano since it makes whole new checked out directories with svn and doesn't use it after that. Anyway, good write-up, I'll add that to the Pound documentation for Mongrel. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:08:42 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:08:42 -0700 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> Message-ID: <1156547322.6093.29.camel@localhost.localdomain> On Fri, 2006-08-25 at 11:29 -0400, Wilson Bilkovich wrote: > On 8/25/06, Luis Lavena wrote: > > On 8/25/06, linux user wrote: > > > > > > I am begining to think its platform related Win2K SP4, I don't have access > > > to XP. May be I need to re-install ruby & rails ?? but that would be > > > ridiculous. > > > > > > > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on > > XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. > > > > I've never seen Mongrel save a log file on Win32, and I use it every > day on Windows XP. Way to report that bug Wilson. :-) I'll build a pre-release of 0.3.13.4 for win32 today (after I squash the memory leak) and see if there's something that might have been fixed with the latest changes to the paths. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:14:38 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:14:38 -0700 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: References: <44EEFF13.8080302@ml1.jesc.ch> Message-ID: <1156547678.6093.33.camel@localhost.localdomain> On Fri, 2006-08-25 at 10:22 -0600, Kirk Haines wrote: > On 8/25/06, Jarkko Laine wrote: > > > No offense, Jean-Eric, but you already asked this two weeks ago [1] > > and got 7 responses, including one from Zed himself [2]. > > > > The answer: You can't do that as long as Rails is not thread-safe, in > > other words not any time soon. > Change Mongrel and the Rails handler so that one has the option of > forking instead of spawning a new thread to handle the request. It > might be a usably fast way to get multiple Rails requests out of a > single Mongrel. On my test server (a pretty modest AMD based box > running a 2.4 Linux kernel), I can fork a little over 200 7Mb > processes a second in a simple test. The problem with that Kirk is a large majority of people use VPS for their deployment, and the OS accounts for these forked processes as if they're using up the shared ram. In Linux this bring the wrath of their dumb killer process and it kills them off. Now, what *I* want to investigate is getting a framework (any one) working on Ruby 1.9 and look at just creating a bunch of YARV VMs which are all handling each request sequentially. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:21:09 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:21:09 -0700 Subject: [Mongrel] SVN security hole explained In-Reply-To: <20060825171101.GB20153@replic.net> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> <99efa47b0608250904t25ad623tcb563ed7240a272c@mail.gmail.com> <20060825171101.GB20153@replic.net> Message-ID: <1156548069.6093.38.camel@localhost.localdomain> On Fri, 2006-08-25 at 17:11 +0000, carmen wrote: > > This is a Subversion working copy administrative directory. > > Visit http://subversion.tigris.org/ for more information. > > is there actualy anything important in there? i mean if you authenticate with SSH keys, and even if you dont, i dont think it caches passwords? and it surely doesnt cache the entire history ora nything (like a .git dir) so they wont be able to see all the embarassing oneline 'oops, working now' commits.. You never know what they put in there. Having worked on a RCS before I can tell you all the major authors love tossing the world into their repositories. Passwords, previous revisions that had passwords, your daughter's baby pictures, all sorts of stuff. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:26:15 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:26:15 -0700 Subject: [Mongrel] running multiple mongrels from same application root - is it safe? In-Reply-To: <99efa47b0608251243r2f638fddhb1b9d5681a060cd4@mail.gmail.com> References: <99efa47b0608251243r2f638fddhb1b9d5681a060cd4@mail.gmail.com> Message-ID: <1156548375.6093.41.camel@localhost.localdomain> On Fri, 2006-08-25 at 14:43 -0500, linux user wrote: > Hi All > > I was wondering if I run multiple mongrels from same application root > (one physical path) on the same machine is it safe as far as logging > is concerned. > > I mean won't there be race conditions or file locks and out of > sequence logging statements? After seeing you struggle with this, I suggest you use the built-in Rails logging facility instead of p, puts, and print. In any of your actions you just do: logger.debug("stuff") And it shows up in the development.log or production.log. The mongrel.log is really only for major catastrophe and reporting bugs to me. Otherwise, yes they'll be reasonably maintained but no promises. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:34:16 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:34:16 -0700 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> Message-ID: <1156548856.6093.49.camel@localhost.localdomain> On Fri, 2006-08-25 at 15:49 -0400, Ross Singer wrote: > While I agree with this fundamentally, pragmatically this is an > unrealistic expectation. I get this vendor to fix it, another vendor > pops up with another dumb unescaped character. > It's most likely not a problem with unescaped characters but something else (I won't know until you send me the logs). > You can type these characters into the query string on IE or Safari > and get the same result, it wouldn't have to be vendor provided. Well, this is the problem: almost all security attacks against web servers take advantage of how loose they interpret the protocol in order to handle user errors that really the browser should be dealing with. If you think about it, you have two situations: 1) Dumb user typing into a browser -- browser fixes it. 2) Trained programmer writing an API -- follow the RFC. So the trade-off of being more strict is that a few folks who don't do either of the above have to go change their interactions. > I am not 'blaming' anybody. I'm just pointing out that it's a pretty > chaotic world and, as a result, it's fairly important that (within > reason) a webserver can handle the things that are thrown at it. > Yep, that's understandable, but it's also why so many other web servers get hacked so often. The HTTP RFC is very complex, and the best way I've found to deal with it is to use a strict parser. That being said, the parser has been wrong in the past so shoot me the logs and I'll look at how to update it. > My webserver is the one thing that /I/ can control. This also bring up another point, not every solution is right for every job. Mongrel's the hot thing but I'm the first to suggest another solution if Mongrel doesn't work out, and have many times told people to not adopt Mongrel if they've got something that works. If fcgi works then stick with it. Another option you might like is litespeed: http://litespeedtech.com/community/wiki/doku.php?id=litespeed_wiki:ruby_rails It's fast, commercial, has support, pretty easy to setup and they do fast work. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:38:14 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:38:14 -0700 Subject: [Mongrel] Multi apps in one Mongrel instance In-Reply-To: <1f060c4c0608251430l5255a8ao45dce73ac8fc71b@mail.gmail.com> References: <44EEFF13.8080302@ml1.jesc.ch> <3543F97C-AC34-453B-97B2-E973D022B2F9@brainspl.at> <1f060c4c0608251430l5255a8ao45dce73ac8fc71b@mail.gmail.com> Message-ID: <1156549094.6093.52.camel@localhost.localdomain> On Fri, 2006-08-25 at 14:30 -0700, snacktime wrote: > On 8/25/06, Ezra Zygmuntowicz wrote: > > > > > This is certainly an interesting idea but the problem I see with > > this is ActiveRecord's database connection hates fork. Most of the > > time if you use fork in a rails app you will immediately get the > > "Mysql server has gone away" error. THere is a workaround you can use > > but its not pretty. > > Not that it would be worth the effort, but you could create a process > pool and load rails in the children instead of the parent. That was the original plan actually, and SCGI Rails Runner did that at first. Until I found out that Ruby's IO seems to have problems with a socket being multiplexed. This was in the dark days of 1.8.0 ruby, but there'd be lost data in one process that'd show up in another (which is really not cool). Not to mention this don't work on win32 (but what does really). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Aug 25 19:42:16 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 16:42:16 -0700 Subject: [Mongrel] really a GemPlugin/mongrel_cluster question In-Reply-To: References: Message-ID: <1156549336.6093.55.camel@localhost.localdomain> On Fri, 2006-08-25 at 15:08 -0700, Asa Hopkins wrote: > Hi folks, > > > I'd like to run the Mongrel prerelease (0.3.13.4 prerelease) and > mongrel_cluster 0.2.1 on my shared host (which doesn't want to install > prerelease software for all to use). I can install the gems in my own > directory, and run mongrel 0.3.13.4 with --prefix just fine. However, > I think due to the GemPlugin structure, even my new mongrel_rails > loads up mongrel_cluster 0.2.0, which doesn't support --prefix. If I > try telling rubygems to ignore the other installed gems (in the main > gem structure), it loses track of itself (gem environment fails, for > example). I vaguely remember that you can change where rubygems "lives" with environment variables. But, if you've got shell access and can build stuff yourself, why not just build your own complete kit? Grab the ruby source and configure it to install into your home directory then change your PATH in your .bashrc (or whatever shell you want). Then, you can install anything you want independently. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From fanoflinux at gmail.com Fri Aug 25 19:48:09 2006 From: fanoflinux at gmail.com (linux user) Date: Fri, 25 Aug 2006 18:48:09 -0500 Subject: [Mongrel] running multiple mongrels from same application root - is it safe? In-Reply-To: <1156548375.6093.41.camel@localhost.localdomain> References: <99efa47b0608251243r2f638fddhb1b9d5681a060cd4@mail.gmail.com> <1156548375.6093.41.camel@localhost.localdomain> Message-ID: <99efa47b0608251648u16dd14e0mb9a6b1c5fc6e85a0@mail.gmail.com> On 8/25/06, Zed Shaw wrote: > > On Fri, 2006-08-25 at 14:43 -0500, linux user wrote: > > Hi All > > > > I was wondering if I run multiple mongrels from same application root > > (one physical path) on the same machine is it safe as far as logging > > is concerned. > > > > I mean won't there be race conditions or file locks and out of > > sequence logging statements? > > After seeing you struggle with this, I suggest you use the built-in > Rails logging facility instead of p, puts, and print. In any of your > actions you just do: > > logger.debug("stuff") > > And it shows up in the development.log or production.log. > > The mongrel.log is really only for major catastrophe and reporting bugs > to me. > > Otherwise, yes they'll be reasonably maintained but no promises. I agree with not using print,. puts and p But what I am trying to understand and missing are 1. If I run multipe mongrels pointing to the same application root i.e. same folder on one and only one machine. Is it possible to have logging out of sequence i.e. first request logged in after second request or worse file locks and deadlocks. 2. On Win2K Sp4 atleas there is no mongrel.log that is ever created. So no chance of ever catching a catastrophic failure log -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > 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/20060825/21def4da/attachment.html From ross.singer at library.gatech.edu Fri Aug 25 20:08:20 2006 From: ross.singer at library.gatech.edu (Ross Singer) Date: Fri, 25 Aug 2006 20:08:20 -0400 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <1156548856.6093.49.camel@localhost.localdomain> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> <1156548856.6093.49.camel@localhost.localdomain> Message-ID: <23b83f160608251708y225eff32u3e6db4a0484d565e@mail.gmail.com> Zed, Thanks for getting back to me on this. Here is the log from the offending request: --- Fri Aug 25 20:01:09 EDT 2006: BAD CLIENT (127.0.0.1): Invalid HTTP format, parsing fails. Fri Aug 25 20:01:09 EDT 2006: REQUEST DATA: "GET /resolve?genre=article&issn=00224898&title=Journal+of+Terramechanics&volume=43&issue=4&date=20061001&atitle=Requirements+and+system+design+for+a+robot+performing+selective+cleaning+in+young+forest+stands.&spage=505&sid=EBSCO:aph&pid=Vestlund%2c+Karin%3bHellstr%C3%B6m%2c+Thomas>>2183092720061001aph HTTP/1.1\r\nHost: umlaut.library.gatech.edu\r\nUser-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/312.8 (KHTML, like Gecko) Safari/312.6\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en\r\nCookie: _session_id=8999f072c7fcf77d13e741c9ee8faccc\r\nMax-Forwards: 10\r\nX-Forwarded-For: 24.98.252.118\r\nX-Forwarded-Host: umlaut.library.gatech.edu\r\nX-Forwarded-Server: umlaut.library.gatech.edu\r\n\r\n" --- PARAMS: {"REQUEST_PATH"=>"/resolve", "REQUEST_METHOD"=>"GET"} --- Is this what you were looking for? IE and Safari (and presumably other KHTML based browsers) don't escape the ">>". Gecko and Opera do. Again, here's the URL: http://umlaut.library.gatech.edu/resolve?genre=article&issn=00224898&title=Journal+of+Terramechanics&volume=43&issue=4&date=20061001&atitle=Requirements+and+system+design+for+a+robot+performing+selective+cleaning+in+young+forest+stands.&spage=505&sid=EBSCO:aph&pid=Vestlund%2c+Karin%3bHellstr?m%2c+Thomas>>2183092720061001aph The ">>" is the critical part. On 8/25/06, Zed Shaw wrote: > On Fri, 2006-08-25 at 15:49 -0400, Ross Singer wrote: > > While I agree with this fundamentally, pragmatically this is an > > unrealistic expectation. I get this vendor to fix it, another vendor > > pops up with another dumb unescaped character. > > > It's most likely not a problem with unescaped characters but something > else (I won't know until you send me the logs). > > > You can type these characters into the query string on IE or Safari > > and get the same result, it wouldn't have to be vendor provided. > > Well, this is the problem: almost all security attacks against web > servers take advantage of how loose they interpret the protocol in order > to handle user errors that really the browser should be dealing with. > I completely understand this. > If you think about it, you have two situations: > > 1) Dumb user typing into a browser -- browser fixes it. Except it's not. > 2) Trained programmer writing an API -- follow the RFC. Agreed. But, again, YMMV. > > So the trade-off of being more strict is that a few folks who don't do > either of the above have to go change their interactions. > Right. I guess I'm just pointing out "real world behavior" that broke mongrel. But, yes, you're right, it's sort of 'encouraging' bad behavior to adjust mongrel to it. > > I am not 'blaming' anybody. I'm just pointing out that it's a pretty > > chaotic world and, as a result, it's fairly important that (within > > reason) a webserver can handle the things that are thrown at it. > > > Yep, that's understandable, but it's also why so many other web servers > get hacked so often. The HTTP RFC is very complex, and the best way > I've found to deal with it is to use a strict parser. > Sure. Understandable. > That being said, the parser has been wrong in the past so shoot me the > logs and I'll look at how to update it. > > > My webserver is the one thing that /I/ can control. > > This also bring up another point, not every solution is right for every > job. Mongrel's the hot thing but I'm the first to suggest another > solution if Mongrel doesn't work out, and have many times told people to > not adopt Mongrel if they've got something that works. > Well, I liked mongrel for the simple fact that it's uber-easy to deploy (and, until last night, I couldn't get fcgi to work, period). If I'm helping another library install my app, the ability to say, "Type gem install mongrel; gem install mongrel_cluster" and they're basically running is a ton better than the alternatives. I mean, yes, fcgi is working (and, like I said, this is new), but 'options' are nice. Especially if a library is stuck Solaris or AIX machine that they don't have much control on. But, yeah, I see both sides of this. Thanks, -Ross. > If fcgi works then stick with it. Another option you might like is > litespeed: > > http://litespeedtech.com/community/wiki/doku.php?id=litespeed_wiki:ruby_rails > > It's fast, commercial, has support, pretty easy to setup and they do > fast work. > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From wilsonb at gmail.com Fri Aug 25 20:08:52 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Fri, 25 Aug 2006 20:08:52 -0400 Subject: [Mongrel] mongrel logging on win32 platform and win32 service In-Reply-To: <1156547322.6093.29.camel@localhost.localdomain> References: <99efa47b0608241528o2a525bd1ka14fb5e6cd32daee@mail.gmail.com> <71166b3b0608241558l580cdeecwdb747dfd91c548b0@mail.gmail.com> <99efa47b0608250617uae12e2n2e7354377afcce28@mail.gmail.com> <71166b3b0608250659x47cc3f4cwc8df48a471a854a4@mail.gmail.com> <99efa47b0608250722j6667822ake73867fc4cbc3c9c@mail.gmail.com> <71166b3b0608250742k19259340wb3ec9e65479dfd26@mail.gmail.com> <99efa47b0608250807p6184a0e3s37721062fd3b80dd@mail.gmail.com> <71166b3b0608250818n4a17df99r57899a2785555b8a@mail.gmail.com> <1156547322.6093.29.camel@localhost.localdomain> Message-ID: On 8/25/06, Zed Shaw wrote: > On Fri, 2006-08-25 at 11:29 -0400, Wilson Bilkovich wrote: > > On 8/25/06, Luis Lavena wrote: > > > On 8/25/06, linux user wrote: > > > > > > > > I am begining to think its platform related Win2K SP4, I don't have access > > > > to XP. May be I need to re-install ruby & rails ?? but that would be > > > > ridiculous. > > > > > > > > > > I have installed ruby, One-Click-Installer and plain ruby-mswin32 on > > > XP (SP1&SP2), W2K SP3 and SP4 and W2K3 Server, all without problems. > > > > > > > I've never seen Mongrel save a log file on Win32, and I use it every > > day on Windows XP. > > Way to report that bug Wilson. :-) > > I'll build a pre-release of 0.3.13.4 for win32 today (after I squash the > memory leak) and see if there's something that might have been fixed > with the latest changes to the paths. > Those stack traces are MINE. You think I'm just going to GIVE them to the developer?? From zedshaw at zedshaw.com Fri Aug 25 22:09:41 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 19:09:41 -0700 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <23b83f160608251708y225eff32u3e6db4a0484d565e@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> <1156548856.6093.49.camel@localhost.localdomain> <23b83f160608251708y225eff32u3e6db4a0484d565e@mail.gmail.com> Message-ID: <1156558181.16471.12.camel@localhost.localdomain> On Fri, 2006-08-25 at 20:08 -0400, Ross Singer wrote: > Zed, > > Thanks for getting back to me on this. > > Here is the log from the offending request: > > Is this what you were looking for? Yep I'll look at that. But right from the RFC you have this: unsafe = (CTL | " " | "\"" | "#" | "%" | "<" | ">"); Even they label that as "unsafe" so I'm going to be hard pressed to allow this in. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From ross.singer at library.gatech.edu Fri Aug 25 22:58:44 2006 From: ross.singer at library.gatech.edu (Ross Singer) Date: Fri, 25 Aug 2006 22:58:44 -0400 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <1156558181.16471.12.camel@localhost.localdomain> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> <1156548856.6093.49.camel@localhost.localdomain> <23b83f160608251708y225eff32u3e6db4a0484d565e@mail.gmail.com> <1156558181.16471.12.camel@localhost.localdomain> Message-ID: <23b83f160608251958o233d549bud66491d377ae169c@mail.gmail.com> On 8/25/06, Zed Shaw wrote: > > On Fri, 2006-08-25 at 20:08 -0400, Ross Singer wrote: > > Zed, > > > > Thanks for getting back to me on this. > > > > Here is the log from the offending request: > > > > > Is this what you were looking for? > > Yep I'll look at that. But right from the RFC you have this: > > unsafe = (CTL | " " | "\"" | "#" | "%" | "<" | ">"); > > Even they label that as "unsafe" so I'm going to be hard pressed to > allow this in. Again, I wouldn't say I'm opposed to this. :) All I'm sayin' "Real World Scenario". Also "85% browser market share". I can probably talk EBSCO into fixing their bad URLs, but I don't have any control over Internet Explorer or Microsoft. I've got no influence there. I'm not trying to be passive-aggressive at all about this (I really want to stress that), I'm just stating that this is something that's bound to come up again. Because IE sucks. I guess Safari does too. But good lord a lot people use them. -Ross. -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > 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/20060825/e8d24c95/attachment.html From ross.singer at library.gatech.edu Fri Aug 25 23:01:48 2006 From: ross.singer at library.gatech.edu (Ross Singer) Date: Fri, 25 Aug 2006 23:01:48 -0400 Subject: [Mongrel] Invalid HTTP format, parsing fails In-Reply-To: <23b83f160608251958o233d549bud66491d377ae169c@mail.gmail.com> References: <23b83f160608241527l62e8ba60l8bf6e904a4f03798@mail.gmail.com> <23b83f160608250419u565b37b8kfb4cf129f24ec257@mail.gmail.com> <1f060c4c0608251152k14be7934y15a123463421e1c8@mail.gmail.com> <23b83f160608251249j2f04aa4er8f99c0ceb81801c6@mail.gmail.com> <1156548856.6093.49.camel@localhost.localdomain> <23b83f160608251708y225eff32u3e6db4a0484d565e@mail.gmail.com> <1156558181.16471.12.camel@localhost.localdomain> <23b83f160608251958o233d549bud66491d377ae169c@mail.gmail.com> Message-ID: <23b83f160608252001l69756e89p6d691b63b7a89c57@mail.gmail.com> Also, I think I want to reiterate at this point about how resolution on this is not as pressing for me anymore. You're right about the fcgi thing. So... I guess take this however you want :) -Ross. On 8/25/06, Ross Singer wrote: > > On 8/25/06, Zed Shaw wrote: > > > On Fri, 2006-08-25 at 20:08 -0400, Ross Singer wrote: > > > Zed, > > > > > > Thanks for getting back to me on this. > > > > > > Here is the log from the offending request: > > > > > > > > Is this what you were looking for? > > > > Yep I'll look at that. But right from the RFC you have this: > > > > unsafe = (CTL | " " | "\"" | "#" | "%" | "<" | ">"); > > > > Even they label that as "unsafe" so I'm going to be hard pressed to > > allow this in. > > > Again, I wouldn't say I'm opposed to this. :) > > All I'm sayin' "Real World Scenario". Also "85% browser market share". > > I can probably talk EBSCO into fixing their bad URLs, but I don't have any > control over Internet Explorer or Microsoft. I've got no influence there. > > I'm not trying to be passive-aggressive at all about this (I really want > to stress that), I'm just stating that this is something that's bound to > come up again. > > Because IE sucks. I guess Safari does too. > > But good lord a lot people use them. > > -Ross. > > > -- > > > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > 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/20060825/2f62e066/attachment-0001.html From zedshaw at zedshaw.com Fri Aug 25 23:31:08 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Fri, 25 Aug 2006 20:31:08 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) Message-ID: <1156563068.29544.19.camel@localhost.localdomain> Howdy Folks, This release is after painstaking analysis of a memory leak that was reported by Bradley Taylor, reduced by myself, and then fixed after much work. You should all thank Bradley for finding the bizarre fix. It turns out the Ruby has a memory leak when you use pretty much any thread locking primitive other than Sync (Mutex, Monitor, etc.): http://pastie.caboo.se/10194 The fix (for whatever reason) is to use Sync and put it in a block: http://pastie.caboo.se/10317 Those two scripts are mini versions of how Mongrel manages threads so that I could figure out a solution or get some input. The graph is reported ram usage samples 1/second. As you can see the first leaking graph goes up and doesn't go down, the second (fixed) graph cycles properly. ** This is a Ruby issue, so if you have software using Mutex or Monitor, change to Sync now. ** Tests of this latest pre-release show that the RAM is properly cycled by the GC and that it's actually finally solved. If you run your app using this release and you still have a leak then use the memory debugging tools mongrel has to rule out your code (see below). CHANGES * No more allow_concurrency. Until Ruby's fixed I can't let people do this anymore. * USR1 debugging. If you're wondering about how Mongrel's locking of Rails impacts your application, or what is causing BAD CLIENT then just hit your mongrel_rails with USR1 and Mongrel will tell you. * More extensive and accurate memory debugging. Use -B and look at the log/mongrel_log/objects.log to get a good idea of counts of objects, delta changes in counts, and mean+standard deviation lengths of objects with length methods. * Fixes a few places where sockets are closed and left in CLOSE_WAIT. INSTALLING As per usual: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Initial tests show it works on 1.8.5 and is actually faster, but this is unsupported for now. TESTING THIS RELEASE If you want to test the memory leak, here's the process: 1) Start your application in *production* mode: mongrel_rails start -e production 2) Hit it with USR1: killall -USR1 mongrel_rails 3) Start running something that prints out the ram (here's my fish code): while sleep 1 ps aux | grep mongrel_rails | grep -v grep | grep -v gvim | ruby -aln -e "puts split[4 .. 5].join(',')" end 4) Thrash a simple rails controller with httperf: httperf --server 127.0.0.1 --port 3000 --num-conns 1000 --rate 120 --uri /testuri What you want to do is adjust num-conns and rate until Mongrel reports "X threads waiting for /testuri..." The bug only manifests itself when threads pile up behind the guard around Rails dispatching. This is also how you'd find out which Rails actions are too slow. Please report any bugs you find in this release, and a Win32 release will come out after I'm sure it works for everyone else. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From snacktime at gmail.com Sat Aug 26 00:24:01 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 25 Aug 2006 21:24:01 -0700 Subject: [Mongrel] Mongrel grammar file Message-ID: <1f060c4c0608252124g27b883d1m1c233d9946de0f5c@mail.gmail.com> Hey Zed, any chance you mind sharing the grammar file you use with lemon to create the parser? I've been meaning to sit down and learn how to use one of those things. If not, any suggestions on a good resource for learning how to use a LALR parser? From jeremy at bitsweat.net Sat Aug 26 01:02:28 2006 From: jeremy at bitsweat.net (Jeremy Kemper) Date: Fri, 25 Aug 2006 22:02:28 -0700 Subject: [Mongrel] Mongrel grammar file In-Reply-To: <1f060c4c0608252124g27b883d1m1c233d9946de0f5c@mail.gmail.com> References: <1f060c4c0608252124g27b883d1m1c233d9946de0f5c@mail.gmail.com> Message-ID: <69a2885c0608252202t1ab67d7dwb75b67f982da99c@mail.gmail.com> On 8/25/06, snacktime wrote: > > Hey Zed, any chance you mind sharing the grammar file you use with > lemon to create the parser? I've been meaning to sit down and learn > how to use one of those things. If not, any suggestions on a good > resource for learning how to use a LALR parser? The Ragel grammar is ext/http11/http11_parser.rl Lighttpd uses Lemon. jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060825/59a6d413/attachment.html From snacktime at gmail.com Sat Aug 26 01:42:50 2006 From: snacktime at gmail.com (snacktime) Date: Fri, 25 Aug 2006 22:42:50 -0700 Subject: [Mongrel] Mongrel grammar file In-Reply-To: <69a2885c0608252202t1ab67d7dwb75b67f982da99c@mail.gmail.com> References: <1f060c4c0608252124g27b883d1m1c233d9946de0f5c@mail.gmail.com> <69a2885c0608252202t1ab67d7dwb75b67f982da99c@mail.gmail.com> Message-ID: <1f060c4c0608252242n2d7321faw717f55b6e27f37e3@mail.gmail.com> On 8/25/06, Jeremy Kemper wrote: > On 8/25/06, snacktime wrote: > > > Hey Zed, any chance you mind sharing the grammar file you use with > > lemon to create the parser? I've been meaning to sit down and learn > > how to use one of those things. If not, any suggestions on a good > > resource for learning how to use a LALR parser? > > > The Ragel grammar is ext/http11/http11_parser.rl > > Lighttpd uses Lemon. > > jeremy Duh, I didn't look in subversion I was just looking at what came with the gem. Thanks Jeremy. From charles at nednieuws.com Sat Aug 26 05:11:52 2006 From: charles at nednieuws.com (Charles M. Gerungan) Date: Sat, 26 Aug 2006 11:11:52 +0200 Subject: [Mongrel] SVN security hole explained In-Reply-To: <1156547269.6093.27.camel@localhost.localdomain> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> <1156547269.6093.27.camel@localhost.localdomain> Message-ID: <048B97B8-ACF9-4714-8F39-EEE9CC59237E@nednieuws.com> On 26-aug-2006, at 1:07, Zed Shaw wrote: > I wonder if you could just modify the cap tasks to simply > delete all the .svn directories after the app is deployed? > > find . -name ".svn" -exec rm -rf {} \; Wouldn't this result in the same as doing an export, which Ezra already suggested? -- Regards, Charles. From zedshaw at zedshaw.com Sat Aug 26 08:48:00 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 26 Aug 2006 05:48:00 -0700 Subject: [Mongrel] SVN security hole explained In-Reply-To: <048B97B8-ACF9-4714-8F39-EEE9CC59237E@nednieuws.com> References: <41d5fadf0608250826u294a0723w6fb5c3473808725@mail.gmail.com> <1156547269.6093.27.camel@localhost.localdomain> <048B97B8-ACF9-4714-8F39-EEE9CC59237E@nednieuws.com> Message-ID: <1156596480.6120.39.camel@localhost.localdomain> On Sat, 2006-08-26 at 11:11 +0200, Charles M. Gerungan wrote: > On 26-aug-2006, at 1:07, Zed Shaw wrote: > > > I wonder if you could just modify the cap tasks to simply > > delete all the .svn directories after the app is deployed? > > > > find . -name ".svn" -exec rm -rf {} \; > > Wouldn't this result in the same as doing an export, which Ezra > already suggested? > Yeps, but doesn't do it for people who already have their stuff checked out. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From hutch at recursive.ca Sat Aug 26 10:22:10 2006 From: hutch at recursive.ca (Bob Hutchison) Date: Sat, 26 Aug 2006 10:22:10 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: References: <1156563068.29544.19.camel@localhost.localdomain> Message-ID: On Aug 26, 2006, at 5:12 AM, ara.t.howard at noaa.gov wrote: > in any case, i'd carefully examine your tests (or the rails code if > that is > indeed what it's modeled after) to make sure that they test > Mutex/Sync/Thread/Ruby and not your os virtual memory system and > look closely > at the results again - like i said, i have had issues with sync.rb. > > the point here is that it is probably the code in question and not > Mutex per > se that was causing your process to grow in vmsize. > I ran your test on OS/X looking at VSZ and RSS. And, like you, initially got Sync with no leak visible, and mutex with what looks like a bad leak. However, I notice that you only called GC once. I have a years old habit of always running GC at least three times when I really wanted GC to run (and in Java I had a loop that ran GC until it stopped freeing stuff which in some cases was eight or nine times). Superstition? Apparently not. On OS X, when I run GC three times neither sync nor mutex show a memory leak. Zed, just for fun, try running GC a few times in a row (like GC.start; GC.start; GC.start) . Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur -- xampl for Ruby -- From hutch at recursive.ca Sat Aug 26 11:20:31 2006 From: hutch at recursive.ca (Bob Hutchison) Date: Sat, 26 Aug 2006 11:20:31 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: References: <1156563068.29544.19.camel@localhost.localdomain> Message-ID: <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> On Aug 26, 2006, at 10:22 AM, Bob Hutchison wrote: > > On Aug 26, 2006, at 5:12 AM, ara.t.howard at noaa.gov wrote: > >> in any case, i'd carefully examine your tests (or the rails code >> if that is >> indeed what it's modeled after) to make sure that they test >> Mutex/Sync/Thread/Ruby and not your os virtual memory system and >> look closely >> at the results again - like i said, i have had issues with sync.rb. >> >> the point here is that it is probably the code in question and not >> Mutex per >> se that was causing your process to grow in vmsize. >> > > > I ran your test on OS/X looking at VSZ and RSS. And, like you, > initially got Sync with no leak visible, and mutex with what looks > like a bad leak. However, I notice that you only called GC once. I > have a years old habit of always running GC at least three times > when I really wanted GC to run (and in Java I had a loop that ran > GC until it stopped freeing stuff which in some cases was eight or > nine times). Superstition? Apparently not. On OS X, when I run GC > three times neither sync nor mutex show a memory leak. > > Zed, just for fun, try running GC a few times in a row (like > GC.start; GC.start; GC.start) Well I tried your test on OS X. The Sync had no problem, the mutex showed the memory growth (though it eventually (fifth iteration I think) cleaned itself up). I modified your test to create exactly 1000 threads and call GC three times at the end, things were better, i.e. it released its memory more quickly than without, but still not good. I ended up with: GC.start `sync; sync; sync` sleep 1 GC.start `sync; sync; sync` sleep 1 GC.start `sync; sync; sync` sleep 1 GC.start `sync; sync; sync` sleep 1 and this made a bigger difference. The memory usage was much more tightly bound. (And yes, the three calls to sync are also on purpose... in the late 70s through the 80s, calling sync once didn't guarantee anything, you had to call it a few times, three generally worked... I don't know the current situation because it is easy enough to type sync;sync;sync (well, in truth, I usually alias sync to the three calls)) But of course, the point is that despite appearances there is likely no memory leak at all on OS X, just some kind of long term cycle of process resource utilisation -- this is a complex situation, Ruby GC, process resource utilisation/optimisation, and system optimisation all interacting. Who knows what's actually going on. So. Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur -- xampl for Ruby -- From scott at sigkill.org Sat Aug 26 12:03:13 2006 From: scott at sigkill.org (Scott Laird) Date: Sat, 26 Aug 2006 09:03:13 -0700 Subject: [Mongrel] really a GemPlugin/mongrel_cluster question In-Reply-To: <1156549336.6093.55.camel@localhost.localdomain> References: <1156549336.6093.55.camel@localhost.localdomain> Message-ID: <14b7e5ef0608260903x60f48232ma14b47b97ef14768@mail.gmail.com> On 8/25/06, Zed Shaw wrote: > On Fri, 2006-08-25 at 15:08 -0700, Asa Hopkins wrote: > > Hi folks, > > > > > > I'd like to run the Mongrel prerelease (0.3.13.4 prerelease) and > > mongrel_cluster 0.2.1 on my shared host (which doesn't want to install > > prerelease software for all to use). I can install the gems in my own > > directory, and run mongrel 0.3.13.4 with --prefix just fine. However, > > I think due to the GemPlugin structure, even my new mongrel_rails > > loads up mongrel_cluster 0.2.0, which doesn't support --prefix. If I > > try telling rubygems to ignore the other installed gems (in the main > > gem structure), it loses track of itself (gem environment fails, for > > example). > > I vaguely remember that you can change where rubygems "lives" with > environment variables. > > But, if you've got shell access and can build stuff yourself, why not > just build your own complete kit? Grab the ruby source and configure it > to install into your home directory then change your PATH in > your .bashrc (or whatever shell you want). Then, you can install > anything you want independently. FWIW, I ran into this a month or so back. It's actually pretty straightforward: http://scottstuff.net/blog/articles/2006/07/28/how-to-install-gems-when-youre-not-root Scott From kevwil at gmail.com Sat Aug 26 13:12:29 2006 From: kevwil at gmail.com (Kevin Williams) Date: Sat, 26 Aug 2006 11:12:29 -0600 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <1156563068.29544.19.camel@localhost.localdomain> References: <1156563068.29544.19.camel@localhost.localdomain> Message-ID: <683a886f0608261012r62991597i91dc48d246329db7@mail.gmail.com> Perhaps it's just me, but I don't like cross-posting. Please post to each mailing list separately, if you don't mind. :) On 8/25/06, Zed Shaw wrote: > Howdy Folks, > > This release is after painstaking analysis of a memory leak that was > reported by Bradley Taylor, reduced by myself, and then fixed after much > work. You should all thank Bradley for finding the bizarre fix. > > It turns out the Ruby has a memory leak when you use pretty much any > thread locking primitive other than Sync (Mutex, Monitor, etc.): > > http://pastie.caboo.se/10194 > > The fix (for whatever reason) is to use Sync and put it in a block: > > http://pastie.caboo.se/10317 > > Those two scripts are mini versions of how Mongrel manages threads so > that I could figure out a solution or get some input. The graph is > reported ram usage samples 1/second. As you can see the first leaking > graph goes up and doesn't go down, the second (fixed) graph cycles > properly. > > ** This is a Ruby issue, so if you have software using Mutex or Monitor, > change to Sync now. ** > > Tests of this latest pre-release show that the RAM is properly cycled by > the GC and that it's actually finally solved. If you run your app using > this release and you still have a leak then use the memory debugging > tools mongrel has to rule out your code (see below). > > > CHANGES > > * No more allow_concurrency. Until Ruby's fixed I can't let people do > this anymore. > * USR1 debugging. If you're wondering about how Mongrel's locking of > Rails impacts your application, or what is causing BAD CLIENT then just > hit your mongrel_rails with USR1 and Mongrel will tell you. > * More extensive and accurate memory debugging. Use -B and look at the > log/mongrel_log/objects.log to get a good idea of counts of objects, > delta changes in counts, and mean+standard deviation lengths of objects > with length methods. > * Fixes a few places where sockets are closed and left in CLOSE_WAIT. > > > INSTALLING > > As per usual: > > sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > Initial tests show it works on 1.8.5 and is actually faster, but this is > unsupported for now. > > > TESTING THIS RELEASE > > If you want to test the memory leak, here's the process: > > 1) Start your application in *production* mode: > mongrel_rails start -e production > > 2) Hit it with USR1: > killall -USR1 mongrel_rails > > 3) Start running something that prints out the ram (here's my fish > code): > while sleep 1 > ps aux | grep mongrel_rails | grep -v grep | grep -v gvim | ruby -aln > -e "puts split[4 .. 5].join(',')" > end > > 4) Thrash a simple rails controller with httperf: > httperf --server 127.0.0.1 --port 3000 --num-conns 1000 --rate 120 > --uri /testuri > > What you want to do is adjust num-conns and rate until Mongrel reports > "X threads waiting for /testuri..." > > The bug only manifests itself when threads pile up behind the guard > around Rails dispatching. This is also how you'd find out which Rails > actions are too slow. > > > Please report any bugs you find in this release, and a Win32 release > will come out after I'm sure it works for everyone else. > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Cheers, Kevin "Any sufficiently advanced technology is indistinguishable from Magic." - Arthur C. Clarke From carl.lerche at verizon.net Sat Aug 26 16:29:44 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Sat, 26 Aug 2006 16:29:44 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <1156563068.29544.19.camel@localhost.localdomain> References: <1156563068.29544.19.camel@localhost.localdomain> Message-ID: Zed, Thanks for the hard work, when I get home I'll try running this one on my server and see how it holds! -carl On Aug 25, 2006, at 11:31 PM, Zed Shaw wrote: > Howdy Folks, > > This release is after painstaking analysis of a memory leak that was > reported by Bradley Taylor, reduced by myself, and then fixed after > much > work. You should all thank Bradley for finding the bizarre fix. > > It turns out the Ruby has a memory leak when you use pretty much any > thread locking primitive other than Sync (Mutex, Monitor, etc.): > > http://pastie.caboo.se/10194 > > The fix (for whatever reason) is to use Sync and put it in a block: > > http://pastie.caboo.se/10317 > > Those two scripts are mini versions of how Mongrel manages threads so > that I could figure out a solution or get some input. The graph is > reported ram usage samples 1/second. As you can see the first leaking > graph goes up and doesn't go down, the second (fixed) graph cycles > properly. > > ** This is a Ruby issue, so if you have software using Mutex or > Monitor, > change to Sync now. ** > > Tests of this latest pre-release show that the RAM is properly > cycled by > the GC and that it's actually finally solved. If you run your app > using > this release and you still have a leak then use the memory debugging > tools mongrel has to rule out your code (see below). > > > CHANGES > > * No more allow_concurrency. Until Ruby's fixed I can't let people do > this anymore. > * USR1 debugging. If you're wondering about how Mongrel's locking of > Rails impacts your application, or what is causing BAD CLIENT then > just > hit your mongrel_rails with USR1 and Mongrel will tell you. > * More extensive and accurate memory debugging. Use -B and look at > the > log/mongrel_log/objects.log to get a good idea of counts of objects, > delta changes in counts, and mean+standard deviation lengths of > objects > with length methods. > * Fixes a few places where sockets are closed and left in CLOSE_WAIT. > > > INSTALLING > > As per usual: > > sudo gem install mongrel --source=http://mongrel.rubyforge.org/ > releases/ > > Initial tests show it works on 1.8.5 and is actually faster, but > this is > unsupported for now. > > > TESTING THIS RELEASE > > If you want to test the memory leak, here's the process: > > 1) Start your application in *production* mode: > mongrel_rails start -e production > > 2) Hit it with USR1: > killall -USR1 mongrel_rails > > 3) Start running something that prints out the ram (here's my fish > code): > while sleep 1 > ps aux | grep mongrel_rails | grep -v grep | grep -v gvim | ruby > -aln > -e "puts split[4 .. 5].join(',')" > end > > 4) Thrash a simple rails controller with httperf: > httperf --server 127.0.0.1 --port 3000 --num-conns 1000 --rate 120 > --uri /testuri > > What you want to do is adjust num-conns and rate until Mongrel reports > "X threads waiting for /testuri..." > > The bug only manifests itself when threads pile up behind the guard > around Rails dispatching. This is also how you'd find out which Rails > actions are too slow. > > > Please report any bugs you find in this release, and a Win32 release > will come out after I'm sure it works for everyone else. > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From zedshaw at zedshaw.com Sat Aug 26 18:02:23 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 26 Aug 2006 15:02:23 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> References: <1156563068.29544.19.camel@localhost.localdomain> <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> Message-ID: <1156629743.14151.8.camel@localhost.localdomain> On Sat, 2006-08-26 at 11:20 -0400, Bob Hutchison wrote: > On Aug 26, 2006, at 10:22 AM, Bob Hutchison wrote: > > Well I tried your test on OS X. The Sync had no problem, the mutex > showed the memory growth (though it eventually (fifth iteration I > think) cleaned itself up). I modified your test to create exactly > 1000 threads and call GC three times at the end, things were better, > i.e. it released its memory more quickly than without, but still not > good. I ended up with: Thanks Bob, but I've gotta say this one more time, this test is not about 1000 threads. The test is about how *Mongrel* processes threads, a specific bug when many threads are put into a ThreadGroup and wait behind a Mutex, and how to stop that from leaking. If you change the way the test is written so that it creates exactly 1000 threads, then this isn't simulating Mongrel. You're most likely using additional synchronization primitives not used in Mongrel so your test is wrong. I mean, Mongrel doesn't wait for 1000 threads, it just cranks on them and sometimes it's too slow so you build a log jam. In this situation, we were seeing memory leaks. Other people also report the memory leaks and even reported this fixed it in other systems unrelated to Mongrel. Yes, you can write something else to not have memory leaks, but then you're not testing our leaking situation. The point is that the script with Mutex leaks, the one with Sync doesn't. The number 1000 was just a number picked at random so that I knew when to stop simulating requests and start calling GC. And, if you notice there's a loop that calls GC.start about 3-4 times. There's no way I'm going to put into Mongrel's loop three calls to GC. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Sat Aug 26 18:04:23 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 26 Aug 2006 15:04:23 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <683a886f0608261012r62991597i91dc48d246329db7@mail.gmail.com> References: <1156563068.29544.19.camel@localhost.localdomain> <683a886f0608261012r62991597i91dc48d246329db7@mail.gmail.com> Message-ID: <1156629863.14151.11.camel@localhost.localdomain> On Sat, 2006-08-26 at 11:12 -0600, Kevin Williams wrote: > Perhaps it's just me, but I don't like cross-posting. Please post to > each mailing list separately, if you don't mind. :) Kevin, how is it different if I put the mailing lists into one e-mail or three if the message is the same. Considering I don't have tons of time and needed to get the word out so I can make the next release final, it seems stupid to spend my time on some kind of "vanity send". Is there something about your mail client that can't handle this? -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From wyhaines at gmail.com Sat Aug 26 18:36:12 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Sat, 26 Aug 2006 16:36:12 -0600 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <1156629743.14151.8.camel@localhost.localdomain> References: <1156563068.29544.19.camel@localhost.localdomain> <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> <1156629743.14151.8.camel@localhost.localdomain> Message-ID: On 8/26/06, Zed Shaw wrote: > Thanks Bob, but I've gotta say this one more time, this test is not > about 1000 threads. The test is about how *Mongrel* processes threads, > a specific bug when many threads are put into a ThreadGroup and wait > behind a Mutex, and how to stop that from leaking. > > If you change the way the test is written so that it creates exactly > 1000 threads, then this isn't simulating Mongrel. You're most likely > using additional synchronization primitives not used in Mongrel so your > test is wrong. I mean, Mongrel doesn't wait for 1000 threads, it just > cranks on them and sometimes it's too slow so you build a log jam. > > In this situation, we were seeing memory leaks. Other people also > report the memory leaks and even reported this fixed it in other systems > unrelated to Mongrel. Yes, you can write something else to not have > memory leaks, but then you're not testing our leaking situation. The > point is that the script with Mutex leaks, the one with Sync doesn't. I've been testing with your pasted scripts and variations all day, and I can not reproduce any results that indicate that Mutex leaks. In your pasted script, the primary difference in behavior between Mutex and Sync (which, under the covers, use an identical algorithm for locking, though they differ in unlock semanticsi; mutex pops a single thread off the waiting list and wakes it while Sync wakes them all, letting one grab the other lock and the others go back to waiting) is that Sync is slower. All that I have to do in order to eliminate the phantom memory leaking by Mutex is to insert a very small delay at the end of each synchronized block. On my test system, select(nil,nil,nil,0.025) does the trick. In your test scripts, this causes the Mutex variant to launch fewer total threads, similar to the Sync variant (on my box, an iteration with the Mutex variant as you pasted it actually ends up creating about 2100 threads, while the Sync variant is around 1650, because Sync is slower so it takes longer for threads to fall out of the threadgroup as you are adding new ones in). On variations that launch exactly 1000 threads (which is easily done without using any other locking primitives), the difference boils down to how fast objects can be created and how long the GC has to clean them up. Change the test() method to do something that creates some strings and other objects, and it becomes clear very quickly that if there is a burst of activity, a bunch of threads locking with a Mutex outrun the GC's ability to clean it up. Memory consumption rises. This also seems consistent on my tests so far comparing 1.8.4 to 1.8.5, which you mentioned seemed to exhibit worse RAM use characteristics. I still need to dig into the differences in the GC subsystem code between the two versions, but the experimental evidence that I have suggests that in 1.8.5 it is taking longer to get around to cleaning up objects. It seems to be faster when it does, as my overall throughput is about 10% faster on 1.8.5, but I don't think I'm liking the tradeoff that I am seeing with memory consumption when it is pounded with objects. Something looks wrong, there, but it's not related to Mutex. Kirk Haines From luislavena at gmail.com Sat Aug 26 19:26:01 2006 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 26 Aug 2006 20:26:01 -0300 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: References: <1156563068.29544.19.camel@localhost.localdomain> <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> <1156629743.14151.8.camel@localhost.localdomain> Message-ID: <71166b3b0608261626w78021aacwf1ff625dcb70ef87@mail.gmail.com> I have done some testings of the code on Win32 with ruby 1.8.4, please check the included pictures [1]. I have compared both test scripts, using Process Explorer to monitor their memory use and CPU use. So far, Win32 behave way different than *nix in this matter. If you see the pngs, using mutex actually releases memory (GC) and finish faster than sync. Sync, on the contrary, never released memory (like GC wasn't called at all) and took longer to finish (I stopped it because took more than 6 minutes). I could conclude that ruby implementations are too different to compare between installations and platforms... A solution for the memory leaking should be tested on any platform before taking final decisions. On 8/26/06, Kirk Haines wrote: [snip] > > On variations that launch exactly 1000 threads (which is easily done > without using any other locking primitives), the difference boils down > to how fast objects can be created and how long the GC has to clean > them up. Change the test() method to do something that creates some > strings and other objects, and it becomes clear very quickly that if > there is a burst of activity, a bunch of threads locking with a Mutex > outrun the GC's ability to clean it up. Memory consumption rises. Please provide a sample script (pastie?) and I will test it too on Win32. > This also seems consistent on my tests so far comparing 1.8.4 to > 1.8.5, which you mentioned seemed to exhibit worse RAM use > characteristics. I still need to dig into the differences in the GC > subsystem code between the two versions, but the experimental evidence > that I have suggests that in 1.8.5 it is taking longer to get around > to cleaning up objects. It seems to be faster when it does, as my > overall throughput is about 10% faster on 1.8.5, but I don't think I'm > liking the tradeoff that I am seeing with memory consumption when it > is pounded with objects. Something looks wrong, there, but it's not > related to Mutex. I agree with you that something is wrong, not with mutex, but with ruby itself. People will start yelling me about this, but is true. Not just with mutex, but with threads (oh lovely select()) and sockets. On every platform exceptions are thrown differently or in some cases, not raised at all! We must investigate this to find a workaround that works "almost good" on every platform. -- 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 [1] Cannot add pngs to this mail (40K limit) so uploaded them to my server: http://www.mmediasys.com/mongrel/mutex.png http://www.mmediasys.com/mongrel/sync-1.png http://www.mmediasys.com/mongrel/sync-2.png From kevwil at gmail.com Sat Aug 26 19:38:46 2006 From: kevwil at gmail.com (Kevin Williams) Date: Sat, 26 Aug 2006 17:38:46 -0600 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <1156629863.14151.11.camel@localhost.localdomain> References: <1156563068.29544.19.camel@localhost.localdomain> <683a886f0608261012r62991597i91dc48d246329db7@mail.gmail.com> <1156629863.14151.11.camel@localhost.localdomain> Message-ID: <683a886f0608261638t27a94b98vdb553950a2f1224f@mail.gmail.com> On 8/26/06, Zed Shaw wrote: > On Sat, 2006-08-26 at 11:12 -0600, Kevin Williams wrote: > > Perhaps it's just me, but I don't like cross-posting. Please post to > > each mailing list separately, if you don't mind. :) > > Kevin, how is it different if I put the mailing lists into one e-mail or > three if the message is the same. Considering I don't have tons of time > and needed to get the word out so I can make the next release final, it > seems stupid to spend my time on some kind of "vanity send". > > Is there something about your mail client that can't handle this? > GMail gets the labels all crossed up. Sorry to bother you. -- Cheers, Kevin "Any sufficiently advanced technology is indistinguishable from Magic." - Arthur C. Clarke From zedshaw at zedshaw.com Sun Aug 27 01:20:09 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 26 Aug 2006 22:20:09 -0700 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <71166b3b0608261626w78021aacwf1ff625dcb70ef87@mail.gmail.com> References: <1156563068.29544.19.camel@localhost.localdomain> <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> <1156629743.14151.8.camel@localhost.localdomain> <71166b3b0608261626w78021aacwf1ff625dcb70ef87@mail.gmail.com> Message-ID: <1156656009.6077.4.camel@localhost.localdomain> On Sat, 2006-08-26 at 20:26 -0300, Luis Lavena wrote: > I have done some testings of the code on Win32 with ruby 1.8.4, please > check the included pictures [1]. > Thank you Luis, *this* is what I need. A test with Mongrel code and evidence that it's not fixed on a particular platform. Thank you for not guessing at random theories about why it works this way, and instead doing the test. It's also incredibly sad since it means that one way works on POSIX and the other works on Win32. I'll take a look at this tomorrow and see what happens. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From luislavena at gmail.com Sun Aug 27 05:56:27 2006 From: luislavena at gmail.com (Luis Lavena) Date: Sun, 27 Aug 2006 06:56:27 -0300 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <1156656009.6077.4.camel@localhost.localdomain> References: <1156563068.29544.19.camel@localhost.localdomain> <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> <1156629743.14151.8.camel@localhost.localdomain> <71166b3b0608261626w78021aacwf1ff625dcb70ef87@mail.gmail.com> <1156656009.6077.4.camel@localhost.localdomain> Message-ID: <71166b3b0608270256w57445070xf3ec08bb7b1ad2e2@mail.gmail.com> On 8/27/06, Zed Shaw wrote: > On Sat, 2006-08-26 at 20:26 -0300, Luis Lavena wrote: > > I have done some testings of the code on Win32 with ruby 1.8.4, please > > check the included pictures [1]. > > > > Thank you Luis, *this* is what I need. A test with Mongrel code and > evidence that it's not fixed on a particular platform. Thank you for > not guessing at random theories about why it works this way, and instead > doing the test. > > It's also incredibly sad since it means that one way works on POSIX and > the other works on Win32. > Yeah, I was shocked when I saw that. > I'll take a look at this tomorrow and see what happens. What about a new approach to RailsHandler? I mean: If just 1 thread can access Rails dispatcher, what if we serialize/enqueue the requests? Maybe will be too complicated, but MonitorMixin maybe could help: http://www.ruby-doc.org/stdlib/libdoc/monitor/rdoc/classes/MonitorMixin.html Anyway, talk this sunday about mongrel_service Regards, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From hutch at recursive.ca Sun Aug 27 10:16:41 2006 From: hutch at recursive.ca (Bob Hutchison) Date: Sun, 27 Aug 2006 10:16:41 -0400 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <1156629743.14151.8.camel@localhost.localdomain> References: <1156563068.29544.19.camel@localhost.localdomain> <878E1C76-9576-4D83-BDB0-C846FE69C7EB@recursive.ca> <1156629743.14151.8.camel@localhost.localdomain> Message-ID: <9F23FD2F-F207-4AE7-91D5-BA57B97307BC@recursive.ca> On Aug 26, 2006, at 6:02 PM, Zed Shaw wrote: > On Sat, 2006-08-26 at 11:20 -0400, Bob Hutchison wrote: >> On Aug 26, 2006, at 10:22 AM, Bob Hutchison wrote: >> > >> Well I tried your test on OS X. The Sync had no problem, the mutex >> showed the memory growth (though it eventually (fifth iteration I >> think) cleaned itself up). I modified your test to create exactly >> 1000 threads and call GC three times at the end, things were better, >> i.e. it released its memory more quickly than without, but still not >> good. I ended up with: > > Thanks Bob, but I've gotta say this one more time, this test is not > about 1000 threads. The test is about how *Mongrel* processes > threads, > a specific bug when many threads are put into a ThreadGroup and wait > behind a Mutex, and how to stop that from leaking. I know it isn't about 1000 threads, but when testing it *really* helps sometimes to lock as much down as possible. I was getting anywhere from 1005 through 1040 threads and that variation was too much. I like having exactly *one* thing vary between tests. No matter. I posted on the ruby-talk list the result of some mucking about I was doing this morning. It seems that on OS X at least, the Mutex is holding threads in memory. If you delete the reference to the Mutex and then garbage collect you get a nice stable memory utilisation. I have no idea if you can make use of this information. Is there some point at which you know you can clobber the Mutex in Mongrel? Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur -- xampl for Ruby -- From pedro at pedrocr.net Sun Aug 27 10:45:19 2006 From: pedro at pedrocr.net (=?ISO-8859-1?Q?Pedro_C=F4rte-Real?=) Date: Sun, 27 Aug 2006 15:45:19 +0100 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <683a886f0608261638t27a94b98vdb553950a2f1224f@mail.gmail.com> References: <1156563068.29544.19.camel@localhost.localdomain> <683a886f0608261012r62991597i91dc48d246329db7@mail.gmail.com> <1156629863.14151.11.camel@localhost.localdomain> <683a886f0608261638t27a94b98vdb553950a2f1224f@mail.gmail.com> Message-ID: <62e8012c0608270745q786b0889k240b71dff92161b0@mail.gmail.com> On 8/27/06, Kevin Williams wrote: > GMail gets the labels all crossed up. I use gmail and the labels worked fine. The message was labeled with rails, mongrel and ruby-talk labels. It shows only one message although the mail server must have received three copies. One from each list. Pedro. From joeat303 at yahoo.com Sun Aug 27 14:53:54 2006 From: joeat303 at yahoo.com (joe d) Date: Sun, 27 Aug 2006 11:53:54 -0700 (PDT) Subject: [Mongrel] Mongrel not creating pid file Message-ID: <20060827185354.29312.qmail@web38614.mail.mud.yahoo.com> Here's my config: :debug: false :daemon: true - mongrel :log_file: log/mongrel.log :pid_file: log/mongrel.pid :environment: development And I start Mongrel with: mongrel_rails -C config/mongrel.yml It starts up fine, and creates and logs to the log file, but I haven't seen it create a pid file yet. Any idea why? BTW, why does Mongrel generate a config with vars like :var: rather than just the typical var: ? Thanks, Joe __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From eoin at peelmeagrape.net Sun Aug 27 14:56:04 2006 From: eoin at peelmeagrape.net (Eoin Curran) Date: Sun, 27 Aug 2006 19:56:04 +0100 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. Message-ID: <44F1EAC4.4080803@peelmeagrape.net> Also getting this error message - was trying to enable request logging as described at: http://www.mail-archive.com/mongrel-users at rubyforge.org/msg01018.html But I just get /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join': SIGUSR1 (SignalException) from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:136:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 from /usr/bin/mongrel_rails:18 Looking through the source, the USR1 signal isn't trapped. Should I be using a different version to get this request logging? thanks, eoin. From ross.singer at library.gatech.edu Sun Aug 27 15:26:16 2006 From: ross.singer at library.gatech.edu (Ross Singer) Date: Sun, 27 Aug 2006 15:26:16 -0400 Subject: [Mongrel] BAD CLIENT, Invalid HTTP Format - Firefox, IE, etc.. In-Reply-To: <44F1EAC4.4080803@peelmeagrape.net> References: <44F1EAC4.4080803@peelmeagrape.net> Message-ID: <23b83f160608271226p342513bj1a62d7a4934cfc64@mail.gmail.com> Eoin, I think the first step was: get the latest 0.3.13.4 pre-release: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ -Ross. On 8/27/06, Eoin Curran wrote: > Also getting this error message - was trying to enable request logging > as described at: > > http://www.mail-archive.com/mongrel-users at rubyforge.org/msg01018.html > > But I just get > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in > `join': SIGUSR1 (SignalException) > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join' > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:982:in `join' > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:136:in `run' > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in > `run' > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 > from /usr/bin/mongrel_rails:18 > > Looking through the source, the USR1 signal isn't trapped. Should I be > using a different version to get this request logging? > > thanks, > eoin. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Sun Aug 27 16:54:34 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 27 Aug 2006 13:54:34 -0700 Subject: [Mongrel] Mongrel not creating pid file In-Reply-To: <20060827185354.29312.qmail@web38614.mail.mud.yahoo.com> References: <20060827185354.29312.qmail@web38614.mail.mud.yahoo.com> Message-ID: <1156712074.11446.3.camel@localhost.localdomain> Hey Joe, that's fixed in the 0.3.13.4 release, try it out with: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Zed On Sun, 2006-08-27 at 11:53 -0700, joe d wrote: > > It starts up fine, and creates and logs to the log > file, but I haven't seen it create a pid file yet. Any > idea why? > > BTW, why does Mongrel generate a config with vars like > :var: rather than just the typical var: ? That's YAML. The :var: is a symbol :var followed by the : for the YAML hash. That's also why I wrote the -G (generate) command so it'll make one for you from the command line options you pass. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From kevwil at gmail.com Sun Aug 27 17:15:36 2006 From: kevwil at gmail.com (Kevin Williams) Date: Sun, 27 Aug 2006 15:15:36 -0600 Subject: [Mongrel] [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) In-Reply-To: <62e8012c0608270745q786b0889k240b71dff92161b0@mail.gmail.com> References: <1156563068.29544.19.camel@localhost.localdomain> <683a886f0608261012r62991597i91dc48d246329db7@mail.gmail.com> <1156629863.14151.11.camel@localhost.localdomain> <683a886f0608261638t27a94b98vdb553950a2f1224f@mail.gmail.com> <62e8012c0608270745q786b0889k240b71dff92161b0@mail.gmail.com> Message-ID: <683a886f0608271415y49bc80fbvf2fd703f62a18df8@mail.gmail.com> My mongrel filter is this: Matches: to:(mongrel-users at rubyforge.org) Do this: Skip Inbox, Apply label "mongrel" I'm have unsubscribed from the rails list anyway, so it won't be an issue anymore. I'll just use ruby-forum to keep track of Rails stuff. On 8/27/06, Pedro C?rte-Real wrote: > On 8/27/06, Kevin Williams wrote: > > GMail gets the labels all crossed up. > > I use gmail and the labels worked fine. The message was labeled with > rails, mongrel and ruby-talk labels. It shows only one message > although the mail server must have received three copies. One from > each list. > > Pedro. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Cheers, Kevin "Any sufficiently advanced technology is indistinguishable from Magic." - Arthur C. Clarke From joeat303 at yahoo.com Mon Aug 28 17:32:04 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Mon, 28 Aug 2006 14:32:04 -0700 (PDT) Subject: [Mongrel] Mongrel not creating pid file Message-ID: <20060828213204.37676.qmail@web38609.mail.mud.yahoo.com> Hey Zed, Cool, thanks. I just tried it and the pid file shows up in log/ (it takes a few seconds). Joe ------------------------------------- Hey Joe, that's fixed in the 0.3.13.4 release, try it out with: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Zed On Sun, 2006-08-27 at 11:53 -0700, joe d wrote: > > It starts up fine, and creates and logs to the log > file, but I haven't seen it create a pid file yet. Any > idea why? > > BTW, why does Mongrel generate a config with vars like > :var: rather than just the typical var: ? That's YAML. The :var: is a symbol :var followed by the : for the YAML hash. That's also why I wrote the -G (generate) command so it'll make one for you from the command line options you pass. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From joeat303 at yahoo.com Mon Aug 28 20:15:20 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Mon, 28 Aug 2006 17:15:20 -0700 (PDT) Subject: [Mongrel] restart - `exec': Operation not supported Message-ID: <20060829001520.61664.qmail@web38614.mail.mud.yahoo.com> I'm using the latest Mongrel (0.3.13.4) and restarting causes Mongrel to die. From mongrel.log: ** USR2 signal received. ** Restarting with arguments: ruby /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails start -C config/mongrel.yml /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:142:in `exec': Operation not supported - ruby /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails start -C config/mongrel.yml (Errno::EOPNOTSUPP) from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:142:in `run' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/command.rb:203:in `run' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231 from /opt/local/bin/mongrel_rails:18 I tried 'ruby /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails start -C config/mongrel.yml' from the commandline and it started up Mongrel. Joe __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jason at joyent.com Mon Aug 28 20:28:36 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Mon, 28 Aug 2006 17:28:36 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <20060829001520.61664.qmail@web38614.mail.mud.yahoo.com> References: <20060829001520.61664.qmail@web38614.mail.mud.yahoo.com> Message-ID: <2CFAB2BD-114E-48A8-BA39-1AAB510365CB@joyent.com> On Aug 28, 2006, at 5:15 PM, Joe Ruby wrote: > I'm using the latest Mongrel (0.3.13.4) and restarting > causes Mongrel to die. From mongrel.log: > > ** USR2 signal received. > ** Restarting with arguments: ruby > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > start -C config/mongrel.yml > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ > mongrel_rails:142:in > `exec': Operation not supported - ruby > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > start -C config/mongrel.yml (Errno::EOPNOTSUPP) > from > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ > mongrel_rails:142:in > `run' > from > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ > command.rb:203:in > `run' > from > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ > mongrel_rails:231 > from /opt/local/bin/mongrel_rails:18 > > I tried 'ruby > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > start -C config/mongrel.yml' from the commandline and > it started up Mongrel. > > Joe What operating system is this? And did it install properly? /opt/ local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails isn't where it should be, from that I'd think it would be at /opt/local/bin/ mongrel_rails? - Jason From joeat303 at yahoo.com Mon Aug 28 20:40:44 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Mon, 28 Aug 2006 17:40:44 -0700 (PDT) Subject: [Mongrel] restart - `exec': Operation not supported Message-ID: <20060829004044.25309.qmail@web38602.mail.mud.yahoo.com> It's OS 10.4.7. I installed using 'sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/' (and, yes, it did appear to install properly). Yep, there's also a mongrel_rails in /opt/local/bin -- its size is 490, the other is 7960. Both have timestamps of Aug 28 15:24. Should I delete one of them? Joe --- What operating system is this? And did it install properly? /opt/ local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails isn't where it should be, from that I'd think it would be at /opt/local/bin/ mongrel_rails? - Jason --- Joe Ruby wrote: > I'm using the latest Mongrel (0.3.13.4) and > restarting > causes Mongrel to die. From mongrel.log: > > ** USR2 signal received. > ** Restarting with arguments: ruby > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > start -C config/mongrel.yml > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:142:in > `exec': Operation not supported - ruby > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > start -C config/mongrel.yml (Errno::EOPNOTSUPP) > from > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:142:in > `run' > from > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/command.rb:203:in > `run' > from > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231 > from /opt/local/bin/mongrel_rails:18 > > I tried 'ruby > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > start -C config/mongrel.yml' from the commandline > and > it started up Mongrel. > > Joe > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jason at joyent.com Mon Aug 28 20:45:36 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Mon, 28 Aug 2006 17:45:36 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <20060829004044.25309.qmail@web38602.mail.mud.yahoo.com> References: <20060829004044.25309.qmail@web38602.mail.mud.yahoo.com> Message-ID: Try the command Jason-17% which mongrel_rails /usr/local/bin/mongrel_rails And then just cd into the rails application directory and try mongrel_rails to see what happens (rather than using the full path to the build directory). - Jason On Aug 28, 2006, at 5:40 PM, Joe Ruby wrote: > > It's OS 10.4.7. I installed using 'sudo gem install > mongrel > --source=http://mongrel.rubyforge.org/releases/' (and, > yes, it did appear to install properly). Yep, there's > also a mongrel_rails in /opt/local/bin -- its size is > 490, the other is 7960. Both have timestamps of Aug 28 > 15:24. Should I delete one of them? > > Joe > > --- > What operating system is this? And did it install > properly? /opt/ > local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > isn't > where it should be, from that I'd think it would be at > /opt/local/bin/ > mongrel_rails? > > - Jason > > --- Joe Ruby wrote: > >> I'm using the latest Mongrel (0.3.13.4) and >> restarting >> causes Mongrel to die. From mongrel.log: >> >> ** USR2 signal received. >> ** Restarting with arguments: ruby >> > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails >> start -C config/mongrel.yml >> > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ > mongrel_rails:142:in >> `exec': Operation not supported - ruby >> > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails >> start -C config/mongrel.yml (Errno::EOPNOTSUPP) >> from >> > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ > mongrel_rails:142:in >> `run' >> from >> > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ > command.rb:203:in >> `run' >> from >> > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ > mongrel_rails:231 >> from /opt/local/bin/mongrel_rails:18 >> >> I tried 'ruby >> > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails >> start -C config/mongrel.yml' from the commandline >> and >> it started up Mongrel. >> >> Joe >> >> __________________________________________________ >> Do You Yahoo!? >> Tired of spam? Yahoo! Mail has the best spam >> protection around >> http://mail.yahoo.com >> >> __________________________________________________ >> Do You Yahoo!? >> Tired of spam? Yahoo! Mail has the best spam >> protection around >> http://mail.yahoo.com >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From joeat303 at yahoo.com Mon Aug 28 20:52:41 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Mon, 28 Aug 2006 17:52:41 -0700 (PDT) Subject: [Mongrel] restart - `exec': Operation not supported Message-ID: <20060829005241.40540.qmail@web38615.mail.mud.yahoo.com> Here's what I get: ~/rails $ which mongrel_rails /opt/local/bin/mongrel_rails ~/rails $ cd /opt/local/bin/ /opt/local/bin $ ./mongrel_rails Usage: mongrel_rails [options] Available commands are: - cluster::configure - cluster::restart - cluster::start - cluster::stop - restart - start - stop Each command takes -h as an option to get help. I have been using just 'mongrel_rails' (with no path) in my Rails root dir. It starts and stops fine, just not restart. Joe --- Try the command Jason-17% which mongrel_rails /usr/local/bin/mongrel_rails And then just cd into the rails application directory and try mongrel_rails to see what happens (rather than using the full path to the build directory). - Jason __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jason at joyent.com Mon Aug 28 21:00:12 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Mon, 28 Aug 2006 18:00:12 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <20060829005241.40540.qmail@web38615.mail.mud.yahoo.com> References: <20060829005241.40540.qmail@web38615.mail.mud.yahoo.com> Message-ID: On Aug 28, 2006, at 5:52 PM, Joe Ruby wrote: > Here's what I get: > > ~/rails $ which mongrel_rails > /opt/local/bin/mongrel_rails > > ~/rails $ cd /opt/local/bin/ > > Each command takes -h as an option to get help. > > I have been using just 'mongrel_rails' (with no path) > in my Rails root dir. It starts and stops fine, just > not restart. > > Joe Are you doing something like I move into a rails app Jason-17% cd jasonrailsapp Jason-17% ls README components doc public tmp Rakefile config lib script vendor app db log test I start it Jason-17% mongrel_rails start -d Restarts fine Jason-17% mongrel_rails restart Sending USR2 to Mongrel at PID 305...Done. I stop it Jason-17% mongrel_rails stop Sending TERM to Mongrel at PID 308...Done. I become root Jason-17% sudo -s I start the process as root Jason-17:~/Desktop/jasonrailsapp root# mongrel_rails start -d Jason-17:~/Desktop/jasonrailsapp root# exit exit I become a normal user and I try to restart and get an operation not permitted. Jason-17% mongrel_rails restart /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails: 154:in `kill': Operation not permitted (Errno::EPERM) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:154:in `send_signal' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:226: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 Is this being entirely run as you? Try doing a sudo mongrel_rails restart And see if that works for you. - Jason From zedshaw at zedshaw.com Mon Aug 28 22:31:04 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 28 Aug 2006 19:31:04 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <20060829001520.61664.qmail@web38614.mail.mud.yahoo.com> References: <20060829001520.61664.qmail@web38614.mail.mud.yahoo.com> Message-ID: <1156818664.6214.9.camel@localhost.localdomain> On Mon, 2006-08-28 at 17:15 -0700, Joe Ruby wrote: > I'm using the latest Mongrel (0.3.13.4) and restarting > causes Mongrel to die. From mongrel.log: > > ** USR2 signal received. > ** Restarting with arguments: ruby > /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails > start -C config/mongrel.yml Well, I'd need to know what's in mongrel.yml, but my first guess is that you're starting with --user/--group, which could cause problems with permissions. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From joeat303 at yahoo.com Mon Aug 28 22:37:35 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Mon, 28 Aug 2006 19:37:35 -0700 (PDT) Subject: [Mongrel] restart - `exec': Operation not supported Message-ID: <20060829023735.53535.qmail@web38604.mail.mud.yahoo.com> Nope, I'm not sudo'ing -- I'm always logged in as the same user. I am starting MOngrel with 'mongrel_rails -C config.mongrel.yml'. I tried 'sudo mongrel_rails restart' and got the same error as before (in my first email). Joe --- Are you doing something like I move into a rails app Jason-17% cd jasonrailsapp Jason-17% ls README components doc public tmp Rakefile config lib script vendor app db log test I start it Jason-17% mongrel_rails start -d Restarts fine Jason-17% mongrel_rails restart Sending USR2 to Mongrel at PID 305...Done. I stop it Jason-17% mongrel_rails stop Sending TERM to Mongrel at PID 308...Done. I become root Jason-17% sudo -s I start the process as root Jason-17:~/Desktop/jasonrailsapp root# mongrel_rails start -d Jason-17:~/Desktop/jasonrailsapp root# exit exit I become a normal user and I try to restart and get an operation not permitted. Jason-17% mongrel_rails restart /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails: 154:in `kill': Operation not permitted (Errno::EPERM) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:154:in `send_signal' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/ mongrel_rails:226: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 Is this being entirely run as you? Try doing a sudo mongrel_rails restart And see if that works for you. - Jason __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From joeat303 at yahoo.com Mon Aug 28 22:39:39 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Mon, 28 Aug 2006 19:39:39 -0700 (PDT) Subject: [Mongrel] restart - `exec': Operation not supported Message-ID: <20060829023939.69962.qmail@web38601.mail.mud.yahoo.com> Here's my config/mongrel.yml: --- :port: 3000 :debug: false :daemon: true - mongrel :log_file: log/mongrel.log :environment: development I'm starting with 'mongrel_rails -C config/mongrel.yml' in the root of my Rails app. Joe --- Well, I'd need to know what's in mongrel.yml, but my first guess is that you're starting with --user/--group, which could cause problems with permissions. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jason at joyent.com Mon Aug 28 22:44:33 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Mon, 28 Aug 2006 19:44:33 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <20060829023735.53535.qmail@web38604.mail.mud.yahoo.com> References: <20060829023735.53535.qmail@web38604.mail.mud.yahoo.com> Message-ID: <82F608DA-186B-429C-A4D5-C5ED1858537C@joyent.com> On Aug 28, 2006, at 7:37 PM, Joe Ruby wrote: > Nope, I'm not sudo'ing -- I'm always logged in as the > same user. Yes but trying sudo'ing it. - Jason From zedshaw at zedshaw.com Mon Aug 28 22:44:51 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Mon, 28 Aug 2006 19:44:51 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <20060829023939.69962.qmail@web38601.mail.mud.yahoo.com> References: <20060829023939.69962.qmail@web38601.mail.mud.yahoo.com> Message-ID: <1156819491.6214.12.camel@localhost.localdomain> On Mon, 2006-08-28 at 19:39 -0700, Joe Ruby wrote: > Here's my config/mongrel.yml: > > --- > :port: 3000 > :debug: false > :daemon: true > - mongrel > :log_file: log/mongrel.log > :environment: development > > I'm starting with 'mongrel_rails -C > config/mongrel.yml' in the root of my Rails app. > Hmm, I don't have a mac to test this on, but I can't see any reason that would fail like that. Maybe try without the -C with: mongrel_rails start -d (All the stuff you've got in the .yml are defaults anyway except -d daemon). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From evanbwhite at gmail.com Mon Aug 28 22:45:28 2006 From: evanbwhite at gmail.com (Evan White) Date: Mon, 28 Aug 2006 19:45:28 -0700 Subject: [Mongrel] "Broken pipe" and "no such file to load -- irb" Message-ID: I just switched my rails app, which I had previously been running on my pc, to my linux server and have decided to use mongrel. However, since doing so I get an error when I first access the app saying "no such file to load -- irb". After I refresh this error goes away, but I keep getting the following errors in my logs, and I've noticed that certains things, like sessions and redirects, aren't working. Any idea why this might be? ~Evan Logfile errors: Error sending file /home/evan/rails3/public/javascripts/prototype.js: Broken pi\ pe Error calling Dispatcher.dispatch # /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:147:in `require' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/breakpoint.rb:18 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:140:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:56:in `require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:30:in `depend_on' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:85:in `require_dependency' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:98:in `const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:131:in `const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies\ .rb:133:in `const_missing' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:75:in `reset_after_di\ spatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:46:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/rails.rb:73:in`proces\ s' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:551:in`process_cli\ ent' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:550:in`process_cli\ ent' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:625:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:956:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:955:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in`run\ ' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235 /usr/bin/mongrel_rails:18 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060828/ca8937f5/attachment-0001.html From rgkaufman at gmail.com Mon Aug 28 23:56:57 2006 From: rgkaufman at gmail.com (Rob Kaufman) Date: Mon, 28 Aug 2006 20:56:57 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <1156819491.6214.12.camel@localhost.localdomain> References: <20060829023939.69962.qmail@web38601.mail.mud.yahoo.com> <1156819491.6214.12.camel@localhost.localdomain> Message-ID: <17112e2f0608282056t6aebc758n5767de648e27ddfb@mail.gmail.com> Hi Zed, I can attest that on OS X (PPC at least) both 0.13.3.1 and 0.13.3.4 pre-release (downloaded tonight) exhibit this behavior: ** Restarting with arguments: ruby /opt/local/lib/ruby/gems/1.8/gems/mon 3.13.4/bin/mongrel_rails start /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:142: c': Operation not supported - ruby /opt/local/lib/ruby/gems/1.8/gems/mong .13.4/bin/mongrel_rails start (Errno::EOPNOTSUPP) from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongr s:142:in `run' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongr and.rb:203:in `run' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongr s:231 When USR2 sent to mongrel in development mode. I'm running development mode, no cluster, no config, not even in with -d (tried both, made no difference). I'll do testing on Intel in the morning and see if I can't track things down a little more. Cheers, Rob Kaufman On 8/28/06, Zed Shaw wrote: > On Mon, 2006-08-28 at 19:39 -0700, Joe Ruby wrote: > > Here's my config/mongrel.yml: > > > > --- > > :port: 3000 > > :debug: false > > :daemon: true > > - mongrel > > :log_file: log/mongrel.log > > :environment: development > > > > I'm starting with 'mongrel_rails -C > > config/mongrel.yml' in the root of my Rails app. > > > > Hmm, I don't have a mac to test this on, but I can't see any reason that > would fail like that. Maybe try without the -C with: > > mongrel_rails start -d > > (All the stuff you've got in the .yml are defaults anyway except -d > daemon). > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From joeat303 at yahoo.com Tue Aug 29 00:08:11 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Mon, 28 Aug 2006 21:08:11 -0700 (PDT) Subject: [Mongrel] restart - `exec': Operation not supported Message-ID: <20060829040811.997.qmail@web38602.mail.mud.yahoo.com> I just tried that and 'mongrel_rails restart' results in Mongrel dying with the same error. Joe --- Hmm, I don't have a mac to test this on, but I can't see any reason that would fail like that. Maybe try without the -C with: mongrel_rails start -d (All the stuff you've got in the .yml are defaults anyway except -d daemon). -- Zed A. Shaw __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jason at joyent.com Tue Aug 29 00:35:27 2006 From: jason at joyent.com (Jason Hoffman) Date: Mon, 28 Aug 2006 21:35:27 -0700 Subject: [Mongrel] proxy engines and load balancers for mongrel Message-ID: <8012C0C6-1FB3-4BE6-AA48-DE3DA81AB814@joyent.com> Hi Everyone, So I'm finally going to sit down with a few of the guys and do an even comparison between some stuff proxying to mongrel (we ourselves typically use Big-IP or Zeus to Apache 2.2 to mongrels). If you have other pieces of software that you know about beyond, can you please let me know? Perlbal Pound Pen HA-Proxy Nginx TCPBalance Balance Balance NG TCPFork Apache 2.2 Litespeed Lighttpd Zeus load balancer Zeus High-performance traffic manager BIG-IP 6400 http://joyeur.com/2006/08/29/evaluating-proxy-engines-and-load- balancers-for-mongrel-driven-ruby-on-rails-applications-an- introduction-and-an-open-call Regards, Jason From jan.svitok at gmail.com Tue Aug 29 03:27:21 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Tue, 29 Aug 2006 09:27:21 +0200 Subject: [Mongrel] "Broken pipe" and "no such file to load -- irb" In-Reply-To: References: Message-ID: <8d9b3d920608290027m1a82ce68gb467c460d682cfb3@mail.gmail.com> On 8/29/06, Evan White wrote: > I just switched my rails app, which I had previously been running on my pc, > to my linux server and have decided to use mongrel. However, since doing so > I get an error when I first access the app saying "no such file to load -- > irb". After I refresh this error goes away, but I keep getting the > following errors in my logs, and I've noticed that certains things, like > sessions and redirects, aren't working. > > Any idea why this might be? Do you have you irb installed at all? Type 'irb' at the prompt and see what it does. Debian for example has irb in separate package. J. From edv at hendrikstier.de Tue Aug 29 09:34:10 2006 From: edv at hendrikstier.de (Hendrik Stier) Date: Tue, 29 Aug 2006 15:34:10 +0200 Subject: [Mongrel] Processes dying Message-ID: <01EAEFE6-E02C-4D7A-9A88-D79EAFC637D2@hendrikstier.de> Hello everybody! I'm a developer from Germany trying to run RadiantCMS on a Mongrel and Apache-powered server, and the processes keep dying away. I've been roaming the archives hoping to find a clue to the solution to my problem, but I didn't get very far, since mostly the given environment or error messages don't match mine. I'm using a Debian setup in a VM to test my application consisting of - Debian 3.1 Kernel 2.4.27-2-386 - Ruby 1.8.5 (tried 1.8.4 before with same result) - Apache 2.2.3 + mod_proxy_balancer compiled in - Mongrel 0.13.3.4 as of today, running 5 processes - Rubygems 0.9.0 - Radiant 0.5.2 I generate load by having a Firefox-Browser-Extension reload 5 tabs with different pages of the Radiant-managed site each second. All requested pages are part of frontend, the management interface is not accessed. The following messages are from the mongrel.log file in the applications log-directory: Fri Aug 25 22:03:58 +0200 2006: ERROR: closed stream (very many lines like this one) /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:270: [BUG] Segmentation fault (once in a while) The first entry doesn't have a crashed process related to the occurence of the error, the second one does. I had the Mongrel processes running in development mode, what caused the processes to die even quicker, now I changed it to production mode, but still the processes are crashing, though not as quick as in development mode. Most of the time the memory consumption of one or more processes is increasing steadily, but it's not necessarily the one crashing first. I'd really like to give you more details, so please ask, and I'll try to document, but since I don't know what you could possibly need... With very best regards, Hendrik Stier Hendrik Stier EDV Beratung From rgkaufman at gmail.com Tue Aug 29 12:25:52 2006 From: rgkaufman at gmail.com (Rob Kaufman) Date: Tue, 29 Aug 2006 09:25:52 -0700 Subject: [Mongrel] restart - `exec': Operation not supported In-Reply-To: <20060829040811.997.qmail@web38602.mail.mud.yahoo.com> References: <20060829040811.997.qmail@web38602.mail.mud.yahoo.com> Message-ID: <17112e2f0608290925k5d1a18edy16da8ea1c125a9d4@mail.gmail.com> I tried the same steps on Intel based OS X and had the same results (the exception) Rob Kaufman On 8/28/06, Joe Ruby wrote: > I just tried that and 'mongrel_rails restart' results > in Mongrel dying with the same error. > > Joe > > --- > Hmm, I don't have a mac to test this on, but I can't > see any reason that > would fail like that. Maybe try without the -C with: > > mongrel_rails start -d > > (All the stuff you've got in the .yml are defaults > anyway except -d > daemon). > > > -- > Zed A. Shaw > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From brad at bradediger.com Tue Aug 29 13:07:53 2006 From: brad at bradediger.com (Brad Ediger) Date: Tue, 29 Aug 2006 12:07:53 -0500 Subject: [Mongrel] mongrel_upload_progress problems Message-ID: <5F5B2908-7F8E-4246-B4BC-49901453F81A@bradediger.com> What is the status of the mongrel_upload_progress gem and Rails? I have been playing around with _why and technoweenie's code but I'm not sure what is current and what is old. It is not working for me. I am running Mongrel 0.3.13.3 (gem) with mongrel_upload_progress 0.1. My upload URI is /agronomics/sample_cycle/upload, and my progress URI is /agronomics/sample_cycle/progress. I have the following in mongrel.conf: uri "/", :handler => Upload.new(:path_info => "/agronomics/ sample_cycle/upload"), :in_front => true It appears that the uploads are not properly being tracked. The Mongrel::Uploads singleton looks like this on each call to progress: #> The lack of @counters seems to indicate that the upload is not being tracked properly. My progress controller function looks like this: def progress (render :update do |page| page.upload_progress.update @status[:size], @status[:received] end and return) if @status = Mongrel::Uploads.instance.check(params [:upload_id]) render :text => Mongrel::Uploads.instance.inspect end I am definitely willing to experiment, but I don't have enough knowledge of Mongrel to know what I am looking at. Can anyone offer advice? Thanks! Brad Ediger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060829/bc635756/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2421 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20060829/bc635756/attachment.bin From evanbwhite at gmail.com Tue Aug 29 13:36:37 2006 From: evanbwhite at gmail.com (Evan White) Date: Tue, 29 Aug 2006 10:36:37 -0700 Subject: [Mongrel] "Broken pipe" and "no such file to load -- irb" In-Reply-To: <8d9b3d920608290027m1a82ce68gb467c460d682cfb3@mail.gmail.com> References: <8d9b3d920608290027m1a82ce68gb467c460d682cfb3@mail.gmail.com> Message-ID: Well, silly me. I figured irb was installed with ruby and/or rails, but it appears it wasn't. "yum install irb" fixed it. Thanks! ~Evan On 8/29/06, Jan Svitok wrote: > > On 8/29/06, Evan White wrote: > > I just switched my rails app, which I had previously been running on my > pc, > > to my linux server and have decided to use mongrel. However, since > doing so > > I get an error when I first access the app saying "no such file to load > -- > > irb". After I refresh this error goes away, but I keep getting the > > following errors in my logs, and I've noticed that certains things, like > > sessions and redirects, aren't working. > > > > Any idea why this might be? > > Do you have you irb installed at all? Type 'irb' at the prompt and see > what it does. Debian for example has irb in separate package. > > J. > _______________________________________________ > 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/20060829/fb17512e/attachment-0001.html From hip at lan-attack.ch Tue Aug 29 15:45:26 2006 From: hip at lan-attack.ch (Philippe Jayet) Date: Tue, 29 Aug 2006 21:45:26 +0200 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads Message-ID: <44F49956.8080308@lan-attack.ch> Hi all, I encounter timeout errors during file uploads in my Rails application. I think the problem may be in the Mongrel configuration. Here is my setup: * Load balancer (Cisco CSM, my provider's Catalyst 6509) * Apache 2.2.3 with mod_proxy_balancer * Mongrel 0.3.13.3 * Rails 1.1.6 * Ruby 1.8.4 * MySQL 5.0.22 * file_column I host an application in which users may upload medium files (around 2-5MB each) using an AJAX form POST, one large file at a time. Some users succeed to upload, others do not. There seem to be no relation between the failing users and their browsers. I see these error messages in Apache's error_log: [Tue Aug 29 21:28:27 2006] [error] (70007)The timeout specified has expired: proxy: pass request body failed to 127.0.0.1:8012 (127.0.0.1) from THE.CLIENT.IP.HERE () Joining these error messages with the access_log's, the failing requests are the file uploads. At the beginning, I had 5 Mongrel processes. I tried to increase this value to 20 but I still see such errors. Is there any problem with concurrency here? Does this setup do not handle a small/medium number of concurrent uploads? The site is not yet heavily loaded, but it may be in the near future. I hope I'll be able to fix this very soon :) I'm not quite sure to fully understand how a request is handled by this setup, particularly at which step the full request may be cached and passed by to Mongrel and/or Rails fully, without waiting for the client to finish his upload. Also note that the system's load average is near zero, the system is responsive, the bandwidth fully available (although the bottleneck is at the client's end on this point). I hope I've been clear enough and don't hesitate to ask for more logs and debugs ! Unfortunately, I can't reproduce this problem locally and I haven't tried Mongrel 0.3.13.4 on the production system yet. Maybe this problem is related to the Rails code handling the upload (which is the file_column plugin)? In this case, I will ask it on the rails list. Any suggestion would be greatly appreciated! Philippe J. From jason at joyent.com Tue Aug 29 15:54:39 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Tue, 29 Aug 2006 12:54:39 -0700 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F49956.8080308@lan-attack.ch> References: <44F49956.8080308@lan-attack.ch> Message-ID: On Aug 29, 2006, at 12:45 PM, Philippe Jayet wrote: > I encounter timeout errors during file uploads in my Rails > application. How big are the uploads? - Jason From hip at lan-attack.ch Tue Aug 29 15:58:31 2006 From: hip at lan-attack.ch (Philippe Jayet) Date: Tue, 29 Aug 2006 21:58:31 +0200 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: References: <44F49956.8080308@lan-attack.ch> Message-ID: <44F49C67.8080907@lan-attack.ch> > How big are the uploads? Around 2-5MB. Not very large ... :/ Philippe J. From technoweenie at gmail.com Tue Aug 29 16:04:51 2006 From: technoweenie at gmail.com (Rick Olson) Date: Tue, 29 Aug 2006 15:04:51 -0500 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F49956.8080308@lan-attack.ch> References: <44F49956.8080308@lan-attack.ch> Message-ID: <48fe25b0608291304g5a0b8g1b63831fa92e48b2@mail.gmail.com> On 8/29/06, Philippe Jayet wrote: > Hi all, > > I encounter timeout errors during file uploads in my Rails application. > I think the problem may be in the Mongrel configuration. Here is my setup: > > * Load balancer (Cisco CSM, my provider's Catalyst 6509) > * Apache 2.2.3 with mod_proxy_balancer > * Mongrel 0.3.13.3 > * Rails 1.1.6 > * Ruby 1.8.4 > * MySQL 5.0.22 > * file_column I've started seeing this too recently. I upgraded to the latest mongrel prerelease 0.3.13.4 and still had an issue this morning. The uploaded files are usually at least 20MB when this happens. Here's my config: Apache 2 with mod_proxy_balancer mongrel 0.3.13.4 Edge Rails Ruby 1.8.4 It doesn't seem to be rails itself. The production logs show nothing peculiar. I've turned on debug logging to see if it happens again. -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com From mongrel at philip.pjkh.com Tue Aug 29 16:12:47 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Tue, 29 Aug 2006 15:12:47 -0500 (CDT) Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F49956.8080308@lan-attack.ch> References: <44F49956.8080308@lan-attack.ch> Message-ID: <20060829150940.V65667@bravo.pjkh.com> On Tue, 29 Aug 2006, Philippe Jayet wrote: > Hi all, > > I encounter timeout errors during file uploads in my Rails application. > I think the problem may be in the Mongrel configuration. Here is my setup: > > * Load balancer (Cisco CSM, my provider's Catalyst 6509) > * Apache 2.2.3 with mod_proxy_balancer > * Mongrel 0.3.13.3 > * Rails 1.1.6 > * Ruby 1.8.4 > * MySQL 5.0.22 > * file_column > > I host an application in which users may upload medium files (around > 2-5MB each) using an AJAX form POST, one large file at a time. Some > users succeed to upload, others do not. There seem to be no relation > between the failing users and their browsers. > We have almost the same setup... different load balancer (fortinet) and not at rails 1.1.6 (patched though) and not using file_column... I've tested uploads with 80mb files (audio shows). Takes awhile, but never had a timeout. I've done this with both lighty/fastcgi and apache/mongrel... anyway, not sure that helps or not :/ From carl.lerche at verizon.net Tue Aug 29 16:22:11 2006 From: carl.lerche at verizon.net (Carl Lerche) Date: Tue, 29 Aug 2006 16:22:11 -0400 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F49C67.8080907@lan-attack.ch> References: <44F49956.8080308@lan-attack.ch> <44F49C67.8080907@lan-attack.ch> Message-ID: <593F654F-4F46-44AA-BA3C-4A46DB3491AE@verizon.net> I also get time outs on uploads every so often. I'm running on FreeBSD 6.1 Apache 2.2.2 with mod_proxy_balancer Mongrel 0.13.3 Rails 1.1.6 Ruby 1.8.4 MySQL 5.0.22 But it happens pretty rarely. -carl On Aug 29, 2006, at 3:58 PM, Philippe Jayet wrote: > >> How big are the uploads? > > Around 2-5MB. Not very large ... :/ > > Philippe J. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From hip at lan-attack.ch Tue Aug 29 17:32:15 2006 From: hip at lan-attack.ch (Philippe Jayet) Date: Tue, 29 Aug 2006 23:32:15 +0200 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <48fe25b0608291304g5a0b8g1b63831fa92e48b2@mail.gmail.com> References: <44F49956.8080308@lan-attack.ch> <48fe25b0608291304g5a0b8g1b63831fa92e48b2@mail.gmail.com> Message-ID: <44F4B25F.3000504@lan-attack.ch> Thanks all for your feedback. > I've started seeing this too recently. I upgraded to the latest > mongrel prerelease 0.3.13.4 and still had an issue this morning. The > uploaded files are usually at least 20MB when this happens. Here's my > config: Apparently in my setup, there is no relation with the file size, but one actor has a timeout of 10 minutes, it appears to be quite constant in the log files. But I really can't figure out where it may come from :( Any idea someone ? I'll try to investigate the Apache configuration. Philippe J. From jdz99 at hotmail.com Tue Aug 29 18:04:07 2006 From: jdz99 at hotmail.com (Jim Douglas) Date: Tue, 29 Aug 2006 22:04:07 +0000 Subject: [Mongrel] Mongrel browse problem Message-ID: I wanted to show a Rails site to someone so I set up Mongrel and it ran fine, This is my mongrel_cluster.yml, port: ?80" environment: production pid_file: log/mongrel.pid servers: 4 Now, after going back to Apache/Tomcat I can't get the Mongrel site up and running again...? Any suggestions? (When I run Mongrel, I stop Apache first) Jim From mongrel at philip.pjkh.com Tue Aug 29 18:39:25 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Tue, 29 Aug 2006 17:39:25 -0500 (CDT) Subject: [Mongrel] Mongrel browse problem In-Reply-To: References: Message-ID: <20060829173834.L70264@bravo.pjkh.com> > I wanted to show a Rails site to someone so I set up Mongrel and it ran fine, > > This is my mongrel_cluster.yml, > > port: ?80" > environment: production > pid_file: log/mongrel.pid > servers: 4 > > Now, after going back to Apache/Tomcat I can't get the Mongrel site up and > running again...? > > Any suggestions? > > (When I run Mongrel, I stop Apache first) How long do you wait after stopping apache before staring mongrel? I know some OS's won't let you connect/bind to the same port if it's just been released... and some OS's have an option to override that behavior... what happens if you change your port to 81 or something other than 80? From hip at lan-attack.ch Tue Aug 29 20:12:28 2006 From: hip at lan-attack.ch (Philippe Jayet) Date: Wed, 30 Aug 2006 02:12:28 +0200 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F4B25F.3000504@lan-attack.ch> References: <44F4B25F.3000504@lan-attack.ch> Message-ID: <44F4D7EC.1070105@lan-attack.ch> Hi all, > Apparently in my setup, there is no relation with the file size, but one > actor has a timeout of 10 minutes, it appears to be quite constant in > the log files. But I really can't figure out where it may come from :( > > Any idea someone ? I'll try to investigate the Apache configuration. That wasn't it. :) Although the ten minutes timeout was from Apache, this isn't the problem. In fact the source of the problem was coming from the provider's load balancer ! No idea why, I'll have to further investigate. But accessing my server directly, I have no problem uploading files. I should have thought trying that earlier :/ So ... really not related to Mongrel, which makes this thread slightly OT :) Anyway thanks all for your help. Philippe J. From jdz99 at hotmail.com Tue Aug 29 23:19:42 2006 From: jdz99 at hotmail.com (Jim Douglas) Date: Wed, 30 Aug 2006 03:19:42 +0000 Subject: [Mongrel] Mongrel browse problem In-Reply-To: <20060829173834.L70264@bravo.pjkh.com> Message-ID: >From: Philip Hallstrom >Reply-To: mongrel-users at rubyforge.org >To: mongrel-users at rubyforge.org >Subject: Re: [Mongrel] Mongrel browse problem >Date: Tue, 29 Aug 2006 17:39:25 -0500 (CDT) > >>I wanted to show a Rails site to someone so I set up Mongrel and it ran >>fine, >> >>This is my mongrel_cluster.yml, >> >>port: ?80" >>environment: production >>pid_file: log/mongrel.pid >>servers: 4 >> >>Now, after going back to Apache/Tomcat I can't get the Mongrel site up and >>running again...? >> >>Any suggestions? >> >>(When I run Mongrel, I stop Apache first) > >How long do you wait after stopping apache before staring mongrel? I know >some OS's won't let you connect/bind to the same port if it's just been >released... and some OS's have an option to override that behavior... what >happens if you change your port to 81 or something other than 80? >_______________________________________________ >Mongrel-users mailing list >Mongrel-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/mongrel-users I was trying to connect on the wrong port...my bad. It should be www.mysite.com:3000 Do you know how I can make it so a user can browse http://www.mysite.com/railsemo w/o the 3000? I know I can just start mongrel on port 80 and not use Apache, but I need my Tomcat/Apache sites up also. Thanks, Jim From mongrel at philip.pjkh.com Tue Aug 29 23:36:05 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Tue, 29 Aug 2006 22:36:05 -0500 (CDT) Subject: [Mongrel] Mongrel browse problem In-Reply-To: References: Message-ID: <20060829223535.N76808@bravo.pjkh.com> >>> I wanted to show a Rails site to someone so I set up Mongrel and it ran >>> fine, >>> >>> This is my mongrel_cluster.yml, >>> >>> port: ?80" >>> environment: production >>> pid_file: log/mongrel.pid >>> servers: 4 >>> >>> Now, after going back to Apache/Tomcat I can't get the Mongrel site up and >>> running again...? >>> >>> Any suggestions? >>> >>> (When I run Mongrel, I stop Apache first) >> >> How long do you wait after stopping apache before staring mongrel? I know >> some OS's won't let you connect/bind to the same port if it's just been >> released... and some OS's have an option to override that behavior... what >> happens if you change your port to 81 or something other than 80? > > I was trying to connect on the wrong port...my bad. It should be > www.mysite.com:3000 > > Do you know how I can make it so a user can browse > http://www.mysite.com/railsemo w/o the 3000? > > I know I can just start mongrel on port 80 and not use Apache, but I need my > Tomcat/Apache sites up also. I don't personally, but Zed always mentions the latest pre-release and the --prefix option and something else... search the lists... I'm sure you'll find it... -philip From jamesludlow at gmail.com Wed Aug 30 01:30:57 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Wed, 30 Aug 2006 00:30:57 -0500 Subject: [Mongrel] Mongrel browse problem In-Reply-To: References: <20060829173834.L70264@bravo.pjkh.com> Message-ID: On 8/29/06, Jim Douglas wrote: > I was trying to connect on the wrong port...my bad. It should be > www.mysite.com:3000 > > Do you know how I can make it so a user can browse > http://www.mysite.com/railsemo w/o the 3000? > > I know I can just start mongrel on port 80 and not use Apache, but I need my > Tomcat/Apache sites up also. Proxying, virtual hosts, and a lot more are covered here. http://tinyurl.com/hdwf4 http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ -- James From jean.verger at gmail.com Wed Aug 30 11:02:53 2006 From: jean.verger at gmail.com (Jean Verger) Date: Wed, 30 Aug 2006 23:02:53 +0800 Subject: [Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP?? Message-ID: <856070080608300802n7d1f842ejaf87bf10286aed3d@mail.gmail.com> Hi, I just realice that I can't run php code anymore once I installed my dear mongrels (under an Apache Proxy Balancer). I'm just trying to run the clasic phpinfo() in the following file /var/rubyapp/public/phpinfo.php ... but instead of being executed the code is being displayed as plain text ... This is the ouput :)) anyone can give a hint please on how to have Ruby and PHP code under Apache Proxy Balancer? thanks a lot , Juan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060830/e0522e15/attachment.html From jamesludlow at gmail.com Wed Aug 30 11:12:01 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Wed, 30 Aug 2006 10:12:01 -0500 Subject: [Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP?? In-Reply-To: <856070080608300802n7d1f842ejaf87bf10286aed3d@mail.gmail.com> References: <856070080608300802n7d1f842ejaf87bf10286aed3d@mail.gmail.com> Message-ID: On 8/30/06, Jean Verger wrote: > Hi, > I just realice that I can't run php code anymore once I installed my dear > mongrels (under an Apache Proxy Balancer). > > I'm just trying to run the clasic phpinfo() in the following file > /var/rubyapp/public/phpinfo.php ... but instead of being executed the code > is being displayed as plain text ... This is the ouput :)) > > > > anyone can give a hint please on how to have Ruby and PHP code under Apache > Proxy Balancer? > Is your Rails app on a different virtual host than your PHP app? If it is, this shouldn't be a problem. Can you post the relevant config files? -- James From mongrel at philip.pjkh.com Wed Aug 30 12:20:55 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Wed, 30 Aug 2006 11:20:55 -0500 (CDT) Subject: [Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP?? In-Reply-To: <856070080608300802n7d1f842ejaf87bf10286aed3d@mail.gmail.com> References: <856070080608300802n7d1f842ejaf87bf10286aed3d@mail.gmail.com> Message-ID: <20060830111922.O7115@bravo.pjkh.com> > Hi, > I just realice that I can't run php code anymore once I installed my dear > mongrels (under an Apache Proxy Balancer). > > I'm just trying to run the clasic phpinfo() in the following file > /var/rubyapp/public/phpinfo.php ... but instead of being executed the code > is being displayed as plain text ... This is the ouput :)) > > > > anyone can give a hint please on how to have Ruby and PHP code under > Apache Proxy Balancer? My httpd.conf looks like this (excluding the parts that bring in standard PHP stuff). Works fine for us. The only thing that doesn't work are URLs like: http://foo/path/to/phpscript.php/path/info/here. BalancerMember http://127.0.0.1:8805 RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php RewriteRule ^(.*)$ $1 [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f RewriteRule ^(.*)$ $1/index.html [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f RewriteRule ^(.*)$ $1/index.php [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d RewriteRule ^(.*)[^/]$ $1/ [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] From gusxedge at gmail.com Wed Aug 30 16:17:34 2006 From: gusxedge at gmail.com (Guillaume Carbonneau) Date: Wed, 30 Aug 2006 16:17:34 -0400 Subject: [Mongrel] Mongrel service never starts Message-ID: <3f4ebe010608301317p3c25b5afl88e7002c9a5568d7@mail.gmail.com> I'm on a Win2K server environnement running ruby 1.8.5 and mongrel I've followed the tutorial and everything went fine until I start the service... Here is the output I'm getting : C:\ruby\bin??>mongrel_rails service::start -N inventaire One moment, start pending One moment, stopped One moment, stopped One moment, stopped One moment, stopped One moment, stopped .... and so on ( "One moment, stopped" message keeps popping) any idea? Guillaume Carbonneau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060830/1c1d07a7/attachment.html From luislavena at gmail.com Wed Aug 30 16:28:23 2006 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 30 Aug 2006 17:28:23 -0300 Subject: [Mongrel] Mongrel service never starts In-Reply-To: <3f4ebe010608301317p3c25b5afl88e7002c9a5568d7@mail.gmail.com> References: <3f4ebe010608301317p3c25b5afl88e7002c9a5568d7@mail.gmail.com> Message-ID: <71166b3b0608301328m1de402d6i8427966b5a5869a8@mail.gmail.com> On 8/30/06, Guillaume Carbonneau wrote: > > I'm on a Win2K server environnement running ruby 1.8.5 and mongrel > > I've followed the tutorial and everything went fine until I start the > service... > > Here is the output I'm getting : > > C:\ruby\bin??>mongrel_rails service::start -N inventaire > One moment, start pending > One moment, stopped > > One moment, stopped > > One moment, stopped > > One moment, stopped > > One moment, stopped > .... > and so on ( "One moment, stopped" message keeps popping) > > any idea? > Hi Guillaume, That often means your application crashed. Have you tried running it with mongrel_rails first? Mongrel is compatible with 1.8.4, no official testing was made with 1.8.5, nor for Rails (which seems to brake some things). As I said, try running from command line "mongrel_rails start" and check if your application start ok, if so, the problem could be checked from the log/service.log file into your application directory. Hope that helps, -- 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 jan.svitok at gmail.com Wed Aug 30 16:33:33 2006 From: jan.svitok at gmail.com (Jan Svitok) Date: Wed, 30 Aug 2006 22:33:33 +0200 Subject: [Mongrel] Mongrel service never starts In-Reply-To: <3f4ebe010608301317p3c25b5afl88e7002c9a5568d7@mail.gmail.com> References: <3f4ebe010608301317p3c25b5afl88e7002c9a5568d7@mail.gmail.com> Message-ID: <8d9b3d920608301333l58f19fb7s37aada975750b9e0@mail.gmail.com> On 8/30/06, Guillaume Carbonneau wrote: > > I'm on a Win2K server environnement running ruby 1.8.5 and mongrel > > I've followed the tutorial and everything went fine until I start the > service... > > Here is the output I'm getting : > > C:\ruby\bin??>mongrel_rails service::start -N inventaire > One moment, start pending > One moment, stopped > > One moment, stopped > > One moment, stopped > > One moment, stopped > > One moment, stopped > .... > and so on ( "One moment, stopped" message keeps popping) > > any idea? Look in the log/service.log I suspect there is an exception. I've heard of two possible problems with rails and 1.8.5: One, the breakpointer works no more, and other is deprecation of when XXX: YYY over when XXX; YYY or when XXX then YYY. Start the thing as normal rails app with mongrel or webrick to see more of the problem until it works fine. (non-service version has obviously shorter roundtrip edit-start-crash-diagnose) From jay.turpin at gmail.com Wed Aug 30 16:43:39 2006 From: jay.turpin at gmail.com (Jay Turpin) Date: Wed, 30 Aug 2006 13:43:39 -0700 Subject: [Mongrel] Mongrel service never starts In-Reply-To: <8d9b3d920608301333l58f19fb7s37aada975750b9e0@mail.gmail.com> References: <3f4ebe010608301317p3c25b5afl88e7002c9a5568d7@mail.gmail.com> <8d9b3d920608301333l58f19fb7s37aada975750b9e0@mail.gmail.com> Message-ID: <4eda9d210608301343r260b2fd0vdf01d0913371ac80@mail.gmail.com> Definitely try it with mongrel_rails start first. For me, my server was missing the version of Rails that my app was expecting. -- -- Jay Turpin "One test is worth a thousand expert opinions." - Bill Nye (The Science Guy) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060830/2fdd4a4f/attachment.html From kigsteronline at mac.com Wed Aug 30 18:10:16 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Wed, 30 Aug 2006 15:10:16 -0700 Subject: [Mongrel] Mongrel 0.3.13.3 processes occasionally lock up - critical issue In-Reply-To: <20060829150940.V65667@bravo.pjkh.com> References: <44F49956.8080308@lan-attack.ch> <20060829150940.V65667@bravo.pjkh.com> Message-ID: <091A7E07-B892-4A9B-ABBA-61AD775C3930@mac.com> Hello Mongrel gurus! We are about to deploy our Rails application to production, and even though the last couple of weeks of testing went really well, today we are seeing a new critical issue - the browser just hangs sometimes trying to load a page. When this happens, it seems that one or more of the mongrel_rails processes is hanging and not responding, while others are (so depending on which process the request is routed to, the page loads or not). The only remedy from this point onward appears to be brutal kill and restart of mongrel processes. I found the following lines in mongrel.log: Wed Aug 30 14:03:22 PDT 2006: Reaping 1 threads for slow workers because of 'shutdown' Thread # is too old, killing. Waiting for 1 requests to finish, could take 60 seconds.Wed Aug 30 14:03:23 PDT 2006: Reaping 1 threads for slow workers because of 'shutdown' Thread # is too old, killing. And apache error log has this: [Wed Aug 30 14:46:59 2006] [error] [client 64.161.139.66] proxy: Error reading from remote server returned by /bookstore, referer: ht tp://wp01.my-secret-domain.com/create/book Apache's SSL error log has this: [Wed Aug 30 14:42:35 2006] [error] [client 64.161.139.66] proxy: error reading status line from remote server 127.0.0.1 [Wed Aug 30 14:42:35 2006] [error] [client 64.161.139.66] proxy: Error reading from remote server returned by /my/account/save_edit_a ddress/80 Restarting mongrel_cluster in a regular fashion leaves some of those processes running, and subsequent processes fail to start. Killing mongrel_rails processes with 'kill -9' actually clears the cluster and after a restart it appears to work fine. This happened a couple of times today, and I am wondering if anyone has seen this behavior - and if there is a recommended fix? - Should I upgrade to the latest unreleased version of Mongrel? I am a little worried that it's also unstable. - We did not change anything about Rails session handling. Could mongrel be locking up because it is dead-locking on the session files? - How do I tell what's really going on? - Can I enable more mongrel logging that is acceptable for production use (ie - not the full debugging info) - Can I turn on PID and date/time logging to mongrel.log so that I can see which process is having an issue? Any advice on how to approach this issue is much appreciated. Our environment: Apache 2.2.3 + mod_proxy_balancer + mod_ssl, etc... Mongrel 0.3.13.3 Ruby 1.8.4 Rails 1.1.6, SslRequirements, etc Linux 2.6.9-42.ELsmp (RedHat ES4 with all up-to-date patches) on Intel Mongrel Config: --- cwd: /data/apps/app1/current port: "5000" environment: production address: 127.0.0.1 pid_file: log/mongrel.pid servers: 10 Apache Info: # httpd -v Server version: Apache/2.2.3 Server built: Aug 22 2006 10:26:14 wp01[root]# httpd -V Server version: Apache/2.2.3 Server built: Aug 22 2006 10:26:14 Server's Module Magic Number: 20051115:3 Server loaded: APR 1.2.7, APR-Util 1.2.7 Compiled using: APR 1.2.7, APR-Util 1.2.7 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/usr/local/apache-2.2.3" -D SUEXEC_BIN="/usr/local/apache-2.2.3/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" Apache Module Info: # httpd -l Compiled in modules: core.c mod_authn_file.c mod_authn_default.c mod_authz_host.c mod_authz_groupfile.c mod_authz_user.c mod_authz_default.c mod_auth_basic.c mod_include.c mod_filter.c mod_log_config.c mod_env.c mod_headers.c mod_setenvif.c mod_proxy.c mod_proxy_connect.c mod_proxy_ftp.c mod_proxy_http.c mod_proxy_ajp.c mod_proxy_balancer.c mod_ssl.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_actions.c mod_userdir.c mod_alias.c mod_rewrite.c mod_so.c Restarting using capistrano with a few hanging mongrel processes: > cap restart loading configuration /usr/local/lib/ruby/gems/1.8/gems/ capistrano-1.1.0/lib/capistrano/recipes/standard.rb loading configuration ./config/deploy.rb loading configuration # * executing task restart * executing task restart_mongrel_cluster * executing task stop_mongrel_cluster * executing "mongrel_rails cluster::stop -C /data/apps/app1/ current/config/mongrel_cluster.yml" servers: ["wp01.my-secret-domain.com"] [wp01.my-secret-domain.com] executing command ** [out :: wp01.my-secret-domain.com] Stopping 10 Mongrel servers... command finished * executing task start_mongrel_cluster * executing "mongrel_rails cluster::start -C /data/apps/app1/ current/config/mongrel_cluster.yml" servers: ["wp01.my-secret-domain.com"] [wp01.my-secret-domain.com] executing command ** [out :: wp01.my-secret-domain.com] Starting 10 Mongrel servers... ** [out :: wp01.my-secret-domain.com] ** !!! PID file log/mongrel. 5000.pid already exists. Mongrel could be running already. Check your log/mongrel.log for errors. ** [out :: wp01.my-secret-domain.com] ** !!! PID file log/mongrel. 5001.pid already exists. Mongrel could be running already. Check your log/mongrel.log for errors. ** [out :: wp01.my-secret-domain.com] ** ** [out :: wp01.my-secret-domain.com] !!! PID file log/mongrel. 5004.pid already exists. Mongrel could be running alrea ** [out :: wp01.my-secret-domain.com] dy. Check your log/mongrel.log for errors. ** [out :: wp01.my-secret-domain.com] ** ** [out :: wp01.my-secret-domain.com] !!! PID file log/mongrel. 5005.pid already exists. Mongrel could be running alrea ** [out :: wp01.my-secret-domain.com] dy. Check your log/mongrel.log for errors. ** [out :: wp01.my-secret-domain.com] ** ** [out :: wp01.my-secret-domain.com] !!! PID file log/mongrel. 5007.pid already exists. Mongrel could be running alrea ** [out :: wp01.my-secret-domain.com] dy. Check your log/mongrel.log for errors. command finished -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060830/1d9d33a8/attachment-0001.html From zedshaw at zedshaw.com Wed Aug 30 20:42:20 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Wed, 30 Aug 2006 17:42:20 -0700 Subject: [Mongrel] Mongrel 0.3.13.3 processes occasionally lock up - critical issue In-Reply-To: <091A7E07-B892-4A9B-ABBA-61AD775C3930@mac.com> References: <44F49956.8080308@lan-attack.ch> <20060829150940.V65667@bravo.pjkh.com> <091A7E07-B892-4A9B-ABBA-61AD775C3930@mac.com> Message-ID: <1156984940.6019.6.camel@localhost.localdomain> On Wed, 2006-08-30 at 15:10 -0700, kigsteronline at mac.com wrote: > Hello Mongrel gurus! > > > We are about to deploy our Rails application to production, and even > though the last couple of weeks of testing went really well, today we > are seeing a new critical issue - the browser just hangs sometimes > trying to load a page. When this happens, it seems that one or more of > the mongrel_rails processes is hanging and not responding, while > others are (so depending on which process the request is routed to, > the page loads or not). The only remedy from this point onward > appears to be brutal kill and restart of mongrel processes. > Ah, you might be hitting the CLOSE_WAIT bug. This makes me think more and more that Apache is doing something funky. This bug and a 99% CPU bug is driving down right insane since I can't replicate it to save my life. I've got mongrel serving ISO images to an RFuzz script that randomly closes sockets and does nasty requests while thrashing mongrel with httperf with a short timeout. Nothing. Not even one CLOSE_WAIT socket, no memory leaks (anymore), and no CPU thrashing. It's really driving me nuts. What I've done is created a special "debug version" of the mongrel pre-release that I'd like you to run. Here's what you do: 1) download http://www.zedshaw.com/mongrel-0.3.13.4.gem 2) install: gem install mongrel-0.3.13.4.gem 3) start your app just like it is. 4) Hit mongrels with USR1: killall -USR1 mongrel_rails 5) Let mongrel run until it dies horribly. 6) Just before you kill -9 mongrel, run: lsof -i -P | grep CLOSE_WAIT > close_wait.log 7) Stop mongrel and send me log/mongrel.log and close_wait.log to zedshaw at zedshaw.com. Hopefully I can nail this for the next release. The CLOSE_WAIT used to be really bad but I cut it down quite a bit, so it should take longer to detroy it. Also make sure to tell me if the CPU usage for mongrel is above 90% (it's pegged). Thanks for the help. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From luislavena at gmail.com Wed Aug 30 22:00:01 2006 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 30 Aug 2006 23:00:01 -0300 Subject: [Mongrel] No log/mongrel.log file under win32. Message-ID: <71166b3b0608301900x2ca8365as9172164b388952f@mail.gmail.com> To follow up this bug report: When you run mongrel_rails without the daemonize option -d on *nix, it also don't generate log/mongrel.log file! Because win32 cannot Process.fork like *nix, should it start logging to logfile after showing Ctrl+C option? Suggestions are welcome on how to reply to this "feature". -- 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 _ at whats-your.name Wed Aug 30 23:36:00 2006 From: _ at whats-your.name (carmen) Date: Thu, 31 Aug 2006 03:36:00 +0000 Subject: [Mongrel] No log/mongrel.log file under win32. In-Reply-To: <71166b3b0608301900x2ca8365as9172164b388952f@mail.gmail.com> References: <71166b3b0608301900x2ca8365as9172164b388952f@mail.gmail.com> Message-ID: <20060831033600.GG2065@replic.net> On Wed Aug 30, 2006 at 11:00:01PM -0300, Luis Lavena wrote: > To follow up this bug report: > > When you run mongrel_rails without the daemonize option -d on > *nix, it also don't generate log/mongrel.log file! > > Because win32 cannot Process.fork like *nix, it can. check out the win32 utils on rubyforge. its emulated with Create process and dup'ing pipes or something. not exactly fast or bugfree, in fact, every script ive tried except the example one included in the win32 tools behaved exceedingly weird .. should it start > logging to logfile after showing Ctrl+C option? > > Suggestions are welcome on how to reply to this "feature". > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From luislavena at gmail.com Wed Aug 30 23:45:07 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 31 Aug 2006 00:45:07 -0300 Subject: [Mongrel] No log/mongrel.log file under win32. In-Reply-To: <20060831033600.GG2065@replic.net> References: <71166b3b0608301900x2ca8365as9172164b388952f@mail.gmail.com> <20060831033600.GG2065@replic.net> Message-ID: <71166b3b0608302045g341a26d0i3bec919fa8777834@mail.gmail.com> On 8/31/06, carmen <_ at whats-your.name> wrote: > On Wed Aug 30, 2006 at 11:00:01PM -0300, Luis Lavena wrote: > > To follow up this bug report: > > > > When you run mongrel_rails without the daemonize option -d on > > *nix, it also don't generate log/mongrel.log file! > > > > Because win32 cannot Process.fork like *nix, > > it can. check out the win32 utils on rubyforge. its emulated with Create process and dup'ing pipes or something. not exactly fast or bugfree, in fact, every script ive tried except the example one included in the win32 tools behaved exceedingly weird .. Hehe, THAT'S why I said "win32 cannot do fork like *nix". Every tool that try to emulate the way it behave will fail... is not the same, will not work the same way... nor even twice. So, for sake of functionality, users doing development on windows, should get log/mongrel.log file created? Or only when running them with -d option? The idea is same or similar functionality on any platform. > > should it start > > logging to logfile after showing Ctrl+C option? > > > > Suggestions are welcome on how to reply to this "feature". > > > > -- > > Luis Lavena > > Multimedia systems > > - > > Leaders are made, they are not born. They are made by hard effort, > > which is the price which all of us must pay to achieve any goal that > > is worthwhile. > > Vince Lombardi > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From bryan at galisys.com Thu Aug 31 00:00:11 2006 From: bryan at galisys.com (Bryan Thompson) Date: Wed, 30 Aug 2006 23:00:11 -0500 Subject: [Mongrel] Apache & SSL - Redirects going to http:// not https:// Message-ID: Hi guys, I have a (hopefully) quick question about ssl and mongrel. We are using Apache2 and the proxy balancer module to control a pack of mongrels. This is a brand new setup, as our server had been using Apache 1.3 with no mongrels at all. The speed boost has been great, and we are not getting any of the previous errors that were caused by FastCGI. I am having a strange problem nonetheless. At seemingly random times, redirect_to tags are sending the user to http:// instead of https://, and since :80 is shut off, they are seeing ugly errors. In my development.log I see the normal lines I used to see when my process finished, but it's clearly redirecting to :80. > ..... > SQL (0.000165) COMMIT > Redirected to http://********.edu/install/editSettings That should definitely be https, and when I put the s in manually, it works fine. Is there some mongrel (or apache) config property I need that I don't have? This post looks relevant (http://rubyforge.org/pipermail/mongrel- users/2006-May/000185.html), so I'm going to play with it a little bit. If anyone has any suggestions, I greatly appreciate it. Thanks, Bryan From bryan at galisys.com Thu Aug 31 01:08:17 2006 From: bryan at galisys.com (Bryan Thompson) Date: Thu, 31 Aug 2006 00:08:17 -0500 Subject: [Mongrel] Apache & SSL - Redirects going to http:// not https:// In-Reply-To: References: Message-ID: I'm currently figuring out how to install the mod_headers apache module, but I think I'm on the right track now. Hurray for archives :) Bryan On Aug 30, 2006, at 11:00 PM, Bryan Thompson wrote: > Hi guys, > > I have a (hopefully) quick question about ssl and mongrel. We are > using Apache2 and the proxy balancer module to control a pack of > mongrels. This is a brand new setup, as our server had been using > Apache 1.3 with no mongrels at all. The speed boost has been great, > and we are not getting any of the previous errors that were caused by > FastCGI. I am having a strange problem nonetheless. > > At seemingly random times, redirect_to tags are sending the user to > http:// instead of https://, and since :80 is shut off, they are > seeing ugly errors. In my development.log I see the normal lines I > used to see when my process finished, but it's clearly redirecting > to :80. > >> ..... >> SQL (0.000165) COMMIT >> Redirected to http://********.edu/install/editSettings > > That should definitely be https, and when I put the s in manually, it > works fine. Is there some mongrel (or apache) config property I need > that I don't have? > > This post looks relevant (http://rubyforge.org/pipermail/mongrel- > users/2006-May/000185.html), so I'm going to play with it a little > bit. If anyone has any suggestions, I greatly appreciate it. > > Thanks, > > Bryan > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From kigsteronline at mac.com Thu Aug 31 01:39:43 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Wed, 30 Aug 2006 22:39:43 -0700 Subject: [Mongrel] Mongrel 0.3.13.3 processes occasionally lock up - critical issue In-Reply-To: <1156984940.6019.6.camel@localhost.localdomain> References: <44F49956.8080308@lan-attack.ch> <20060829150940.V65667@bravo.pjkh.com> <091A7E07-B892-4A9B-ABBA-61AD775C3930@mac.com> <1156984940.6019.6.camel@localhost.localdomain> Message-ID: Zed and friends, Turns out our locking up issue was related to the corrupt ruby stack in our application. We were able to reproduce this bug in Webrick and LightHTTPD, so this is not Mongrel specific. Thanks Zed for all the help, Konstantin On Aug 30, 2006, at 5:42 PM, Zed Shaw wrote: > On Wed, 2006-08-30 at 15:10 -0700, kigsteronline at mac.com wrote: >> Hello Mongrel gurus! >> >> >> We are about to deploy our Rails application to production, and even >> though the last couple of weeks of testing went really well, today we >> are seeing a new critical issue - the browser just hangs sometimes >> trying to load a page. When this happens, it seems that one or >> more of >> the mongrel_rails processes is hanging and not responding, while >> others are (so depending on which process the request is routed to, >> the page loads or not). The only remedy from this point onward >> appears to be brutal kill and restart of mongrel processes. >> > > Ah, you might be hitting the CLOSE_WAIT bug. This makes me think more > and more that Apache is doing something funky. This bug and a 99% CPU > bug is driving down right insane since I can't replicate it to save my > life. I've got mongrel serving ISO images to an RFuzz script that > randomly closes sockets and does nasty requests while thrashing > mongrel > with httperf with a short timeout. > > Nothing. Not even one CLOSE_WAIT socket, no memory leaks > (anymore), and > no CPU thrashing. It's really driving me nuts. > > What I've done is created a special "debug version" of the mongrel > pre-release that I'd like you to run. Here's what you do: > > 1) download http://www.zedshaw.com/mongrel-0.3.13.4.gem > 2) install: gem install mongrel-0.3.13.4.gem > 3) start your app just like it is. > 4) Hit mongrels with USR1: killall -USR1 mongrel_rails > 5) Let mongrel run until it dies horribly. > 6) Just before you kill -9 mongrel, run: lsof -i -P | grep > CLOSE_WAIT > > close_wait.log > 7) Stop mongrel and send me log/mongrel.log and close_wait.log to > zedshaw at zedshaw.com. > > Hopefully I can nail this for the next release. The CLOSE_WAIT > used to > be really bad but I cut it down quite a bit, so it should take > longer to > detroy it. > > Also make sure to tell me if the CPU usage for mongrel is above 90% > (it's pegged). > > Thanks for the help. > > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From jean.verger at gmail.com Thu Aug 31 04:53:52 2006 From: jean.verger at gmail.com (Jean Verger) Date: Thu, 31 Aug 2006 16:53:52 +0800 Subject: [Mongrel] Mongrel-users Digest, Vol 7, Issue 58 In-Reply-To: References: Message-ID: <856070080608310153x1832b01ak554d69d673eb42ac@mail.gmail.com> Hi, regarding running PHP+Ruby: the php app/files are under the same folder where the rubby applications are. So therefore, I guess, they are also under the same virtual host. I have tried and it is true that if they are running under a different virtual host there is no problem. I guess the php code is being send to the mongrels ... wich don't expect php code (but rather ruby) and give it back as plain text ... wich ends up being what I see in the browser. Could I define the same virtual host twice? once with proxy (straight to the mongres dealing with ruby) and other one without the proxy ... to let Apache take care of PHP? Hi Philip,thanks for your reply ... your PHP files are under the same folder as the Ruby code? I'll research on what is RewriteCond and RewriteRule ... I was trying to work something out with the FilterFiles (or something like that ...) thanks, Jean -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060831/aa5437ee/attachment.html From hip at lan-attack.ch Thu Aug 31 09:12:11 2006 From: hip at lan-attack.ch (Philippe Jayet) Date: Thu, 31 Aug 2006 15:12:11 +0200 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F49956.8080308@lan-attack.ch> References: <44F49956.8080308@lan-attack.ch> Message-ID: <44F6E02B.4050003@lan-attack.ch> Hi all, > I'm not quite sure to fully understand how a request is handled by this > setup, particularly at which step the full request may be cached and > passed by to Mongrel and/or Rails fully, without waiting for the client > to finish his upload. Concerning this point, I'm not sure of the following: does Mongrel receive the full request before passing it to Rails ? Just to be sure. Thanks in advance for your answers! Philippe From schwuk at gmail.com Thu Aug 31 10:44:35 2006 From: schwuk at gmail.com (Dave Murphy) Date: Thu, 31 Aug 2006 15:44:35 +0100 Subject: [Mongrel] Rails Deployment Book Message-ID: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> I've been mulling over an idea for a book covering Ruby on Rails application deployment. Obvious topics include using Mongrel by itself and with Apache/Lighttpd, load balancers, memcached, and Capistrano. What other topics would you like to see covered in such a book? Cheers, -- Dave Murphy (Schwuk) http://schwuk.com From jamesludlow at gmail.com Thu Aug 31 10:57:22 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Thu, 31 Aug 2006 09:57:22 -0500 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> Message-ID: On 8/31/06, Dave Murphy wrote: > I've been mulling over an idea for a book covering Ruby on Rails > application deployment. Obvious topics include using Mongrel by itself > and with Apache/Lighttpd, load balancers, memcached, and Capistrano. > > What other topics would you like to see covered in such a book? Isn't Ezra releasing a book like this soon? You might want to check out what's covered there and see what's missing. -- James From jdz99 at hotmail.com Thu Aug 31 12:29:06 2006 From: jdz99 at hotmail.com (Jim Douglas) Date: Thu, 31 Aug 2006 16:29:06 +0000 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> Message-ID: rom: "Dave Murphy" >Reply-To: mongrel-users at rubyforge.org >To: mongrel-users at rubyforge.org, rubyonrails-talk at googlegroups.com >Subject: [Mongrel] Rails Deployment Book >Date: Thu, 31 Aug 2006 15:44:35 +0100 > >I've been mulling over an idea for a book covering Ruby on Rails >application deployment. Obvious topics include using Mongrel by itself >and with Apache/Lighttpd, load balancers, memcached, and Capistrano. > >What other topics would you like to see covered in such a book? > >Cheers, >-- >Dave Murphy (Schwuk) >http://schwuk.com >_______________________________________________ >Mongrel-users mailing list >Mongrel-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/mongrel-users Integration/setup with Tomcat/Apache so you can run java webapps also.. From wconrad at yagni.com Thu Aug 31 12:40:42 2006 From: wconrad at yagni.com (Wayne Conrad) Date: Thu, 31 Aug 2006 09:40:42 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> Message-ID: <20060831164042.GA4539@yagni.com> On Thu, Aug 31, 2006 at 03:44:35PM +0100, Dave Murphy wrote: > What other topics would you like to see covered in such a book? More than anything else, what to do when things go wrong. This comes in two parts: The first is a concise overview of the model... of how the pieces interact. For example, what does pound do when the server it is talking to times out? Without a model in your head, diagnosing problems is just guesswork. And the second part: What do the experts do when it doesn't work? Which log do you check first? What do you do to learn more when the log doesn't make the problem obvious to you? From kovacs at gmail.com Thu Aug 31 12:47:04 2006 From: kovacs at gmail.com (Michael Kovacs) Date: Thu, 31 Aug 2006 09:47:04 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <20060831164042.GA4539@yagni.com> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <20060831164042.GA4539@yagni.com> Message-ID: <5E9E952B-8DF3-4868-A0C2-639D240FC2E8@gmail.com> +1 -Michael http://javathehutt.blogspot.com On Aug 31, 2006, at 9:40 AM, Wayne Conrad wrote: > On Thu, Aug 31, 2006 at 03:44:35PM +0100, Dave Murphy wrote: >> What other topics would you like to see covered in such a book? > > More than anything else, what to do when things go wrong. > > This comes in two parts: > > The first is a concise overview of the model... of how the pieces > interact. For example, what does pound do when the server it is > talking to times out? Without a model in your head, diagnosing > problems is just guesswork. > > And the second part: > > What do the experts do when it doesn't work? Which log do you check > first? What do you do to learn more when the log doesn't make the > problem obvious to you? > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From ezmobius at gmail.com Thu Aug 31 13:41:55 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 31 Aug 2006 10:41:55 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> Message-ID: <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> On Aug 31, 2006, at 7:57 AM, James Ludlow wrote: > On 8/31/06, Dave Murphy wrote: >> I've been mulling over an idea for a book covering Ruby on Rails >> application deployment. Obvious topics include using Mongrel by >> itself >> and with Apache/Lighttpd, load balancers, memcached, and Capistrano. >> >> What other topics would you like to see covered in such a book? > > Isn't Ezra releasing a book like this soon? You might want to check > out what's covered there and see what's missing. > > -- James > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users Yeah guys my book will be out in beta around the end of this month. It covers mongrel in depth and also covers pretty much any viable option for deployment on other servers as well. Also covering the theory behind what makes rails tick and how to scale it in a sane way. Plus all the goodies like memcached and friends. Its been in the works for a long time but thats because I keep changing it to keep up with the times. Stay tuned, Dave Thomas already sent out the distributor info packet and stated that the printed book will ship in November so I guess I have a real deadline now ;) Cheers- -Ezra From philippe.lachaise at gmail.com Thu Aug 31 14:10:19 2006 From: philippe.lachaise at gmail.com (philippe lachaise) Date: Thu, 31 Aug 2006 20:10:19 +0200 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> Message-ID: If an in-depth book is due in the forseeable future, what about a cookbook then ? I would kill for a "Rails Deployment and Scaling Receipes" That would enable me to start from scratch from a bare hosted Linux Box and be up and running quickly. Being in harmony with the "Run first, understand later" that makes it so easy for people to gain a very posisitive first experience with RoR will take many enthousiasts past the Webrick stage. Anyway whatever book that may render RoR deployement less intimidating (more PHP-like) will be a significant accelerating factor for RoR adoption and is likely to become a best-seller. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060831/e97368de/attachment.html From jamesludlow at gmail.com Thu Aug 31 14:12:26 2006 From: jamesludlow at gmail.com (James Ludlow) Date: Thu, 31 Aug 2006 13:12:26 -0500 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> Message-ID: On 8/31/06, Ezra Zygmuntowicz wrote: > > Yeah guys my book will be out in beta around the end of this month. > It covers mongrel in depth and also covers pretty much any viable > option for deployment on other servers as well. Also covering the > theory behind what makes rails tick and how to scale it in a sane > way. Plus all the goodies like memcached and friends. Its been in the > works for a long time but thats because I keep changing it to keep up > with the times. > > Stay tuned, Dave Thomas already sent out the distributor info packet > and stated that the printed book will ship in November so I guess I > have a real deadline now ;) I'm looking forward to seeing the beta version. By any chance, do you specifically cover strategies for load-balanced web servers with apps that use file_column for uploads? Synchronization in general between load-balanced apps would be a good topic. -- James From ezmobius at gmail.com Thu Aug 31 14:35:28 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 31 Aug 2006 11:35:28 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> Message-ID: <49729EA9-AEAE-4CCC-AC4F-D1E76B90892E@gmail.com> On Aug 31, 2006, at 11:12 AM, James Ludlow wrote: > On 8/31/06, Ezra Zygmuntowicz wrote: >> >> Yeah guys my book will be out in beta around the end of >> this month. >> It covers mongrel in depth and also covers pretty much any viable >> option for deployment on other servers as well. Also covering the >> theory behind what makes rails tick and how to scale it in a sane >> way. Plus all the goodies like memcached and friends. Its been in the >> works for a long time but thats because I keep changing it to keep up >> with the times. >> >> Stay tuned, Dave Thomas already sent out the distributor >> info packet >> and stated that the printed book will ship in November so I guess I >> have a real deadline now ;) > > I'm looking forward to seeing the beta version. > > By any chance, do you specifically cover strategies for load-balanced > web servers with apps that use file_column for uploads? > Synchronization in general between load-balanced apps would be a good > topic. > > > -- James James- Yeah I cover clustered setups and will cover the file_column or acts_as_attachment situation with asset hosts and all that jazz. Also the beta will be around 8-10 chapters and then the printed book will have 15 or so. So as soon as the beta is out I will be listening to my readers to see exactly what they want the rest of the book to cover. So if I miss anything, I will have some time to make sure it gets in to the final book. Gotta love the beta books from the Prag's. Cheers- -Ezra From ez at brainspl.at Thu Aug 31 14:38:22 2006 From: ez at brainspl.at (Ezra Zygmuntowicz) Date: Thu, 31 Aug 2006 11:38:22 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> Message-ID: <3B052FF8-9376-44A3-A5F9-EBC686FF3A0E@brainspl.at> On Aug 31, 2006, at 11:10 AM, philippe lachaise wrote: > If an in-depth book is due in the forseeable future, what about a > cookbook then ? > > I would kill for a "Rails Deployment and Scaling Receipes" That > would enable me to start from scratch from a bare hosted Linux Box > and be up and running quickly. > > Being in harmony with the "Run first, understand later" that makes > it so easy for people to gain a very posisitive first experience > with RoR will take many enthousiasts past the Webrick stage. > > Anyway whatever book that may render RoR deployement less > intimidating (more PHP-like) will be a significant accelerating > factor for RoR adoption and is likely to become a best-seller. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users My book has a chapter that will take you thru setting up a debian rails server from scratch. It tries to cover the theory along the way as you set things up but you can just use it without knowing what your doing if thats the way you want to go I guess ;) Also with the great beta book program from the Prag's I will be able to make sure that the final printed book covers everything people want to see if I missed anything in the beta. Cheers- -Ezra From al-mongrelusers at none.at Thu Aug 31 15:42:48 2006 From: al-mongrelusers at none.at (Alexander Lazic) Date: Thu, 31 Aug 2006 21:42:48 +0200 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <38C1A9B7-47F2-421D-8BB2-FA4D5C0491AC@gmail.com> Message-ID: <20060831194248.GA27897@none.at> On Don 31.08.2006 10:41, Ezra Zygmuntowicz wrote: > > Yeah guys my book will be out in beta around the end of this >month. It covers mongrel in depth and also covers pretty much any >viable option for deployment on other servers as well. Also covering >the theory behind what makes rails tick and how to scale it in a sane >way. Plus all the goodies like memcached and friends. Its been in the >works for a long time but thats because I keep changing it to keep up >with the times. Do you cover only rails or also some other frameworks such as nitro ;-)?! Regrads Alex From snacktime at gmail.com Thu Aug 31 17:47:52 2006 From: snacktime at gmail.com (snacktime) Date: Thu, 31 Aug 2006 14:47:52 -0700 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F6E02B.4050003@lan-attack.ch> References: <44F49956.8080308@lan-attack.ch> <44F6E02B.4050003@lan-attack.ch> Message-ID: <1f060c4c0608311447y375fce07gdfbf7433afadb6d8@mail.gmail.com> > > Concerning this point, I'm not sure of the following: does Mongrel > receive the full request before passing it to Rails ? > Yes it does. From zedshaw at zedshaw.com Thu Aug 31 17:58:40 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 31 Aug 2006 14:58:40 -0700 Subject: [Mongrel] Setup with Apache 2.2 proxy balancer : timeout during uploads In-Reply-To: <44F6E02B.4050003@lan-attack.ch> References: <44F49956.8080308@lan-attack.ch> <44F6E02B.4050003@lan-attack.ch> Message-ID: <1157061520.7167.8.camel@localhost.localdomain> On Thu, 2006-08-31 at 15:12 +0200, Philippe Jayet wrote: > Hi all, > > > I'm not quite sure to fully understand how a request is handled by this > > setup, particularly at which step the full request may be cached and > > passed by to Mongrel and/or Rails fully, without waiting for the client > > to finish his upload. > > Concerning this point, I'm not sure of the following: does Mongrel > receive the full request before passing it to Rails ? Yes, Mongrel processes the full request, including uploaded body before calling rails (and locking it). If the request is large then it also streams the result to a tmpfile in order to not use up ram. The response Rails generates is placed into an internal buffer and then when Rails is done Mongrel unlocks rails and spends the rest of it's time sending back the response. This is necessary so that Rails can be locked for the shortest amount of time. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Thu Aug 31 18:17:06 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Thu, 31 Aug 2006 15:17:06 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> Message-ID: <1157062626.7167.26.camel@localhost.localdomain> On Thu, 2006-08-31 at 15:44 +0100, Dave Murphy wrote: > I've been mulling over an idea for a book covering Ruby on Rails > application deployment. Obvious topics include using Mongrel by itself > and with Apache/Lighttpd, load balancers, memcached, and Capistrano. Dave, Ezra's already got a book coming out on that topic and I'm supposed to be helping with a tiny one for just Mongrel tweaking. This duplication of course hasn't stopped publishers from flooding the market with the exact same books anyway, so feel free to pitch your idea to one of them. :-) I do have some alternative suggestions though, based on what I think people need next: * Rails Security -- Just a book on the common web app security issues but focused on Rails, with a good section on auditing that we can make rails-core read. * Teaching Rails -- A "train the trainers" book, probably really small for people who are experienced in Rails and Ruby but must now teach a bunch of noobs. I will only buy this book if David A. Black writes it. * Database Design for Rails -- A basic theory book in ER design and how Rails does it, geared toward the mass of people who cowboy their databases with migrations until everything mostly works. * Search In Rails -- Small book on search using Hyper Estraier, Ferret, and other search frameworks and how to integrate with Rails easily. * The Other Frameworks -- Bad name, but basically Camping, Nitro, Wee, and IOWA. Heavy on their design and Ruby, less on using them. * The Tao of Modern System Management -- I am so sick and tired of lame system administrators who do not automate their management tasks and act as troll gatekeepers making it impossible for me to do my job. I'd love nothing more than a book and a bunch of software that puts a good 90% of these idiots out of work. It happened to developers with recent process improvement movements, it's high time something similar happened to system administrators. Theme of this book would be "if you manually ssh into any machine YOU'RE FIRED!" * The Te of Performance Measurement -- I guess I have to write this one, but basically a book on modern statistically based performance measurement techniques from the perspective of Statistical Quality Control. * Rails on Win32 -- Windows is so painful for Rails, maybe a little PDF book would help. That should get people talking. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From gusxedge at gmail.com Thu Aug 31 18:51:18 2006 From: gusxedge at gmail.com (Guillaume Carbonneau) Date: Thu, 31 Aug 2006 18:51:18 -0400 Subject: [Mongrel] Mongrel service never starts In-Reply-To: <4eda9d210608301343r260b2fd0vdf01d0913371ac80@mail.gmail.com> References: <3f4ebe010608301317p3c25b5afl88e7002c9a5568d7@mail.gmail.com> <8d9b3d920608301333l58f19fb7s37aada975750b9e0@mail.gmail.com> <4eda9d210608301343r260b2fd0vdf01d0913371ac80@mail.gmail.com> Message-ID: <3f4ebe010608311551v57a0cc68q5bab6362810cf140@mail.gmail.com> hey Thanks guys The problem was with a conflict of versions with my rails project and the rails gem on the deployement server. I love this community Thanks again Guillaume Carbonneau On 8/30/06, Jay Turpin wrote: > > Definitely try it with mongrel_rails start first. For me, my server was > missing the version of Rails that my app was expecting. > > -- > -- Jay Turpin > "One test is worth a thousand expert opinions." - Bill Nye (The Science > Guy) > > _______________________________________________ > 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/20060831/099abab6/attachment.html From joeat303 at yahoo.com Thu Aug 31 19:00:30 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Thu, 31 Aug 2006 16:00:30 -0700 (PDT) Subject: [Mongrel] Rails Deployment Book Message-ID: <20060831230030.40909.qmail@web38612.mail.mud.yahoo.com> I think I'll write a book about how there seems to be too many Ruby/Rails books coming out, and the abundance of which is making it start to feel like Java (whose books can collapse book shelves). Joe __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jamie at dangosaur.us Thu Aug 31 19:08:34 2006 From: jamie at dangosaur.us (Jamie Orchard-Hays) Date: Thu, 31 Aug 2006 19:08:34 -0400 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <20060831230030.40909.qmail@web38612.mail.mud.yahoo.com> References: <20060831230030.40909.qmail@web38612.mail.mud.yahoo.com> Message-ID: <8C41FAF4-C6E2-43DA-BFF3-7CB4E6CB9183@dangosaur.us> That's the best one yet! On Aug 31, 2006, at 7:00 PM, Joe Ruby wrote: > I think I'll write a book about how there seems to be > too many Ruby/Rails books coming out, and the > abundance of which is making it start to feel like > Java (whose books can collapse book shelves). > > Joe > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From andrew at sophrinix.com Thu Aug 31 19:19:21 2006 From: andrew at sophrinix.com (=?iso-8859-1?Q?andrew?=) Date: Thu, 31 Aug 2006 17:19:21 -0600 Subject: [Mongrel] Rails Deployment Book Message-ID: <20060831231921.20063.qmail@server285.com> > -------Original Message------- > From: Jamie Orchard-Hays > Subject: Re: [Mongrel] Rails Deployment Book > Sent: Aug 31 '06 17:08 > > That's the best one yet! > On n 31, 2006, at 7:00 PM, Joe Ruby wrote: > > > I think I'll write a book about how there seems to be > > too many Ruby/Rails books coming out, and the > > abundance of which is making it start to feel like > > Java (whose books can collapse book shelves). > > > > Joe What, are books about ruby on rails not web 2.0 enough? On a more serious note, I am very glad there is this level of documentation with rails. If anything, no one has yet written a good book on how to deploy a enterprise level application under rails. yes there is ruby in the enterprise. All that book acomplishes is showing one how to replace perl more then anything else. I am disapointed in the lack of libre documentation on rails in relation to !libre. BTW has anyone considered starting a wikibook on mongrel on the wikimedia foundation project? Andrew From joeat303 at yahoo.com Thu Aug 31 19:28:17 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Thu, 31 Aug 2006 16:28:17 -0700 (PDT) Subject: [Mongrel] Rails Deployment Book Message-ID: <20060831232817.57160.qmail@web38605.mail.mud.yahoo.com> I think there's gonna be a good deal of overlap in the material, especially amongst different publishers. Ruby in the Enterprise? Can't 37 Signals example be used? Can't be that hard to figure out and setup... I don't know what you mean by "not Web 2.0 enough." Joe --- > -------Original Message------- > From: Jamie Orchard-Hays > Subject: Re: [Mongrel] Rails Deployment Book > Sent: Aug 31 '06 17:08 > > That's the best one yet! > On n 31, 2006, at 7:00 PM, Joe Ruby wrote: > > > I think I'll write a book about how there seems to be > > too many Ruby/Rails books coming out, and the > > abundance of which is making it start to feel like > > Java (whose books can collapse book shelves). > > > > Joe What, are books about ruby on rails not web 2.0 enough? On a more serious note, I am very glad there is this level of documentation with rails. If anything, no one has yet written a good book on how to deploy a enterprise level application under rails. yes there is ruby in the enterprise. All that book acomplishes is showing one how to replace perl more then anything else. I am disapointed in the lack of libre documentation on rails in relation to !libre. BTW has anyone considered starting a wikibook on mongrel on the wikimedia foundation project? Andrew __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From schwuk at gmail.com Thu Aug 31 19:35:49 2006 From: schwuk at gmail.com (Dave Murphy) Date: Fri, 1 Sep 2006 00:35:49 +0100 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <1157062626.7167.26.camel@localhost.localdomain> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <1157062626.7167.26.camel@localhost.localdomain> Message-ID: <2e60a9e60608311635h433ab606y77a269b983903512@mail.gmail.com> On 31/08/06, Zed Shaw wrote: > I do have some alternative suggestions though, based on what I think > people need next: Zed, Excellent suggestions. Thanks. -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Thu Aug 31 19:36:49 2006 From: schwuk at gmail.com (Dave Murphy) Date: Fri, 1 Sep 2006 00:36:49 +0100 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <20060831230030.40909.qmail@web38612.mail.mud.yahoo.com> References: <20060831230030.40909.qmail@web38612.mail.mud.yahoo.com> Message-ID: <2e60a9e60608311636i69d5ef75mf2ed478226a348b8@mail.gmail.com> On 01/09/06, Joe Ruby wrote: > I think I'll write a book about how there seems to be > too many Ruby/Rails books coming out, and the > abundance of which is making it start to feel like > Java (whose books can collapse book shelves). +1 Nicely put Joe! -- Dave Murphy (Schwuk) http://schwuk.com From schwuk at gmail.com Thu Aug 31 19:41:32 2006 From: schwuk at gmail.com (Dave Murphy) Date: Fri, 1 Sep 2006 00:41:32 +0100 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <1157062626.7167.26.camel@localhost.localdomain> References: <2e60a9e60608310744x6304c8e7o76aa232d8447e80e@mail.gmail.com> <1157062626.7167.26.camel@localhost.localdomain> Message-ID: <2e60a9e60608311641l763175c5i590f274b12ad7752@mail.gmail.com> On 31/08/06, Zed Shaw wrote: > Ezra's already got a book coming out on that topic and I'm supposed to > be helping with a tiny one for just Mongrel tweaking. This duplication > of course hasn't stopped publishers from flooding the market with the > exact same books anyway, so feel free to pitch your idea to one of > them. :-) I was discussing the idea with a publisher when I discovered Ezra's book. We've decided not to compete directly, but a more focused title (most likely around Mongrel) may still be in the works. -- Dave Murphy (Schwuk) http://schwuk.com From kigsteronline at mac.com Thu Aug 31 20:23:23 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Thu, 31 Aug 2006 17:23:23 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <20060831232817.57160.qmail@web38605.mail.mud.yahoo.com> References: <20060831232817.57160.qmail@web38605.mail.mud.yahoo.com> Message-ID: <78A57C81-572B-45F4-B6CD-03ADACE16501@mac.com> > Ruby in the Enterprise? Can't 37 Signals example be > used? Can't be that hard to figure out and setup... What? 37 Signals is an enterprise? Since when?!?!? I want book on Rails for COBOL programmers. Mostly for the museum. That's where the enterprise belongs anyway :^) ~K From joeat303 at yahoo.com Thu Aug 31 20:31:07 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Thu, 31 Aug 2006 17:31:07 -0700 (PDT) Subject: [Mongrel] Rails Deployment Book Message-ID: <20060901003107.31215.qmail@web38614.mail.mud.yahoo.com> Okay, then what IS enterprise? Joe --- > Ruby in the Enterprise? Can't 37 Signals example be > used? Can't be that hard to figure out and setup... What? 37 Signals is an enterprise? Since when?!?!? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From lists at foorama.com Thu Aug 31 20:50:35 2006 From: lists at foorama.com (Tim Trautmann) Date: Thu, 31 Aug 2006 17:50:35 -0700 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <20060901003107.31215.qmail@web38614.mail.mud.yahoo.com> References: <20060901003107.31215.qmail@web38614.mail.mud.yahoo.com> Message-ID: http://en.wikipedia.org/wiki/Enterprise_architecture http://en.wikipedia.org/wiki/Enterprise_software On Aug 31, 2006, at 5:31 PM, Joe Ruby wrote: > Okay, then what IS enterprise? From joeat303 at yahoo.com Thu Aug 31 21:00:23 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Thu, 31 Aug 2006 18:00:23 -0700 (PDT) Subject: [Mongrel] Rails Deployment Book Message-ID: <20060901010024.49837.qmail@web38608.mail.mud.yahoo.com> Recovering from my eyes glazing over, a Rails in the Enterprise book seems silly since DHH and the rest of core have no aspirations to be "enterprise." Joe --- http://en.wikipedia.org/wiki/Enterprise_architecture http://en.wikipedia.org/wiki/Enterprise_software On Aug 31, 2006, at 5:31 PM, Joe Ruby wrote: > Okay, then what IS enterprise? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jaredbrown at gmail.com Thu Aug 31 21:59:03 2006 From: jaredbrown at gmail.com (Jared Brown) Date: Thu, 31 Aug 2006 21:59:03 -0400 Subject: [Mongrel] session caching in mongrel Message-ID: Is there some kind of caching of session data in mongrel? What is the best way to get mongrel servers within a cluster to always keep their sessions synced? -- Jared Brown jaredbrown at gmail.com (765) 409-0875 7001 Central Ave Indianapolis, IN 46220 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060831/e47ccc44/attachment.html From luislavena at gmail.com Thu Aug 31 22:00:59 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 31 Aug 2006 23:00:59 -0300 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <20060901003107.31215.qmail@web38614.mail.mud.yahoo.com> References: <20060901003107.31215.qmail@web38614.mail.mud.yahoo.com> Message-ID: <71166b3b0608311900i609d8e88ibdc42d63bb95b477@mail.gmail.com> On 8/31/06, Joe Ruby wrote: > Okay, then what IS enterprise? For a StarTrek fan, not knowning what is Enterprise is blasfemy! ;-) Anyway, the "Enterprisy" thing is too hyped, Enterprise Edition, Business 2 Business, marketing bluf. What you need to know from a tool is: could I start form zero? I mean, with small things? It could be adaptable/scalable for greater things later during the process? Maybe 1 year from now, it could be maintainable? could be bug fixed? feature enhanced? THAT's worth more than "Enterprise" labels. > > Joe > > --- > > Ruby in the Enterprise? Can't 37 Signals example be > > used? Can't be that hard to figure out and setup... > > What? 37 Signals is an enterprise? Since when?!?!? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Thu Aug 31 22:08:46 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 31 Aug 2006 23:08:46 -0300 Subject: [Mongrel] session caching in mongrel In-Reply-To: References: Message-ID: <71166b3b0608311908s6639c352qf7a201c47ab5ba04@mail.gmail.com> On 8/31/06, Jared Brown wrote: > Is there some kind of caching of session data in mongrel? What is the best > way to get mongrel servers within a cluster to always keep their sessions > synced? That was discussed with mongrel and kigster at longr room the other day. Switch from pstore (file storage) to ANY session storage, the preferred one is memcache. Oh, and a warning: never store externals references to global objects into your sessions! like storing @@logger :-P Or complex ActiveRecords. HTH, > > -- > Jared Brown > jaredbrown at gmail.com > (765) 409-0875 > 7001 Central Ave > Indianapolis, IN 46220 > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From wilsonb at gmail.com Thu Aug 31 22:16:41 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Thu, 31 Aug 2006 22:16:41 -0400 Subject: [Mongrel] Rails Deployment Book In-Reply-To: <78A57C81-572B-45F4-B6CD-03ADACE16501@mac.com> References: <20060831232817.57160.qmail@web38605.mail.mud.yahoo.com> <78A57C81-572B-45F4-B6CD-03ADACE16501@mac.com> Message-ID: On 8/31/06, kigsteronline at mac.com wrote: > > Ruby in the Enterprise? Can't 37 Signals example be > > used? Can't be that hard to figure out and setup... > > What? 37 Signals is an enterprise? Since when?!?!? > > I want book on Rails for COBOL programmers. Mostly for the museum. > That's where the enterprise belongs anyway :^) > I actually taught a short Ruby and Rails class for COBOL and Algol programmers. Crazy stuff. From matt at eastmedia.com Thu Aug 31 22:39:24 2006 From: matt at eastmedia.com (Matt Pelletier) Date: Thu, 31 Aug 2006 22:39:24 -0400 Subject: [Mongrel] Rails Deployment Book In-Reply-To: References: <20060831232817.57160.qmail@web38605.mail.mud.yahoo.com> <78A57C81-572B-45F4-B6CD-03ADACE16501@mac.com> Message-ID: <525964E9-B3F1-4D9C-9985-95B1837D020F@eastmedia.com> On Aug 31, 2006, at 10:16 PM, Wilson Bilkovich wrote: > On 8/31/06, kigsteronline at mac.com wrote: >>> Ruby in the Enterprise? Can't 37 Signals example be >>> used? Can't be that hard to figure out and setup... >> >> What? 37 Signals is an enterprise? Since when?!?!? >> >> I want book on Rails for COBOL programmers. Mostly for the museum. >> That's where the enterprise belongs anyway :^) >> > > I actually taught a short Ruby and Rails class for COBOL and Algol > programmers. > Crazy stuff. There needs to be one for PHP hand-written-SQL-at-the-top-of-views programmers. The subtitle should be 'Just because you can doesn't mean you should' Also, the book that Zed mentioned he was helping with was the one I am writing for Prentice Hall. It should be out by RubyConf. It will cover Mongrel, configuring, running and extending it, writing handlers and plugins, and some best practice configs for server setups. It will not have extensive deployment info, as that topic merits its own shelf. http://www.informit.com/shortcuts Matt > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > =================== Matt Pelletier EastMedia t. 212-921-8413 x3# m. 917-902-2525 f. 212-239-4114 w. www.eastmedia.com From jean.verger at gmail.com Thu Aug 31 23:23:35 2006 From: jean.verger at gmail.com (Jean Verger) Date: Fri, 1 Sep 2006 11:23:35 +0800 Subject: [Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP?? In-Reply-To: <856070080608300802n7d1f842ejaf87bf10286aed3d@mail.gmail.com> References: <856070080608300802n7d1f842ejaf87bf10286aed3d@mail.gmail.com> Message-ID: <856070080608312023p22e1a167hc831a9750900d2a2@mail.gmail.com> Hi, (this mail was sent yesterday with a weird subject that I can't locate anymore) regarding running PHP+Ruby: the php app/files are under the same folder where the rubby applications are. So therefore, I guess, they are also under the same virtual host. I have tried and it is true that if they are running under a different virtual host there is no problem. I guess the php code is being send to the mongrels ... wich don't expect php code (but rather ruby) and give it back as plain text ... wich ends up being what I see in the browser. Could I define the same virtual host twice? once with proxy (straight to the mongres dealing with ruby) and other one without the proxy ... to let Apache take care of PHP? Hi Philip,thanks for your reply ... your PHP files are under the same folder as the Ruby code? I'll research on what is RewriteCond and RewriteRule ... I was trying to work something out with the FilterFiles (or something like that ...) thanks, Jean On 8/30/06, Jean Verger wrote: > > Hi, > I just realice that I can't run php code anymore once I installed my dear > mongrels (under an Apache Proxy Balancer). > > I'm just trying to run the clasic phpinfo() in the following file > /var/rubyapp/public/phpinfo.php ... but instead of being executed the code > is being displayed as plain text ... This is the ouput :)) > > > > anyone can give a hint please on how to have Ruby and PHP code under > Apache Proxy Balancer? > > thanks a lot , > > Juan > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060901/6466f4a4/attachment.html