From lists at ruby-forum.com Mon Oct 4 09:45:08 2010 From: lists at ruby-forum.com (Amit Tomar) Date: Mon, 4 Oct 2010 15:45:08 +0200 Subject: [Mongrel] Found memory leakage in Mongrel Message-ID: <475304a47a06cd8a9c5a7245c0ccd011@ruby-forum.com> Hii ALL, Running ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32],Mongerl 1.1.5. Scenario /Observation : While uploading some large files,i Found memory leakage in mongrel.I start uploading large file what happen is files is being copied to mongerl temp file, from mongrel temp files to ruby temp file (cgi file) and then to actual location where i indend to...after upload complete ,after few seconds ruby temp files is collected(garbase collection)but mongrel temp file is still hanging in memory. I tried to upload again same procedure happens,This time after few seconds ruby temp files is collected + mongerl previous temp files is collected but the latest mongrel temp file is still there. What i would like to know is there any issue with mongrel ,if it is plzz let me know Thanks -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Oct 6 04:47:59 2010 From: lists at ruby-forum.com (Amit Tomar) Date: Wed, 6 Oct 2010 10:47:59 +0200 Subject: [Mongrel] how do i cofigure in mongrel's http_request.rb Message-ID: <82fb69c92dd94eebbf516f11732e8f57@ruby-forum.com> Hi all , Am looking to configure mongrels's http_request.rb in order to delete mongrel temporary file after upload .This is what i would like to have def initialize(params, socket, dispatchers) @params = params @socket = socket @dispatchers = dispatchers content_length = @params[Const::CONTENT_LENGTH].to_i remain = content_length - @params.http_body.length # tell all dispatchers the request has begun @dispatchers.each do |dispatcher| dispatcher.request_begins(@params) end unless @dispatchers.nil? || @dispatchers.empty? # Some clients (like FF1.0) report 0 for body and then send a body. This will probably truncate them but at least the request goes through usually. if remain <= 0 # we've got everything, pack it up @body = StringIO.new @body.write @params.http_body update_request_progress(0, content_length) elsif remain > 0 # must read more data to complete body if remain > Const::MAX_BODY # huge body, put it in a tempfile @body = Tempfile.new(Const::MONGREL_TMP_BASE) @body.binmode else # small body, just use that @body = StringIO.new end @body.write @params.http_body read_body(remain, content_length) end @body.rewind if @body end Here i would like to close this @body after use by using something like @body.close but while doing so am getting error what should i do and whre should i call this @body.close -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Oct 7 17:39:55 2010 From: lists at ruby-forum.com (Daniel Cadenas) Date: Thu, 7 Oct 2010 23:39:55 +0200 Subject: [Mongrel] failed to allocate memory while downloading large files In-Reply-To: References: <68a25017b2376716f01165c42afb4d71@ruby-forum.com> <229b30e1af467f2935307efc959cba92@ruby-forum.com> <6aa87273eb2d101edcfe026aa64aab8d@ruby-forum.com> <973fce7cc7a06939e3174c632eced7b0@ruby-forum.com> Message-ID: Luis Lavena wrote: > please read about streaming data without loading all the file contents. > > You will need to either use rack directly or create a mongrel handler > to serve these files outside rails. > > Rails can only deliver one full request meaning it will load the full > file before completing. > Notice that now you can use send_file which is now (Rails 3) implemented through a rack middleware and includes X-sendfile headers. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Oct 8 01:01:51 2010 From: lists at ruby-forum.com (Amit Tomar) Date: Fri, 8 Oct 2010 07:01:51 +0200 Subject: [Mongrel] failed to allocate memory while downloading large files In-Reply-To: References: <68a25017b2376716f01165c42afb4d71@ruby-forum.com> <229b30e1af467f2935307efc959cba92@ruby-forum.com> <6aa87273eb2d101edcfe026aa64aab8d@ruby-forum.com> <973fce7cc7a06939e3174c632eced7b0@ruby-forum.com> Message-ID: Daniel Cadenas wrote: > Luis Lavena wrote: >> please read about streaming data without loading all the file contents. >> >> You will need to either use rack directly or create a mongrel handler >> to serve these files outside rails. >> >> Rails can only deliver one full request meaning it will load the full >> file before completing. >> > > Notice that now you can use send_file which is now (Rails 3) implemented > through a rack middleware and includes X-sendfile headers. yaa Daniel i already imlemented send_file method and now i downloaded 7 gb of file without fail .. The only problem am facing is how do i delete mongrel temporary after upload large files.. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Oct 22 08:17:47 2010 From: lists at ruby-forum.com (Saratchand Kanuri) Date: Fri, 22 Oct 2010 14:17:47 +0200 Subject: [Mongrel] Problem related to Caching in mongrel Message-ID: <0afee0dca78e4870e4c80e3b2262ada2@ruby-forum.com> My production server has 6 mongrels running. I hosted a CMS (content management system) on the server. As a admin of the website, I delete few tabs in the site. But the Public version(for the non-loggedin) version of the site still shows the deleted tabs at random(some times they show up and sometimes don't). I suppose that the cache at some of the mongrels is not updated properly and that is why I can see the deleted tabs. Is my supposition correct. Or am I missing something? Can someone help me out. I am blocked on this right now. Thanks in Advance, -Saratchand -- Posted via http://www.ruby-forum.com/. From piyush.pr at gmail.com Fri Oct 22 08:52:58 2010 From: piyush.pr at gmail.com (Piyush Ranjan) Date: Fri, 22 Oct 2010 18:22:58 +0530 Subject: [Mongrel] Problem related to Caching in mongrel In-Reply-To: <0afee0dca78e4870e4c80e3b2262ada2@ruby-forum.com> References: <0afee0dca78e4870e4c80e3b2262ada2@ruby-forum.com> Message-ID: this is not a mongrel question. ask it on the mailing list of your cms. On Fri, Oct 22, 2010 at 5:47 PM, Saratchand Kanuri wrote: > My production server has 6 mongrels running. I hosted a CMS (content > management system) on the server. As a admin of the website, I delete > few tabs in the site. But the Public version(for the non-loggedin) > version of the site still shows the deleted tabs at random(some times > they show up and sometimes don't). I suppose that the cache at some of > the mongrels is not updated properly and that is why I can see the > deleted tabs. Is my supposition correct. Or am I missing something? Can > someone help me out. I am blocked on this right now. > > Thanks in Advance, > -Saratchand > > -- > Posted via http://www.ruby-forum.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: From luislavena at gmail.com Fri Oct 22 09:01:48 2010 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 22 Oct 2010 10:01:48 -0300 Subject: [Mongrel] Problem related to Caching in mongrel In-Reply-To: <0afee0dca78e4870e4c80e3b2262ada2@ruby-forum.com> References: <0afee0dca78e4870e4c80e3b2262ada2@ruby-forum.com> Message-ID: On Fri, Oct 22, 2010 at 9:17 AM, Saratchand Kanuri wrote: > My production server has 6 mongrels running. I hosted a CMS (content > management system) on the server. As a admin of the website, I delete > few tabs in the site. But the Public version(for the non-loggedin) > version of the site still shows the deleted tabs at random(some times > they show up and sometimes don't). I suppose that the cache at some of > the mongrels is not updated properly and that is why I can see the > deleted tabs. Is my supposition correct. Or am I missing something? Can > someone help me out. I am blocked on this right now. > Some questions: - What software is your CMS? Radiant? other? - What caching strategy is setup in your Rails/CMS application? The one by default? Asking this because Rails MemoryStore, the default caching strategy only works for a single process. Multiple process requires a shared memory caching strategy, like memcache -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From lists at ruby-forum.com Sat Oct 30 04:13:30 2010 From: lists at ruby-forum.com (Nike Mbt) Date: Sat, 30 Oct 2010 10:13:30 +0200 Subject: [Mongrel] how to i force apche to handle download request In-Reply-To: <46e835c69fc09c19e5a6043385cce816@ruby-forum.com> References: <46e835c69fc09c19e5a6043385cce816@ruby-forum.com> Message-ID: MBT Shoes MBT Shoes Chapa MBT Shoes Bottes Ugg Short Bottes Ugg Milan M href="http://www.bottes-ugg-bottes.com/bottes-ugg-classic-bottes-ugg-classic-corchet-ugg-france-bottes-en--beige-p-500.html"> Ugg France Bottes -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Oct 31 08:21:33 2010 From: lists at ruby-forum.com (Wim Van es) Date: Sun, 31 Oct 2010 13:21:33 +0100 Subject: [Mongrel] Mongrel don't render html if i use .htaccess Message-ID: <17a6c8946d61d20ddec25792cf04de07@ruby-forum.com> Hy, Being new here i hope somebody can help me. Setup: CentOS 5.5 ruby 1.8.7 (2009-06-08 patchlevel 173) [i686-linux] Rails 2.3.8 mongrel 1.1.5 rack 1.2.1, 1.0.1 Problem: If i use a .htaccess like RewriteEngine on RewriteCond %{HTTP_HOST} ^my.domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.my.domain.com$ RewriteRule ^(.*)$ "http\:\/\/127\.0\.0\.1\:12001\/$1" [P,L] on a app what is using a DB i see only html source. Navigating to my.domain.com:12001 works fine. When i make a app with a simple var in the controller and a view that echo's this var i don't have any trouble. What i have figured out: In the mongrel log i found Error calling Dispatcher.dispatch #> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:108:in `send_cookies' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:136:in `out' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_response.rb:65:in `start' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:135:in `out' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:81:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19:in `load' /usr/bin/mongrel_rails:19 I edit mongrel/lib/mongrel/cgi.rb as described in http://github.com/fauna/mongrel/blob/master/lib/mongrel/cgi.rb#L108 I found cookie's from my.domain.com in my browser Can anyone point me in the right direction? Thanks! -- Posted via http://www.ruby-forum.com/.