From _ at whats-your.name Mon Feb 4 04:20:58 2008 From: _ at whats-your.name (cdr) Date: Mon, 4 Feb 2008 04:20:58 -0500 Subject: [Mongrel] is there a FileHandler class out there? Message-ID: <20080204092058.GA2970@m.hsd1.ma.comcast.net> after finding this solution to Paul Graham's 'said' problem (http://arclanguage.org/item?id=722): case r.qs when '': isindex when /^@/: r.qs.tail else a'follow',:href =>'?@'+r.qs end i noticed it was broken if you use a space! theres this line in DirHandler#can_serve: req_path = HttpRequest.unescape(path_info) which was modifying the path i sent in.. via req.params["PATH_INFO"] = '/some/file/path' Mongrel::DirHandler.new(nil,false).process(req,resp) which when you think about it. modifying the requests param hash afterwards? about as kosher as an Al Pastor burrito its just that so far its the easiest way to take advantage of the good bits in the dirhandler that check a file against ETAGs and If-modified and conditionally serve. which is seperate logically from the 'unescape incoming request' and 'generate dirlisting' stuff, but all in one big ball of mud at the moment.. Zed told me on Fri, 1 Dec 2006 13:12:02 -0500 "DirHandler, being a DIR handler and not a FILE handler" and he's still right.. if there isnt one, its easier to just steal the 10 or so lines from dirhandler im needing and throw them into an ebb handler, since that way i dont have to worry about breaking other peoples apps by submitting a patch.. and simultaneously bypass all sorts of other code im not using in the process. so does a FileHandler already exist? From lists at ruby-forum.com Mon Feb 4 14:19:40 2008 From: lists at ruby-forum.com (Doug Livesey) Date: Mon, 4 Feb 2008 20:19:40 +0100 Subject: [Mongrel] Strange Merb error Message-ID: Sorry if this is not the correct place to post this, but I can't really find anywhere else! I want to learn Merb, but am getting an error when I try to run the generated app that goes as follows: /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/version.rb:45: warning: already initialized constant RELEASE sh: cc: command not found /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.6/lib/inline.rb:406:in `build': error executing cc -dynamic -bundle -undefined suppress -flat_namespace -Werror -fno-common -g -O2 -fno-common -pipe -fno-common -I /usr/local/lib/ruby/1.8/universal-darwin8.0 -I /usr/local/include -o "/Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.bundle" "/Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.c" : 32512 (CompilationError) Renamed /Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.c to /Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.c.bad from /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.6/lib/inline.rb:687:in `inline' from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.1.1/lib/parse_tree.rb:244 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/local/lib/ruby/gems/1.8/gems/ruby2ruby-1.1.8/lib/ruby2ruby.rb:4 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/core_ext/get_args.rb:2 ... 12 levels... from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/server.rb:53:in `run' from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/bin/merb:4 from /usr/local/bin/merb:16:in `load' from /usr/local/bin/merb:16 Can anyone offer me any insight into what could be going amiss? & sorry again if this is the wrong place. Cheers, Doug. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Feb 4 14:38:13 2008 From: lists at ruby-forum.com (Roger Pack) Date: Mon, 4 Feb 2008 20:38:13 +0100 Subject: [Mongrel] 100% CPU use In-Reply-To: <20071129214437.GG8610@sue.caltech.edu> References: <20071129214437.GG8610@sue.caltech.edu> Message-ID: <39cea26841345d2a0226b4060564a322@ruby-forum.com> > I needed to restart my mongrel cluster today (updated a Rails > controller). And my mongrels didn't really come back up. They bind the > port but don't respond to any requests. I can't find any log file that > has useful information. These were running fine until I tried the > restart. And I have not changed any software versions in a month. (And > yes, I tried rolling back the controller change.) I had this problem on os x recently--if mongrel has been running 'awhile' (i.e. answered a few requests), then i hit ctrl-c on it, it uses 100% cpu and never terminates. Very odd. Might be a ruby bug. Any thoughts? (this with mysql, leopard, mongrel 1.1.3). thanks. -Roger -- Posted via http://www.ruby-forum.com/. From ezmobius at gmail.com Mon Feb 4 16:00:52 2008 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Mon, 4 Feb 2008 13:00:52 -0800 Subject: [Mongrel] Strange Merb error In-Reply-To: References: Message-ID: Doug- Please sudo gem uninstall merb and remove all versions then sudo gem install merb again. That should fix it for you. if you have further problems then please join #merb in irc.freenode.net and someone will help you. -Ezra On Feb 4, 2008, at 11:19 AM, Doug Livesey wrote: > Sorry if this is not the correct place to post this, but I can't > really > find anywhere else! > I want to learn Merb, but am getting an error when I try to run the > generated app that goes as follows: > > /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/version.rb:45: > warning: already initialized constant RELEASE > sh: cc: command not found > /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.6/lib/inline.rb: > 406:in > `build': error executing cc -dynamic -bundle -undefined suppress > -flat_namespace -Werror -fno-common -g -O2 -fno-common -pipe > -fno-common -I /usr/local/lib/ruby/1.8/universal-darwin8.0 -I > /usr/local/include -o > "/Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.bundle" > "/Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.c" : > 32512 > (CompilationError) > Renamed /Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.c > to /Users/douglasjohnlivesey/.ruby_inline/Inline_ParseTree_fa12.c.bad > from > /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.6/lib/inline.rb: > 687:in > `inline' > from > /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.1.1/lib/parse_tree.rb: > 244 > from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > /usr/local/lib/ruby/gems/1.8/gems/ruby2ruby-1.1.8/lib/ruby2ruby.rb:4 > from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/core_ext/ > get_args.rb:2 > ... 12 levels... > from > /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/server.rb:53:in > `run' > from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/bin/merb:4 > from /usr/local/bin/merb:16:in `load' > from /usr/local/bin/merb:16 > > > Can anyone offer me any insight into what could be going amiss? > & sorry again if this is the wrong place. > Cheers, > Doug. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users - Ezra Zygmuntowicz -- Founder & Software Architect -- ezra at engineyard.com -- EngineYard.com From wayneeseguin at gmail.com Tue Feb 5 10:17:00 2008 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Tue, 5 Feb 2008 10:17:00 -0500 Subject: [Mongrel] 100% CPU use In-Reply-To: <39cea26841345d2a0226b4060564a322@ruby-forum.com> References: <20071129214437.GG8610@sue.caltech.edu> <39cea26841345d2a0226b4060564a322@ruby-forum.com> Message-ID: On Feb 4, 2008 2:38 PM, Roger Pack wrote: > > I needed to restart my mongrel cluster today (updated a Rails > > controller). And my mongrels didn't really come back up. They bind the > > port but don't respond to any requests. I can't find any log file that > > has useful information. These were running fine until I tried the > > restart. And I have not changed any software versions in a month. (And > > yes, I tried rolling back the controller change.) > > > I had this problem on os x recently--if mongrel has been running > 'awhile' (i.e. answered a few requests), then i hit ctrl-c on it, it > uses 100% cpu and never terminates. Very odd. Might be a ruby bug. > Any thoughts? > (this with mysql, leopard, mongrel 1.1.3). > thanks. > -Roger > I also have experienced this with Rails but not Merb so I'm guessing that is where the issue lie. ~Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080205/5843b919/attachment.html From tils at tils.net Tue Feb 5 09:57:33 2008 From: tils at tils.net (Tilmann Singer) Date: Tue, 5 Feb 2008 15:57:33 +0100 Subject: [Mongrel] throttle wrongly treated as seconds instead of 100th of seconds? Message-ID: <20080205145732.GC1164@tilsbox.plazes.com> Am I missing the reason why the value of @throttle is documented and at one point treated as hundreths of seconds, but at other points treated as full seconds? If this is just a bug then I propose the attached fix (tests still pass, but no test added explicitely for the fix). Til -- http://plazes.com/whereis/til | +49 176 20 19 51 69 | http://tils.net -------------- next part -------------- A non-text attachment was scrubbed... Name: throttle.patch Type: text/x-diff Size: 1079 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20080205/0be41bd8/attachment.bin From johnjosephbachir at gmail.com Tue Feb 5 17:06:18 2008 From: johnjosephbachir at gmail.com (John Joseph Bachir) Date: Tue, 5 Feb 2008 17:06:18 -0500 Subject: [Mongrel] consolidated log file? Message-ID: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> Hey folks. Using mongrel_rails, Is it possible to have multiple mongrel instances write to the same log file? I suppose that implementing this might incur a performance hit since each mongrel would need to lock and unlock the file in order to not weave the log messages together in an unreadable stream? Or perhaps all the log messages are single-line anyway. Thanks, john -- John Joseph Bachir http://blog.johnjosephbachir.org http://lyceum.ibiblio.org http://dissent.cc http://jjb.cc From david at vrensk.com Tue Feb 5 17:19:42 2008 From: david at vrensk.com (David Vrensk) Date: Tue, 5 Feb 2008 23:19:42 +0100 Subject: [Mongrel] consolidated log file? In-Reply-To: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> Message-ID: <81b453920802051419p4bb46b78v52b0dab3df4a752e@mail.gmail.com> On 2/5/08, John Joseph Bachir wrote: > > Hey folks. > > Using mongrel_rails, Is it possible to have multiple mongrel instances > write to the same log file? I suppose that implementing this might > incur a performance hit since each mongrel would need to lock and > unlock the file in order to not weave the log messages together in an > unreadable stream? Or perhaps all the log messages are single-line > anyway. Not 100 % sure I see what you're looking for, but anyway: In my out-of-the-box setup, my three mongrelled rails instances all write to log/production.log. There is no locking, and sometimes log messages are interleaved (interleft?). The mongrels write a little something to their respective log files during start and stop, but that's all. You might want to have a look at Kirk Haines's "Analogger", which I believe solves the interleaving problem. I remember Kirk advising us on it on the list, so you could have a look in the archive. /David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080205/f25e0709/attachment.html From wyhaines at gmail.com Tue Feb 5 17:24:30 2008 From: wyhaines at gmail.com (Kirk Haines) Date: Tue, 5 Feb 2008 15:24:30 -0700 Subject: [Mongrel] consolidated log file? In-Reply-To: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> Message-ID: On Feb 5, 2008 3:06 PM, John Joseph Bachir wrote: > Hey folks. > > Using mongrel_rails, Is it possible to have multiple mongrel instances > write to the same log file? I suppose that implementing this might > incur a performance hit since each mongrel would need to lock and > unlock the file in order to not weave the log messages together in an > unreadable stream? Or perhaps all the log messages are single-line > anyway. Are you talking about the mongrel log itself (which usually doesn't accumulate much), or your application's log? With as little as Mongrel itself writes, I wouldn't see any significant problem in just having all of your mongrels write to the same file, personally. If you are talking about application logs, then one way is to use an external logging service of some sort. I have one, Analogger (http://analogger.swiftcore.org). As of the release there it isn't quite drop in compatible with Rails, but I'm releasing an update which provides an interface to allow drop in Rails compatibility. Kirk Haines From jason at joyent.com Tue Feb 5 17:10:21 2008 From: jason at joyent.com (Jason A. Hoffman) Date: Tue, 5 Feb 2008 14:10:21 -0800 Subject: [Mongrel] consolidated log file? In-Reply-To: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> Message-ID: On Feb 5, 2008, at 2:06 PM, John Joseph Bachir wrote: > Hey folks. > > Using mongrel_rails, Is it possible to have multiple mongrel instances > write to the same log file? I suppose that implementing this might > incur a performance hit since each mongrel would need to lock and > unlock the file in order to not weave the log messages together in an > unreadable stream? Or perhaps all the log messages are single-line > anyway. > > Thanks, > john > Hi John, You'll want to use something like SyslogLogger. Regards, Jason From johnjosephbachir at gmail.com Tue Feb 5 17:45:54 2008 From: johnjosephbachir at gmail.com (John Joseph Bachir) Date: Tue, 5 Feb 2008 17:45:54 -0500 Subject: [Mongrel] consolidated log file? In-Reply-To: References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> Message-ID: <4a3752180802051445g5b82180em5f8e7046e676b120@mail.gmail.com> On Feb 5, 2008 5:19 PM, David Vrensk wrote: > Not 100 % sure I see what you're looking for, but anyway: In my > out-of-the-box setup, my three mongrelled rails instances all write to > log/production.log. On Feb 5, 2008 5:24 PM, Kirk Haines wrote: > Are you talking about the mongrel log itself (which usually doesn't > accumulate much), or your application's log? > > With as little as Mongrel itself writes, I wouldn't see any > significant problem in just having all of your mongrels write to the > same file, personally. Thanks for the quick replies. With a mongrel_cluster config file like this: user: root log_file: /path/to/app/log/dir/mongrel.log port: "8000" environment: production group: apache address: 127.0.0.1 servers: 8 ... I end up with these log files: mongrel.8000.log mongrel.8001.log mongrel.8002.log mongrel.8003.log mongrel.8004.log mongrel.8005.log mongrel.8006.log mongrel.8007.log With, as has been stated, very little written to each, and the application logging going to production.log. It would be nice if I could keep things tidier and have just one mongrel.log Thanks! John -- John Joseph Bachir http://blog.johnjosephbachir.org http://lyceum.ibiblio.org http://dissent.cc http://jjb.cc From lawver at gmail.com Tue Feb 5 19:23:29 2008 From: lawver at gmail.com (Kevin Lawver) Date: Tue, 5 Feb 2008 16:23:29 -0800 Subject: [Mongrel] consolidated log file? In-Reply-To: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> Message-ID: <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> We did this on "accident" on our site, and the performance hit is horrible. You might not notice it when you're not getting a lot of traffic, but when you do, the performance hit is really awful. Each mongrel needs to have its own log file and log only the messages you absolutely need (which is pretty much true for every web server). Cheers, Kevin Lawver On Feb 5, 2008 2:06 PM, John Joseph Bachir wrote: > Hey folks. > > Using mongrel_rails, Is it possible to have multiple mongrel instances > write to the same log file? I suppose that implementing this might > incur a performance hit since each mongrel would need to lock and > unlock the file in order to not weave the log messages together in an > unreadable stream? Or perhaps all the log messages are single-line > anyway. > > Thanks, > john > > -- > John Joseph Bachir > http://blog.johnjosephbachir.org > http://lyceum.ibiblio.org > http://dissent.cc > http://jjb.cc > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Kevin Lawver http://lawver.net From wyhaines at gmail.com Tue Feb 5 19:32:00 2008 From: wyhaines at gmail.com (Kirk Haines) Date: Tue, 5 Feb 2008 17:32:00 -0700 Subject: [Mongrel] consolidated log file? In-Reply-To: <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> Message-ID: On Feb 5, 2008 5:23 PM, Kevin Lawver wrote: > We did this on "accident" on our site, and the performance hit is > horrible. You might not notice it when you're not getting a lot of > traffic, but when you do, the performance hit is really awful. Each > mongrel needs to have its own log file and log only the messages you > absolutely need (which is pretty much true for every web server). That doesn't really make sense, though, since Mongrel logs almost nothing. It shouldn't materially affect performance because it is almost never writing anything to the file. If, on the other hand, you accidentally pooled your app logs into the same file, then yeah, that will create a performance hit under load because every requests on each different process is trying to push to that same file and just depending on the OS to sort it out. Kirk Haines From lists at ruby-forum.com Tue Feb 5 21:46:34 2008 From: lists at ruby-forum.com (Roger Pack) Date: Wed, 6 Feb 2008 03:46:34 +0100 Subject: [Mongrel] garbage collection patch Message-ID: Would it make sense to add the option for mongrel to disable GC during a request and enable it after? Or even run it after? Just thinking out loud. Thanks for Mongrel. -Roger -- Posted via http://www.ruby-forum.com/. From luislavena at gmail.com Wed Feb 6 01:03:11 2008 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 6 Feb 2008 04:03:11 -0200 Subject: [Mongrel] garbage collection patch In-Reply-To: References: Message-ID: <71166b3b0802052203i312b9830k5515ee946907dd85@mail.gmail.com> On Feb 6, 2008 12:46 AM, Roger Pack wrote: > Would it make sense to add the option for mongrel to disable GC during a > request and enable it after? Or even run it after? > Just thinking out loud. You're talking about mongrel, or mongrel_rails? The thing with that will be force garbage collection on every request will hit (and hard) the performance of the server. Also, is not Mongrel job if the framework behind it (in this case, Rails) generate so many objects that cross 8M limit set by VM (which usually trigger GC collection). There was a patch submitted a few days back to ruby-core about Benchmark.realtime that reduce memory allocation and increase performance. The problem was Rails use it extensively on every place and several times *per request*, eating memory and reducing performance... Just my comments :-) -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams From zedshaw at zedshaw.com Thu Feb 7 01:02:32 2008 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 7 Feb 2008 01:02:32 -0500 Subject: [Mongrel] garbage collection patch In-Reply-To: References: Message-ID: <20080207010232.539031f2.zedshaw@zedshaw.com> On Wed, 6 Feb 2008 03:46:34 +0100 Roger Pack wrote: > Would it make sense to add the option for mongrel to disable GC during a > request and enable it after? Or even run it after? > Just thinking out loud. > Thanks for Mongrel. Not sure, it's probably not get you far since you'd end up paying for it later anyway. I'd say try it for one or two actions or as a couple of mongrel handlers and see if it helps you. You coudl also do it filter style that would let you just do this GC hackery for one request. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From dave at cheney.net Wed Feb 6 01:11:49 2008 From: dave at cheney.net (Dave Cheney) Date: Wed, 6 Feb 2008 17:11:49 +1100 Subject: [Mongrel] garbage collection patch In-Reply-To: <20080207010232.539031f2.zedshaw@zedshaw.com> References: <20080207010232.539031f2.zedshaw@zedshaw.com> Message-ID: <680A67F8-6512-43BD-AFCE-4326FE2BA5CE@cheney.net> We currently handle GC in a after_filter :cleanup for controllers that use a lot of ram *ahem* image magic. Cheers Dave On 07/02/2008, at 5:02 PM, Zed A. Shaw wrote: > On Wed, 6 Feb 2008 03:46:34 +0100 > Roger Pack wrote: > >> Would it make sense to add the option for mongrel to disable GC >> during a >> request and enable it after? Or even run it after? >> Just thinking out loud. >> Thanks for Mongrel. > > Not sure, it's probably not get you far since you'd end up paying for > it later anyway. I'd say try it for one or two actions or as a couple > of mongrel handlers and see if it helps you. You coudl also do it > filter style that would let you just do this GC hackery for one > request. > > -- > Zed A. Shaw > - Hate: http://savingtheinternetwithhate.com/ > - Good: http://www.zedshaw.com/ > - Evil: http://yearofevil.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From lists at ruby-forum.com Wed Feb 6 01:35:29 2008 From: lists at ruby-forum.com (Roger Pack) Date: Wed, 6 Feb 2008 07:35:29 +0100 Subject: [Mongrel] garbage collection patch In-Reply-To: <20080207010232.539031f2.zedshaw@zedshaw.com> References: <20080207010232.539031f2.zedshaw@zedshaw.com> Message-ID: <760a9e3fd5b13395243343723f9e77bc@ruby-forum.com> > Not sure, it's probably not get you far since you'd end up paying for > it later anyway. I'd say try it for one or two actions or as a couple > of mongrel handlers and see if it helps you. You coudl also do it > filter style that would let you just do this GC hackery for one request. I believe the two things that have been done to combat this "sore spot" for rails (that it sometimes GC's more than once per request [1]) are 1) patch gc.c so that it collects less frequently [i.e. sets the collection frequency to be every 40MB instead of 8). Kind of hard using extensions only :) 2) have rails GC only every X requests (fastcgi does this, I think). It might make a difference in performance. Thoughts? [1] http://blog.pluron.com/2008/01/ruby-on-rails-i.html -- Posted via http://www.ruby-forum.com/. From arsphl at davidbowie.com Wed Feb 6 02:08:21 2008 From: arsphl at davidbowie.com (Philippe Laliberte) Date: Wed, 06 Feb 2008 02:08:21 -0500 Subject: [Mongrel] Init.d script for Mongrel? Message-ID: <47A95CE5.5050303@davidbowie.com> Hi, I can't seem to find an example of startup, restart, reload, script for Mongrel. So here is my little thing I uses. http://rubyforge.org/snippet/detail.php?type=snippet&id=260 Cheers, -------------- next part -------------- A non-text attachment was scrubbed... Name: arsphl.vcf Type: text/x-vcard Size: 232 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20080206/d2716bc3/attachment.vcf From evan at cloudbur.st Wed Feb 6 03:17:44 2008 From: evan at cloudbur.st (Evan Weaver) Date: Wed, 6 Feb 2008 03:17:44 -0500 Subject: [Mongrel] garbage collection patch In-Reply-To: <760a9e3fd5b13395243343723f9e77bc@ruby-forum.com> References: <20080207010232.539031f2.zedshaw@zedshaw.com> <760a9e3fd5b13395243343723f9e77bc@ruby-forum.com> Message-ID: Disabling GC around the requests would guarantee that the size of the Mongrel process will balloon to the size of all objects combined in the most heavyweight request. Remember that the Ruby heap never returns space to the OS. As soon as you re-enable the GC, the entire Ruby heap (now 4-5x bigger than it normally would be) will get paged back in to physical RAM. As I understand it, the point of disabling the GC is to allow part of the heap to swap out. This has no benefit if you enable the GC after--you have to disable the GC, Kernel.fork, run the request, let the request thread die, and then re-enable the heap in the parent. This gets you some marginal COW benefit at the cost of having to page out lots of useless pages while the request is running. I'm doubtful that there is much benefit but it deserves some testing. Incidentally the Ruby heap (and the GC) should have nothing to do with Imagemagick. Extensions that use malloc() are a totally different scenario. Evan On Feb 6, 2008 1:35 AM, Roger Pack wrote: > > Not sure, it's probably not get you far since you'd end up paying for > > it later anyway. I'd say try it for one or two actions or as a couple > > of mongrel handlers and see if it helps you. You coudl also do it > > filter style that would let you just do this GC hackery for one request. > > I believe the two things that have been done to combat this "sore spot" > for rails (that it sometimes GC's more than once per request [1]) are > 1) patch gc.c so that it collects less frequently [i.e. sets the > collection frequency to be every 40MB instead of 8). Kind of hard using > extensions only :) > 2) have rails GC only every X requests (fastcgi does this, I think). > > It might make a difference in performance. > Thoughts? > > > [1] http://blog.pluron.com/2008/01/ruby-on-rails-i.html > -- > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From paolo.campegiani at gmail.com Wed Feb 6 03:28:47 2008 From: paolo.campegiani at gmail.com (Paolo Campegiani) Date: Wed, 6 Feb 2008 09:28:47 +0100 Subject: [Mongrel] Init.d script for Mongrel? In-Reply-To: <47A95CE5.5050303@davidbowie.com> References: <47A95CE5.5050303@davidbowie.com> Message-ID: Hi Philippe, > I can't seem to find an example of startup, restart, reload, script for > Mongrel. Check my script, which also could selectively start/stop/restart Mongrel instances. It's reported here: http://rubyforge.org/pipermail/mongrel-users/2007-December/004705.html From arsphl at davidbowie.com Wed Feb 6 09:28:30 2008 From: arsphl at davidbowie.com (Philippe Laliberte) Date: Wed, 06 Feb 2008 09:28:30 -0500 Subject: [Mongrel] Init.d script for Mongrel? In-Reply-To: References: <47A95CE5.5050303@davidbowie.com> Message-ID: <47A9C40E.1010506@davidbowie.com> Paolo Campegiani wrote: > Hi Philippe, > > >> I can't seem to find an example of startup, restart, reload, script for >> Mongrel. >> > > Check my script, which also could selectively start/stop/restart > Mongrel instances. It's reported here: > http://rubyforge.org/pipermail/mongrel-users/2007-December/004705.html > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Yes, nice, It does not allow to have different administrators for different domains contained into their own environments though. I prefer to use apache as a front end for virtual hosting and using mongrel as an internal relay. I'll try a mixed version. Cheers, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080206/65ba1093/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: arsphl.vcf Type: text/x-vcard Size: 232 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20080206/65ba1093/attachment.vcf From msoulier at digitaltorque.ca Wed Feb 6 10:03:25 2008 From: msoulier at digitaltorque.ca (Michael P. Soulier) Date: Wed, 6 Feb 2008 10:03:25 -0500 Subject: [Mongrel] Init.d script for Mongrel? In-Reply-To: <47A95CE5.5050303@davidbowie.com> References: <47A95CE5.5050303@davidbowie.com> Message-ID: On Wed, Feb 6, 2008 at 2:08 AM, Philippe Laliberte wrote: > Hi, > > I can't seem to find an example of startup, restart, reload, script for > Mongrel. So here is my little thing I uses. > > http://rubyforge.org/snippet/detail.php?type=snippet&id=260 I prefer supervised services via runit, myself. http://smarden.org/runit/ Mike From randy.j.parker at gmail.com Wed Feb 6 10:30:59 2008 From: randy.j.parker at gmail.com (Randy Parker) Date: Wed, 6 Feb 2008 10:30:59 -0500 Subject: [Mongrel] Re-map Portion of Ruby Heap Holding Optree to Save Child Server Memory? Message-ID: <735c8b860802060730k1101510fud2d53bad1528d06a@mail.gmail.com> I wonder if it is possible to reduce the memory footprint of a pack of 6 mongrels by about 70 meg. In reading Hongli's blog about his revisions to Ruby GC (last Monday Matz if he could use Hongli's work), I was wondering at the size (in RSS) of all the mongrels in a cluster. It has always seemed just too big for my C-binary intuition. Why is so much of the memory of the parent not shared by the children? In other words, why are all the children so bloated? Obviously, something prevents Copy-On-Right from being applied to far more of the memory than I expect. (I expect the stack to be private, and a bit of process-malloc'ed heap). The pmap of a running mongrel says that by far the bulk of the memory immediately following launch is mapped anon / private for libruby.so, 23M libnkf.so 6M for kanji libsyck.so 7M for yaml I guess that is because Ruby is a dynamic language, and always allows for a running proc to modify the optree itself ('monkey patching'). So, in contrast to a compiled binary where the program code is all in the text seg, Ruby keeps the 'partly compiled bytecode' optree in private heap, where each proc can mess with it at any time. My question is, how important is that privacy? I know lots of modules monkey patch as they load, but I can't think of any cases where they modify the optree at runtime. I'm sure there are some, but do they happen in 99% of real-world rails apps? I must be overlooking some common cases...? But if runtime optree modification is not always required, would it be reasonable to have a flag that would re-mmap() the optree portions of the heap to 'read-only' prior to the forking of child servers? The payoff would be that the read-only parts (which may be a couple of dozen meg) could be treated as COW pages, saving them from being copied into each mongrel in a cluster. It just annoys me to think that all these mongrels are burdening the system by lugging around useless private copies of the exact same optree! One of the arguments for threading Ruby and Rails is that server procs are so big. DHH has argued that proc-granularity is vastly simpler and safer (bug-wise), and I agree. But I would like to reduce the seeming bloat of a pack of mongrels. Another unrelated thought is that I've never written a rails app that used Kanji, so why can't I compile a version of mongrel without NKF? Why don't most Westerners run app servers without Kanji? The trend in Rails is towards plug-ins for everything except the genuine core, why not apply the same philosophy to app servers? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080206/adac6421/attachment.html From lists at ruby-forum.com Wed Feb 6 10:46:48 2008 From: lists at ruby-forum.com (Roger Pack) Date: Wed, 6 Feb 2008 16:46:48 +0100 Subject: [Mongrel] garbage collection patch In-Reply-To: References: <20080207010232.539031f2.zedshaw@zedshaw.com> <760a9e3fd5b13395243343723f9e77bc@ruby-forum.com> Message-ID: > Disabling GC around the requests would guarantee that the size of the > Mongrel process will balloon to the size of all objects combined in > the most heavyweight request. Definitely a trade-off between RAM and CPU. I would say that those who are CPU not RAM bound would be most interested in it > Remember that the Ruby heap never > returns space to the OS. (well it does if you're extremely lucky and a heap chunk happens to be entirely freed of its ruby objects, but, since the heap chunks are allocated in larger and larger blocks, this is unlikely and, as you noted, probably close to 'never') > As soon as you re-enable the GC, the entire > Ruby heap (now 4-5x bigger than it normally would be) will get paged > back in to physical RAM. Right. No savings in terms of RAM being swapped out (except using the method you suggested below). I believe the main advantage to GC'ing 'only every so often' or 'once per request' would be not that you use less RAM, but that you use keep all that (bloated) RAM in memory and traverse it far less frequently. So it "might" save CPU at the expense of RAM. The overhead of mongrel +rails setup is (for me) around 40MB. So basically ruby, every 8MB of allocated memory, is traversing the 48MB of memory, which sets it down to 40MB. So for it to create 50MB of memory (however many requests that is) it will traverse ~5*50MB memory = 250MB. If you leave it to only GC after ~40MB have been allocated, it traverses 100MB once (and sets it back down to 40). As you noted it does use more RAM, and none of that RAM can healthfully reside in swap. Significant, at least for those with lots of RAM? I don't know. > As I understand it, the point of disabling the GC is to allow part of > the heap to swap out. This has no benefit if you enable the GC > after--you have to disable the GC, Kernel.fork, run the request, let > the request thread die, and then re-enable the heap in the parent. That might be a quite useful RAM-wise--its like 'ignoring' the garbage generated with a request and deserves consideration. Nice. > I'm doubtful that there is much benefit but it deserves some testing. > > Incidentally the Ruby heap (and the GC) should have nothing to do with > Imagemagick. Extensions that use malloc() are a totally different > scenario. IIRC when garbage collection begins it also requests the extensions to clean themselves up, too, though I'll admit I never saw or understood how this is accomplished within gc.c. It's possible that it just called 'cleanup' on extensions' (now old) ruby allocated objects, which are linked to their own malloc'ed objects and know how to clean them up. > Evan Thanks Evan. -Roger -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Feb 6 10:50:00 2008 From: lists at ruby-forum.com (Roger Pack) Date: Wed, 6 Feb 2008 16:50:00 +0100 Subject: [Mongrel] Re-map Portion of Ruby Heap Holding Optree to Save Child In-Reply-To: <735c8b860802060730k1101510fud2d53bad1528d06a@mail.gmail.com> References: <735c8b860802060730k1101510fud2d53bad1528d06a@mail.gmail.com> Message-ID: I've always wondered the same thing--why does rails use so very much memory? Is it possible to cut it down? As a note I've tried some gc.c tweaks before (like changing default heap size allocation, etc.) and they only reduced memory along the lines of running console normal 25MB, takes 15.5s to start running console with gc optimized ruby 23MB, takes 13.5s to start along those lines. So it may well be rails' fault. I should cross post this in the rails group and see if they know :) Take care. -Roger -- Posted via http://www.ruby-forum.com/. From johnjosephbachir at gmail.com Wed Feb 6 10:53:11 2008 From: johnjosephbachir at gmail.com (John Joseph Bachir) Date: Wed, 6 Feb 2008 10:53:11 -0500 Subject: [Mongrel] consolidated log file? In-Reply-To: References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> Message-ID: <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> On Feb 5, 2008 7:32 PM, Kirk Haines wrote: > If, on the other hand, you accidentally pooled your app logs into the > same file, then yeah, that will create a performance hit under load > because every requests on each different process is trying to push to > that same file and just depending on the OS to sort it out. But the application log is already consolidated (to production.log) by default-- are you suggesting that this incurs a performance hit and the log should be split up? -- John Joseph Bachir http://blog.johnjosephbachir.org http://lyceum.ibiblio.org http://dissent.cc http://jjb.cc From anikkar at gmail.com Wed Feb 6 14:32:16 2008 From: anikkar at gmail.com (Arash Nikkar) Date: Wed, 6 Feb 2008 11:32:16 -0800 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? Message-ID: <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02@mail.gmail.com> I am trying to create a proxy which I can route my browser requests through in order to gather information on the web page loading. At this time I am particularly interested in the many GET requests associated with loading a single web page. Note: This does not have anything to do with rails, my goal is to run a ruby app in the background, set firefox to proxy all requests through it, log those requests, then return the fulfilled request back to the browser (i.e. the web page still loads in the browser). I posted this on a ruby forum, and it was suggested to do something along the lines of: require 'rubygems' require 'mongrel' require 'logger' class HeaderHandler < Mongrel::HttpHandler @@logger = Logger.new('headers.log') def process(request,response) response.start(200) do |head, out| head["Content-Type"] = "text/plain" @@logger.info request.params end end end server = Mongrel::HttpServer.new("127.0.0.1", "2222") server.register("/", HeaderHandler.new) server.register("/favicon.ico", Mongrel::Error404Handler.new("")) server.run.join The problem is that this only records the first request (i.e. google.com, and not any other requests that are associated with loading that page), and the page is never loaded in the browser as the requests is never actually proxied. I have played around with this a bit, and tried changing some things up, but I haven't really come up with anything. If anyone could point me in the right direction, I would be grateful. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080206/1249c858/attachment.html From mongrel at dusty.name Wed Feb 6 15:39:03 2008 From: mongrel at dusty.name (Dusty Doris) Date: Wed, 6 Feb 2008 15:39:03 -0500 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02@mail.gmail.com> References: <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02@mail.gmail.com> Message-ID: Hello there. I'm the one that made that suggestion to you earlier, I had a feeling it was more than just capturing the headers. Do you happen to be running apache on the webserver? You can log all of it and not worry about a proxy. Here are two ways. 1. mod_dumpio # Put this in your apache config DumpIOInput On LogLevel debug 2. mod_log_forensic # Put this in your apache config ForensicLog /some/path/to/a/logfile.log From evan at cloudbur.st Wed Feb 6 16:02:21 2008 From: evan at cloudbur.st (Evan Weaver) Date: Wed, 6 Feb 2008 16:02:21 -0500 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: References: <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02@mail.gmail.com> Message-ID: Try MouseHole: http://code.whytheluckystiff.net/mouseHole/ Evan On Feb 6, 2008 3:39 PM, Dusty Doris wrote: > Hello there. I'm the one that made that suggestion to you earlier, I > had a feeling it was more than just capturing the headers. > > Do you happen to be running apache on the webserver? You can log all > of it and not worry about a proxy. Here are two ways. > > 1. mod_dumpio > > # Put this in your apache config > DumpIOInput On > LogLevel debug > > 2. mod_log_forensic > > # Put this in your apache config > ForensicLog /some/path/to/a/logfile.log > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From anikkar at gmail.com Wed Feb 6 16:27:42 2008 From: anikkar at gmail.com (Arash Nikkar) Date: Wed, 6 Feb 2008 13:27:42 -0800 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: References: <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02@mail.gmail.com> Message-ID: <61ddf71e0802061327q28ffc9cfmd296f01a5f23b6c0@mail.gmail.com> Hi Guys, Thanks for your responses. Dusty: Im not sure what the server does, but what I am developing is intended to be a client side testing utility. i.e. all that will be installed on the machine is a browser, and some programming environment (i.e. ruby) Evan: I saw mousehole yesterday, but I didn't quite understand how I could edit a script to do what I want (for now I am starting off small, and I just want to collect header information, but eventually I assume it will be a whole variety of information I would like to log.). I will try and take another look at it. Thanks for your help. On Feb 6, 2008 1:02 PM, Evan Weaver wrote: > Try MouseHole: http://code.whytheluckystiff.net/mouseHole/ > > Evan > > On Feb 6, 2008 3:39 PM, Dusty Doris wrote: > > Hello there. I'm the one that made that suggestion to you earlier, I > > had a feeling it was more than just capturing the headers. > > > > Do you happen to be running apache on the webserver? You can log all > > of it and not worry about a proxy. Here are two ways. > > > > 1. mod_dumpio > > > > # Put this in your apache config > > DumpIOInput On > > LogLevel debug > > > > 2. mod_log_forensic > > > > # Put this in your apache config > > ForensicLog /some/path/to/a/logfile.log > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > -- > Evan Weaver > Cloudburst, LLC > _______________________________________________ > 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/20080206/0ed040e2/attachment.html From evan at cloudbur.st Wed Feb 6 17:50:57 2008 From: evan at cloudbur.st (Evan Weaver) Date: Wed, 6 Feb 2008 17:50:57 -0500 Subject: [Mongrel] throttle wrongly treated as seconds instead of 100th of seconds? In-Reply-To: <20080205145732.GC1164@tilsbox.plazes.com> References: <20080205145732.GC1164@tilsbox.plazes.com> Message-ID: @throttle is supposed to be hundreds of seconds, but the docs might be out of date, because @throttle used to be called @timeout, and @timeout itself is new. If you still think it's a bug please file a ticket on Rubyforge. Evan On Feb 5, 2008 9:57 AM, Tilmann Singer wrote: > Am I missing the reason why the value of @throttle is documented and > at one point treated as hundreths of seconds, but at other points > treated as full seconds? If this is just a bug then I propose the > attached fix (tests still pass, but no test added explicitely for the > fix). > > > Til > > > > > -- > http://plazes.com/whereis/til | +49 176 20 19 51 69 | http://tils.net > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From evan at cloudbur.st Wed Feb 6 18:13:30 2008 From: evan at cloudbur.st (Evan Weaver) Date: Wed, 6 Feb 2008 18:13:30 -0500 Subject: [Mongrel] garbage collection patch In-Reply-To: References: <20080207010232.539031f2.zedshaw@zedshaw.com> <760a9e3fd5b13395243343723f9e77bc@ruby-forum.com> Message-ID: Some VSZ/RSS sizes for the front page of a large application: Fresh caches, minimal AR usage, startup: GC.enabled: 120200 66732 GC.disabled: 293492 239900 Fresh caches, one request. GC.enabled: 127744 73360 GC.disabled: 345296 289616 All stale caches, one request: GC.enabled: 528536 472840 GC.disabled: 1203112 1147276 This is actually not nearly as bad for GC.disabled as I expected. Evan On Feb 6, 2008 10:46 AM, Roger Pack wrote: > > Disabling GC around the requests would guarantee that the size of the > > Mongrel process will balloon to the size of all objects combined in > > the most heavyweight request. > > Definitely a trade-off between RAM and CPU. I would say that those who > are CPU not RAM bound would be most interested in it > > > > Remember that the Ruby heap never > > returns space to the OS. > (well it does if you're extremely lucky and a heap chunk happens to be > entirely freed of its ruby objects, but, since the heap chunks are > allocated in larger and larger blocks, this is unlikely and, as you > noted, probably close to 'never') > > As soon as you re-enable the GC, the entire > > Ruby heap (now 4-5x bigger than it normally would be) will get paged > > back in to physical RAM. > Right. No savings in terms of RAM being swapped out (except using the > method you suggested below). I believe the main advantage to GC'ing > 'only every so often' or 'once per request' would be not that you use > less RAM, but that you use keep all that (bloated) RAM in memory and > traverse it far less frequently. So it "might" save CPU at the expense > of RAM. The overhead of mongrel +rails setup is (for me) around 40MB. > So basically ruby, every 8MB of allocated memory, is traversing the 48MB > of memory, which sets it down to 40MB. So for it to create 50MB of > memory (however many requests that is) it will traverse ~5*50MB memory = > 250MB. If you leave it to only GC after ~40MB have been allocated, it > traverses 100MB once (and sets it back down to 40). As you noted it > does use more RAM, and none of that RAM can healthfully reside in swap. > Significant, at least for those with lots of RAM? I don't know. > > > As I understand it, the point of disabling the GC is to allow part of > > the heap to swap out. This has no benefit if you enable the GC > > after--you have to disable the GC, Kernel.fork, run the request, let > > the request thread die, and then re-enable the heap in the parent. > That might be a quite useful RAM-wise--its like 'ignoring' the garbage > generated with a request and deserves consideration. Nice. > > > I'm doubtful that there is much benefit but it deserves some testing. > > > > Incidentally the Ruby heap (and the GC) should have nothing to do with > > Imagemagick. Extensions that use malloc() are a totally different > > scenario. > IIRC when garbage collection begins it also requests the extensions to > clean themselves up, too, though I'll admit I never saw or understood > how this is accomplished within gc.c. It's possible that it just called > 'cleanup' on extensions' (now old) ruby allocated objects, which are > linked to their own malloc'ed objects and know how to clean them up. > > > Evan > > Thanks Evan. > -Roger > -- > > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From lists at ruby-forum.com Wed Feb 6 18:24:56 2008 From: lists at ruby-forum.com (Brad Carson) Date: Thu, 7 Feb 2008 00:24:56 +0100 Subject: [Mongrel] 502 proxy error, malformed request Message-ID: <74f33b8419f9f6796e71158ccdcd1dbd@ruby-forum.com> If there are double quotes in the url, Firefox escapes them to %22 but Internet explorer gives \", which when proxied to Mongrel results in an HTTP parse error. Is there a RewriteRule or something I can employ to fix this? I'm dying here! -- Posted via http://www.ruby-forum.com/. From tils at tils.net Wed Feb 6 18:05:21 2008 From: tils at tils.net (Tilmann Singer) Date: Thu, 7 Feb 2008 00:05:21 +0100 Subject: [Mongrel] throttle wrongly treated as seconds instead of 100th of seconds? In-Reply-To: References: <20080205145732.GC1164@tilsbox.plazes.com> Message-ID: <20080206230521.GA3639@tils.net> * Evan Weaver [20080206 23:49]: > @throttle is supposed to be hundreds of seconds, but the docs might be > out of date, because @throttle used to be called @timeout, and > @timeout itself is new. The docs about @throttle are right, just in 2 places in the code @throttle is wrongly used as seconds. This bug was also there before the introduction of @timeout. > If you still think it's a bug please file a ticket on Rubyforge. Will do. Til > Evan > > On Feb 5, 2008 9:57 AM, Tilmann Singer wrote: > > Am I missing the reason why the value of @throttle is documented and > > at one point treated as hundreths of seconds, but at other points > > treated as full seconds? If this is just a bug then I propose the > > attached fix (tests still pass, but no test added explicitely for the > > fix). > > > > > > Til > > > > > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > -- http://tsinger.com +49-176 20 19 51 69 From public at misuse.org Wed Feb 6 18:57:36 2008 From: public at misuse.org (Steve Midgley) Date: Wed, 06 Feb 2008 15:57:36 -0800 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: References: Message-ID: <20080206235743.50F8115B801D@rubyforge.org> At 12:39 PM 2/6/2008, mongrel-users-request at rubyforge.org wrote: >Date: Wed, 6 Feb 2008 11:32:16 -0800 >From: "Arash Nikkar" >Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy > between a browser and the web? >To: mongrel-users at rubyforge.org >Message-ID: > <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02 at mail.gmail.com> >Content-Type: text/plain; charset="iso-8859-1" > >I am trying to create a proxy which I can route my browser requests >through >in order to gather information on the web page loading. At this time >I am >particularly interested in the many GET requests associated with >loading a >single web page. Note: This does not have anything to do with rails, >my goal >is to run a ruby app in the background, set firefox to proxy all >requests >through it, log those requests, then return the fulfilled request back >to >the browser (i.e. the web page still loads in the browser). Hi Arash, You may have interest in coding a solution to this, for your own reasons. I totally support those inclinations! :) I'm going to go a little off-topic with an idea though: Personally, I use "Tamper Data" (https://addons.mozilla.org/en-US/firefox/addon/966) within FireFox to handle this type of thing. It's a most excellent resource: it's like a wire sniffer at the HTTP level only. It supports decoding request data and tracking POST, GET and Ajax stuff. It's been invaluable for me in some circumstances - I hope the reference is helpful. Steve p.s. It's been particularly helpful in trapping precisely certain live GET & Ajax requests which I then convert into testing requests to re-create the errors. From public at misuse.org Wed Feb 6 18:57:36 2008 From: public at misuse.org (Steve Midgley) Date: Wed, 06 Feb 2008 15:57:36 -0800 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: References: Message-ID: <20080206235743.4FC1615B801C@rubyforge.org> At 12:39 PM 2/6/2008, mongrel-users-request at rubyforge.org wrote: >Date: Wed, 6 Feb 2008 11:32:16 -0800 >From: "Arash Nikkar" >Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy > between a browser and the web? >To: mongrel-users at rubyforge.org >Message-ID: > <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02 at mail.gmail.com> >Content-Type: text/plain; charset="iso-8859-1" > >I am trying to create a proxy which I can route my browser requests >through >in order to gather information on the web page loading. At this time >I am >particularly interested in the many GET requests associated with >loading a >single web page. Note: This does not have anything to do with rails, >my goal >is to run a ruby app in the background, set firefox to proxy all >requests >through it, log those requests, then return the fulfilled request back >to >the browser (i.e. the web page still loads in the browser). Hi Arash, You may have interest in coding a solution to this, for your own reasons. I totally support those inclinations! :) I'm going to go a little off-topic with an idea though: Personally, I use "Tamper Data" (https://addons.mozilla.org/en-US/firefox/addon/966) within FireFox to handle this type of thing. It's a most excellent resource: it's like a wire sniffer at the HTTP level only. It supports decoding request data and tracking POST, GET and Ajax stuff. It's been invaluable for me in some circumstances - I hope the reference is helpful. Steve p.s. It's been particularly helpful in trapping precisely certain live GET & Ajax requests which I then convert into testing requests to re-create the errors. From dave at cheney.net Wed Feb 6 19:08:38 2008 From: dave at cheney.net (Dave Cheney) Date: Thu, 7 Feb 2008 11:08:38 +1100 Subject: [Mongrel] 502 proxy error, malformed request In-Reply-To: <74f33b8419f9f6796e71158ccdcd1dbd@ruby-forum.com> References: <74f33b8419f9f6796e71158ccdcd1dbd@ruby-forum.com> Message-ID: <7B21679C-2B68-478B-BC3E-0BE5B34065CD@cheney.net> I submitted a patch for this behavior, you can find it here http://rubyforge.org/tracker/index.php?func=detail&aid=15664&group_id=1306&atid=5145 the patch was applied and the ticket closed, however the patch was rolled back in mongrel 1.1.3 Cheers Dave On 07/02/2008, at 10:24 AM, Brad Carson wrote: > If there are double quotes in the url, Firefox escapes them to %22 but > Internet explorer gives \", which when proxied to Mongrel results in > an > HTTP parse error. > > Is there a RewriteRule or something I can employ to fix this? I'm > dying > here! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From anikkar at gmail.com Wed Feb 6 19:20:26 2008 From: anikkar at gmail.com (Arash Nikkar) Date: Wed, 6 Feb 2008 16:20:26 -0800 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: <20080206235743.4FC1615B801C@rubyforge.org> References: <20080206235743.4FC1615B801C@rubyforge.org> Message-ID: <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> Hi Steve, I wish I could use something like that (in fact, I often use firebug to see what is actually going on), but I am trying to build something that is browser independent. Ideally, what I am looking for is something which just listens to all the traffic going into and out of a browser (using whatever protocol) and do some analysis on that traffic (even if that means I need to duplicate all the data elsewhere on my disk). but alas, I come from a desktop background and I am not that well versed in web related issues. So I suppose I will just take baby steps (with your guy's help, if you dont mind.) --arash On Feb 6, 2008 3:57 PM, Steve Midgley wrote: > At 12:39 PM 2/6/2008, mongrel-users-request at rubyforge.org wrote: > >Date: Wed, 6 Feb 2008 11:32:16 -0800 > >From: "Arash Nikkar" > >Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy > > between a browser and the web? > >To: mongrel-users at rubyforge.org > >Message-ID: > > <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02 at mail.gmail.com> > >Content-Type: text/plain; charset="iso-8859-1" > > > >I am trying to create a proxy which I can route my browser requests > >through > >in order to gather information on the web page loading. At this time > >I am > >particularly interested in the many GET requests associated with > >loading a > >single web page. Note: This does not have anything to do with rails, > >my goal > >is to run a ruby app in the background, set firefox to proxy all > >requests > >through it, log those requests, then return the fulfilled request back > >to > >the browser (i.e. the web page still loads in the browser). > > Hi Arash, > > You may have interest in coding a solution to this, for your own > reasons. I totally support those inclinations! :) I'm going to go a > little off-topic with an idea though: > > Personally, I use "Tamper Data" > (https://addons.mozilla.org/en-US/firefox/addon/966) within FireFox to > handle this type of thing. It's a most excellent resource: it's like a > wire sniffer at the HTTP level only. It supports decoding request data > and tracking POST, GET and Ajax stuff. > > It's been invaluable for me in some circumstances - I hope the > reference is helpful. > > Steve > > p.s. It's been particularly helpful in trapping precisely certain live > GET & Ajax requests which I then convert into testing requests to > re-create the errors. > > _______________________________________________ > 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/20080206/e299de22/attachment.html From eden at mojiti.com Wed Feb 6 19:32:54 2008 From: eden at mojiti.com (Eden Li) Date: Thu, 7 Feb 2008 08:32:54 +0800 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> References: <20080206235743.4FC1615B801C@rubyforge.org> <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> Message-ID: It might be better if you use a packet sniffer like WireShark or tcpdump. Mongrel wouldn't be able to handle non-http traffic. http://www.wireshark.org/ http://www.tcpdump.org/tcpdump_man.html On Feb 7, 2008, at 8:20 AM, Arash Nikkar wrote: > Ideally, what I am looking for is something which just listens to > all the traffic going into and out of a browser (using whatever > protocol) and do some analysis on that traffic (even if that means I > need to duplicate all the data elsewhere on my disk). but alas, I > come from a desktop background and I am not that well versed in web > related issues. So I suppose I will just take baby steps (with your > guy's help, if you dont mind.) From eden at mojiti.com Wed Feb 6 20:31:34 2008 From: eden at mojiti.com (Eden Li) Date: Thu, 7 Feb 2008 09:31:34 +0800 Subject: [Mongrel] 502 proxy error, malformed request In-Reply-To: <7B21679C-2B68-478B-BC3E-0BE5B34065CD@cheney.net> References: <74f33b8419f9f6796e71158ccdcd1dbd@ruby-forum.com> <7B21679C-2B68-478B-BC3E-0BE5B34065CD@cheney.net> Message-ID: I ran into this last year and patched the ragel parser to allow quotes, but it looks like it never made it to trunk. http://rubyforge.org/pipermail/mongrel-users/2006-October/001847.html It's out of spec, so I'm guessing that's the reason it never made it in. Apache, nginx and lighttpd all handle quotes transparently, however. So you can do it with rewrite rules, but it's a tad hairy. This might work for you (not tested): RewriteCond %{QUERY_STRING} ^([^"]+)"(.*) RewriteRule ^/(.*) /$1\?%1\%22%2 [N] And, this works in nginx (for up to 3 quotes, before the location block): if ($args ~ ^([^\"]+)\"(.*)$) { set $args $1%22$2; } if ($args ~ ^([^\"]+)\"(.*)$) { set $args $1%22$2; } if ($args ~ ^([^\"]+)\"(.*)$) { set $args $1%22$2; } if ($args) { rewrite ^/(.*) /$1?$args last; } This doesn't handle quotes in the path part of the uri however. On Feb 7, 2008, at 8:08 AM, Dave Cheney wrote: > I submitted a patch for this behavior, you can find it here > > http://rubyforge.org/tracker/index.php?func=detail&aid=15664&group_id=1306&atid=5145 > > the patch was applied and the ticket closed, however the patch was > rolled back in mongrel 1.1.3 > > Cheers > > Dave > > On 07/02/2008, at 10:24 AM, Brad Carson wrote: > >> If there are double quotes in the url, Firefox escapes them to %22 >> but >> Internet explorer gives \", which when proxied to Mongrel results in >> an >> HTTP parse error. >> >> Is there a RewriteRule or something I can employ to fix this? I'm >> dying >> here! >> -- >> Posted via http://www.ruby-forum.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 From lists at ruby-forum.com Wed Feb 6 23:24:34 2008 From: lists at ruby-forum.com (Brad Carson) Date: Thu, 7 Feb 2008 05:24:34 +0100 Subject: [Mongrel] 502 proxy error, malformed request In-Reply-To: References: <74f33b8419f9f6796e71158ccdcd1dbd@ruby-forum.com> <7B21679C-2B68-478B-BC3E-0BE5B34065CD@cheney.net> Message-ID: Eden Li wrote: > It's out of spec, so I'm guessing that's the reason it never made it > in. Apache, nginx and lighttpd all handle quotes transparently, > however. So you can do it with rewrite rules, but it's a tad hairy. > This might work for you (not tested): > > RewriteCond %{QUERY_STRING} ^([^"]+)"(.*) > RewriteRule ^/(.*) /$1\?%1\%22%2 [N] Eden, thank you, that's great. I've found it only works for the first " in Apache. The double quotes in the URL are coming from a 3rd party, so I'm going to try my best to get them to properly escape their URLs. Otherwise, is it possible to make a Rewrite rule to escape all the double quotes properly if a request is coming from IE? Many thanks. -- Posted via http://www.ruby-forum.com/. From todd.fisher at gmail.com Thu Feb 7 02:26:49 2008 From: todd.fisher at gmail.com (Todd Fisher) Date: Thu, 7 Feb 2008 02:26:49 -0500 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: References: <20080206235743.4FC1615B801C@rubyforge.org> <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> Message-ID: Arash, mongrel-esi is a fairly simple proxy server... You could possibly modify or extract the bits of it you needed. The bulk of the proxy code is in just one file: http://code.google.com/p/mongrel-esi/source/browse/trunk/lib/esi/handler.rb It uses Net::HTTP library, forwarding POST and GET requests... might be helpful... -Todd On Feb 6, 2008 7:32 PM, Eden Li wrote: > It might be better if you use a packet sniffer like WireShark or > tcpdump. Mongrel wouldn't be able to handle non-http traffic. > > http://www.wireshark.org/ > http://www.tcpdump.org/tcpdump_man.html > > On Feb 7, 2008, at 8:20 AM, Arash Nikkar wrote: > > > Ideally, what I am looking for is something which just listens to > > all the traffic going into and out of a browser (using whatever > > protocol) and do some analysis on that traffic (even if that means I > > need to duplicate all the data elsewhere on my disk). but alas, I > > come from a desktop background and I am not that well versed in web > > related issues. So I suppose I will just take baby steps (with your > > guy's help, if you dont mind.) > > _______________________________________________ > 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/20080207/02ee14f1/attachment.html From lists at ruby-forum.com Thu Feb 7 02:57:59 2008 From: lists at ruby-forum.com (Roger Pack) Date: Thu, 7 Feb 2008 08:57:59 +0100 Subject: [Mongrel] garbage collection patch In-Reply-To: References: <20080207010232.539031f2.zedshaw@zedshaw.com> <760a9e3fd5b13395243343723f9e77bc@ruby-forum.com> Message-ID: <5437dc1a80602a2b2f13fe668bfd6db0@ruby-forum.com> > Fresh caches, one request. > GC.enabled: 127744 73360 > GC.disabled: 345296 289616 > This is actually not nearly as bad for GC.disabled as I expected. How about time wise? -- Posted via http://www.ruby-forum.com/. From igor at pokelondon.com Thu Feb 7 04:40:41 2008 From: igor at pokelondon.com (Igor Clark) Date: Thu, 7 Feb 2008 09:40:41 +0000 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> References: <20080206235743.4FC1615B801C@rubyforge.org> <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> Message-ID: On 7 Feb 2008, at 00:20, Arash Nikkar wrote: > Hi Steve, > > I wish I could use something like that (in fact, I often use firebug > to see what is actually going on), but I am trying to build > something that is browser independent. > > Ideally, what I am looking for is something which just listens to > all the traffic going into and out of a browser (using whatever > protocol) and do some analysis on that traffic (even if that means I > need to duplicate all the data elsewhere on my disk). but alas, I > come from a desktop background and I am not that well versed in web > related issues. So I suppose I will just take baby steps (with your > guy's help, if you dont mind.) http://www.xk72.com/charles/ "Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information)." Browser independent, it intercepts, decodes and displays all browser <--> server communications, including decoding Flash AMF data. It's invaluable for Flash --> server and "ajax" development; sounds like it'll do some of what you want, too. cheers i > > --arash > > On Feb 6, 2008 3:57 PM, Steve Midgley wrote: > At 12:39 PM 2/6/2008, mongrel-users-request at rubyforge.org wrote: > >Date: Wed, 6 Feb 2008 11:32:16 -0800 > >From: "Arash Nikkar" > >Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy > > between a browser and the web? > >To: mongrel-users at rubyforge.org > >Message-ID: > > > <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02 at mail.gmail.com> > >Content-Type: text/plain; charset="iso-8859-1" > > > >I am trying to create a proxy which I can route my browser requests > >through > >in order to gather information on the web page loading. At this time > >I am > >particularly interested in the many GET requests associated with > >loading a > >single web page. Note: This does not have anything to do with rails, > >my goal > >is to run a ruby app in the background, set firefox to proxy all > >requests > >through it, log those requests, then return the fulfilled request > back > >to > >the browser (i.e. the web page still loads in the browser). > > Hi Arash, > > You may have interest in coding a solution to this, for your own > reasons. I totally support those inclinations! :) I'm going to go a > little off-topic with an idea though: > > Personally, I use "Tamper Data" > (https://addons.mozilla.org/en-US/firefox/addon/966) within FireFox to > handle this type of thing. It's a most excellent resource: it's like a > wire sniffer at the HTTP level only. It supports decoding request data > and tracking POST, GET and Ajax stuff. > > It's been invaluable for me in some circumstances - I hope the > reference is helpful. > > Steve > > p.s. It's been particularly helpful in trapping precisely certain live > GET & Ajax requests which I then convert into testing requests to > re-create the errors. > > _______________________________________________ > 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 -- Igor Clark // POKE // 10 Redchurch Street // E2 7DD // +44 (0)20 7749 5355 // www.pokelondon.com From lists at ruby-forum.com Thu Feb 7 06:10:20 2008 From: lists at ruby-forum.com (Neil Na) Date: Thu, 7 Feb 2008 12:10:20 +0100 Subject: [Mongrel] server firewall logs Message-ID: <1a332e490511fa91acce303de072e91d@ruby-forum.com> Hi guys, firstly let me say i know nothing about Ruby and it was a colleague that has since left the company that did and worked on a project for a client. the clients hosting company had to upgrade the server his website was on and when it moved across we had a few problems - namely the website didnt come back on. the hosting company had failed to turn ruby on - doh! and also have a redirect to the correct port. anyway, the website was running, but the hosting company had emailed part of the server log (pasted below) and as the old server died they dont know if this existed on the old server as well. could you tell me what this means, is it an issue, can it be ignored? Sun Feb 3 05:01:06 2008 lfd: *Suspicious Process* PID:9658 User:barton Uptime:232873 secs EXE:/usr/bin/ruby CMD:/usr/bin/ruby /usr/bin/mongrel_rails start -p 12001 -d -e production -P log/mongrel.pid Sun Feb 3 05:01:06 2008 lfd: *User Processing* PID:9658 Kill:0 User:barton Time:232873 EXE:/usr/bin/ruby CMD:/usr/bin/ruby /usr/bin/mongrel_rails start -p 12001 -d -e production -P log/mongrel.pid remember i dont know anything about ruby so if you can lay this out in the simplest terms that would be great. thanks in advance :o) -- Posted via http://www.ruby-forum.com/. From filipe at icewall.org Thu Feb 7 06:24:34 2008 From: filipe at icewall.org (Filipe) Date: Thu, 7 Feb 2008 09:24:34 -0200 (BRST) Subject: [Mongrel] server firewall logs In-Reply-To: <1a332e490511fa91acce303de072e91d@ruby-forum.com> References: <1a332e490511fa91acce303de072e91d@ruby-forum.com> Message-ID: On Thu, 7 Feb 2008, Neil Na wrote: > ... > means, is it an issue, can it be ignored? > > Sun Feb 3 05:01:06 2008 lfd: *Suspicious Process* PID:9658 User:barton > Uptime:232873 secs EXE:/usr/bin/ruby CMD:/usr/bin/ruby > /usr/bin/mongrel_rails start -p 12001 -d -e production -P > log/mongrel.pid > Sun Feb 3 05:01:06 2008 lfd: *User Processing* PID:9658 Kill:0 > User:barton Time:232873 EXE:/usr/bin/ruby CMD:/usr/bin/ruby > /usr/bin/mongrel_rails start -p 12001 -d -e production -P > log/mongrel.pid > It can be ignored. The firewall is barking at mongrel because it is listening in a high port (12001) - many backdoors like to listen at high ports like this. Just give some bones to your firewall, so it will stop barking at your mongrel. Cheers, filipe { @ icewall.org GPG 1024D/A6BA423E http://filipe.icewall.org/ } From lists at ruby-forum.com Thu Feb 7 08:27:41 2008 From: lists at ruby-forum.com (Neonpie ..) Date: Thu, 7 Feb 2008 14:27:41 +0100 Subject: [Mongrel] server firewall logs In-Reply-To: References: <1a332e490511fa91acce303de072e91d@ruby-forum.com> Message-ID: <8f546934c2c87d52715da769d8e9c0ca@ruby-forum.com> Filipe wrote: > Just give some bones to your firewall, > so > it will stop barking at your mongrel. lol - thank you Filipe for clearing that up for me Many Thanks -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Feb 7 10:32:57 2008 From: lists at ruby-forum.com (Brad Carson) Date: Thu, 7 Feb 2008 16:32:57 +0100 Subject: [Mongrel] 502 proxy error, malformed request In-Reply-To: References: <74f33b8419f9f6796e71158ccdcd1dbd@ruby-forum.com> <7B21679C-2B68-478B-BC3E-0BE5B34065CD@cheney.net> Message-ID: <1c4fdd58af138a6210f47560638af8bd@ruby-forum.com> > Eden, thank you, that's great. I've found it only works for the first " > in Apache. Never mind, I'm mistaken and understand what's happening now. Thanks, I owe you one! -- Posted via http://www.ruby-forum.com/. From anikkar at gmail.com Thu Feb 7 13:09:16 2008 From: anikkar at gmail.com (Arash Nikkar) Date: Thu, 7 Feb 2008 10:09:16 -0800 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: References: <20080206235743.4FC1615B801C@rubyforge.org> <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> Message-ID: <61ddf71e0802071009g249c0839l91d3d2084649c5a0@mail.gmail.com> Hi Igor, sounds like its exactly what I want, provided I can plug into it programmatically. I'll take a look today. thanks. On Feb 7, 2008 1:40 AM, Igor Clark wrote: > On 7 Feb 2008, at 00:20, Arash Nikkar wrote: > > > Hi Steve, > > > > I wish I could use something like that (in fact, I often use firebug > > to see what is actually going on), but I am trying to build > > something that is browser independent. > > > > Ideally, what I am looking for is something which just listens to > > all the traffic going into and out of a browser (using whatever > > protocol) and do some analysis on that traffic (even if that means I > > need to duplicate all the data elsewhere on my disk). but alas, I > > come from a desktop background and I am not that well versed in web > > related issues. So I suppose I will just take baby steps (with your > > guy's help, if you dont mind.) > > http://www.xk72.com/charles/ > > "Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables > a developer to view all of the HTTP traffic between their machine and > the Internet. This includes requests, responses and the HTTP headers > (which contain the cookies and caching information)." > > Browser independent, it intercepts, decodes and displays all browser > <--> server communications, including decoding Flash AMF data. It's > invaluable for Flash --> server and "ajax" development; sounds like > it'll do some of what you want, too. > > cheers > i > > > > > --arash > > > > On Feb 6, 2008 3:57 PM, Steve Midgley wrote: > > At 12:39 PM 2/6/2008, mongrel-users-request at rubyforge.org wrote: > > >Date: Wed, 6 Feb 2008 11:32:16 -0800 > > >From: "Arash Nikkar" > > >Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy > > > between a browser and the web? > > >To: mongrel-users at rubyforge.org > > >Message-ID: > > > > > <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02 at mail.gmail.com> > > >Content-Type: text/plain; charset="iso-8859-1" > > > > > >I am trying to create a proxy which I can route my browser requests > > >through > > >in order to gather information on the web page loading. At this time > > >I am > > >particularly interested in the many GET requests associated with > > >loading a > > >single web page. Note: This does not have anything to do with rails, > > >my goal > > >is to run a ruby app in the background, set firefox to proxy all > > >requests > > >through it, log those requests, then return the fulfilled request > > back > > >to > > >the browser (i.e. the web page still loads in the browser). > > > > Hi Arash, > > > > You may have interest in coding a solution to this, for your own > > reasons. I totally support those inclinations! :) I'm going to go a > > little off-topic with an idea though: > > > > Personally, I use "Tamper Data" > > (https://addons.mozilla.org/en-US/firefox/addon/966) within FireFox to > > handle this type of thing. It's a most excellent resource: it's like a > > wire sniffer at the HTTP level only. It supports decoding request data > > and tracking POST, GET and Ajax stuff. > > > > It's been invaluable for me in some circumstances - I hope the > > reference is helpful. > > > > Steve > > > > p.s. It's been particularly helpful in trapping precisely certain live > > GET & Ajax requests which I then convert into testing requests to > > re-create the errors. > > > > _______________________________________________ > > 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 > > -- > Igor Clark // POKE // 10 Redchurch Street // E2 7DD // +44 (0)20 7749 > 5355 // www.pokelondon.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/20080207/25b91728/attachment.html From lists at ruby-forum.com Fri Feb 8 06:34:24 2008 From: lists at ruby-forum.com (Vapor ..) Date: Fri, 8 Feb 2008 12:34:24 +0100 Subject: [Mongrel] linking app? Message-ID: I have deployed an app on Windows XP with Apache and Mongrel. I can access my app with http://machinename. This is more of a Apache question: how can I make it like http://machinename/myapp ? Thanks in advance. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Feb 8 09:10:39 2008 From: lists at ruby-forum.com (Vapor ..) Date: Fri, 8 Feb 2008 15:10:39 +0100 Subject: [Mongrel] linking app? In-Reply-To: References: Message-ID: <06d8ecc57bab5013527da0fd29bc0ba2@ruby-forum.com> Vapor .. wrote: > I have deployed an app on Windows XP with Apache and Mongrel. I can > access my app with http://machinename. This is more of a Apache > question: how can I make it like http://machinename/myapp ? > Thanks in advance. well actually I have one php app and other rails app that I want to host on single windows machine...rails seems to override the other app. -- Posted via http://www.ruby-forum.com/. From arsphl at davidbowie.com Fri Feb 8 09:42:41 2008 From: arsphl at davidbowie.com (Philippe Laliberte) Date: Fri, 08 Feb 2008 09:42:41 -0500 Subject: [Mongrel] linking app? In-Reply-To: <06d8ecc57bab5013527da0fd29bc0ba2@ruby-forum.com> References: <06d8ecc57bab5013527da0fd29bc0ba2@ruby-forum.com> Message-ID: <47AC6A61.1060803@davidbowie.com> Vapor .. wrote: > Vapor .. wrote: > >> I have deployed an app on Windows XP with Apache and Mongrel. I can >> access my app with http://machinename. This is more of a Apache >> question: how can I make it like http://machinename/myapp ? >> Thanks in advance. >> > > well actually I have one php app and other rails app that I want to host > on single windows machine...rails seems to override the other app. > There are a couple of ways to do this. 1- You use an internal proxypass to route only /myapp to mongrel (first exclude everything then pass /myapp to mongrel) 2- you use aliases and no mongrel 3- you use different ports for each type off application and with a permanent redirect you redirect /myapp 4- You use multiple domain or subdomain names myapp.machinename and virtualhosting. Have a read of virtual hosting aspects in apache and mongrel. That is where you will find what you need. Cheers, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080208/5d633278/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: arsphl.vcf Type: text/x-vcard Size: 232 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20080208/5d633278/attachment.vcf From paolo.campegiani at gmail.com Fri Feb 8 11:40:41 2008 From: paolo.campegiani at gmail.com (Paolo Campegiani) Date: Fri, 8 Feb 2008 17:40:41 +0100 Subject: [Mongrel] Init.d script for Mongrel? In-Reply-To: <47A9C40E.1010506@davidbowie.com> References: <47A95CE5.5050303@davidbowie.com> <47A9C40E.1010506@davidbowie.com> Message-ID: > Yes, nice, It does not allow to have different administrators for different > domains contained into their own environments though. It could do if you have /etc/mongrel accessible by the other administrators (i.e.: chmod ugo+x /etc/mongrel chmod u+s /etc/mongrel, so it works a la /tmp way). Otherwise you could change the script so instead of looking in /etc/mongrel it will looks in $HOME/mongrel o whatever, for the values of $HOME you prefer. > I prefer to use apache > as a front end for virtual hosting and using mongrel as an internal relay. > I'll try a mixed version. This is exactly what we do in production, the script only activates the mongrel servers, Apache (in a reverse proxy configuration, plus different users for each application to maximize security) is handled by another script. From gui at alphabetware.com Fri Feb 8 17:26:19 2008 From: gui at alphabetware.com (gui weinmann) Date: Fri, 8 Feb 2008 17:26:19 -0500 Subject: [Mongrel] Mongrel hangs In-Reply-To: References: Message-ID: I've only been on the list for a few days. I like what I've been reading. I thought I'd post here to learn if anyone else has experienced a similar issue? I seem to be having trouble with a production launch of Apache/Mongrel. The environment is * Apache2.2 with mod_proxy_balancer * Mongrel 1.1.3 * Windows 2000 advanced server This is the error I'm getting: Fri Feb 08 ... 2008: Read error: # c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/http_response.rb:137:in `write' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/http_response.rb:137:in `write' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/http_response.rb:95:in `send_header' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/http_response.rb:146:in `finished' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:165:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:285:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:285:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:285:in `new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:285:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:268:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:268:in `new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:268:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/configurator.rb:282:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/configurator.rb:281:in `each' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/configurator.rb:281:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/mongrel_rails:128:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/command.rb:212:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32 /bin/mongrel_rails:281 c:/ruby/bin/mongrel_rails:16:in `load' c:/ruby/bin/mongrel_rails:16 It seems like the issue occurs when clients cancels their http requests either by navigating away from the page or clicking the stop button in their browser. This eventually causes Mongrel to hang when it's coupled with Apache. I think it is only happening when Mongrel is behind Apache. I could run another stress test to confirm but I'm fairly certain that when Mongrel is not behind Apache it does not hang. It still throws the same exception "Errno::ECONNABORTED" but it is handled gracefully without hanging. When Apache sends requests by proxy then Mongrel hangs, even if ProxyPass is used instead of Proxy balancer. Also I noticed this morning that even after I end the stress test, mongrel keeps running processes/requests after the client has closed the connections. Thanks the excellent work that has produced an agile little server. Any input is appreciated even if it's just something stupid like explaining whether I need to use keep-alives or not (and how). G u i W e i n m a n n A L P H A B E T W A R E -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080208/717dadf4/attachment.html From lists at ruby-forum.com Sat Feb 9 00:26:01 2008 From: lists at ruby-forum.com (Ilyas Iskakov) Date: Sat, 9 Feb 2008 06:26:01 +0100 Subject: [Mongrel] problem with Mongrel and Vista (port 80) Message-ID: <4ccc729d2605e73f8a80e97c71fd8ca0@ruby-forum.com> Hello, I have problem with Mongrel and Vista, I'm trying to launch mongrel web server on Vista platform and getting the following error: ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** Starting Mongrel listening at 0.0.0.0:80 E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Bad file descriptor - bind(2) (Errno::EBADF) from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/lib/mongrel/tcphack.rb:12:in `initialize' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/lib/mongrel.rb:560:in `initialize' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/lib/mongrel/configurator.rb:128:in `listener' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/bin/mongrel_rails:98:in `cloaker_' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/lib/mongrel/configurator.rb:51:in `initialize' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/bin/mongrel_rails:83:in `run' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/lib/mongrel/command.rb:211:in `run' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.0-mswin32/bin/mongrel_rails:243 ... 7 levels... from E:/Server/Ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require' from E:/Server/Ruby/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/server.rb:39 from E:/Server/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from E:/ProjectEnviroments/revyr/web/script/server:3 I checked port 80 by 'netstat -a' and this port is free. Mongrel works with other ports well. Any one know what is problem? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Feb 9 00:39:10 2008 From: lists at ruby-forum.com (Ilyas Iskakov) Date: Sat, 9 Feb 2008 06:39:10 +0100 Subject: [Mongrel] problem with Mongrel and Vista (port 80) In-Reply-To: <4ccc729d2605e73f8a80e97c71fd8ca0@ruby-forum.com> References: <4ccc729d2605e73f8a80e97c71fd8ca0@ruby-forum.com> Message-ID: I'm sorry, I found solution for this problem, need to disable Service: "Web publication". -- Posted via http://www.ruby-forum.com/. From brandorr at opensolaris.org Sat Feb 9 00:54:43 2008 From: brandorr at opensolaris.org (Brandorr) Date: Sat, 9 Feb 2008 00:54:43 -0500 Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy between a browser and the web? In-Reply-To: <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> References: <20080206235743.4FC1615B801C@rubyforge.org> <61ddf71e0802061620x3fb1ef29idf690d0636c1581b@mail.gmail.com> Message-ID: <5b5090780802082154h114005dau3f9bafb52153b722@mail.gmail.com> If you are willing to test with a Windows client, there are two very useful utilities available: http://www.pocketsoap.com/tcptrace/ and http://www.pocketsoap.com/tcptrace/pt.aspx (Proxy trace is probably what you are looking for. You run it on your local machine, and just configure your browser to use localhost as your proxy. It works with any browser, as they all support forward proxies.) Cheers, Brian On Feb 6, 2008 7:20 PM, Arash Nikkar wrote: > Hi Steve, > > I wish I could use something like that (in fact, I often use firebug to > see what is actually going on), but I am trying to build something that is > browser independent. > > Ideally, what I am looking for is something which just listens to all the > traffic going into and out of a browser (using whatever protocol) and do > some analysis on that traffic (even if that means I need to duplicate all > the data elsewhere on my disk). but alas, I come from a desktop background > and I am not that well versed in web related issues. So I suppose I will > just take baby steps (with your guy's help, if you dont mind.) > > --arash > > > On Feb 6, 2008 3:57 PM, Steve Midgley wrote: > > > At 12:39 PM 2/6/2008, mongrel-users-request at rubyforge.org wrote: > > >Date: Wed, 6 Feb 2008 11:32:16 -0800 > > >From: "Arash Nikkar" > > >Subject: [Mongrel] Newbie Question: Can I setup mongrel as a proxy > > > between a browser and the web? > > >To: mongrel-users at rubyforge.org > > >Message-ID: > > > <61ddf71e0802061132i59a5b05fy7df5c74e6cc1be02 at mail.gmail.com> > > >Content-Type: text/plain; charset="iso-8859-1" > > > > > >I am trying to create a proxy which I can route my browser requests > > >through > > >in order to gather information on the web page loading. At this time > > >I am > > >particularly interested in the many GET requests associated with > > >loading a > > >single web page. Note: This does not have anything to do with rails, > > >my goal > > >is to run a ruby app in the background, set firefox to proxy all > > >requests > > >through it, log those requests, then return the fulfilled request back > > >to > > >the browser (i.e. the web page still loads in the browser). > > > > Hi Arash, > > > > You may have interest in coding a solution to this, for your own > > reasons. I totally support those inclinations! :) I'm going to go a > > little off-topic with an idea though: > > > > Personally, I use "Tamper Data" > > (https://addons.mozilla.org/en-US/firefox/addon/966) within FireFox to > > handle this type of thing. It's a most excellent resource: it's like a > > wire sniffer at the HTTP level only. It supports decoding request data > > and tracking POST, GET and Ajax stuff. > > > > It's been invaluable for me in some circumstances - I hope the > > reference is helpful. > > > > Steve > > > > p.s. It's been particularly helpful in trapping precisely certain live > > GET & Ajax requests which I then convert into testing requests to > > re-create the errors. > > > > _______________________________________________ > > 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 > -- - Brian Gupta http://opensolaris.org/os/project/nycosug/ http://www.genunix.org/wiki/index.php/OpenSolaris_New_User_FAQ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080209/a70f868e/attachment.html From jakob at mentalized.net Sun Feb 10 18:29:42 2008 From: jakob at mentalized.net (Jakob Skjerning) Date: Mon, 11 Feb 2008 00:29:42 +0100 Subject: [Mongrel] consolidated log file? In-Reply-To: <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> Message-ID: <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> On Feb 6, 2008, at 16:53 , John Joseph Bachir wrote: > But the application log is already consolidated (to production.log) by > default-- are you suggesting that this incurs a performance hit and > the log should be split up? At least, that's the experiences we had with our Rails application; random slowdowns for no apparent reason. All went away after we moved to SyslogLogger. -- Jakob Skjerning - http://mentalized.net From bassnode at gmail.com Mon Feb 11 10:36:06 2008 From: bassnode at gmail.com (Ed Hickey) Date: Mon, 11 Feb 2008 09:36:06 -0600 Subject: [Mongrel] consolidated log file? In-Reply-To: <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> Message-ID: <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> I recently just blogged about my experiences with large logfiles effecting mongrel. It's not hugely scientific, but there is definitely a connection between mongrel memory usage and the rails production.log. http://blog.edhickey.com/2008/02/08/mongrel-memory-usage/ On Feb 10, 2008 5:29 PM, Jakob Skjerning wrote: > > On Feb 6, 2008, at 16:53 , John Joseph Bachir wrote: > > > But the application log is already consolidated (to production.log) by > > default-- are you suggesting that this incurs a performance hit and > > the log should be split up? > > At least, that's the experiences we had with our Rails application; > random slowdowns for no apparent reason. All went away after we moved > to SyslogLogger. > > -- > Jakob Skjerning - http://mentalized.net > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From nvick77 at gmail.com Mon Feb 11 11:39:53 2008 From: nvick77 at gmail.com (Nate Vick) Date: Mon, 11 Feb 2008 08:39:53 -0800 Subject: [Mongrel] Mongrel does not restart after cap deploy Message-ID: I get the following error when I try to deploy my first application. /usr/lib/ruby/gems/1.8/gems/mongrel-1.1/bin/mongrel_rails:18: uninitialized constant Mongrel::GemPlugin (NameError) I have a script in /etc/init.d that restarts mongrel and uses the reaper script to do so. Any ideas? -- Nate Vick nvick77 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080211/db5f5c40/attachment.html From michael.dauria at gmail.com Mon Feb 11 12:11:44 2008 From: michael.dauria at gmail.com (Michael D'Auria) Date: Mon, 11 Feb 2008 12:11:44 -0500 Subject: [Mongrel] Mongrel does not restart after cap deploy In-Reply-To: References: Message-ID: <1907e2ca0802110911w136782dex729b3e2f370db3ed@mail.gmail.com> Nate, Sounds like your script doesn't define the correct path. I compile ruby so it's under /usr/local/lib/ruby. Michael On Feb 11, 2008 11:39 AM, Nate Vick wrote: > I get the following error when I try to deploy my first application. > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1/bin/mongrel_rails:18: > uninitialized constant Mongrel::GemPlugin (NameError) > > I have a script in /etc/init.d that restarts mongrel and uses the reaper > script to do so. Any ideas? > > -- > Nate Vick > nvick77 at gmail.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080211/d8d06308/attachment.html From lists at ruby-forum.com Mon Feb 11 12:19:22 2008 From: lists at ruby-forum.com (Justin Winkler) Date: Mon, 11 Feb 2008 18:19:22 +0100 Subject: [Mongrel] Timestamping in log file? In-Reply-To: References: <20071120192112.23C9C18585D2@rubyforge.org> <327FCCA3-9BEA-4C11-B381-F4DC2E7EC209@ncsu.edu> Message-ID: <00b74467a187b0d20ff13f823001ab1a@ruby-forum.com> Any word on this being in an official release? We're currently on 1.1.1, and the timestamps don't seem to appear, and I'm unable to find it in any changlog for other versions. Thanks! -- Posted via http://www.ruby-forum.com/. From evan at cloudbur.st Mon Feb 11 13:21:40 2008 From: evan at cloudbur.st (Evan Weaver) Date: Mon, 11 Feb 2008 13:21:40 -0500 Subject: [Mongrel] Timestamping in log file? In-Reply-To: <00b74467a187b0d20ff13f823001ab1a@ruby-forum.com> References: <20071120192112.23C9C18585D2@rubyforge.org> <327FCCA3-9BEA-4C11-B381-F4DC2E7EC209@ncsu.edu> <00b74467a187b0d20ff13f823001ab1a@ruby-forum.com> Message-ID: Well, he committed it to trunk, but didn't write any tests, so what am I supposed to do with that, really ;) . Evan On Feb 11, 2008 12:19 PM, Justin Winkler wrote: > Any word on this being in an official release? We're currently on 1.1.1, > and the timestamps don't seem to appear, and I'm unable to find it in > any changlog for other versions. > > Thanks! > -- > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From lists at ruby-forum.com Tue Feb 12 17:19:03 2008 From: lists at ruby-forum.com (Paolo Montrasio) Date: Tue, 12 Feb 2008 23:19:03 +0100 Subject: [Mongrel] Timestamping in log file? In-Reply-To: References: <20071120192112.23C9C18585D2@rubyforge.org> <327FCCA3-9BEA-4C11-B381-F4DC2E7EC209@ncsu.edu> <00b74467a187b0d20ff13f823001ab1a@ruby-forum.com> Message-ID: <25c80a96ba1f2f8398679836711cbb02@ruby-forum.com> I added timestamps to my mongrel logs by adding these lines to config/environment.rb: class Logger def format_message(severity, timestamp, progname, msg) time = timestamp.getutc.strftime("%Y%m%d%H%M%S") "\n#{time}:#{severity.to_s.upcase}:#{$$}:#{msg}" end end It logs messages like this: Processing MyController#my_method (for 127.0.0.1 at 2007-12-29 14:37:54) [POST] 20071229133754:INFO:23386: Session ID: d7022e387306cc4e5fea107080014bf1 20071229133754:INFO:23386: Parameters: {"action"=>"my_method", "controller"=>"my", "id"=>"1"} 20071229133754:DEBUG:23386:ID = 1 The process id turned out to be extremely useful to debug some weird things my application started doing when moved from the single mongrel development environment to a multi mongrel one in production. Furthermore, sometimes the logs from two or more requests get mixed together (I guess that it can't be helped) and the process id helps to connect a log line to its request. Paolo -- Posted via http://www.ruby-forum.com/. From kgdavis at gmail.com Tue Feb 12 23:00:57 2008 From: kgdavis at gmail.com (Kevin Davis) Date: Tue, 12 Feb 2008 20:00:57 -0800 Subject: [Mongrel] automatic startup in leopard Message-ID: I've been having quite a bit of trouble since upgrading to leopard. I had a launchctl plist file that seemed to work (attached). It essentially ran mongrel_rails bunch of times with different arguments. In leopard it fails to load, saying: launchctl: propertyList is NULL launchctl: no plist was returned for: net.mongrel.plist launchctl: no plist was returned for: net.mongrel.plist nothing found to load In the process of trying to figure out what was wrong I learned about mongrel_cluster. I made a much more elegant file that calls mongrel_rails cluster::start once. The mongrels start up ok, but launchctl doesn't seem to recognize this and tries to start the processes every 10 seconds. I'm guessing that this is because the mongrel_rails script ends up calling something else and launchctl doesn't recognize it as running I'd considered removing the 'keepalive' key, but that's the whole value of launchctl. Anyone have any suggestions? Much appreciated, Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080212/03451de3/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: net.mongrel.plist Type: application/octet-stream Size: 1521 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20080212/03451de3/attachment.obj From zedshaw at zedshaw.com Thu Feb 14 01:38:58 2008 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 14 Feb 2008 01:38:58 -0500 Subject: [Mongrel] consolidated log file? In-Reply-To: <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> Message-ID: <20080214013858.7978fc28.zedshaw@zedshaw.com> On Mon, 11 Feb 2008 09:36:06 -0600 "Ed Hickey" wrote: > I recently just blogged about my experiences with large logfiles > effecting mongrel. It's not hugely scientific, but there is > definitely a connection between mongrel memory usage and the rails > production.log. > http://blog.edhickey.com/2008/02/08/mongrel-memory-usage/ That's fucking weird. There's definitely a correlation, but not sure how mongrel would cause that. It doesn't touch the logs or logger or anything and leaves that all to Rails. How much you want to bet that hack job rails-core did on the fucking Logger class causes this? Not sure how. That's just weird. Next would to see if it happens in jruby since they use a different IO setup. Anyway, looks like syslogger is the way to go for production. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From drbuettner at gmail.com Wed Feb 13 09:21:59 2008 From: drbuettner at gmail.com (Dan Buettner) Date: Wed, 13 Feb 2008 14:21:59 +0000 Subject: [Mongrel] Specifying filesystem destination for uploaded files Message-ID: Posted on the RoR users list several days ago, no responses, so asking here. Currently, mongrel stores files uploaded via HTTP forms in temp files in the system's tmp dir. Logical, works well, etc. However, I have a need to move those files to a network store after they're uploaded, and often those files are quite large, so it can take a few seconds each to move from /tmp to the network store (since the move is a copy due to the different filesystem). I'm wondering if I can have mongrel store the uploaded files right onto a temp dir set up on the network store, so that my move into a specific location is actually a move and not a copy. Thoughts? Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080213/7b33e3a4/attachment.html From wayneeseguin at gmail.com Wed Feb 13 10:49:00 2008 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Wed, 13 Feb 2008 10:49:00 -0500 Subject: [Mongrel] Timestamping in log file? In-Reply-To: References: <20071120192112.23C9C18585D2@rubyforge.org> <327FCCA3-9BEA-4C11-B381-F4DC2E7EC209@ncsu.edu> <00b74467a187b0d20ff13f823001ab1a@ruby-forum.com> Message-ID: On Feb 11, 2008 1:21 PM, Evan Weaver wrote: > Well, he committed it to trunk, but didn't write any tests, so what am > I supposed to do with that, really ;) . > Justin, Checkout trunk, write some tests and it'll get pushed out. I do not have the time to do this right now and won't for a few more weeks at lest. ~Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080213/c1130c07/attachment-0001.html From seanmichaelbrown at gmail.com Wed Feb 13 10:50:34 2008 From: seanmichaelbrown at gmail.com (Sean Brown) Date: Wed, 13 Feb 2008 10:50:34 -0500 Subject: [Mongrel] consolidated log file? In-Reply-To: <20080214013858.7978fc28.zedshaw@zedshaw.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> <20080214013858.7978fc28.zedshaw@zedshaw.com> Message-ID: <1086fb5f0802130750s16b9e59dre662598e53122366@mail.gmail.com> On Thu, Feb 14, 2008 at 1:38 AM, Zed A. Shaw wrote: > On Mon, 11 Feb 2008 09:36:06 -0600 > "Ed Hickey" wrote: > > > I recently just blogged about my experiences with large logfiles > > effecting mongrel. It's not hugely scientific, but there is > > definitely a connection between mongrel memory usage and the rails > > production.log. > > http://blog.edhickey.com/2008/02/08/mongrel-memory-usage/ > > That's fucking weird. There's definitely a correlation, but not sure > how mongrel would cause that. It doesn't touch the logs or logger or > anything and leaves that all to Rails. > > How much you want to bet that hack job rails-core did on the fucking > Logger class causes this? Not sure how. That's just weird. > > Next would to see if it happens in jruby since they use a different IO > setup. > > Anyway, looks like syslogger is the way to go for production. > This won't address the cause, but can alleviate the symptoms. We use logrotate to rotate our production logs once a week and that definitely helps keep things snappy. You certainly set them to rotate more or less frequently if your application needs it. If anyone would like to see our logrotate configuration, let me know. -- Sean Brown seanmichaelbrown at gmail.com From johnjosephbachir at gmail.com Wed Feb 13 14:11:00 2008 From: johnjosephbachir at gmail.com (John Joseph Bachir) Date: Wed, 13 Feb 2008 14:11:00 -0500 Subject: [Mongrel] consolidated log file? In-Reply-To: <1086fb5f0802130750s16b9e59dre662598e53122366@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> <20080214013858.7978fc28.zedshaw@zedshaw.com> <1086fb5f0802130750s16b9e59dre662598e53122366@mail.gmail.com> Message-ID: <4a3752180802131111t383f4791n359ae14da105934d@mail.gmail.com> On Feb 13, 2008 10:50 AM, Sean Brown wrote: > If anyone would > like to see our logrotate configuration, let me know. I would be interested in seeing your config, thanks for offering. Perhaps it's worthy of a new thread? -- John Joseph Bachir http://blog.johnjosephbachir.org http://lyceum.ibiblio.org http://dissent.cc http://jjb.cc From jgeiger at gmail.com Wed Feb 13 16:13:51 2008 From: jgeiger at gmail.com (Joey Geiger) Date: Wed, 13 Feb 2008 15:13:51 -0600 Subject: [Mongrel] consolidated log file? In-Reply-To: <4a3752180802131111t383f4791n359ae14da105934d@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> <20080214013858.7978fc28.zedshaw@zedshaw.com> <1086fb5f0802130750s16b9e59dre662598e53122366@mail.gmail.com> <4a3752180802131111t383f4791n359ae14da105934d@mail.gmail.com> Message-ID: <466af3440802131313r6eda2c71y6f79f16d8e312018@mail.gmail.com> So, it's the size of the LOG that is causing the issue? I'm rotating every night anyway using logrotate, but I was thinking about moving to syslogger if I could find a nice how-to. On Feb 13, 2008 1:11 PM, John Joseph Bachir wrote: > On Feb 13, 2008 10:50 AM, Sean Brown wrote: > > > If anyone would > > like to see our logrotate configuration, let me know. > > I would be interested in seeing your config, thanks for offering. > Perhaps it's worthy of a new thread? > > -- > John Joseph Bachir > http://blog.johnjosephbachir.org > http://lyceum.ibiblio.org > http://dissent.cc > http://jjb.cc > _______________________________________________ > > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From bassnode at gmail.com Wed Feb 13 16:56:15 2008 From: bassnode at gmail.com (Ed Hickey) Date: Wed, 13 Feb 2008 15:56:15 -0600 Subject: [Mongrel] consolidated log file? In-Reply-To: <466af3440802131313r6eda2c71y6f79f16d8e312018@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> <20080214013858.7978fc28.zedshaw@zedshaw.com> <1086fb5f0802130750s16b9e59dre662598e53122366@mail.gmail.com> <4a3752180802131111t383f4791n359ae14da105934d@mail.gmail.com> <466af3440802131313r6eda2c71y6f79f16d8e312018@mail.gmail.com> Message-ID: <733f56120802131356x60f84121tf1df7012d3ec2fd7@mail.gmail.com> At least in my case, the issue is definitely related to the size of the log. All the sapped memory gets freed as soon as I truncate the production.log. I tried SyslogLogger today (http://rails-analyzer.rubyforge.org/hacks/classes/SyslogLogger.html) but couldn't get the rails log to only show up in one place when following the README's directions It was logging to /var/log/production.log as well as /var/log/messages. Server load jumped up to 2, I assume because of all the disk IO. Anyone who's deployed SyslogLogger and has insight, comments welcome. Also, anyone tried Analogger? http://analogger.swiftcore.org/ ed On Feb 13, 2008 3:13 PM, Joey Geiger wrote: > So, it's the size of the LOG that is causing the issue? > > I'm rotating every night anyway using logrotate, but I was thinking > about moving to syslogger if I could find a nice how-to. > > > On Feb 13, 2008 1:11 PM, John Joseph Bachir wrote: > > On Feb 13, 2008 10:50 AM, Sean Brown wrote: > > > > > If anyone would > > > like to see our logrotate configuration, let me know. > > > > I would be interested in seeing your config, thanks for offering. > > Perhaps it's worthy of a new thread? > > > > -- > > John Joseph Bachir > > http://blog.johnjosephbachir.org > > http://lyceum.ibiblio.org > > http://dissent.cc > > http://jjb.cc > > _______________________________________________ > > > > 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 jftucker at gmail.com Wed Feb 13 17:31:02 2008 From: jftucker at gmail.com (James Tucker) Date: Wed, 13 Feb 2008 22:31:02 +0000 Subject: [Mongrel] consolidated log file? In-Reply-To: <733f56120802131356x60f84121tf1df7012d3ec2fd7@mail.gmail.com> References: <4a3752180802051406w725b31ecjd676931b14262d13@mail.gmail.com> <344f1b720802051623h27c883c8w2c4b490b912e559e@mail.gmail.com> <4a3752180802060753u2712baf2le5539334959a1d04@mail.gmail.com> <479387BC-D4CE-40C7-97ED-1D9350168D66@mentalized.net> <733f56120802110736x20ba3b2fg7b4e8b5082f93968@mail.gmail.com> <20080214013858.7978fc28.zedshaw@zedshaw.com> <1086fb5f0802130750s16b9e59dre662598e53122366@mail.gmail.com> <4a3752180802131111t383f4791n359ae14da105934d@mail.gmail.com> <466af3440802131313r6eda2c71y6f79f16d8e312018@mail.gmail.com> <733f56120802131356x60f84121tf1df7012d3ec2fd7@mail.gmail.com> Message-ID: <6CB07FB0-56CA-48D7-9A1E-056AF4F08CB7@gmail.com> On 13 Feb 2008, at 21:56, Ed Hickey wrote: > At least in my case, the issue is definitely related to the size of > the log. All the sapped memory gets freed as soon as I truncate the > production.log. > > I tried SyslogLogger today > (http://rails-analyzer.rubyforge.org/hacks/classes/SyslogLogger.html) > but couldn't get the rails log to only show up in one place when > following the README's directions It was logging to > /var/log/production.log as well as /var/log/messages. Server load > jumped up to 2, I assume because of all the disk IO. > Anyone who's deployed SyslogLogger and has insight, comments welcome. > > Also, anyone tried Analogger? http://analogger.swiftcore.org/ I'm not running it in production yet, but we're using it in a development environment for our application. I sent Kirk Haines a patch which implements a Logger style api which you can hand to the rails log config options. I believe this will be coming with the release that is coming up soon. It's been working just fine under development for our group, and we will be going production with it shortly. > > > ed > > > On Feb 13, 2008 3:13 PM, Joey Geiger wrote: >> So, it's the size of the LOG that is causing the issue? >> >> I'm rotating every night anyway using logrotate, but I was thinking >> about moving to syslogger if I could find a nice how-to. >> >> >> On Feb 13, 2008 1:11 PM, John Joseph Bachir > > wrote: >>> On Feb 13, 2008 10:50 AM, Sean Brown >>> wrote: >>> >>>> If anyone would >>>> like to see our logrotate configuration, let me know. >>> >>> I would be interested in seeing your config, thanks for offering. >>> Perhaps it's worthy of a new thread? >>> >>> -- >>> John Joseph Bachir >>> http://blog.johnjosephbachir.org >>> http://lyceum.ibiblio.org >>> http://dissent.cc >>> http://jjb.cc >>> _______________________________________________ >>> >>> 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 mike.engelhart at gmail.com Thu Feb 14 10:46:12 2008 From: mike.engelhart at gmail.com (Michael Engelhart) Date: Thu, 14 Feb 2008 09:46:12 -0600 Subject: [Mongrel] one mongrel request seems to block cluster Message-ID: <42642c790802140746y650c216fjdb27d318c2cffece@mail.gmail.com> Hello - I'm new to setting up a mongrel cluster and ran into a question while doing some simple performance testing. I'm using Apache 2.2 as a proxy/load balancer to multiple mongrel instances (for this test on the same box - a small EC2 compute unit). I setup the cluster with 5 mongrel instances. Last night I ran "siege" against the server and the performance seemed to be fine while hitting a single rails action. But the app I'm working on does a web service request that can take up to 20 seconds to get a response. So to test concurrent performance for this long process while siege was running against a simple Rails action I used my browser to hit the page that called out to the long running web service. What happened next was that siege stopped outputting any response information until my browser returned with the response from the web service request. As I said I'm new to this and maybe I'm misinterpreting they way siege works but it "appeared" to me that ALL the mongrel instances were blocked while one handled this long running request. I can't imagine that this is how it is supposed to work in a properly configured environment but I can't find any other information from googling as to why this might be happening. It could very well just be a configuration problem on my end. I'm hoping that this is just siege blocking on it's output :-) Thanks for any advice. Best Regards Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080214/ffdf017f/attachment.html From erik.hetzner at ucop.edu Thu Feb 14 11:15:39 2008 From: erik.hetzner at ucop.edu (Erik Hetzner) Date: Thu, 14 Feb 2008 08:15:39 -0800 Subject: [Mongrel] one mongrel request seems to block cluster In-Reply-To: <42642c790802140746y650c216fjdb27d318c2cffece@mail.gmail.com> References: <42642c790802140746y650c216fjdb27d318c2cffece@mail.gmail.com> Message-ID: <87y79ncy50.wl%erik.hetzner@ucop.edu> At Thu, 14 Feb 2008 09:46:12 -0600, "Michael Engelhart" wrote: > > Hello - > > I'm new to setting up a mongrel cluster and ran into a question while doing > some simple performance testing. > > I'm using Apache 2.2 as a proxy/load balancer to multiple mongrel instances > (for this test on the same box - a small EC2 compute unit). I setup the > cluster with 5 mongrel instances. > > [?] In your apache.conf, add the max & (maybe) acquire settings to each balancer member. BalancerMember http://127.0.0.1:12345 max=1 acquire=1 [?] See: best, Erik Hetzner -------------- next part -------------- ;; Erik Hetzner, California Digital Library ;; gnupg key id: 1024D/01DB07E3 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20080214/5117547d/attachment.bin From seanmichaelbrown at gmail.com Thu Feb 14 12:29:54 2008 From: seanmichaelbrown at gmail.com (Sean Brown) Date: Thu, 14 Feb 2008 12:29:54 -0500 Subject: [Mongrel] Rotating mongrel production logs Message-ID: <1086fb5f0802140929y231ff318oc7da503ba285bdfa@mail.gmail.com> In another thread, I had posted that we rotate our mongrel production logs once a week as a means to keep the performance degradations that happen with large log files at bay. A few of you asked me to post how we do it, so here it is. We run our sites on RedHat Enterprise 4 machines. Our logrotate.conf file looks like this: # see "man logrotate" for details # rotate log files weekly weekly # keep 4 weeks worth of backlogs rotate 4 # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed #compress # RPM packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp -- we'll rotate them here /var/log/wtmp { monthly create 0664 root utmp rotate 1 } # system-specific logs may be also be configured here. # mongrel logs /path/to/rails/root/shared/log/*.log { copytruncate weekly missingok dateext compress sharedscripts olddir /path/to/rails/root/old_mongrel_logs rotate 28 postrotate for i in `ls /path/to/rails/root/shared/log/mongrel*.pid`; do kill -USR2 `cat $i` done endscript } Incidentally, we also use monit to monitor our various processes (mongrel, Apache, ferretDRb MySQL, etc), so if for some odd reason this log rotation would not bring one of our mongrels back up cleanly, we'd be alerted and monit would try to restart it. So far, this has not happened at all across any of our 6 production setups just like this. None of the sites are extremely high traffic, so it's possible that you'd want to rotate mongrel log files more frequently than weekly. I hope this helps. -- Sean Brown seanmichaelbrown at gmail.com From gui at alphabetware.com Thu Feb 14 13:23:28 2008 From: gui at alphabetware.com (gui weinmann) Date: Thu, 14 Feb 2008 13:23:28 -0500 Subject: [Mongrel] one mongrel request seems to block cluster In-Reply-To: <87y79ncy50.wl%erik.hetzner@ucop.edu> References: <42642c790802140746y650c216fjdb27d318c2cffece@mail.gmail.com> <87y79ncy50.wl%erik.hetzner@ucop.edu> Message-ID: Mike, That sounds similar to a problem I experienced last week. I'm running apache with mongrel on a windows machine. It's not a definitive solution, and I am new to apache/mongrel, but with that important caveat out of the way I can say that I found playing with the TTL and timeout parameters in apache.conf had a positive effect. The downside is that some long-running queries may get a proxy timeout message from Apache. Since I'm using caching, this is not a serious problem - the next request for the same data usually succeeds. BalancerMember http://someip max=5 timeout=55 ttl=90 acquire=60 I also assigned a value to ProxyTimeout in the Virtualhost section of apache.conf. Comments are from the Apache documentation. #This is useful when you have a slow/buggy appserver which hangs, and you would rather just return a timeout and fail gracefully instead of waiting however long it takes the server to return. ProxyTimeout 90 Good luck, G u i W e i n m a n n A L P H A B E T W A R E On 2/14/08, Erik Hetzner wrote: > At Thu, 14 Feb 2008 09:46:12 -0600, > > "Michael Engelhart" wrote: > > > > Hello - > > > > I'm new to setting up a mongrel cluster and ran into a question while doing > > some simple performance testing. > > > > I'm using Apache 2.2 as a proxy/load balancer to multiple mongrel instances > > (for this test on the same box - a small EC2 compute unit). I setup the > > cluster with 5 mongrel instances. > > > > > [?] > > In your apache.conf, add the max & (maybe) acquire settings to each > balancer member. > > > BalancerMember http://127.0.0.1:12345 max=1 acquire=1 > [?] > > > See: > > > > best, > > Erik Hetzner > > ;; Erik Hetzner, California Digital Library > ;; gnupg key id: 1024D/01DB07E3 > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From njvack at wisc.edu Thu Feb 14 14:08:57 2008 From: njvack at wisc.edu (Nate Vack) Date: Thu, 14 Feb 2008 13:08:57 -0600 Subject: [Mongrel] Rotating mongrel production logs In-Reply-To: <1086fb5f0802140929y231ff318oc7da503ba285bdfa@mail.gmail.com> References: <1086fb5f0802140929y231ff318oc7da503ba285bdfa@mail.gmail.com> Message-ID: <8be813400802141108x2629a8e0xd66bb232a9ae0b9f@mail.gmail.com> On Thu, Feb 14, 2008 at 11:29 AM, Sean Brown wrote: > postrotate > for i in `ls /path/to/rails/root/shared/log/mongrel*.pid`; do > kill -USR2 `cat $i` > done > endscript > Incidentally, we also use monit to monitor our various processes > (mongrel, Apache, ferretDRb MySQL, etc), so if for some odd reason > this log rotation would not bring one of our mongrels back up cleanly, > we'd be alerted and monit would try to restart it. Why not ask monit to restart your mongrels? It seems kind of nice to have monit be the only guy in town touching the processes it monitors.... but maybe there's a technical reason why not? -Nate From mike.engelhart at gmail.com Thu Feb 14 14:22:48 2008 From: mike.engelhart at gmail.com (Michael Engelhart) Date: Thu, 14 Feb 2008 13:22:48 -0600 Subject: [Mongrel] one mongrel request seems to block cluster In-Reply-To: <87wsp7cq41.wl%erik.hetzner@ucop.edu> References: <42642c790802140746y650c216fjdb27d318c2cffece@mail.gmail.com> <87y79ncy50.wl%erik.hetzner@ucop.edu> <42642c790802141033h79ac57ebpb0412591431868b7@mail.gmail.com> <87wsp7cq41.wl%erik.hetzner@ucop.edu> Message-ID: <42642c790802141122q36bb934dg36fc4313e80c2778@mail.gmail.com> Hi Erik - Yes I meant to cc the list! :-) OK - that's what I'm coming to the conclusion as well that this is the way siege behaves because I was able to get a request through just fine in a sub-second response while siege was hung. I'm glad you're seeing this behavior as well so my load balancer is probably working. Thanks very much for looking into this. Mike On Thu, Feb 14, 2008 at 1:09 PM, Erik Hetzner wrote: > At Thu, 14 Feb 2008 12:33:44 -0600, > "Michael Engelhart" wrote: > > > > Thanks Erik for the advice and link. > > > > After modifying the load balancer to use those parameters I'm still > > seeing the behavior though: > > > > Here are a few lines of output from siege before I hit the long > > running process with my browser. It generally just repeats at about > > this pace give or take a few milliseconds: > > HTTP/1.1 200 0.18 secs: 1998 bytes ==> /trips/1 > > HTTP/1.1 200 0.20 secs: 1998 bytes ==> /trips/1 > > > > But then when I hit my browser against the long running web service > > request, siege hangs for about 20 seconds > > > > Then siege dumps the following lines all at once which says to me > > that every request was blocked until the long running process ended: > > > [?] > > Hi Michael. > > (Did you mean to cc the list?) > > Anyhow, this looks like the same behavior. I think this is something > to do with the way that siege works, based on a simulation I just did > with siege on my own system. Can you get a response back from your > balancer (not from siege) when siege has hung? > > -Erik > > ;; Erik Hetzner, California Digital Library > ;; gnupg key id: 1024D/01DB07E3 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080214/aea82ff8/attachment.html From seanmichaelbrown at gmail.com Thu Feb 14 14:44:38 2008 From: seanmichaelbrown at gmail.com (Sean Brown) Date: Thu, 14 Feb 2008 14:44:38 -0500 Subject: [Mongrel] Rotating mongrel production logs In-Reply-To: <8be813400802141108x2629a8e0xd66bb232a9ae0b9f@mail.gmail.com> References: <1086fb5f0802140929y231ff318oc7da503ba285bdfa@mail.gmail.com> <8be813400802141108x2629a8e0xd66bb232a9ae0b9f@mail.gmail.com> Message-ID: <1086fb5f0802141144t3b6b5b9di284657266ba739e6@mail.gmail.com> On Thu, Feb 14, 2008 at 2:08 PM, Nate Vack wrote: > On Thu, Feb 14, 2008 at 11:29 AM, Sean Brown wrote: > > > postrotate > > for i in `ls /path/to/rails/root/shared/log/mongrel*.pid`; do > > kill -USR2 `cat $i` > > done > > endscript > > > Incidentally, we also use monit to monitor our various processes > > (mongrel, Apache, ferretDRb MySQL, etc), so if for some odd reason > > this log rotation would not bring one of our mongrels back up cleanly, > > we'd be alerted and monit would try to restart it. > > Why not ask monit to restart your mongrels? It seems kind of nice to > have monit be the only guy in town touching the processes it > monitors.... but maybe there's a technical reason why not? > > -Nate > No technical reason. Simply timing. Monit wakes itself every X minutes to check if processes are running, so there could be a delay of up X minutes until the mongrel process was restarted. The approach in the logrotate restarts the mongrels immediately. Interestingly, monit does realize that the process ID for each mongrel has changed and alerts of that fact, but since we know that will happen every Sunday at 3:00 AM, we can safely ignore it. -- Sean Brown seanmichaelbrown at gmail.com From njvack at wisc.edu Thu Feb 14 15:32:41 2008 From: njvack at wisc.edu (Nate Vack) Date: Thu, 14 Feb 2008 14:32:41 -0600 Subject: [Mongrel] Rotating mongrel production logs In-Reply-To: <1086fb5f0802141144t3b6b5b9di284657266ba739e6@mail.gmail.com> References: <1086fb5f0802140929y231ff318oc7da503ba285bdfa@mail.gmail.com> <8be813400802141108x2629a8e0xd66bb232a9ae0b9f@mail.gmail.com> <1086fb5f0802141144t3b6b5b9di284657266ba739e6@mail.gmail.com> Message-ID: <8be813400802141232g5a4672a7m46570ce8c823a0f5@mail.gmail.com> On Thu, Feb 14, 2008 at 1:44 PM, Sean Brown wrote: > On Thu, Feb 14, 2008 at 2:08 PM, Nate Vack wrote: > > Why not ask monit to restart your mongrels? It seems kind of nice to > > have monit be the only guy in town touching the processes it > > monitors.... but maybe there's a technical reason why not? > No technical reason. Simply timing. Monit wakes itself every X > minutes to check if processes are running, so there could be a delay > of up X minutes until the mongrel process was restarted. The approach > in the logrotate restarts the mongrels immediately. Interestingly, > monit does realize that the process ID for each mongrel has changed > and alerts of that fact, but since we know that will happen every > Sunday at 3:00 AM, we can safely ignore it. I'm pretty sure that doing: monit restart all -g your_mongrel_group will wake monit up and have it restart your app before hitting its timeout. This also avoids the worried emails from monit; ignoring 'PID changed' messages from monit (even if you're expecting them) is a bad habit to get into. -n From jgeiger at gmail.com Thu Feb 14 15:49:43 2008 From: jgeiger at gmail.com (Joey Geiger) Date: Thu, 14 Feb 2008 14:49:43 -0600 Subject: [Mongrel] Rotating mongrel production logs In-Reply-To: <8be813400802141232g5a4672a7m46570ce8c823a0f5@mail.gmail.com> References: <1086fb5f0802140929y231ff318oc7da503ba285bdfa@mail.gmail.com> <8be813400802141108x2629a8e0xd66bb232a9ae0b9f@mail.gmail.com> <1086fb5f0802141144t3b6b5b9di284657266ba739e6@mail.gmail.com> <8be813400802141232g5a4672a7m46570ce8c823a0f5@mail.gmail.com> Message-ID: <466af3440802141249j3a5964cg6bbcda6d650591d3@mail.gmail.com> Umm, why are you restarting your mongrels at all? copytruncate allows the processes to write to the log file without restarting The only issue is you may lose a few requests while it's rotating, but in my case, I'm using the nginx logs to provide the stats anyway. On Thu, Feb 14, 2008 at 2:32 PM, Nate Vack wrote: > On Thu, Feb 14, 2008 at 1:44 PM, Sean Brown wrote: > > > On Thu, Feb 14, 2008 at 2:08 PM, Nate Vack wrote: > > > > > Why not ask monit to restart your mongrels? It seems kind of nice to > > > have monit be the only guy in town touching the processes it > > > monitors.... but maybe there's a technical reason why not? > > > > No technical reason. Simply timing. Monit wakes itself every X > > minutes to check if processes are running, so there could be a delay > > of up X minutes until the mongrel process was restarted. The approach > > in the logrotate restarts the mongrels immediately. Interestingly, > > monit does realize that the process ID for each mongrel has changed > > and alerts of that fact, but since we know that will happen every > > Sunday at 3:00 AM, we can safely ignore it. > > I'm pretty sure that doing: > > monit restart all -g your_mongrel_group > > will wake monit up and have it restart your app before hitting its > timeout. This also avoids the worried emails from monit; ignoring 'PID > changed' messages from monit (even if you're expecting them) is a bad > habit to get into. > > -n > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From nvick77 at gmail.com Thu Feb 14 22:02:17 2008 From: nvick77 at gmail.com (Nate Vick) Date: Thu, 14 Feb 2008 19:02:17 -0800 Subject: [Mongrel] Mongrel does not restart after cap deploy In-Reply-To: <1907e2ca0802110911w136782dex729b3e2f370db3ed@mail.gmail.com> References: <1907e2ca0802110911w136782dex729b3e2f370db3ed@mail.gmail.com> Message-ID: Thanks for the response. I have check the path and as far as I can tell it is all set. I did try adding default_environment to my capfile to define the path to ruby with no change. Should I be define the path in my reaper script? On Mon, Feb 11, 2008 at 9:11 AM, Michael D'Auria wrote: > Nate, > > Sounds like your script doesn't define the correct path. I compile ruby > so it's under /usr/local/lib/ruby. > > Michael > > On Feb 11, 2008 11:39 AM, Nate Vick wrote: > > > I get the following error when I try to deploy my first application. > > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1/bin/mongrel_rails:18: > > uninitialized constant Mongrel::GemPlugin (NameError) > > > > I have a script in /etc/init.d that restarts mongrel and uses the reaper > > script to do so. Any ideas? > > > > -- > > Nate Vick > > nvick77 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 > -- Nate Vick nvick77 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080214/7bbe44aa/attachment.html From michael.dauria at gmail.com Fri Feb 15 10:57:00 2008 From: michael.dauria at gmail.com (Michael D'Auria) Date: Fri, 15 Feb 2008 10:57:00 -0500 Subject: [Mongrel] Mongrel does not restart after cap deploy In-Reply-To: References: <1907e2ca0802110911w136782dex729b3e2f370db3ed@mail.gmail.com> Message-ID: <1907e2ca0802150757s47033bcdjad0b6a7b65ef87f9@mail.gmail.com> I would check that you have all the proper gems installed on the server. Is your dev machine the same os and version as your production? On 2/14/08, Nate Vick wrote: > Thanks for the response. I have check the path and as far as I can tell it > is all set. I did try adding default_environment to my capfile to define the > path to ruby with no change. > Should I be define the path in my reaper script? > > On Mon, Feb 11, 2008 at 9:11 AM, Michael D'Auria > wrote: > > > Nate, > > > > Sounds like your script doesn't define the correct path. I compile ruby > > so it's under /usr/local/lib/ruby. > > > > Michael > > > > On Feb 11, 2008 11:39 AM, Nate Vick wrote: > > > > > I get the following error when I try to deploy my first application. > > > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1/bin/mongrel_rails:18: > > > uninitialized constant Mongrel::GemPlugin (NameError) > > > > > > I have a script in /etc/init.d that restarts mongrel and uses the reaper > > > script to do so. Any ideas? > > > > > > -- > > > Nate Vick > > > nvick77 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 > > > > > > -- > Nate Vick > nvick77 at gmail.com > From ezra_freedman at mac.com Fri Feb 15 11:05:24 2008 From: ezra_freedman at mac.com (Ezra Freedman) Date: Fri, 15 Feb 2008 11:05:24 -0500 Subject: [Mongrel] Socket read returned insufficient data Message-ID: In the several months I've been using Mongrel, I've experienced two crashes. Both were immediately following a "Socket read returned insufficient data" error from HTTPRequest. Both times, the mongrel process would hang indefinitely (and not respond to requests) untill manually killed. The first instance references a line where I was using XML::Document.file(). It's not clear under what conditions the second instance occurred. Any ideas on why this might be happening or what can be done to prevent it? Thanks. Ezra Freedman INSTANCE #1: ERROR reading http body: Socket read returned insufficient data: 9504 /home/eperny/rails/epernicus_production/config/../app/models/ publication.rb:72: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i486-linux] INSTANCE #2: Thu Feb 14 16:40:13 UTC 2008: Error reading HTTP body: # /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:87:in `read_body' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:55:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:149:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:268:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ configurator.rb:282:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ configurator.rb:281:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:128:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ command.rb:212:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19 Thu Feb 14 16:40:14 UTC 2008: Error reading HTTP body: # /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:107:in `read_socket' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:86:in `read_body' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:55:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:149:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:268:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ configurator.rb:282:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ configurator.rb:281:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:128:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ command.rb:212:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19 ** TERM signal received. Thu Feb 14 16:40:31 UTC 2008: Reaping 1 threads for slow workers because of 'shutdown' Waiting for 1 requests to finish, could take 60 seconds. Thu Feb 14 16:40:37 UTC 2008: Reaping 1 threads for slow workers because of 'shutdown' Waiting for 1 requests to finish, could take 60 seconds. From zprime at gmail.com Fri Feb 15 15:35:04 2008 From: zprime at gmail.com (Zachary Roetemeyer) Date: Fri, 15 Feb 2008 14:35:04 -0600 Subject: [Mongrel] Transfer-Encoding: Chunked Message-ID: I'm working with someone who is having issues with a Transfer- Encoding: Chunked upload. With out a content-length set in the request, everything is treating the content length as 0 and the file is more or less getting sent to the bit bucket. Does anyone have any experience with this kind of issue? We started proxying with nginx(returned a HTTP Error 411), then we tried to directly expose a mongrel and ended up getting strange results, and errors in the mongrel logs. The client is uploading with a mobile phone using J2ME. Zachary Roetemeyer From ry at tinyclouds.org Fri Feb 15 18:53:37 2008 From: ry at tinyclouds.org (ry dahl) Date: Sat, 16 Feb 2008 00:53:37 +0100 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: References: Message-ID: <3ae7f4480802151553l5ce384d8o634c54d0001d944c@mail.gmail.com> > With out a content-length set in the > request, everything is treating the content length as 0 and the file > is more or less getting sent to the bit bucket. Is the content length header really not getting set? Mongrel automatically sets this. If you do something like while writing the response code. You might have to overload mongrel's HttpResponse#send_status method to explicitly not send this header. I think http://merb.devjavu.com/ticket/121 might have some useful hints too. ry From luislavena at gmail.com Fri Feb 15 19:21:21 2008 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 15 Feb 2008 22:21:21 -0200 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: <3ae7f4480802151553l5ce384d8o634c54d0001d944c@mail.gmail.com> References: <3ae7f4480802151553l5ce384d8o634c54d0001d944c@mail.gmail.com> Message-ID: <71166b3b0802151621w34611de7l91d006434bb49f94@mail.gmail.com> On Feb 15, 2008 9:53 PM, ry dahl wrote: > > With out a content-length set in the > > request, everything is treating the content length as 0 and the file > > is more or less getting sent to the bit bucket. > > I think http://merb.devjavu.com/ticket/121 might have some useful hints too. > Oh, got lost, there is merb.devjavu.com and also merb.lighthouseapp.com ? :-P -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams From eden at mojiti.com Fri Feb 15 20:01:23 2008 From: eden at mojiti.com (Eden Li) Date: Sat, 16 Feb 2008 09:01:23 +0800 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: References: Message-ID: Looks like mongrel can't handle chunked posts (see http://mongrel.rubyforge.org/svn/trunk/lib/mongrel/http_request.rb line 29). You'll need to put another web server (other than nginx) in front of it to handle this, or you could file a bug in the mongrel tracker to get them to add this support (or you could code it up yourself :). On Feb 16, 2008, at 4:35 AM, Zachary Roetemeyer wrote: > I'm working with someone who is having issues with a Transfer- > Encoding: Chunked upload. With out a content-length set in the > request, everything is treating the content length as 0 and the file > is more or less getting sent to the bit bucket. Does anyone have any > experience with this kind of issue? We started proxying with > nginx(returned a HTTP Error 411), then we tried to directly expose a > mongrel and ended up getting strange results, and errors in the > mongrel logs. The client is uploading with a mobile phone using J2ME. > > Zachary Roetemeyer > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From lists at ruby-forum.com Fri Feb 15 22:01:11 2008 From: lists at ruby-forum.com (Roger Pack) Date: Sat, 16 Feb 2008 04:01:11 +0100 Subject: [Mongrel] Socket read returned insufficient data In-Reply-To: References: Message-ID: <2f7270ce1705df188a65bdc2a4b579c8@ruby-forum.com> Looks like it was blocking reading that external url. Possible to load it safely before-hand or surround it with a timeout? > The first instance references a line where I was using > XML::Document.file(). It's not clear under what > conditions the second instance occurred. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Feb 15 22:02:50 2008 From: lists at ruby-forum.com (Roger Pack) Date: Sat, 16 Feb 2008 04:02:50 +0100 Subject: [Mongrel] memory leak ? In-Reply-To: <1201528826.1054.5.camel@brain.netio.si> References: <1201528826.1054.5.camel@brain.netio.si> Message-ID: <05efa0a99fc6d1f138a542f1309aaa21@ruby-forum.com> Did you ever figure this out? > my mongrel cluster worked as charm for last 3 months, but in last days > some processes are taking all available memory. It goes up to 440Mb per > process. Few hours after restart memory usage starts to climb up and > cluster became unresponsive. -- Posted via http://www.ruby-forum.com/. From nvick77 at gmail.com Sat Feb 16 03:33:15 2008 From: nvick77 at gmail.com (Nate Vick) Date: Sat, 16 Feb 2008 00:33:15 -0800 Subject: [Mongrel] Mongrel does not restart after cap deploy In-Reply-To: <1907e2ca0802150757s47033bcdjad0b6a7b65ef87f9@mail.gmail.com> References: <1907e2ca0802110911w136782dex729b3e2f370db3ed@mail.gmail.com> <1907e2ca0802150757s47033bcdjad0b6a7b65ef87f9@mail.gmail.com> Message-ID: <38FF3878-4FD7-4D49-8AB7-AF07E121FCAA@gmail.com> All of our dev machines are Macs and our production machine is Ubuntu 6.06 server. Thanks, Nate Vick Technical Ministry New Heights Church On Feb 15, 2008, at 7:57 AM, "Michael D'Auria" wrote: > I would check that you have all the proper gems installed on the > server. Is your dev machine the same os and version as your > production? > > > > On 2/14/08, Nate Vick wrote: >> Thanks for the response. I have check the path and as far as I can >> tell it >> is all set. I did try adding default_environment to my capfile to >> define the >> path to ruby with no change. >> Should I be define the path in my reaper script? >> >> On Mon, Feb 11, 2008 at 9:11 AM, Michael D'Auria > > >> wrote: >> >>> Nate, >>> >>> Sounds like your script doesn't define the correct path. I >>> compile ruby >>> so it's under /usr/local/lib/ruby. >>> >>> Michael >>> >>> On Feb 11, 2008 11:39 AM, Nate Vick wrote: >>> >>>> I get the following error when I try to deploy my first >>>> application. >>>> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1/bin/mongrel_rails:18: >>>> uninitialized constant Mongrel::GemPlugin (NameError) >>>> >>>> I have a script in /etc/init.d that restarts mongrel and uses the >>>> reaper >>>> script to do so. Any ideas? >>>> >>>> -- >>>> Nate Vick >>>> nvick77 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 >>> >> >> >> >> -- >> Nate Vick >> nvick77 at gmail.com >> > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From zedshaw at zedshaw.com Sun Feb 17 21:18:15 2008 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Sun, 17 Feb 2008 21:18:15 -0500 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: References: Message-ID: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> On Fri, 15 Feb 2008 14:35:04 -0600 Zachary Roetemeyer wrote: > I'm working with someone who is having issues with a Transfer- > Encoding: Chunked upload. With out a content-length set in the > request, everything is treating the content length as 0 and the file > is more or less getting sent to the bit bucket. Does anyone have any > experience with this kind of issue? We started proxying with > nginx(returned a HTTP Error 411), then we tried to directly expose a > mongrel and ended up getting strange results, and errors in the > mongrel logs. The client is uploading with a mobile phone using J2ME. Uh, you aren't allowed to set a Content-Length AND use CE in the same request. That would let the two contradict so it's an RFC violation. Actually, WebLogic makes this mistake and we had to school them about it until they told us to turn it off. (WebLogic is such a piece of shit). My RFC knowledge on CE is rusty since I banished that shitty part of HTTP from my mind when I implemented it in RFuzz, but my thoughts are: 1) CE wasn't designed for clients to upload, since no browser does it. 2) It's originally for a server to send periodic parts of a request without having to know it's total final size. 3) Anyone doing a CE as a client is seriously screwing with the RFC and really exercising the corners of it for no apparent reason since CE isn't needed by a client (the client knows the size, or better). 4) This puts a burden on the server to process the CE as it comes over, which has the same problems as mime boundaries but with a more horribly designed part of the RFC. 5) My recommendation is that you just don't do this. The value add for a client (or even modern servers really) is quite minimal. Now, how you go about implementing it: A) Read up on how to write a Mongrel handler. B) Register it at the front of your web app or create a separate server that runs just mongrel (probably your best if you want any kind of performance). C) Your handler would detect the CE via the normal headers and such, and then process the final request body as it comes in for each chunk. D) This might involve subclassing the Http processing parts that handle the body and doing a bit of other hacking, and it's seriously fucking dumb because after that you've gotta process mime boundaries and other stuff, which will punish your server heavily. Enjoy! -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From zprime at gmail.com Mon Feb 18 07:39:02 2008 From: zprime at gmail.com (Zachary Roetemeyer) Date: Mon, 18 Feb 2008 06:39:02 -0600 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> References: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> Message-ID: The upload is coming from a mobile device with J2ME, and it does this by default with anything over 2K, and apparently there's no way to turn it off. On Feb 17, 2008, at 8:18 PM, Zed A. Shaw wrote: > On Fri, 15 Feb 2008 14:35:04 -0600 > Zachary Roetemeyer wrote: > >> I'm working with someone who is having issues with a Transfer- >> Encoding: Chunked upload. With out a content-length set in the >> request, everything is treating the content length as 0 and the file >> is more or less getting sent to the bit bucket. Does anyone have any >> experience with this kind of issue? We started proxying with >> nginx(returned a HTTP Error 411), then we tried to directly expose a >> mongrel and ended up getting strange results, and errors in the >> mongrel logs. The client is uploading with a mobile phone using >> J2ME. > > Uh, you aren't allowed to set a Content-Length AND use CE in the same > request. That would let the two contradict so it's an RFC violation. > Actually, WebLogic makes this mistake and we had to school them about > it until they told us to turn it off. (WebLogic is such a piece of > shit). > > My RFC knowledge on CE is rusty since I banished that shitty part of > HTTP from my mind when I implemented it in RFuzz, but my thoughts are: > > 1) CE wasn't designed for clients to upload, since no browser does it. > 2) It's originally for a server to send periodic parts of a request > without having to know it's total final size. > 3) Anyone doing a CE as a client is seriously screwing with the RFC > and > really exercising the corners of it for no apparent reason since CE > isn't needed by a client (the client knows the size, or better). > 4) This puts a burden on the server to process the CE as it comes > over, which has the same problems as mime boundaries but with a more > horribly designed part of the RFC. > 5) My recommendation is that you just don't do this. The value add > for > a client (or even modern servers really) is quite minimal. > > Now, how you go about implementing it: > > A) Read up on how to write a Mongrel handler. > B) Register it at the front of your web app or create a separate > server > that runs just mongrel (probably your best if you want any kind of > performance). > C) Your handler would detect the CE via the normal headers and such, > and then process the final request body as it comes in for each chunk. > D) This might involve subclassing the Http processing parts that > handle > the body and doing a bit of other hacking, and it's seriously fucking > dumb because after that you've gotta process mime boundaries and other > stuff, which will punish your server heavily. > > Enjoy! > > -- > Zed A. Shaw > - Hate: http://savingtheinternetwithhate.com/ > - Good: http://www.zedshaw.com/ > - Evil: http://yearofevil.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users Zachary Roetemeyer zprime at gmail.com From todd.fisher at gmail.com Mon Feb 18 15:44:08 2008 From: todd.fisher at gmail.com (Todd Fisher) Date: Mon, 18 Feb 2008 15:44:08 -0500 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: References: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> Message-ID: I implemented a chunked transfer encoding to handle ESI in pages... Each fragment is sent as a chunk... Since, I can't determine ahead of time what the content-length would be as the individual ESI fragments are of unknown length until the page is assembled... I can see where a mobile device might want to do this because of memory constraints, however.... if the device has what's it's sending stored somewhere one would hope it can measure that something's length, ahead of time - writing the Content-length first... Then connect the write end of the socket to the read end of the file... and away it goes never storing more then the OS decides to keep in memory... This page might be helpful... http://www.jmarshall.com/easy/http/#http1.1c2 On Feb 18, 2008 7:39 AM, Zachary Roetemeyer wrote: > The upload is coming from a mobile device with J2ME, and it does this > by default with anything over 2K, and apparently there's no way to > turn it off. > > On Feb 17, 2008, at 8:18 PM, Zed A. Shaw wrote: > > > On Fri, 15 Feb 2008 14:35:04 -0600 > > Zachary Roetemeyer wrote: > > > >> I'm working with someone who is having issues with a Transfer- > >> Encoding: Chunked upload. With out a content-length set in the > >> request, everything is treating the content length as 0 and the file > >> is more or less getting sent to the bit bucket. Does anyone have any > >> experience with this kind of issue? We started proxying with > >> nginx(returned a HTTP Error 411), then we tried to directly expose a > >> mongrel and ended up getting strange results, and errors in the > >> mongrel logs. The client is uploading with a mobile phone using > >> J2ME. > > > > Uh, you aren't allowed to set a Content-Length AND use CE in the same > > request. That would let the two contradict so it's an RFC violation. > > Actually, WebLogic makes this mistake and we had to school them about > > it until they told us to turn it off. (WebLogic is such a piece of > > shit). > > > > My RFC knowledge on CE is rusty since I banished that shitty part of > > HTTP from my mind when I implemented it in RFuzz, but my thoughts are: > > > > 1) CE wasn't designed for clients to upload, since no browser does it. > > 2) It's originally for a server to send periodic parts of a request > > without having to know it's total final size. > > 3) Anyone doing a CE as a client is seriously screwing with the RFC > > and > > really exercising the corners of it for no apparent reason since CE > > isn't needed by a client (the client knows the size, or better). > > 4) This puts a burden on the server to process the CE as it comes > > over, which has the same problems as mime boundaries but with a more > > horribly designed part of the RFC. > > 5) My recommendation is that you just don't do this. The value add > > for > > a client (or even modern servers really) is quite minimal. > > > > Now, how you go about implementing it: > > > > A) Read up on how to write a Mongrel handler. > > B) Register it at the front of your web app or create a separate > > server > > that runs just mongrel (probably your best if you want any kind of > > performance). > > C) Your handler would detect the CE via the normal headers and such, > > and then process the final request body as it comes in for each chunk. > > D) This might involve subclassing the Http processing parts that > > handle > > the body and doing a bit of other hacking, and it's seriously fucking > > dumb because after that you've gotta process mime boundaries and other > > stuff, which will punish your server heavily. > > > > Enjoy! > > > > -- > > Zed A. Shaw > > - Hate: http://savingtheinternetwithhate.com/ > > - Good: http://www.zedshaw.com/ > > - Evil: http://yearofevil.com/ > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > Zachary Roetemeyer > zprime at gmail.com > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080218/5d8790df/attachment.html From eden at mojiti.com Mon Feb 18 19:36:43 2008 From: eden at mojiti.com (Eden Li) Date: Tue, 19 Feb 2008 08:36:43 +0800 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: References: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> Message-ID: <74B71DBF-A25F-42D7-B56F-B94B8C6E8113@mojiti.com> Mind posting a patch? As an aside, the j2me people seem to think CE requests are part the http 1.1 spec (rfc2616): http://developers.sun.com/mobility/midp/questions/chunking/ and the minimal justification they give is that "interactive applications may not know ahead of time how much data they're going to send" (paraphrase). On Feb 19, 2008, at 4:44 AM, Todd Fisher wrote: > I implemented a chunked transfer encoding to handle ESI in pages... > Each fragment is sent as a chunk... Since, I can't determine ahead > of time what the content-length would be as the individual ESI > fragments are of unknown length until the page is assembled... > > I can see where a mobile device might want to do this because of > memory constraints, however.... if the device has what's it's > sending stored somewhere one would hope it can measure that > something's length, ahead of time - writing the Content-length > first... Then connect the write end of the socket to the read end of > the file... and away it goes never storing more then the OS > decides to keep in memory... > > This page might be helpful... http://www.jmarshall.com/easy/http/#http1.1c2 > > > > On Feb 18, 2008 7:39 AM, Zachary Roetemeyer wrote: > The upload is coming from a mobile device with J2ME, and it does this > by default with anything over 2K, and apparently there's no way to > turn it off. > > On Feb 17, 2008, at 8:18 PM, Zed A. Shaw wrote: > > > On Fri, 15 Feb 2008 14:35:04 -0600 > > Zachary Roetemeyer wrote: > > > >> I'm working with someone who is having issues with a Transfer- > >> Encoding: Chunked upload. With out a content-length set in the > >> request, everything is treating the content length as 0 and the > file > >> is more or less getting sent to the bit bucket. Does anyone have > any > >> experience with this kind of issue? We started proxying with > >> nginx(returned a HTTP Error 411), then we tried to directly > expose a > >> mongrel and ended up getting strange results, and errors in the > >> mongrel logs. The client is uploading with a mobile phone using > >> J2ME. > > > > Uh, you aren't allowed to set a Content-Length AND use CE in the > same > > request. That would let the two contradict so it's an RFC > violation. > > Actually, WebLogic makes this mistake and we had to school them > about > > it until they told us to turn it off. (WebLogic is such a piece of > > shit). > > > > My RFC knowledge on CE is rusty since I banished that shitty part of > > HTTP from my mind when I implemented it in RFuzz, but my thoughts > are: > > > > 1) CE wasn't designed for clients to upload, since no browser does > it. > > 2) It's originally for a server to send periodic parts of a request > > without having to know it's total final size. > > 3) Anyone doing a CE as a client is seriously screwing with the RFC > > and > > really exercising the corners of it for no apparent reason since CE > > isn't needed by a client (the client knows the size, or better). > > 4) This puts a burden on the server to process the CE as it comes > > over, which has the same problems as mime boundaries but with a more > > horribly designed part of the RFC. > > 5) My recommendation is that you just don't do this. The value add > > for > > a client (or even modern servers really) is quite minimal. > > > > Now, how you go about implementing it: > > > > A) Read up on how to write a Mongrel handler. > > B) Register it at the front of your web app or create a separate > > server > > that runs just mongrel (probably your best if you want any kind of > > performance). > > C) Your handler would detect the CE via the normal headers and such, > > and then process the final request body as it comes in for each > chunk. > > D) This might involve subclassing the Http processing parts that > > handle > > the body and doing a bit of other hacking, and it's seriously > fucking > > dumb because after that you've gotta process mime boundaries and > other > > stuff, which will punish your server heavily. > > > > Enjoy! > > > > -- > > Zed A. Shaw > > - Hate: http://savingtheinternetwithhate.com/ > > - Good: http://www.zedshaw.com/ > > - Evil: http://yearofevil.com/ > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > Zachary Roetemeyer > zprime 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 From lists at ruby-forum.com Mon Feb 18 21:51:16 2008 From: lists at ruby-forum.com (Kevin Williams) Date: Tue, 19 Feb 2008 03:51:16 +0100 Subject: [Mongrel] parser files not compatible with ragel 6.0 Message-ID: I'm getting errors running the ragel task - unrecognized write command "eof". I'm on OS X with ragel version 6.0 from MacPorts. It appears 6.0 has some breaking changes. Has anyone tried ragel 6.0 with the current *.rl files? -- Posted via http://www.ruby-forum.com/. From zedshaw at zedshaw.com Tue Feb 19 23:55:43 2008 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 19 Feb 2008 23:55:43 -0500 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: <74B71DBF-A25F-42D7-B56F-B94B8C6E8113@mojiti.com> References: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> <74B71DBF-A25F-42D7-B56F-B94B8C6E8113@mojiti.com> Message-ID: <20080219235543.6d7c8339.zedshaw@zedshaw.com> On Tue, 19 Feb 2008 08:36:43 +0800 Eden Li wrote: > Mind posting a patch? > > As an aside, the j2me people seem to think CE requests are part the > http 1.1 spec (rfc2616): > > http://developers.sun.com/mobility/midp/questions/chunking/ > > and the minimal justification they give is that "interactive > applications may not know ahead of time how much data they're going to > send" (paraphrase). Alright, let's see the code being used. If this is truly the only way to submit a request from a memory constrained device, and I can't find an alternative that's simpler then I'll add CE to the Mongrel handler. CE is already in the RFuzz handler so it'd be nothing more than putting the same code in the Mongrel parser. Of course this will just be an exercise and I'll let the mongrel crew decide if they want it in or not. And when I say "see the code" I don't mean a toy version, I mean the actual code being used to do the upload that I can work with and test. Doesn't have to be the full app, but enough for me to run in a MIDP emulator and try out. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From eden at mojiti.com Tue Feb 19 22:03:55 2008 From: eden at mojiti.com (Eden Li) Date: Wed, 20 Feb 2008 11:03:55 +0800 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: <20080219235543.6d7c8339.zedshaw@zedshaw.com> References: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> <74B71DBF-A25F-42D7-B56F-B94B8C6E8113@mojiti.com> <20080219235543.6d7c8339.zedshaw@zedshaw.com> Message-ID: <8BDCAD31-09FB-4DB2-A7BD-EC09F045C31D@mojiti.com> Zachary, mind posting some of the code you're using in J2ME? I've got no dog in this fight. On Feb 20, 2008, at 12:55 PM, Zed A. Shaw wrote: > On Tue, 19 Feb 2008 08:36:43 +0800 > Eden Li wrote: > >> Mind posting a patch? >> >> As an aside, the j2me people seem to think CE requests are part the >> http 1.1 spec (rfc2616): >> >> http://developers.sun.com/mobility/midp/questions/chunking/ >> >> and the minimal justification they give is that "interactive >> applications may not know ahead of time how much data they're going >> to >> send" (paraphrase). > > Alright, let's see the code being used. If this is truly the only way > to submit a request from a memory constrained device, and I can't find > an alternative that's simpler then I'll add CE to the Mongrel handler. > CE is already in the RFuzz handler so it'd be nothing more than > putting > the same code in the Mongrel parser. Of course this will just be an > exercise and I'll let the mongrel crew decide if they want it in or > not. > > And when I say "see the code" I don't mean a toy version, I mean the > actual code being used to do the upload that I can work with and test. > Doesn't have to be the full app, but enough for me to run in a MIDP > emulator and try out. > > -- > Zed A. Shaw > - Hate: http://savingtheinternetwithhate.com/ > - Good: http://www.zedshaw.com/ > - Evil: http://yearofevil.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From zprime at gmail.com Wed Feb 20 07:32:33 2008 From: zprime at gmail.com (Zachary Roetemeyer) Date: Wed, 20 Feb 2008 06:32:33 -0600 Subject: [Mongrel] Transfer-Encoding: Chunked In-Reply-To: <8BDCAD31-09FB-4DB2-A7BD-EC09F045C31D@mojiti.com> References: <20080217211815.ba4f0e40.zedshaw@zedshaw.com> <74B71DBF-A25F-42D7-B56F-B94B8C6E8113@mojiti.com> <20080219235543.6d7c8339.zedshaw@zedshaw.com> <8BDCAD31-09FB-4DB2-A7BD-EC09F045C31D@mojiti.com> Message-ID: <8C16D39C-D73F-440C-9A75-39BFC7743002@gmail.com> I'll have to see what I can do since the code isn't mine. On Feb 19, 2008, at 9:03 PM, Eden Li wrote: > Zachary, mind posting some of the code you're using in J2ME? I've > got no dog in this fight. > > On Feb 20, 2008, at 12:55 PM, Zed A. Shaw wrote: > >> On Tue, 19 Feb 2008 08:36:43 +0800 >> Eden Li wrote: >> >>> Mind posting a patch? >>> >>> As an aside, the j2me people seem to think CE requests are part the >>> http 1.1 spec (rfc2616): >>> >>> http://developers.sun.com/mobility/midp/questions/chunking/ >>> >>> and the minimal justification they give is that "interactive >>> applications may not know ahead of time how much data they're >>> going to >>> send" (paraphrase). >> >> Alright, let's see the code being used. If this is truly the only >> way >> to submit a request from a memory constrained device, and I can't >> find >> an alternative that's simpler then I'll add CE to the Mongrel >> handler. >> CE is already in the RFuzz handler so it'd be nothing more than >> putting >> the same code in the Mongrel parser. Of course this will just be an >> exercise and I'll let the mongrel crew decide if they want it in or >> not. >> >> And when I say "see the code" I don't mean a toy version, I mean the >> actual code being used to do the upload that I can work with and >> test. >> Doesn't have to be the full app, but enough for me to run in a MIDP >> emulator and try out. >> >> -- >> Zed A. Shaw >> - Hate: http://savingtheinternetwithhate.com/ >> - Good: http://www.zedshaw.com/ >> - Evil: http://yearofevil.com/ >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users > Zachary Roetemeyer zprime at gmail.com From andrew.ohnstad at gmail.com Thu Feb 21 14:36:35 2008 From: andrew.ohnstad at gmail.com (Andrew Ohnstad) Date: Thu, 21 Feb 2008 14:36:35 -0500 Subject: [Mongrel] Mongrel won't start as user nobody Message-ID: <659297e90802211136v356517e0xd0080d9b1a11a3e1@mail.gmail.com> Hi all, My mongrel cluster runs perfectly if I allow it to run as root, but whenever I try to change things to nobody/nobody my mongrels refuse to start and the following shows up in the mongrel logs. I have checked all the relevant file permissions and "nobody" should be able to access everything needed. ** Starting Mongrel listening at 127.0.0.1:9000 ** Initiating groups for "nobody":"nobody". ** Changing group to "nobody". ** Changing user to "nobody". ** Starting Rails with development environment... /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- /usr/local/lib/ruby/ gems/1.8/gems/rails-1.2.6/lib/initializer (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' from /opt/csw/apache2/share/htdocs/apps/boffable_development/ trunk/config/boot.rb:30 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' from /opt/csw/apache2/share/htdocs/apps/boffable_development/ trunk/config/environment.rb:12 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../ lib/mongrel/rails.rb:147:in `rails' ... 8 levels... from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../ lib/mongrel/command.rb:212:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/ mongrel_rails:281 from /usr/local/bin/mongrel_rails:19:in `load' from /usr/local/bin/mongrel_rails:19 My mongrel-cluster.yml looks like this: user: nobody cwd: /opt/csw/apache2/share/htdocs/apps/trunk port: "9000" environment: development group: nobody address: 127.0.0.1 servers: 3 Things work perfectly if I comment out the user and group lines. Thanks for any ideas. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080221/2ad6cb65/attachment.html From cmcknight at pheonic.com Thu Feb 21 19:03:31 2008 From: cmcknight at pheonic.com (Charles McKnight) Date: Thu, 21 Feb 2008 16:03:31 -0800 Subject: [Mongrel] Mongrel web site down? Message-ID: <47BE1153.5060600@pheonic.com> Hi All, Is the web site down for a particular reason? :-) Regards, Charles McKnight From luislavena at gmail.com Thu Feb 21 20:20:23 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 21 Feb 2008 23:20:23 -0200 Subject: [Mongrel] Mongrel web site down? In-Reply-To: <47BE1153.5060600@pheonic.com> References: <47BE1153.5060600@pheonic.com> Message-ID: <71166b3b0802211720l650283fs4f088ca2dc421415@mail.gmail.com> On Thu, Feb 21, 2008 at 10:03 PM, Charles McKnight wrote: > Hi All, > > Is the web site down for a particular reason? :-) > Hmm, 404... It should be redirecting to this site instead: http://mongrel.cloudbur.st/ Evan: can you confirm? -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams From evan at cloudbur.st Thu Feb 21 20:35:45 2008 From: evan at cloudbur.st (Evan Weaver) Date: Thu, 21 Feb 2008 20:35:45 -0500 Subject: [Mongrel] Mongrel web site down? In-Reply-To: <71166b3b0802211720l650283fs4f088ca2dc421415@mail.gmail.com> References: <47BE1153.5060600@pheonic.com> <71166b3b0802211720l650283fs4f088ca2dc421415@mail.gmail.com> Message-ID: Fixed. Apache typo. Evan On Thu, Feb 21, 2008 at 8:20 PM, Luis Lavena wrote: > On Thu, Feb 21, 2008 at 10:03 PM, Charles McKnight > wrote: > > Hi All, > > > > Is the web site down for a particular reason? :-) > > > > Hmm, 404... > > It should be redirecting to this site instead: > > http://mongrel.cloudbur.st/ > > Evan: can you confirm? > > -- > Luis Lavena > Multimedia systems > - > A common mistake that people make when trying to design > something completely foolproof is to underestimate > the ingenuity of complete fools. > Douglas Adams > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From evan at cloudbur.st Thu Feb 21 20:53:09 2008 From: evan at cloudbur.st (Evan Weaver) Date: Thu, 21 Feb 2008 20:53:09 -0500 Subject: [Mongrel] Trac is up Message-ID: Hello Mongrels, The official Mongrel website has finally been moved to Trac, as was discussed long ago on the list. http://mongrel.rubyforge.org The big benefits of this are a wiki, so that you guys can help keep the documentation up to date, a ticket tracker that doesn't make you claw your eyes out, and the changeset timeline and milestones, which make it easy to keep track of ongoing development. The SVN is still hosted on the Rubyforge project. Anyone can make a Trac account and edit the wiki; just sign up on the site. Thanks Evan -- Evan Weaver Cloudburst, LLC From evan at cloudbur.st Fri Feb 22 13:40:56 2008 From: evan at cloudbur.st (Evan Weaver) Date: Fri, 22 Feb 2008 13:40:56 -0500 Subject: [Mongrel] Trac is up In-Reply-To: References: Message-ID: Nice to see that some people have started editing the wiki already! Evan On Thu, Feb 21, 2008 at 8:53 PM, Evan Weaver wrote: > Hello Mongrels, > > The official Mongrel website has finally been moved to Trac, as was > discussed long ago on the list. > > http://mongrel.rubyforge.org > > The big benefits of this are a wiki, so that you guys can help keep > the documentation up to date, a ticket tracker that doesn't make you > claw your eyes out, and the changeset timeline and milestones, which > make it easy to keep track of ongoing development. The SVN is still > hosted on the Rubyforge project. > > Anyone can make a Trac account and edit the wiki; just sign up on the site. > > Thanks > > Evan > > -- > Evan Weaver > Cloudburst, LLC > -- Evan Weaver Cloudburst, LLC From lists at ruby-forum.com Sat Feb 23 22:30:01 2008 From: lists at ruby-forum.com (Chris Columbo) Date: Sun, 24 Feb 2008 04:30:01 +0100 Subject: [Mongrel] mongrel_rails not starting In-Reply-To: <1ca66680035dda3219c9ffad30ffb8c7@ruby-forum.com> References: <1a9d37f43d217a1fc71cf4975c556b07@ruby-forum.com> <325148f70801282350p1df4523bkb578341ad8ca486d@mail.gmail.com> <081753b578ecd29a33682bb1d1e56932@ruby-forum.com> <325148f70801290800x49c71a00j35590fb628fff38a@mail.gmail.com> <1ca66680035dda3219c9ffad30ffb8c7@ruby-forum.com> Message-ID: <46f30751fc49a1b1d073a226eec85941@ruby-forum.com> Hey all, I hope this isn't off topic here, but I had a similar problem with mongrel not starting (after i installed gem typo though) After a bunch of reading and stumbling upon this thread after a google search here's where i ended up... ( Note: im stil a mongrel / rails noob ) I checked the mongrel gems i had via the list gem mongrel. that printed... *** LOCAL GEMS *** mongrel (1.1.3, 1.0.1) mongrel_cluster (1.0.5) I then uninstalled mongrel 1.1.3 and mongrel_cluster, leaving only mongrel 1.0.1 That worked, i was then able to start mongrel. So maybe that helps maybe not, hope it does though. -- Posted via http://www.ruby-forum.com/. From normalperson at yhbt.net Sun Feb 24 03:54:53 2008 From: normalperson at yhbt.net (Eric Wong) Date: Sun, 24 Feb 2008 00:54:53 -0800 Subject: [Mongrel] ANNC: qrp - queueing reverse proxy Message-ID: <20080224085453.GA7552@soma> Hi, I've started a new project that uses Mongrel. It basically lets you defer requests to it until other Mongrels in your (Rails) pool becomes free. Rubyforge project page: http://rubyforge.org/projects/qrp/ gems, tarballs and git repo in case they haven't hit the mirrors yet: http://bogomips.org/ruby/ I should also add that nginx 0.6.7 or later is required for the "backup" feature I mention below in the README: Queueing Reverse Proxy (qrp) Ever pick the wrong line at the checkout counters in a crowded store? This is what happens to HTTP requests when you mix a multi-threaded Mongrel with Rails, which is single-threaded. qrp aims to be the simplest (worse-is-better) solution and have the lowest (adverse) impact to an existing setup. Background: An existing Rails site running Mongrel with nginx proxying to them. Unlike Apache, nginx fully buffers HTTP requests from clients before passing them off to Mongrels, which allows Mongrels to dedicate more cycles to running Rails itself. Problem: Rails is single-threaded; this is (probably) not easily fixable. By default, Mongrel will accept and queue requests while Rails is handling another request. Some Rails actions will take longer than others; and sometimes several seconds can be required to respond to an HTTP request. This problem is exacerbated if the Rails application queries third-party servers for information. Any queued requests inside Mongrel running Rails must wait until a slow Rails action has finished before they can run. If another Mongrel in the pool becomes free, then the requests that got queued behind a still-busy Mongrel would still be stuck and unable to get to the free Mongrel. Disabling concurrency on the Rails Mongrel (with "num_processors: 1" in the config)[1] will cause clients to be rejected outright and users will see 502 (Bad Gateway) errors. Bad Gateway errors getting returned to clients are bad, a slightly slower site is still better than a broken site. The developers also lack the resources to migrate to thread-safe platform (such as Merb or Waves) at the moment. Solution: Disable concurrency in Mongrels running Rails is part of the solution. Then setup a qrp or two as a backup member in your nginx configuration. Connections will normally go directly from nginx to Rails Mongrels (as before). However if all your regular Mongrels are busy, *then* nginx will send requests to the backup qrp instance(s). Once a request gets to qrp, qrp will retry the all the members in a given pool until a connection can be made and a response is returned. This avoids extra data copies of requests for the common (non-busy) case, and requires few changes to any existing infrastructure. Having fail_timeout=0 in the nginx config for every member of the Rails pool will allow nginx to immediately re-add a Rails Mongrel to the pool once the Rails Mongrel has finished processing. --- highlights of the nginx config: upstream mongrel { server 0:3000 fail_timeout=0; # Rails server 0:3001 fail_timeout=0; # Rails server 0:3002 fail_timeout=0; # Rails server 0:3003 fail_timeout=0; # Rails server 0:3500 backup; # qrp server 0:3501 backup; # qrp } --- highlights of the qrp config: # same Rails upstreams as in the nginx config upstreams: - 0:3000 - 0:3001 - 0:3002 - 0:3003 # ... --- highlight of the mongrel config[1]: num_processors: 1 Other existing solutions (and why I chose qrp): Fair-proxy balancer patch for nginx - this can keep new connections away from busy Mongrels, but if all (concurrency-disabled) Mongrels in your pool get busy, then you'll still get 502 errors. HAProxy - This will queue requests for you, but only if it makes all the connections to the backends itself. This means you cannot make other HTTP connections to the backends without confusing HAProxy; which (IMHO) defeats the purpose of using HTTP over a custom protocol. Swiftiply - admittedly I haven't tried it. It seems to require changes to our current infrastructure in deployment and monitoring tools. Additionally, the extra layer between nginx and Mongrel hurts performance for _every_ request, not just those that get unlucky. This also seems to take away the flexibility of being able to talk to any individual Mongrel process using plain HTTP. Footnotes: [1] - The current version of mongrel (1.1.3) does not handle the -n/--num-procs command-line option, and hence the current mongrel_cluster (1.0.5) is broken with it: http://mongrel.rubyforge.org/ticket/14 A better solution would be to use mongrel_cow_cluster (also a development of mine) as it handles the "num_processors:" directive correctly in the config file and also supports rolling restarts. /EOF -- Eric Wong From nvick77 at gmail.com Sun Feb 24 13:47:39 2008 From: nvick77 at gmail.com (Nate Vick) Date: Sun, 24 Feb 2008 10:47:39 -0800 Subject: [Mongrel] mongrel_rails not starting In-Reply-To: <46f30751fc49a1b1d073a226eec85941@ruby-forum.com> References: <1a9d37f43d217a1fc71cf4975c556b07@ruby-forum.com> <325148f70801282350p1df4523bkb578341ad8ca486d@mail.gmail.com> <081753b578ecd29a33682bb1d1e56932@ruby-forum.com> <325148f70801290800x49c71a00j35590fb628fff38a@mail.gmail.com> <1ca66680035dda3219c9ffad30ffb8c7@ruby-forum.com> <46f30751fc49a1b1d073a226eec85941@ruby-forum.com> Message-ID: <1F4507DC-EA6C-4CA3-9203-998EE0F396B6@gmail.com> Hey Chris, That seemed to fix my problem. I had to uninstall mongrel 1.1 and install 1.0.1 to get my script to work. Thanks, Nate Vick Technical Ministry New Heights Church On Feb 23, 2008, at 7:30 PM, Chris Columbo wrote: > Hey all, > > I hope this isn't off topic here, but I had a similar problem with > mongrel not starting (after i installed gem typo though) After a bunch > of reading and stumbling upon this thread after a google search here's > where i ended up... ( Note: im stil a mongrel / rails noob ) > > I checked the mongrel gems i had via the list gem mongrel. that > printed... > > *** LOCAL GEMS *** > > mongrel (1.1.3, 1.0.1) > mongrel_cluster (1.0.5) > > I then uninstalled mongrel 1.1.3 and mongrel_cluster, leaving only > mongrel 1.0.1 > > That worked, i was then able to start mongrel. > So maybe that helps maybe not, hope it does though. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From public at misuse.org Sun Feb 24 14:24:05 2008 From: public at misuse.org (Steve Midgley) Date: Sun, 24 Feb 2008 11:24:05 -0800 Subject: [Mongrel] ANNC: qrp - queueing reverse proxy In-Reply-To: References: Message-ID: <20080224192419.8C98A185861E@rubyforge.org> Hi Eric, This is very interesting - thanks for your notification on qrp. I have a question for you. I believe there is an nginx module called "fair proxy" which is supposed to be intelligent about queuing requests so that only "free mongrels" (i.e. mongrels without an active Rails task running) receive requests. Ezra blogged it here: http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel I wonder how what you're working on differs and/or improves on this system (obviously the architecture is different but I'm wondering about performance/effect)? Would there be a reason to run both? Would your tool be preferred in some circumstances to the nginx fair proxy balancer? If so, what kind of circumstances? Or do they basically solve the same problem at different points in the stack? Thanks for any additional detail on your very interesting project! Sincerely, Steve At 10:47 AM 2/24/2008, mongrel-users-request at rubyforge.org wrote: >Date: Sun, 24 Feb 2008 00:54:53 -0800 >From: Eric Wong >Subject: [Mongrel] ANNC: qrp - queueing reverse proxy >To: mongrel-users at rubyforge.org >Message-ID: <20080224085453.GA7552 at soma> >Content-Type: text/plain; charset=us-ascii > >Hi, I've started a new project that uses Mongrel. It basically >lets you defer requests to it until other Mongrels in your (Rails) >pool becomes free. > >Rubyforge project page: > http://rubyforge.org/projects/qrp/ > >gems, tarballs and git repo in case they haven't hit the mirrors yet: > http://bogomips.org/ruby/ > >I should also add that nginx 0.6.7 or later is required for the >"backup" feature I mention below in the README: > > >Queueing Reverse Proxy (qrp) > > Ever pick the wrong line at the checkout counters in a crowded > store? > This is what happens to HTTP requests when you mix a multi-threaded > Mongrel with Rails, which is single-threaded. > > qrp aims to be the simplest (worse-is-better) solution and have the > lowest (adverse) impact to an existing setup. > > >Background: > > An existing Rails site running Mongrel with nginx proxying to them. > > Unlike Apache, nginx fully buffers HTTP requests from clients > before > passing them off to Mongrels, which allows Mongrels to dedicate > more > cycles to running Rails itself. From normalperson at yhbt.net Sun Feb 24 17:51:31 2008 From: normalperson at yhbt.net (Eric Wong) Date: Sun, 24 Feb 2008 14:51:31 -0800 Subject: [Mongrel] ANNC: qrp - queueing reverse proxy In-Reply-To: <20080224192420.680347F40FA@hand.yhbt.net> References: <20080224192420.680347F40FA@hand.yhbt.net> Message-ID: <20080224225130.GA10426@soma> Steve Midgley wrote: > Hi Eric, > > This is very interesting - thanks for your notification on qrp. I have > a question for you. I believe there is an nginx module called "fair > proxy" which is supposed to be intelligent about queuing requests so > that only "free mongrels" (i.e. mongrels without an active Rails task > running) receive requests. > > Ezra blogged it here: > > http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel Hi Steven, I noted it in the README and original announcement: > > Other existing solutions (and why I chose qrp): > > > > Fair-proxy balancer patch for nginx - this can keep new connections > > away from busy Mongrels, but if all (concurrency-disabled) Mongrels in > > your pool get busy, then you'll still get 502 errors. > I wonder how what you're working on differs and/or improves on this > system (obviously the architecture is different but I'm wondering about > performance/effect)? > > Would there be a reason to run both? Would your tool be preferred in > some circumstances to the nginx fair proxy balancer? If so, what kind > of circumstances? Or do they basically solve the same problem at > different points in the stack? I believe my solution is better for the worst-case scenario when all Mongrels are busy servicing requests and another new request comes in. The fair proxy balancer would give 502s if I disabled concurrency in the Mongrels. Leaving concurrency in the Mongrels while Rails is single-threaded is not a comfortable solution, either; mainly because requests can still end up waiting on the current one. Imagine this scenario with the fair proxy balancer + Mongrel concurrency: 10 mongrels, and 10 concurrent requests => all good, requests would be evenly distributed If there are 20 concurrent requests on 10 Mongrels, then each Mongrel would be processing two requests each. If *one* of the first ten requests is a slow one, then the second request in that Mongrel could be stuck waiting even after the other 18 requests are happily finished. This is why I'm not comfortable having concurrency in Mongrel + Rails I haven't benchmarked the two, but if I had to bet money on it, I'd say nginx fair balancer + Mongrel concurrency would be slighly faster on the average case than my solution. It's just the odd pedantic case I'm worried about. So the average processing time of a request going from 200ms to 150ms doesn't mean a whole lot to me, it's somebody that's stuck behind a 10s request when all they want is a 200ms request that bothers me. Running both could work, but I'd prefer to keep nginx as stupidly simple as possible. I actually considered adding retry/queueing logic to nginx, but it would be a more complex addition to the event loop. I actually discovered how the "backup" directive worked when reading the nginx source and investigating adding queueing to nginx. Mine relies on nginx 0.6.7 or later for the "backup" directive. Using nginx 0.6.x may be too scary for some people, but the site I wrote qrp for has been using nginx 0.6.x since before I was hired to work on it, and it works pretty well. > Thanks for any additional detail on your very interesting project! You're welcome :> -- Eric Wong From matthew.langham at indiginox.com Mon Feb 25 03:57:20 2008 From: matthew.langham at indiginox.com (Matthew Langham) Date: Mon, 25 Feb 2008 09:57:20 +0100 Subject: [Mongrel] Upgrading from 1.0.1 to 1.0.5 In-Reply-To: <20080224085453.GA7552@soma> References: <20080224085453.GA7552@soma> Message-ID: Hi, we have a project where mongrel 1.0.1 has been in use in production for a few months now. Everything works fine except we run into marked performance problems if the setup has been running a couple of weeks without a restart. The general performance slows down quite a bit but restarting everything brings it back to normal. So we are looking at areas that could be relevant and therefore considering upgrading mongrel to 1.0.5. Can anyone provide insight on whether this could help our performance issues? Thanks Matthew From luislavena at gmail.com Mon Feb 25 11:22:53 2008 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 25 Feb 2008 14:22:53 -0200 Subject: [Mongrel] Upgrading from 1.0.1 to 1.0.5 In-Reply-To: References: <20080224085453.GA7552@soma> Message-ID: <71166b3b0802250822t5ce15edeu1c7714b9c44cff82@mail.gmail.com> On Mon, Feb 25, 2008 at 6:57 AM, Matthew Langham wrote: > Hi, > > we have a project where mongrel 1.0.1 has been in use in production > for a few months now. Everything works fine except we run into marked > performance problems if the setup has been running a couple of weeks > without a restart. The general performance slows down quite a bit but > restarting everything brings it back to normal. > > So we are looking at areas that could be relevant and therefore > considering upgrading mongrel to 1.0.5. > > Can anyone provide insight on whether this could help our performance > issues? > Maybe no-one will comment this, but most of the "long running process" problems are not (directly) Mongrel related, but Rails related. It seems quite common blame Mongrel because it hides behind a simple "mongrel_rails" script or a cluster of mongrels. But after all, mongrel is running your Rails application. period. Mongrel offers to Rails a layer to process the HTTP protocol and serve the CGI-like information to the Rails Dispatcher, nothing more, nothing less. If you don't provide/create custom handlers (in mongrel) that's the most Mongrel do for Rails. I've seen several memory leaks from Rails, and tried to pinpoint some of them, ended repeating the work done in the past by others but that never got integrated into Ruby or Rails core. Like, for example, the Benchmark::realtime "abuse" that Rails do and the huge amount of memory it allocated in the past (now fixed in Ruby trunk and 1_8 branch). Migrating to Mongrel 1.0.5 wouldn't fix that, and you will keep blaming Mongrel for the problem. I'll suggest you plan a monit/god sweep and respawn strategy for your rails processes. Besides that, guess is time for you to start looking at things your application is using to became slower with the time: - Use of image processing plugins/extensions/gems like RMagick - Files opened without proper closing (File.open without a block or file#close after use of it). - String concatenation using += instead of << - Misused queries over associations in your ActiveRecord models (use of length to determine the size of a associated array instead of .size). Those are the more common mistakes. HTH, -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams From matthew.langham at indiginox.com Mon Feb 25 11:49:26 2008 From: matthew.langham at indiginox.com (Matthew Langham) Date: Mon, 25 Feb 2008 17:49:26 +0100 Subject: [Mongrel] Upgrading from 1.0.1 to 1.0.5 In-Reply-To: <71166b3b0802250822t5ce15edeu1c7714b9c44cff82@mail.gmail.com> References: <20080224085453.GA7552@soma> <71166b3b0802250822t5ce15edeu1c7714b9c44cff82@mail.gmail.com> Message-ID: Hi Luis, I wasn't blaming mongrel for the performance problems in general. I realize that we need to look at the Rails application as well. My question was more along the lines of whether we would see any _additional_ gains in using a newer version of mongrel. Thanks for all your points. Matthew On 25.02.2008, at 17:22, Luis Lavena wrote: > On Mon, Feb 25, 2008 at 6:57 AM, Matthew Langham > wrote: >> Hi, >> >> we have a project where mongrel 1.0.1 has been in use in production >> for a few months now. Everything works fine except we run into marked >> performance problems if the setup has been running a couple of weeks >> without a restart. The general performance slows down quite a bit but >> restarting everything brings it back to normal. >> >> So we are looking at areas that could be relevant and therefore >> considering upgrading mongrel to 1.0.5. >> >> Can anyone provide insight on whether this could help our performance >> issues? >> > > Maybe no-one will comment this, but most of the "long running process" > problems are not (directly) Mongrel related, but Rails related. > > It seems quite common blame Mongrel because it hides behind a simple > "mongrel_rails" script or a cluster of mongrels. But after all, > mongrel is running your Rails application. period. > > Mongrel offers to Rails a layer to process the HTTP protocol and serve > the CGI-like information to the Rails Dispatcher, nothing more, > nothing less. > > If you don't provide/create custom handlers (in mongrel) that's the > most Mongrel do for Rails. > > I've seen several memory leaks from Rails, and tried to pinpoint some > of them, ended repeating the work done in the past by others but that > never got integrated into Ruby or Rails core. > > Like, for example, the Benchmark::realtime "abuse" that Rails do and > the huge amount of memory it allocated in the past (now fixed in Ruby > trunk and 1_8 branch). > > Migrating to Mongrel 1.0.5 wouldn't fix that, and you will keep > blaming Mongrel for the problem. > > I'll suggest you plan a monit/god sweep and respawn strategy for your > rails processes. > > Besides that, guess is time for you to start looking at things your > application is using to became slower with the time: > > - Use of image processing plugins/extensions/gems like RMagick > - Files opened without proper closing (File.open without a block or > file#close after use of it). > - String concatenation using += instead of << > - Misused queries over associations in your ActiveRecord models (use > of length to determine the size of a associated array instead of > .size). > > Those are the more common mistakes. > > HTH, > -- > Luis Lavena > Multimedia systems > - > A common mistake that people make when trying to design > something completely foolproof is to underestimate > the ingenuity of complete fools. > Douglas Adams > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > ---- Matthew Langham Gesch?ftsf?hrer / Managing Director Tel: +49 (0) 5251 6948 293 Mobile: +49 (0)172 5749305 Indiginox GmbH Frankfurter Weg 6, 33106 Paderborn, Germany HRB Paderborn 8130 Gesch?ftsf?hrer / Managing Directors: Matthew Langham / Ashley Steele From luislavena at gmail.com Mon Feb 25 12:07:14 2008 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 25 Feb 2008 15:07:14 -0200 Subject: [Mongrel] Upgrading from 1.0.1 to 1.0.5 In-Reply-To: References: <20080224085453.GA7552@soma> <71166b3b0802250822t5ce15edeu1c7714b9c44cff82@mail.gmail.com> Message-ID: <71166b3b0802250907v3caaebe7ub9b6dd4b8131a50a@mail.gmail.com> On Mon, Feb 25, 2008 at 2:49 PM, Matthew Langham wrote: > Hi Luis, > > I wasn't blaming mongrel for the performance problems in general. I > realize that we need to look at the Rails application as well. > Don't worry, I know you didn't, but that post will serve as pointer for future rants ;-) Anyway... > My question was more along the lines of whether we would see any > _additional_ gains in using a newer version of mongrel. I've not seen a "huge" difference between these versions (performance speaking). In any case, it fixed a few issues with mongrel_rails parameters and some security issues with DirHandler, only if you served directly Mongrel and not behind apache or nginx. Forgot to mention: check what are you logging in your log/ files, and how big the became... Ruby don't play nice with bigger files (neither most of the dynamic languages I know of) > Thanks for all your points. No problem man, don't take them personally :-) -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams From cnk at caltech.edu Tue Feb 26 01:00:18 2008 From: cnk at caltech.edu (Cynthia Kiser) Date: Mon, 25 Feb 2008 22:00:18 -0800 Subject: [Mongrel] Mongrel won't start as user nobody In-Reply-To: <659297e90802211136v356517e0xd0080d9b1a11a3e1@mail.gmail.com> References: <659297e90802211136v356517e0xd0080d9b1a11a3e1@mail.gmail.com> Message-ID: <20080226060018.GB11003@inky.caltech.edu> Check to see if the user nobody can run 'gem list'. I saw errors similar to this from some gems installed with too restrictive permissions. Quoting Andrew Ohnstad : > Hi all, > > My mongrel cluster runs perfectly if I allow it to run as root, but whenever > I try to change things to nobody/nobody my mongrels refuse to start and the > following shows up in the mongrel logs. I have checked all the relevant > file permissions and "nobody" should be able to access everything needed. > > ** Starting Mongrel listening at 127.0.0.1:9000 > ** Initiating groups for "nobody":"nobody". > ** Changing group to "nobody". > ** Changing user to "nobody". > ** Starting Rails with development environment... > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- /usr/local/lib/ruby/ > gems/1.8/gems/rails-1.2.6/lib/initializer (LoadError) > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:27:in `require' > from /opt/csw/apache2/share/htdocs/apps/boffable_development/ > trunk/config/boot.rb:30 From mohammed.a at aol.in Tue Feb 26 03:25:46 2008 From: mohammed.a at aol.in (mohammed.a at aol.in) Date: Tue, 26 Feb 2008 03:25:46 -0500 Subject: [Mongrel] problems with Mongrel + Pound Message-ID: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> Hi, I have been using mongrel + Pound for the past 6 months on a single server deployment. Recently mongrel has started to behave very weirdly after we?moved app to a bunch of servers from a single server deployment. - It crashes on every exception, throws 500 and throws 500 for ALL instances of the cluster? after one exception has occurred - Connectivity to SQL seems to take a rather long time (the db is a different server on the same network, servers are connected through a gigaport switch) - Images deliveries have slowed down since we migrated from single server to multi server deployment (still using pound, not yet moved to apache / nginx) - The application architecture uses lot of background processes?- built using?DRB which again are deployed physically on different dedicated machines to distribute load - ?Mongrel doesn't always log the error 500 within its logs (mongrel may not be getting these requests). -? Other mongrel instances in the same cluster do not respond even if one mongrel has crashed or has encountered an exception. Here is some basic info of the deployment 3 web servers - Dualcore Dell servers with Xeon 2.0 ghz processor running Cent OS 5 4 GB Ram Each 1 seperate components server - for threaded Drbs, same config as above 1 seperate database server (not yet clustered, same config as above) I would appreciate if anyone can analyze the issues and provide me a solution as it is becoming frustrating to have too much down time in the application regards Mohammed ________________________________________________________________________ You are invited to Get a Free AOL Email ID. - http://webmail.aol.in -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080226/0a14f146/attachment-0001.html From dave at cheney.net Tue Feb 26 04:05:26 2008 From: dave at cheney.net (Dave Cheney) Date: Tue, 26 Feb 2008 20:05:26 +1100 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> Message-ID: <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> What version of ruby are you running ruby -v On 26/02/2008, at 7:25 PM, mohammed.a at aol.in wrote: > 3 web servers - Dualcore Dell servers with Xeon 2.0 ghz processor > running Cent OS 5 From mohammed.a at aol.in Tue Feb 26 05:44:06 2008 From: mohammed.a at aol.in (mohammed.a at aol.in) Date: Tue, 26 Feb 2008 05:44:06 -0500 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> Message-ID: <8CA467BA54ED6F0-D0C-3859@web-cen-v02.sim.aol.com> Dave, Here is the version of Ruby along with other Gems installed ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] *** LOCAL GEMS *** abstract (1.0.0) ??? a library which enable you to define abstract method in Ruby actionmailer (1.3.6, 1.3.5) ??? Service layer for easy email delivery and testing. actionpack (1.13.6, 1.13.5) ??? Web-flow and rendering framework putting the VC in MVC. actionwebservice (1.2.6, 1.2.5) ??? Web service support for Action Pack. activerecord (1.15.6) ??? Implements the ActiveRecord pattern for ORM. activesupport (2.0.2, 1.4.4) ??? Support and utility classes used by the Rails framework. ap4r (0.3.5) ??? Asynchr onous Processing for Ruby. archive-tar-minitar (0.5.1) ??? Provides POSIX tarchive management from Ruby programs. builder (2.1.2) ??? Builders for MarkUp. cached_model (1.3.1) ??? An ActiveRecord abstract model that caches records in memcached capistrano (2.1.0) ??? Capistrano is a utility and framework for executing commands in ??? parallel on multiple remote machines, via SSH. cgi_multipart_eof_fix (2.5.0, 2.3) ??? Fix an exploitable bug in CGI multipart parsing. color (1.4.0) ??? Colour management with Ruby color-tools (1.3.0) ??? color-tools provides colour space definition and manpiulation as ??? well as commonly named RGB colours. daemo ns (1.0.9) ??? A toolkit to create and control daemons in different ways documatic (0.1.0) ??? Documatic is an OpenDocument extension for Ruby Reports (Ruport). It ??? is a template-driven formatter that can be used to produce ??? attractive printable documents such as database reports, invoices, ??? letters, faxes and more. erubis (2.4.1) ??? a fast and extensible eRuby implementation which supports ??? multi-language ezcrypto (0.7) ??? Simplified encryption library. fastercsv (1.2.3, 1.2.1) ??? FasterCSV is CSV, but faster, smaller, and cleaner. fastthread (1.0.1) ??? Optimized replacement for thread.rb primitives gem_plugin (0.2 .3) ??? A plugin system based on rubygems that uses dependencies only gruff (0.2.8) ??? Beautiful graphs for one or multiple datasets. highline (1.4.0) ??? HighLine is a high-level command-line IO library. hoe (1.5.0, 1.3.0) ??? Hoe is a simple rake/rubygems helper for project Rakefiles hpricot (0.6) ??? a swift, liberal HTML parser with a fantastic library localization_generator (1.0.8) ??? [Rails] Localization generator. log4r (1.0.5) ??? Log4r is a comprehensive and flexible logging library for Ruby. mailfactory (1.2.3) ??? MailFactory is a pure-ruby MIME mail generator memcache-client (1.5.0) ??? A Ruby memcached client merb (0 .4.1) ??? Merb == Mongrel + Erb. Pocket rocket web framework. mime-types (1.15) ??? Manages a MIME Content-Type that will return the Content-Type for a ??? given filename. mongrel (1.1.1) ??? A small fast HTTP library and server that runs Rails, Camping, Nitro ??? and Iowa apps. mongrel_cluster (1.0.5) ??? Mongrel plugin that provides commands and Capistrano tasks for ??? managing multiple Mongrel processes. needle (1.3.0) ??? Needle is a Dependency Injection/Inversion of Control container for ??? Ruby. It supports both type-2 (setter) and type-3 (constructor) ??? injection. It takes advantage of the dynamic nature of Ruby 20to ??? provide a rich and flexible approach to injecting dependencies. net-sftp (1.1.0) ??? Net::SFTP is a pure-Ruby implementation of the SFTP client protocol. net-ssh (1.1.2) ??? Net::SSH is a pure-Ruby implementation of the SSH2 client protocol. pdf-writer (1.1.7) ??? A pure Ruby PDF document creation library. rails (1.2.6) ??? Web-application framework with template engine, control-flow layer, ??? and ORM. rails_analyzer_tools (1.4.0) ??? Tools for analyzing the performance of web sites. railsmachine (1.0.0) ??? The Rails Machine task library rake (0.8.1, 0.7.3) ??? Ruby based make-like utility. RedCloth (3.0.4) ??? RedCl oth is a module for using Textile and Markdown in Ruby. Textile ??? and Markdown are text formats.? A very simple text format. Another ??? stab at making readable text that can be converted to HTML. reliable-msg (1.1.0) ??? Reliable messaging and persistent queues for building asynchronous ??? applications in Ruby rmagick (2.2.2) ??? Ruby binding to ImageMagick rubigen (1.2.3, 1.1.1) ??? A framework to allow Ruby applications to generate file/folder stubs ??? (like the rails command does for Ruby on Rails, and the ??? ?script/generate? command within a Rails application during ??? development). ruby-debug (0.10.0) ?? C2 Command line interface (CLI) for ruby-debug-base ruby-debug-base (0.10.0, 0.9.3) ??? Fast Ruby debugger - core component ruby-debug-ide (0.1.9) ??? IDE interface for ruby-debug. rubyforge (0.4.4) ??? A script which automates a limited set of rubyforge operations. rubyzip (0.9.1) ??? rubyzip is a ruby module for reading and writing zip files ruport (1.4.0) ??? A generalized Ruby report generation and templating engine. ruport-util (0.8.0) ??? A set of tools and helper libs for Ruby Reports salted_login_generator (1.1.1) ??? [Rails] Login generator with salted passwords. scruffy (0.2.2) ??? A powerful, clean graphing library for Ruby. sources (0.0.1) ??? This package provides download sources for remote gem installation sql_dep_graph (1.0.0) ??? Graphs table dependencies based on usage from SQL logs SyslogLogger (1.4.0) ??? SyslogLogger is a Logger replacement that logs to syslog.? It is ??? almost drop-in with a few caveats. tlsmail (0.0.1) ??? This library enables pop or smtp via ssl/tls by dynamically ??? replacing these classes to these in ruby 1.9. transaction-simple (1.4.0) ??? Simple object transaction support for Ruby. uuid (1.0.4) ??? UUID generator ZenTest (3.9.1, 3.6.1) ??? ZenTest provides 4 different tools and 1 library: zentest, ??? unit_diff , autotest, multiruby, and Test::Rails regards Mohammed -----Original Message----- From: Dave Cheney To: mongrel-users at rubyforge.org Sent: Tue, 26 Feb 2008 2:35 pm Subject: Re: [Mongrel] problems with Mongrel + Pound What version of ruby are you running ruby -v On 26/02/2008, at 7:25 PM, mohammed.a at aol.in wrote: > 3 web servers - Dualcore Dell servers with Xeon 2.0 ghz processor running Cent OS 5 _______________________________________________ ongrel-users mailing list ongrel-users at rubyforge.org ttp://rubyforge.org/mailman/listinfo/mongrel-users ________________________________________________________________________ You are invited to Get a Free AOL Email ID. - http://webmail.aol.in -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080226/ffd1e69f/attachment.html From zedshaw at zedshaw.com Wed Feb 27 08:39:55 2008 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Wed, 27 Feb 2008 08:39:55 -0500 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> Message-ID: <20080227083955.c31070aa.zedshaw@zedshaw.com> On Tue, 26 Feb 2008 03:25:46 -0500 mohammed.a at aol.in wrote: > Hi, > > I have been using mongrel + Pound for the past 6 months on a single server deployment. > > Recently mongrel has started to behave very weirdly after we?moved app to a bunch of servers from a single server deployment. These answers might help: > - It crashes on every exception, throws 500 and throws 500 for ALL instances of the cluster? after one exception has occurred For the crashes and database problems, make sure you have the mysql or postgresql gem installed and that it's using the actual binary library not the Rails built-in stuff. The built-in driver for those databases is bad and causes exceptions, lost connections, etc. > - Connectivity to SQL seems to take a rather long time (the db is a different server on the same network, servers are connected through a gigaport switch) Rule out your network config before you assume it's a *Rails* issue (not a mongrel issue). Try running a few simple scripts and test the perf, then start from the most basic network config like half-duplex and see what you can find. > - Images deliveries have slowed down since we migrated from single server to multi server deployment (still using pound, not yet moved to apache / nginx) Yeah, time to upgrade to nginx. Nginx is actually easier to configure than pound, makes more sense in the config, and is a hell of a lot faster and stable. Especially for having it serve static files. Just drop pound. > - The application architecture uses lot of background processes?- built using?DRB which again are deployed physically on different dedicated machines to distribute load Yeah, this really makes me wonder what you're doing. I'd go and double and triple check every line of code and watch network traffic to make sure you aren't doing something dumb like sending huge files over DRb. I'm guessing you've got something dumb that's overloading the Ruby interpreter. > - ?Mongrel doesn't always log the error 500 within its logs (mongrel may not be getting these requests). Mongrel doesn't log most stuff, rails does. Check in the production.log file and see what's there. > -? Other mongrel instances in the same cluster do not respond even if one mongrel has crashed or has encountered an exception. That sounds like Pound more than anything. Isolate the difference between a connection to pound and one to mongrel. > Here is some basic info of the deployment With this much hardware you should be able to crank tons of requests through the system. If you have this many problems, it's entirely in your design. Remember, tons and tons of other people do way more with much less. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From ezmobius at gmail.com Tue Feb 26 14:53:10 2008 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Tue, 26 Feb 2008 11:53:10 -0800 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: <8CA467BA54ED6F0-D0C-3859@web-cen-v02.sim.aol.com> References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> <8CA467BA54ED6F0-D0C-3859@web-cen-v02.sim.aol.com> Message-ID: Hi~ On Feb 26, 2008, at 2:44 AM, mohammed.a at aol.in wrote: > Dave, > > Here is the version of Ruby along with other Gems installed > > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] This version of ruby has serious bugs! You need to either down grade to ruby 1.8.5 or upgrade to ruby 1.8.6 p 111. You need at least patch level 110 or else do not use 1.8.6 Cheers- - Ezra Zygmuntowicz -- Founder & Software Architect -- ezra at engineyard.com -- EngineYard.com From boss at airbladesoftware.com Tue Feb 26 15:10:44 2008 From: boss at airbladesoftware.com (Andrew Stewart) Date: Tue, 26 Feb 2008 20:10:44 +0000 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> <8CA467BA54ED6F0-D0C-3859@web-cen-v02.sim.aol.com> Message-ID: On 26 Feb 2008, at 19:53, Ezra Zygmuntowicz wrote: >> ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] > > This version of ruby has serious bugs! You need to either down grade > to ruby 1.8.5 or upgrade to ruby 1.8.6 p 111. You need at least patch > level 110 or else do not use 1.8.6 Thanks for that tip -- I checked my Ruby installation and found it was that very same buggy version. I hadn't realised it was flawed.... Regards, Andy Stewart ------- http://airbladesoftware.com From mohammed.a at aol.in Wed Feb 27 02:42:03 2008 From: mohammed.a at aol.in (mohammed.a at aol.in) Date: Wed, 27 Feb 2008 02:42:03 -0500 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> <8CA467BA54ED6F0-D0C-3859@web-cen-v02.sim.aol.com> Message-ID: <8CA472B61107470-D0C-3E7E@web-cen-v02.sim.aol.com> Zed, Emobius, Thank you for the replies. Here's what I found - mysql gem was not installed and that maybe a core source of problems as suggested by Zed. We've had? too many problems when we tried to install this, and found that none of the solutions that are mentioned really work. We will try to install this gem again. An application that we built using DRB designed to be asynchronous failed to process asynchronous requests, had each instance of ruby piling up request queues and subsequently throwing errors (as all ports were getting requests continuously). I will be keen to get inputs from anyone who has used DRB instead of AP4R for asynchronous requests Ruby version is 1.8.6 (we're upgrading this today night) Ngnix - we're trying this out today on our staging machines and after it is found to be stable, we will move to production. Temporarily, we've moved from DRB to AP4R for asynchronous processing. Personally, I am still comfortable with DRB than AP4R but that is another discussion altogether. ---- Another question: Are there benchmarked transaction statistics on standard hardware for ROR / mongrel platform (similar to whats available on TPC.org?). We're looking at benchmarking our system to initially support 10m requests per day (consider each one to be a simple find_by_sql query against a database of 1000 requests + 1 asynchronous process for billing. regards Mohammed. A -----Original Message----- From: Andrew Stewart To: mongrel-users at rubyforge.org Sent: Wed, 27 Feb 2008 1:40 am Subject: Re: [Mongrel] problems with Mongrel + Pound On 26 Feb 2008, at 19:53, Ezra Zygmuntowicz wrote: >> ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] > > This version of ruby has serious bugs! You need to either down grade > to ruby 1.8.5 or upgrade to ruby 1.8.6 p 111. You need at least patch > level 110 or else do not use 1.8.6 Thanks for that tip -- I checked my Ruby installation and found it was that very same buggy version. I hadn't realised it was flawed.... Regards, Andy Stewart ------- http://airbladesoftware.com _______________________________________________ Mongrel-users mailing list Mongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users ________________________________________________________________________ You are invited to Get a Free AOL Email ID. - http://webmail.aol.in -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080227/f4122624/attachment.html From dave at cheney.net Wed Feb 27 02:59:48 2008 From: dave at cheney.net (Dave Cheney) Date: Wed, 27 Feb 2008 18:59:48 +1100 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: <8CA472B61107470-D0C-3E7E@web-cen-v02.sim.aol.com> References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> <8CA467BA54ED6F0-D0C-3859@web-cen-v02.sim.aol.com> <8CA472B61107470-D0C-3E7E@web-cen-v02.sim.aol.com> Message-ID: <00B61B4A-1D5E-4EEA-88F8-613DB9A02EFB@cheney.net> I hacked our vendor tree to explode on startup if the mysql gem could not be found. IMHO this should be the default behavior, the built in mysql adapter is crap and its silent use is a ticking time bomb Cheers Dave On 27/02/2008, at 6:42 PM, mohammed.a at aol.in wrote: > Thank you for the replies. > > Here's what I found - mysql gem was not installed and that maybe a > core source of problems as suggested by Zed. We've had too many > problems when we tried to install this, and found that none of the > solutions that are mentioned really work. We will try to install > this gem again. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080227/fd367a4d/attachment.html From piyush.pr at gmail.com Wed Feb 27 03:20:34 2008 From: piyush.pr at gmail.com (Piyush Ranjan) Date: Wed, 27 Feb 2008 13:50:34 +0530 Subject: [Mongrel] problems with Mongrel + Pound In-Reply-To: <00B61B4A-1D5E-4EEA-88F8-613DB9A02EFB@cheney.net> References: <8CA466852327A10-D0C-3759@web-cen-v02.sim.aol.com> <24E69670-2EB4-43B1-9897-46314FD06857@cheney.net> <8CA467BA54ED6F0-D0C-3859@web-cen-v02.sim.aol.com> <8CA472B61107470-D0C-3E7E@web-cen-v02.sim.aol.com> <00B61B4A-1D5E-4EEA-88F8-613DB9A02EFB@cheney.net> Message-ID: <325148f70802270020g55b091fay5f0ef84bc415eccc@mail.gmail.com> To install mysql gem you need to specify the mysql_config path(if it is not installed then into mysql dev or devel package) To install sudo gem install mysql -- --with-mysql-config= And your problems are similar(not same) I used to encounter. I had these problems with my mongrel handler when it used to write to database in asynchronous queries by the users. Log file used to scream connection lost to mysql. After spending a few days trying to boost up my mysql server I did the gem install and since then it has handled 100K + queries (the mongrel handler part of the app)each day without any problem whatsoever. Also switch to apache/ngnix if you can. Pound could also be the trouble maker though I am not very sure about this comment. On Wed, Feb 27, 2008 at 1:29 PM, Dave Cheney wrote: > I hacked our vendor tree to explode on startup if the mysql gem could not > be found. IMHO this should be the default behavior, the built in mysql > adapter is crap and its silent use is a ticking time bomb > Cheers > > Dave > > On 27/02/2008, at 6:42 PM, mohammed.a at aol.in wrote: > > Thank you for the replies. > > Here's what I found - mysql gem was not installed and that maybe a core > source of problems as suggested by Zed. We've had too many problems when we > tried to install this, and found that none of the solutions that are > mentioned really work. We will try to install this gem again. > > > > _______________________________________________ > 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/20080227/d2950aa6/attachment.html From lists at ruby-forum.com Wed Feb 27 18:58:29 2008 From: lists at ruby-forum.com (Adam Groves) Date: Thu, 28 Feb 2008 00:58:29 +0100 Subject: [Mongrel] RedirectHandler Message-ID: <1ae740b0a382b3a2288b78d3532736fa@ruby-forum.com> Hi, I'm a bit stumped as to how to use Mongrel::RedirectHandler I've got a config script in my rails lib directory call assets.rb assets.rb contains: uri "/assets", :handler => Mongrel::RedirectHandler.new("/path/to/redirect/to"), :in_front => true How to I get this to redirect assets/foo.jpg to /assets/subdirectory/foo.jpg. HOw do I access the request parameters? Regards Adam Groves -- Posted via http://www.ruby-forum.com/. From seti at tquadrado.com Fri Feb 29 10:57:55 2008 From: seti at tquadrado.com (pedro mg) Date: Fri, 29 Feb 2008 15:57:55 +0000 Subject: [Mongrel] XSendFile in development environment In-Reply-To: <47879DF1.3080706@berkeley.edu> References: <6A144E9E-020E-4180-B929-DA10F220F119@ibexinternet.co.uk> <6f7401650801102040h7d8403b9h777c6facbc1ec6a1@mail.gmail.com> <47879DF1.3080706@berkeley.edu> Message-ID: unrelated, but on Lighttpd, I had to use @headers['X-LIGHTTPD-Send-file'] -- pedro g On 1/11/08, Steven Hansen wrote: > > > For what it's worth, I have a method that handles the logic for sending > the file. If the rails environment == 'production' it just sets the > headers to trigger apache x_send_file. Otherwise I just use the default > sendfile that comes with rails... > > > -Steven > > > > Alex Egg wrote: > > I believe this functionality doesn't exist in mongrel. > > > > On Jan 8, 2008 9:20 AM, Jeremy Wilkins wrote: > > > >> Hi > >> > >> I'm currently trying to use X-Sendfile to take some load off my rails > >> app, unfortunately in my development environment mongrel is happily > >> passing through the x-sendfile header, presumably for the (non- > >> existant) proxy to handle the header. > >> > >> Is there some way to make mongrel process the x-sendfile header itself? > >> > >> Thanks > >> > >> jebw From lists at ruby-forum.com Fri Feb 29 20:40:44 2008 From: lists at ruby-forum.com (Nathan Esquenazi) Date: Sat, 1 Mar 2008 02:40:44 +0100 Subject: [Mongrel] Offloading Background Tasks Message-ID: <2d8ffda38541bfdc3425ca8511bfcd00@ruby-forum.com> Hello everyone, I am very interested in off-loading tasks from the request/response cycle in order to speed up my application. My application is heavily connected to using web services both external and from other servers we host. My application does the following long-running tasks: - accesses / pushes to the twitter api's (with possible need for status responses) - accesses / pushes the facebook api's (with need for status responses) - requesting data from another server we run (rails needs access data) - pushes information to aim using ruburple I am just curious and grateful for any help people can give for what would suit me best. I am familar with backgroundrb and bj along with starling, etc. I don't know which one will suit me best based on the tasks I need to queue. My main concern is how to properly request data and then show it to the user. For instance, when the user logs into the rails application, I need to show them certain information about them which comes from complex analyzing of data done by another server we run. When a user logs in, I need to show them the current results of this analysis. To do this, I need to perform a GET request to another server and get the results and then show them to the user. What is the "best practice" way to achieve this in which I can offload this task to a background worker and then get the results and display them to the user. For instance, say the user logs in and then the background worker kicks off to retrieve their current analyzed data from the server. How do I then wait for the data to be retrieved by the worker and when it's ready display it to the user? I feel like I am missing something because I don't see how the worker can "tell" the main rails application that it now has the data and then somehow show it when its "ready". Do I need to constantly poll the server or how is this usually done. Also, I need to allow the user to make certain changes to data fields and then I need to push those changes to twitter and facebook via a background process. What solution is best suited based on what I described and could someone please help me understand the pattern for how to do this. I will be eternally grateful. -- Posted via http://www.ruby-forum.com/.