From mental at rydia.net Fri Dec 1 00:15:19 2006 From: mental at rydia.net (MenTaLguY) Date: Fri, 01 Dec 2006 00:15:19 -0500 Subject: [Mongrel] fastthread 0.5 Message-ID: <1164950119.9868.4.camel@localhost.localdomain> Just a quick note that I've committed the bits for fastthread 0.5; the most important differences are that all the thread.rb classes are once again marshallable, and we've got Luis' commit which eliminates some warnings when building on Win32. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061201/7cc255b8/attachment.bin From zedshaw at zedshaw.com Fri Dec 1 00:48:17 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 00:48:17 -0500 Subject: [Mongrel] fastthread 0.5 In-Reply-To: <1164950119.9868.4.camel@localhost.localdomain> References: <1164950119.9868.4.camel@localhost.localdomain> Message-ID: <20061201004817.61d41a9e.zedshaw@zedshaw.com> On Fri, 01 Dec 2006 00:15:19 -0500 MenTaLguY wrote: > Just a quick note that I've committed the bits for fastthread 0.5; the > most important differences are that all the thread.rb classes are once > again marshallable, and we've got Luis' commit which eliminates some > warnings when building on Win32. Awesome. I just tested it and it all looks good. I'll push a Mongrel pre-release tomorrow and then hopefully find time to work on the win32 side of things. Stay tuned, and thanks. Oh, how's svn treating you? -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Dec 1 00:49:46 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 00:49:46 -0500 Subject: [Mongrel] Mongrel 0.3.18, rails 1.1.6 and cookies In-Reply-To: <466af3440611301714h70aa0524l60073df22ae815f8@mail.gmail.com> References: <466af3440611301714h70aa0524l60073df22ae815f8@mail.gmail.com> Message-ID: <20061201004946.7d6244b6.zedshaw@zedshaw.com> On Thu, 30 Nov 2006 19:14:17 -0600 "Joey Geiger" wrote: > I've run into an issue with my rails application being unable to > properly set cookies on Mongrel 0.3.18. If I run the simplified code > below in Mongrel 3.14.4, both cookies are properly sent to and saved > by the browser. With the same code in 0.3.18, only the auth_token > cookie is created (if I switch them, only the userid as it will only > properly create the first cookie in the list.) > > I'm at home right now, but when I get back into work tomorrow, I'll > try to install 0.3.15 and see if the problem exists there as well. > > Thanks. > > def login > cookies[:auth_token] = { :value => "auth", :expires => 10.years.from_now.utc } > cookies[:userid] = { :value => "100", :expires => 10.years.from_now.utc } > end Aha! You're the guy! No, that's because I created a change which eliminated duplicate headers but we weren't quite sure what headers should be allowed to duplicate. I'll push a new release out that includes an exception list with the cookie headers. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Dec 1 00:53:20 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 00:53:20 -0500 Subject: [Mongrel] stability In-Reply-To: <456F4827.2070207@supercool.nl> References: <456F4827.2070207@supercool.nl> Message-ID: <20061201005320.8aeee743.zedshaw@zedshaw.com> On Thu, 30 Nov 2006 22:07:51 +0100 Jeroen Houben wrote: > Hi, > > Are there any recommendations as to what is currently the most stable > setup is for mongrel & apache? I read somewhere (probably here) that you > should avoid using PStore for sessions. Are there any more of such > recommendations? Also, what is currently the safest version of mongrel > to use in production? General warning is using any external libraries that require sharing OS level resources (files, sockets, shmem, file locks) should be avoided or very strictly tested and controlled. Additionally, if you *must* use these put them into a separate DRb server and make it the single control point for the resources. Also, try to avoid RMagick processing inside rails. People love their file_column, but RMagick is a fat nasty pig that cripples many sites without warning. The optimal setup is use something like BackgrounDRb or a plain DRb server and use a batch processing method. That's the main warnings right now. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From runner at berkeley.edu Fri Dec 1 00:58:04 2006 From: runner at berkeley.edu (Steven Hansen) Date: Thu, 30 Nov 2006 21:58:04 -0800 Subject: [Mongrel] deploying mongrel with capistrano In-Reply-To: <200611302337.10389.curtis.hatter@insightbb.com> References: <200611302337.10389.curtis.hatter@insightbb.com> Message-ID: <456FC46C.8010703@berkeley.edu> Curtis Hatter wrote: > I'm wondering if anyone has built a Capistrano task that will deploy mongrel > either standalone or along with a rails app. I've been looking at > possibilities for doing this but still new to using both having switched from > using FCGI+Lighty and deploying by hand. > > Thanks, > Curtis > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > Hi Curtis, Install the mongrel_cluster gem. It comes with a Capistrano recipe for deploying with mongrel. Basically, once the gem is installed, you just need to require it at the beginning of your capistrano deploy file: require "mongrel_cluster/recipes" More info here: http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ -Steven From zedshaw at zedshaw.com Fri Dec 1 00:59:35 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 00:59:35 -0500 Subject: [Mongrel] Sharing Mongrel Log Files on SAN Storage In-Reply-To: <466af3440611301914o850b0aeha03b642d05a3dacc@mail.gmail.com> References: <456F24BF.7000408@berkeley.edu> <20061130150104.3e00aed1.zedshaw@zedshaw.com> <466af3440611301914o850b0aeha03b642d05a3dacc@mail.gmail.com> Message-ID: <20061201005935.d7b6f472.zedshaw@zedshaw.com> On Thu, 30 Nov 2006 21:14:41 -0600 "Joey Geiger" wrote: > Are you suggesting that you have a separate mongrel.8001.log, > mongrel.8002.log like the pids files or is there a way to somehow log > like production-8001.log, production-8002.log through a mongrel > setting? > > Having separate log files for the mongrel.log seems like overkill to > me, since when my app is running, it's not generating very many > entries there... > > If you can create rails production logs named with the pid, could > someone point me in a direction on how to set that up? Thanks. It varies for different people. The norm is that Mongrel is very quiet except when it needs to tell you about how it's configured and when things are going bad. In most situations people can safely ignore the mongrel logs and be happy. When things start going bad though you'll run into situations where you can't isolate which mongrel instance is doing it. In one configuration I actually configured the log files to be: mongrel-hostname-port.log for each instance, and the PID files as mongrel-hostname-port.pid. This was a customer server so changing it was cake, but you can accomplish the same thing with options. So, for most folks one log file is enough. For the paranoid and the broken creating separate logs per mongrel is necessary. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From joeat303 at yahoo.com Fri Dec 1 02:16:02 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Thu, 30 Nov 2006 23:16:02 -0800 (PST) Subject: [Mongrel] stability Message-ID: <83732.15158.qm@web38603.mail.mud.yahoo.com> > Also, try to avoid RMagick processing inside rails. People love their file_column, but RMagick is a fat nasty pig that cripples many sites without warning. The optimal setup is use something like BackgrounDRb or a plain DRb server and use a batch processing method. I don't use file_column, but do use RMagick and haven't had any problems (and its author has been helpful with support). But I also only allow admins to use it. 43Things resizes images on the fly -- not sure if they use rmagick, but with all their users and all those images, it's gotta bump up the cpu and memory requirements quite a bit. Joe Ruby MUDCRAP-CE "Believe nothing, test everything!" ____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited From jeroen at supercool.nl Fri Dec 1 03:05:50 2006 From: jeroen at supercool.nl (Jeroen Houben) Date: Fri, 01 Dec 2006 09:05:50 +0100 Subject: [Mongrel] stability In-Reply-To: <20061201005320.8aeee743.zedshaw@zedshaw.com> References: <456F4827.2070207@supercool.nl> <20061201005320.8aeee743.zedshaw@zedshaw.com> Message-ID: <456FE25E.2090501@supercool.nl> Zed A. Shaw wrote: > On Thu, 30 Nov 2006 22:07:51 +0100 > Jeroen Houben wrote: > >> Hi, >> >> Are there any recommendations as to what is currently the most stable >> setup is for mongrel & apache? I read somewhere (probably here) that you >> should avoid using PStore for sessions. Are there any more of such >> recommendations? Also, what is currently the safest version of mongrel >> to use in production? > > General warning is using any external libraries that require sharing OS level resources (files, sockets, shmem, file locks) should be avoided or very strictly tested and controlled. Additionally, if you *must* use these put them into a separate DRb server and make it the single control point for the resources. I use Ruby's built-in IO functions to fetch some external RSS and do some file caching. Would you consider this a hazard? I had a Rails site that had gone 500 when it couldn't connect to the external feed. This was due to a lack of error checking on my behalf. The weird thing was that other Rails sites on the same box also stopped responding. I know this is a vague problem description, I'll try and get to the logs and see if I can spot anything. > Also, try to avoid RMagick processing inside rails. People love their file_column, but RMagick is a fat nasty pig that cripples many sites without warning. The optimal setup is use something like BackgrounDRb or a plain DRb server and use a batch processing method. > > That's the main warnings right now. Thanks Zed. Jeroen From dan.kubb at autopilotmarketing.com Fri Dec 1 02:52:38 2006 From: dan.kubb at autopilotmarketing.com (Dan Kubb) Date: Thu, 30 Nov 2006 23:52:38 -0800 Subject: [Mongrel] Mongrel 0.3.18, rails 1.1.6 and cookies In-Reply-To: <20061201004946.7d6244b6.zedshaw@zedshaw.com> References: <466af3440611301714h70aa0524l60073df22ae815f8@mail.gmail.com> <20061201004946.7d6244b6.zedshaw@zedshaw.com> Message-ID: <61374EA3-CDA8-4BD2-BE7B-FC4FF5EABC0F@autopilotmarketing.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 30-Nov-06, at 9:49 PM, Zed A. Shaw wrote: > On Thu, 30 Nov 2006 19:14:17 -0600 > "Joey Geiger" wrote: > >> I've run into an issue with my rails application being unable to >> properly set cookies on Mongrel 0.3.18. > > No, that's because I created a change which eliminated duplicate > headers but we weren't quite sure what headers should be allowed to > duplicate. > > I'll push a new release out that includes an exception list with > the cookie headers. Zed, the only headers I can think of that you'd want to legitimately send multiple times AND with different values each time, are: Set-Cookie Set-Cookie2 Warning WWW-Authenticate (eg. when using both Basic and Digest auth) There might be more, but this will be a good start for an exception list. - -- Thanks, Dan __________________________________________________________________ Dan Kubb Autopilot Marketing Inc. Email: dan.kubb at autopilotmarketing.com Phone: 1 (604) 820-0212 Web: http://autopilotmarketing.com/ vCard: http://autopilotmarketing.com/~dan.kubb/vcard __________________________________________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) iD8DBQFFb99G4DfZD7OEWk0RAjiOAKCfChH0Qs8ZfmtaUWw6TSPJgU3H9gCeP2Is o5Q7T4p9vrSK0bEl1XFwTVU= =7mVb -----END PGP SIGNATURE----- From rmdf at stimble.net Fri Dec 1 04:15:38 2006 From: rmdf at stimble.net (Michael Fairchild) Date: Fri, 1 Dec 2006 01:15:38 -0800 Subject: [Mongrel] mongrel served from a subdirectory In-Reply-To: <2ef9bb620611301757j20a5fcd1k2d6f1a008e87b4ff@mail.gmail.com> References: <2ef9bb620611301539t62b9bea0y80326fcf6abe7fb@mail.gmail.com> <20061130175545.P21812@bravo.pjkh.com> <2ef9bb620611301757j20a5fcd1k2d6f1a008e87b4ff@mail.gmail.com> Message-ID: <2ef9bb620612010115t83d40f3mc0a762d22b06863@mail.gmail.com> Yeah! Success feels so good:-) Thanks for the tips. To summarize, in case any body else comes along with a similar need to serve a rails app from sub directory. For example i wanted to serve my rails app from example.edu/docserver instead of docserver.example.edu. first: you must have the in your hosts apache configuration ProxyPass /docserver/ http://example.edu:3001/docserver/ ProxyPassReverse /docserver/ http://example.edu:3001/docserver/ ProxyPreserveHost on > mongrel_rails start --prefix=/docserver Having the trailing /docserver at the end of the ProxyPass and the --prefix=/docserver are the main difference from a regular docserver.example.edu type setup. I did not need RAILS_RELATIVE_URL_ROOT="/docserver/" in enviornment.rb. caveats: Any relative links that are hardcoded will break, so link_to helpers need to be used exclusivley for these links. Same goes for form action urls. would it be worth puting something about the ProxyPass changes in the faq under "How do I put my Rails site at /someprefix?" Thanks for the help, ~michael fairchild On 11/30/06, Michael Fairchild < rmdf at stimble.net> wrote: > > Thanks for that Philip. I missed that option. I tried starting up with > that, but --prefix=/docserver and leaving the apache stuff the same. When i > did that i couldn't even get any of it. > I think there might be something i need to set in enviornment.rb, but im > not sure. > I'll keep trying. > ~michael > > On 11/30/06, Philip Hallstrom wrote: > > > > > Hello, > > > I have setup mongrel successfully a few times now, but, each time I > > have > > > used apaceh 2.2 and mod_proxy setup descibed on the mongrel site. > > > However, I need to set up another app in a subdomain. example.com/docserver > > > instead of docserver.example.com. > > > I have tried just adding I have something like: > > > > > > ProxyPass /docserver/ http://example.com:3001/ > > > ProxyPassReverse /docserver/ http://example.com:3001 > > > ProxyPreserveHost on > > > > > > The problem seems to be two fold. First, the css, image and > > javascript > > > links, are all broken. Second all the generated links are to > > > /controller/action instead of to docserver/controller/action. > > > > > > I tried putting RAILS_RELATIVE_URL_ROOT="/docserver/" in > > enviornment.rb, but > > > that didn't help. > > > > I haven't done it, but seems my memory is there is a --prefix option to > > mongrel that you need to set as well... > > > > Check the mongrel site to see if there any docs on this... > > _______________________________________________ > > 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/20061201/db70a86b/attachment.html From yves.dastous at intertrade.com Fri Dec 1 10:53:52 2006 From: yves.dastous at intertrade.com (Yves D'Astous) Date: Fri, 01 Dec 2006 10:53:52 -0500 Subject: [Mongrel] Bug: Mongrel 0.3.14 unix debug not working when the "--prefix" is also used Message-ID: <45705010.5080303@intertrade.com> Hello, I have problem with Mongrel 0.3.14 on unix I can not use the "-B" (debug) with the "--prefix" flag the mongrel_debug/logs files are being created but never update. Do anyone have a work around for this ? Yves From _ at whats-your.name Fri Dec 1 13:12:02 2006 From: _ at whats-your.name (carmen) Date: Fri, 1 Dec 2006 13:12:02 -0500 Subject: [Mongrel] favicon Message-ID: <20061201181202.GA29450@replic.net> im trying to figure out how to serve a favicon.ico for my app, does anyone have a line for Mongrel::Configurator? all i can see is that everyone seems to use the 404 handler...how boring.. uri "/favico", :handler => Mongrel::DirHandler.new(File.dirname(__FILE__)+"/favicon.ico") is sort of close, but it says The image ?http://m/favicon.ico? cannot be displayed, because it contains errors. . puting the favicon into its own dir, means it ends up at /favico/favicon.ico which isnt right either. should i be hacking up the dirhandler to serve a static file if the pathname argument is a file not a dir? or is there some SingleFileHandler that im missing (would like to keep the modified header checks from DirHandler) From zedshaw at zedshaw.com Fri Dec 1 14:55:38 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 14:55:38 -0500 Subject: [Mongrel] stability In-Reply-To: <456FE25E.2090501@supercool.nl> References: <456F4827.2070207@supercool.nl> <20061201005320.8aeee743.zedshaw@zedshaw.com> <456FE25E.2090501@supercool.nl> Message-ID: <20061201145538.ddbfc081.zedshaw@zedshaw.com> On Fri, 01 Dec 2006 09:05:50 +0100 Jeroen Houben wrote: > Zed A. Shaw wrote: > > On Thu, 30 Nov 2006 22:07:51 +0100 > > Jeroen Houben wrote: > I use Ruby's built-in IO functions to fetch some external RSS and do > some file caching. Would you consider this a hazard? I had a Rails site > that had gone 500 when it couldn't connect to the external feed. This > was due to a lack of error checking on my behalf. The weird thing was > that other Rails sites on the same box also stopped responding. I know > this is a vague problem description, I'll try and get to the logs and > see if I can spot anything. It can be a problem if the source of the RSS is unreliable, like off the network, or if you're doing DNS queries against a flaky DNS server. Ruby's interpreter actually stops completely during most DNS queries so if you are using say net/http to connect to a flaky web site you could block the whole show. I'm not sure why all your ruby processes went down, but you should try to replicate it and figure out what is the cause. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Dec 1 15:05:04 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 15:05:04 -0500 Subject: [Mongrel] favicon In-Reply-To: <20061201181202.GA29450@replic.net> References: <20061201181202.GA29450@replic.net> Message-ID: <20061201150504.bf695310.zedshaw@zedshaw.com> On Fri, 1 Dec 2006 13:12:02 -0500 carmen <_ at whats-your.name> wrote: > im trying to figure out how to serve a favicon.ico for my app, does anyone have a line for Mongrel::Configurator? all i can see is that everyone seems to use the 404 handler...how boring.. > > uri "/favico", :handler => Mongrel::DirHandler.new(File.dirname(__FILE__)+"/favicon.ico") is sort of close, but it says The image ?http://m/favicon.ico? cannot be displayed, because it contains errors. . puting the favicon into its own dir, means it ends up at /favico/favicon.ico which isnt right either. should i be hacking up the dirhandler to serve a static file if the pathname argument is a file not a dir? or is there some SingleFileHandler that im missing (would like to keep the modified header checks from DirHandler) DirHandler, being a DIR handler and not a FILE handler, needs the directory path that you want it to serve. In your case, just put the favicon.ico into the root rails directory. If you're not using rails, then change your line to: uri "/", :handler => Mongrel::DirHandler.new(File.dirname(__FILE__)) Of course, if you were really really smart you'd find a way to make a mongrel handler that generated a random favicon. :-) -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From steven at lumos.us Fri Dec 1 15:06:01 2006 From: steven at lumos.us (Steven Lumos) Date: Fri, 01 Dec 2006 12:06:01 -0800 Subject: [Mongrel] no more wedged mongrels with fastthread Message-ID: <867ixbmlee.fsf@bitty.lumos.us> With Mongrel 0.3.18, I have not seen a single one of the hangs that I have been grousing about for the past N weeks. Thanks MenTaLguY and Zed! Q: Mongrel loads fastthread, Mongrel loads Rails, Rails loads OCI8, OCI8 requires 'thread'. That means OCI8 is using fastthread too, right? Steve From zedshaw at zedshaw.com Fri Dec 1 15:10:51 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 15:10:51 -0500 Subject: [Mongrel] Bug: Mongrel 0.3.14 unix debug not working when the "--prefix" is also used In-Reply-To: <45705010.5080303@intertrade.com> References: <45705010.5080303@intertrade.com> Message-ID: <20061201151051.0366784b.zedshaw@zedshaw.com> On Fri, 01 Dec 2006 10:53:52 -0500 Yves D'Astous wrote: > Hello, > > I have problem with Mongrel 0.3.14 on unix I can not use the "-B" > (debug) with the "--prefix" flag > the mongrel_debug/logs files are being created but never update. > > Do anyone have a work around for this ? Odd, seems to be that objects.log is the only one that's busted. The others work fine. I'll look into this, but until then there's not much you can do. If you're trying to debug an memory leak then consider just running the app locally without the --prefix. And make sure you run in production on development mode. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Dec 1 15:31:41 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 1 Dec 2006 15:31:41 -0500 Subject: [Mongrel] no more wedged mongrels with fastthread In-Reply-To: <867ixbmlee.fsf@bitty.lumos.us> References: <867ixbmlee.fsf@bitty.lumos.us> Message-ID: <20061201153141.7d461be6.zedshaw@zedshaw.com> On Fri, 01 Dec 2006 12:06:01 -0800 Steven Lumos wrote: > > With Mongrel 0.3.18, I have not seen a single one of the hangs that I > have been grousing about for the past N weeks. > > Thanks MenTaLguY and Zed! > > Q: Mongrel loads fastthread, Mongrel loads Rails, Rails loads OCI8, > OCI8 requires 'thread'. That means OCI8 is using fastthread too, > right? Yep, that's the point. By loading it ahead of everything else it should be the replacement. Glad this is actually working. How's the memory usage? -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From _ at whats-your.name Fri Dec 1 15:32:32 2006 From: _ at whats-your.name (carmen) Date: Fri, 1 Dec 2006 15:32:32 -0500 Subject: [Mongrel] favicon In-Reply-To: <20061201150504.bf695310.zedshaw@zedshaw.com> References: <20061201181202.GA29450@replic.net> <20061201150504.bf695310.zedshaw@zedshaw.com> Message-ID: <20061201203232.GB29450@replic.net> > just put the favicon.ico into the root rails directory. If you're not using rails, then change your line to: > > uri "/", :handler => Mongrel::DirHandler.new(File.dirname(__FILE__)) yeah im Camping on / , which then sends both the file or dirlist, and output from the app at the same time..corrupt images. and confusing html! guess i will move send_file from DirHandler to a module, then mix it into a StaticFileHandler From curtis.hatter at insightbb.com Fri Dec 1 15:49:47 2006 From: curtis.hatter at insightbb.com (Curtis Hatter) Date: Fri, 1 Dec 2006 15:49:47 -0500 Subject: [Mongrel] deploying mongrel with capistrano In-Reply-To: <456FC46C.8010703@berkeley.edu> References: <200611302337.10389.curtis.hatter@insightbb.com> <456FC46C.8010703@berkeley.edu> Message-ID: <200612011549.48109.curtis.hatter@insightbb.com> > Install the mongrel_cluster gem. It comes with a Capistrano recipe for > deploying with mongrel. Basically, once the gem is installed, you just > need to require it at the beginning of your capistrano deploy file: Thanks a lot, this is exactly what I was looking for. Curtis From mental at rydia.net Fri Dec 1 22:06:36 2006 From: mental at rydia.net (MenTaLguY) Date: Fri, 01 Dec 2006 22:06:36 -0500 Subject: [Mongrel] fastthread 0.5 In-Reply-To: <20061201004817.61d41a9e.zedshaw@zedshaw.com> References: <1164950119.9868.4.camel@localhost.localdomain> <20061201004817.61d41a9e.zedshaw@zedshaw.com> Message-ID: <1165028796.19083.17.camel@localhost.localdomain> On Fri, 2006-12-01 at 00:48 -0500, Zed A. Shaw wrote: > Oh, how's svn treating you? Okay I guess. I'm still using git mostly; the SVN repo is just there an upstream branch, much like one would do with svk. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061201/6acb78cc/attachment.bin From ms at pccl.info Fri Dec 1 11:46:24 2006 From: ms at pccl.info (Mark Somerville) Date: Fri, 1 Dec 2006 16:46:24 +0000 Subject: [Mongrel] Setting up Mongrel and Apache , some direction needed In-Reply-To: <93334f200611180703m6e3d396cm83de6c00386f763c@mail.gmail.com> References: <8bd5d6760611131016r63c5dc3cxd711ff0d614e49f3@mail.gmail.com> <200611141041.18346.ms@pccl.info> <93334f200611180703m6e3d396cm83de6c00386f763c@mail.gmail.com> Message-ID: <200612011646.24532.ms@pccl.info> On Saturday 18 November 2006 15:03, Chris Martin wrote: > how's this working for you? We haven't had the need to really hammer it yet. We expect to be doing that later on this month, if that's any use to you. > you might try the rails_analyzer_tools gem to see how evenly that > distributes requests. I hadn't heard of that - thanks a lot! Take it easy, Mark From dwayne at futmedia.com Mon Dec 4 11:35:24 2006 From: dwayne at futmedia.com (Dwayne Purper) Date: Mon, 4 Dec 2006 11:35:24 -0500 Subject: [Mongrel] Log problem on stop/restart Message-ID: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> I'm using the mongrel_cluster recipes for Capistrano as laid out by codahale.com and the new ed. of the Agile Development book, but I'm having problems on restart and stop: I can start: [root current]# mongrel_rails cluster::start Starting 3 Mongrel servers... And I can see 3 processes running: [root current]# ps aux | grep mongrel mongrel 1947 0.0 8.2 24684 10776 ? S Dec01 0:00 /usr/ local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p 8000 -a 127.0.0.1 -P log/mongrel.8000.pid -c /var/www/apps/central -- user mongrel --group mongrel --prefix /central mongrel 1950 0.0 12.4 24716 16336 ? S Dec01 0:00 /usr/ local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p 8001 -a 127.0.0.1 -P log/mongrel.8001.pid -c /var/www/apps/central -- user mongrel --group mongrel --prefix /central mongrel 1953 0.0 12.0 24696 15768 ? S Dec01 0:00 /usr/ local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p 8002 -a 127.0.0.1 -P log/mongrel.8002.pid -c /var/www/apps/central -- user mongrel --group mongrel --prefix /central root 6687 0.0 0.5 3912 688 pts/1 R+ 05:21 0:00 grep mongrel But when I check the page, I get a 404: [root current]# curl -I http://127.0.0.1:8000 HTTP/1.1 404 Not Found Connection: close Server: Mongrel 0.3.18 When I stop (or restart), I get .pid does not exist messages: [root current]# mongrel_rails cluster::stop Stopping 3 Mongrel servers... !!! PID file log/mongrel.8000.pid does not exist. Not running? mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h to get help. mongrel_rails stop -P log/mongrel.8000.pid -c /var/www/apps/central/ current !!! PID file log/mongrel.8001.pid does not exist. Not running? mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h to get help. mongrel_rails stop -P log/mongrel.8001.pid -c /var/www/apps/central/ current !!! PID file log/mongrel.8002.pid does not exist. Not running? mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h to get help. mongrel_rails stop -P log/mongrel.8002.pid -c /var/www/apps/central/ current So is it a permissions issue? Permissions for current directory have log owned by dwayne:dwayne ... : [root current]# ls -l total 60 drwxr-xr-x 7 dwayne dwayne 4096 Dec 5 05:06 app drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 components drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 config drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 db drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 doc drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 lib lrwxrwxrwx 1 dwayne dwayne 32 Dec 5 05:06 log -> /var/www/apps/ central/shared/log drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 public -rw-r--r-- 1 dwayne dwayne 307 Dec 5 05:06 Rakefile -rw-r--r-- 1 dwayne dwayne 7264 Dec 5 05:06 README drwxr-xr-x 5 dwayne dwayne 4096 Dec 5 05:06 script drwxr-xr-x 8 dwayne dwayne 4096 Dec 5 05:06 test drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 tmp -rw-r--r-- 1 dwayne dwayne 1930 Dec 5 05:06 TODO drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 vendor But that's a symlink to shared directory created by Capistrano. I changed the shared log directory in /var/www/apps/central/shared/log to group mongrel, but that doesn't seem to help: [root current]# ls -l /var/www/apps/central/shared total 12 drwxrwxrwx 2 dwayne mongrel 4096 Dec 5 03:08 log drwxrwxrwx 2 dwayne dwayne 4096 Dec 4 16:01 pids drwxrwxr-x 2 dwayne dwayne 4096 Dec 4 16:01 system I changed existing mongrel.log to group mongrel also: [root current]# ls -l /var/www/apps/central/shared/log total 76 -rw-r--r-- 1 root root 73 Dec 4 16:24 development.log -rw-rw-rw- 1 dwayne mongrel 67050 Dec 5 05:20 mongrel.log It seems like mongrel_cluster should have what it needs to create the pid files. What am I missing? Thanks for any help. I know others have had this .pid issue, but from what I've read, it usually involves not starting the cluster from the proper directory or with proper permissions. -- Dwayne From jeroen at supercool.nl Mon Dec 4 13:19:03 2006 From: jeroen at supercool.nl (Jeroen Houben) Date: Mon, 04 Dec 2006 19:19:03 +0100 Subject: [Mongrel] Log problem on stop/restart In-Reply-To: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> References: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> Message-ID: <45746697.3080303@supercool.nl> Maybe also share your mongrel_cluster.yml Jeroen Dwayne Purper wrote: > I'm using the mongrel_cluster recipes for Capistrano as laid out by > codahale.com and the new ed. of the Agile Development book, but I'm > having problems on restart and stop: > > I can start: > > [root current]# mongrel_rails cluster::start > Starting 3 Mongrel servers... > > > And I can see 3 processes running: > > [root current]# ps aux | grep mongrel > mongrel 1947 0.0 8.2 24684 10776 ? S Dec01 0:00 /usr/ > local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p > 8000 -a 127.0.0.1 -P log/mongrel.8000.pid -c /var/www/apps/central -- > user mongrel --group mongrel --prefix /central > mongrel 1950 0.0 12.4 24716 16336 ? S Dec01 0:00 /usr/ > local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p > 8001 -a 127.0.0.1 -P log/mongrel.8001.pid -c /var/www/apps/central -- > user mongrel --group mongrel --prefix /central > mongrel 1953 0.0 12.0 24696 15768 ? S Dec01 0:00 /usr/ > local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p > 8002 -a 127.0.0.1 -P log/mongrel.8002.pid -c /var/www/apps/central -- > user mongrel --group mongrel --prefix /central > root 6687 0.0 0.5 3912 688 pts/1 R+ 05:21 0:00 grep > mongrel > > > But when I check the page, I get a 404: > > [root current]# curl -I http://127.0.0.1:8000 > HTTP/1.1 404 Not Found > Connection: close > Server: Mongrel 0.3.18 > > > When I stop (or restart), I get .pid does not exist messages: > > [root current]# mongrel_rails cluster::stop > Stopping 3 Mongrel servers... > !!! PID file log/mongrel.8000.pid does not exist. Not running? > mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h > to get help. > mongrel_rails stop -P log/mongrel.8000.pid -c /var/www/apps/central/ > current > > !!! PID file log/mongrel.8001.pid does not exist. Not running? > mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h > to get help. > mongrel_rails stop -P log/mongrel.8001.pid -c /var/www/apps/central/ > current > > !!! PID file log/mongrel.8002.pid does not exist. Not running? > mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h > to get help. > mongrel_rails stop -P log/mongrel.8002.pid -c /var/www/apps/central/ > current > > > So is it a permissions issue? > > Permissions for current directory have log owned by dwayne:dwayne ... : > > [root current]# ls -l > total 60 > drwxr-xr-x 7 dwayne dwayne 4096 Dec 5 05:06 app > drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 components > drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 config > drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 db > drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 doc > drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 lib > lrwxrwxrwx 1 dwayne dwayne 32 Dec 5 05:06 log -> /var/www/apps/ > central/shared/log > drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 public > -rw-r--r-- 1 dwayne dwayne 307 Dec 5 05:06 Rakefile > -rw-r--r-- 1 dwayne dwayne 7264 Dec 5 05:06 README > drwxr-xr-x 5 dwayne dwayne 4096 Dec 5 05:06 script > drwxr-xr-x 8 dwayne dwayne 4096 Dec 5 05:06 test > drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 tmp > -rw-r--r-- 1 dwayne dwayne 1930 Dec 5 05:06 TODO > drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 vendor > > > But that's a symlink to shared directory created by Capistrano. I > changed the shared log directory in /var/www/apps/central/shared/log > to group mongrel, but that doesn't seem to help: > > [root current]# ls -l /var/www/apps/central/shared > total 12 > drwxrwxrwx 2 dwayne mongrel 4096 Dec 5 03:08 log > drwxrwxrwx 2 dwayne dwayne 4096 Dec 4 16:01 pids > drwxrwxr-x 2 dwayne dwayne 4096 Dec 4 16:01 system > > > I changed existing mongrel.log to group mongrel also: > > [root current]# ls -l /var/www/apps/central/shared/log > total 76 > -rw-r--r-- 1 root root 73 Dec 4 16:24 development.log > -rw-rw-rw- 1 dwayne mongrel 67050 Dec 5 05:20 mongrel.log > > > It seems like mongrel_cluster should have what it needs to create the > pid files. What am I missing? > > Thanks for any help. I know others have had this .pid issue, but from > what I've read, it usually involves not starting the cluster from the > proper directory or with proper permissions. > > -- > Dwayne > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From dwayne at futmedia.com Mon Dec 4 13:50:03 2006 From: dwayne at futmedia.com (Dwayne Purper) Date: Mon, 4 Dec 2006 13:50:03 -0500 Subject: [Mongrel] Log problem on stop/restart In-Reply-To: <45746697.3080303@supercool.nl> References: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> <45746697.3080303@supercool.nl> Message-ID: <1617B1FF-A04A-4981-AAEB-D0DD6E4087F9@futmedia.com> Good point: mongrel_cluster.yml ------------------- user: dwayne cwd: /var/www/apps/central/current port: "8000" environment: production group: mongrel address: 127.0.0.1 pid_file: log/mongrel.pid servers: 3 ------------------- Commenting out the pid_file line makes no difference. Still the same issue. > Maybe also share your mongrel_cluster.yml > > Jeroen > > Dwayne Purper wrote: >> I'm using the mongrel_cluster recipes for Capistrano as laid out by >> codahale.com and the new ed. of the Agile Development book, but I'm >> having problems on restart and stop: >> >> I can start: >> >> [root current]# mongrel_rails cluster::start >> Starting 3 Mongrel servers... >> >> >> And I can see 3 processes running: >> >> [root current]# ps aux | grep mongrel >> mongrel 1947 0.0 8.2 24684 10776 ? S Dec01 0:00 / >> usr/ >> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p >> 8000 -a 127.0.0.1 -P log/mongrel.8000.pid -c /var/www/apps/central -- >> user mongrel --group mongrel --prefix /central >> mongrel 1950 0.0 12.4 24716 16336 ? S Dec01 0:00 / >> usr/ >> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p >> 8001 -a 127.0.0.1 -P log/mongrel.8001.pid -c /var/www/apps/central -- >> user mongrel --group mongrel --prefix /central >> mongrel 1953 0.0 12.0 24696 15768 ? S Dec01 0:00 / >> usr/ >> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p >> 8002 -a 127.0.0.1 -P log/mongrel.8002.pid -c /var/www/apps/central -- >> user mongrel --group mongrel --prefix /central >> root 6687 0.0 0.5 3912 688 pts/1 R+ 05:21 0:00 grep >> mongrel >> >> >> But when I check the page, I get a 404: >> >> [root current]# curl -I http://127.0.0.1:8000 >> HTTP/1.1 404 Not Found >> Connection: close >> Server: Mongrel 0.3.18 >> >> >> When I stop (or restart), I get .pid does not exist messages: >> >> [root current]# mongrel_rails cluster::stop >> Stopping 3 Mongrel servers... >> !!! PID file log/mongrel.8000.pid does not exist. Not running? >> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h >> to get help. >> mongrel_rails stop -P log/mongrel.8000.pid -c /var/www/apps/central/ >> current >> >> !!! PID file log/mongrel.8001.pid does not exist. Not running? >> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h >> to get help. >> mongrel_rails stop -P log/mongrel.8001.pid -c /var/www/apps/central/ >> current >> >> !!! PID file log/mongrel.8002.pid does not exist. Not running? >> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h >> to get help. >> mongrel_rails stop -P log/mongrel.8002.pid -c /var/www/apps/central/ >> current >> >> >> So is it a permissions issue? >> >> Permissions for current directory have log owned by >> dwayne:dwayne ... : >> >> [root current]# ls -l >> total 60 >> drwxr-xr-x 7 dwayne dwayne 4096 Dec 5 05:06 app >> drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 components >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 config >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 db >> drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 doc >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 lib >> lrwxrwxrwx 1 dwayne dwayne 32 Dec 5 05:06 log -> /var/www/apps/ >> central/shared/log >> drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 public >> -rw-r--r-- 1 dwayne dwayne 307 Dec 5 05:06 Rakefile >> -rw-r--r-- 1 dwayne dwayne 7264 Dec 5 05:06 README >> drwxr-xr-x 5 dwayne dwayne 4096 Dec 5 05:06 script >> drwxr-xr-x 8 dwayne dwayne 4096 Dec 5 05:06 test >> drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 tmp >> -rw-r--r-- 1 dwayne dwayne 1930 Dec 5 05:06 TODO >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 vendor >> >> >> But that's a symlink to shared directory created by Capistrano. I >> changed the shared log directory in /var/www/apps/central/shared/log >> to group mongrel, but that doesn't seem to help: >> >> [root current]# ls -l /var/www/apps/central/shared >> total 12 >> drwxrwxrwx 2 dwayne mongrel 4096 Dec 5 03:08 log >> drwxrwxrwx 2 dwayne dwayne 4096 Dec 4 16:01 pids >> drwxrwxr-x 2 dwayne dwayne 4096 Dec 4 16:01 system >> >> >> I changed existing mongrel.log to group mongrel also: >> >> [root current]# ls -l /var/www/apps/central/shared/log >> total 76 >> -rw-r--r-- 1 root root 73 Dec 4 16:24 development.log >> -rw-rw-rw- 1 dwayne mongrel 67050 Dec 5 05:20 mongrel.log >> >> >> It seems like mongrel_cluster should have what it needs to create the >> pid files. What am I missing? >> >> Thanks for any help. I know others have had this .pid issue, but from >> what I've read, it usually involves not starting the cluster from the >> proper directory or with proper permissions. >> >> -- >> Dwayne >> _______________________________________________ >> 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 > > -- Dwayne Purper Futura : Durham, NC USA print : web : multimedia www.futuracreative.com From jnewland at gmail.com Mon Dec 4 13:57:33 2006 From: jnewland at gmail.com (jesse newland) Date: Mon, 4 Dec 2006 13:57:33 -0500 Subject: [Mongrel] Log problem on stop/restart In-Reply-To: <1617B1FF-A04A-4981-AAEB-D0DD6E4087F9@futmedia.com> References: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> <45746697.3080303@supercool.nl> <1617B1FF-A04A-4981-AAEB-D0DD6E4087F9@futmedia.com> Message-ID: I noticed a similar issue several weeks ago that was fixed by commenting out the address line. Give it a shot? Jesse On 12/4/06, Dwayne Purper wrote: > Good point: > > mongrel_cluster.yml > ------------------- > user: dwayne > cwd: /var/www/apps/central/current > port: "8000" > environment: production > group: mongrel > address: 127.0.0.1 > pid_file: log/mongrel.pid > servers: 3 > ------------------- > > Commenting out the pid_file line makes no difference. Still the same > issue. > > > > Maybe also share your mongrel_cluster.yml > > > > Jeroen > > > > Dwayne Purper wrote: > >> I'm using the mongrel_cluster recipes for Capistrano as laid out by > >> codahale.com and the new ed. of the Agile Development book, but I'm > >> having problems on restart and stop: > >> > >> I can start: > >> > >> [root current]# mongrel_rails cluster::start > >> Starting 3 Mongrel servers... > >> > >> > >> And I can see 3 processes running: > >> > >> [root current]# ps aux | grep mongrel > >> mongrel 1947 0.0 8.2 24684 10776 ? S Dec01 0:00 / > >> usr/ > >> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p > >> 8000 -a 127.0.0.1 -P log/mongrel.8000.pid -c /var/www/apps/central -- > >> user mongrel --group mongrel --prefix /central > >> mongrel 1950 0.0 12.4 24716 16336 ? S Dec01 0:00 / > >> usr/ > >> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p > >> 8001 -a 127.0.0.1 -P log/mongrel.8001.pid -c /var/www/apps/central -- > >> user mongrel --group mongrel --prefix /central > >> mongrel 1953 0.0 12.0 24696 15768 ? S Dec01 0:00 / > >> usr/ > >> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p > >> 8002 -a 127.0.0.1 -P log/mongrel.8002.pid -c /var/www/apps/central -- > >> user mongrel --group mongrel --prefix /central > >> root 6687 0.0 0.5 3912 688 pts/1 R+ 05:21 0:00 grep > >> mongrel > >> > >> > >> But when I check the page, I get a 404: > >> > >> [root current]# curl -I http://127.0.0.1:8000 > >> HTTP/1.1 404 Not Found > >> Connection: close > >> Server: Mongrel 0.3.18 > >> > >> > >> When I stop (or restart), I get .pid does not exist messages: > >> > >> [root current]# mongrel_rails cluster::stop > >> Stopping 3 Mongrel servers... > >> !!! PID file log/mongrel.8000.pid does not exist. Not running? > >> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h > >> to get help. > >> mongrel_rails stop -P log/mongrel.8000.pid -c /var/www/apps/central/ > >> current > >> > >> !!! PID file log/mongrel.8001.pid does not exist. Not running? > >> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h > >> to get help. > >> mongrel_rails stop -P log/mongrel.8001.pid -c /var/www/apps/central/ > >> current > >> > >> !!! PID file log/mongrel.8002.pid does not exist. Not running? > >> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h > >> to get help. > >> mongrel_rails stop -P log/mongrel.8002.pid -c /var/www/apps/central/ > >> current > >> > >> > >> So is it a permissions issue? > >> > >> Permissions for current directory have log owned by > >> dwayne:dwayne ... : > >> > >> [root current]# ls -l > >> total 60 > >> drwxr-xr-x 7 dwayne dwayne 4096 Dec 5 05:06 app > >> drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 components > >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 config > >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 db > >> drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 doc > >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 lib > >> lrwxrwxrwx 1 dwayne dwayne 32 Dec 5 05:06 log -> /var/www/apps/ > >> central/shared/log > >> drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 public > >> -rw-r--r-- 1 dwayne dwayne 307 Dec 5 05:06 Rakefile > >> -rw-r--r-- 1 dwayne dwayne 7264 Dec 5 05:06 README > >> drwxr-xr-x 5 dwayne dwayne 4096 Dec 5 05:06 script > >> drwxr-xr-x 8 dwayne dwayne 4096 Dec 5 05:06 test > >> drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 tmp > >> -rw-r--r-- 1 dwayne dwayne 1930 Dec 5 05:06 TODO > >> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 vendor > >> > >> > >> But that's a symlink to shared directory created by Capistrano. I > >> changed the shared log directory in /var/www/apps/central/shared/log > >> to group mongrel, but that doesn't seem to help: > >> > >> [root current]# ls -l /var/www/apps/central/shared > >> total 12 > >> drwxrwxrwx 2 dwayne mongrel 4096 Dec 5 03:08 log > >> drwxrwxrwx 2 dwayne dwayne 4096 Dec 4 16:01 pids > >> drwxrwxr-x 2 dwayne dwayne 4096 Dec 4 16:01 system > >> > >> > >> I changed existing mongrel.log to group mongrel also: > >> > >> [root current]# ls -l /var/www/apps/central/shared/log > >> total 76 > >> -rw-r--r-- 1 root root 73 Dec 4 16:24 development.log > >> -rw-rw-rw- 1 dwayne mongrel 67050 Dec 5 05:20 mongrel.log > >> > >> > >> It seems like mongrel_cluster should have what it needs to create the > >> pid files. What am I missing? > >> > >> Thanks for any help. I know others have had this .pid issue, but from > >> what I've read, it usually involves not starting the cluster from the > >> proper directory or with proper permissions. > >> > >> -- > >> Dwayne > >> _______________________________________________ > >> 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 > > > > > > -- > Dwayne Purper > Futura : Durham, NC USA > print : web : multimedia > www.futuracreative.com > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Mon Dec 4 14:01:58 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 4 Dec 2006 14:01:58 -0500 Subject: [Mongrel] Log problem on stop/restart In-Reply-To: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> References: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> Message-ID: <20061204140158.b9a5a4b0.zedshaw@zedshaw.com> On Mon, 4 Dec 2006 11:35:24 -0500 Dwayne Purper wrote: > I'm using the mongrel_cluster recipes for Capistrano as laid out by > codahale.com and the new ed. of the Agile Development book, but I'm > having problems on restart and stop: Something I don't quite understand is how people are passing in -c to chdir, the code does the chdir first before any checking, and still the files aren't there for many people. I'm thinking it's user error, but I'm gonna expand the error message on the next release to be: "PID file #@pid_file does not exist in directory #@cwd. Not running?" For all the errors that complain about a file being missing. Hopefully that'll narrow down why it's not finding them even after it's been told to chdir. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From ompan at mac.com Mon Dec 4 13:48:00 2006 From: ompan at mac.com (Phillip Novess) Date: Mon, 4 Dec 2006 11:48:00 -0700 Subject: [Mongrel] Mongrel and Mongrel Cluster Library LoadErrors Message-ID: <73A2B50B-0E02-40BE-8F93-FF3D80867D7F@mac.com> Hello, I'm a noobie to Rails and even more to mongrel. I have an issue with one server that I've installed mongrel. Its a Fedora Core 5 box, and it is having problems loading the Oracle OCI8 libraries. However, this only occurs when I use mongrel_cluster, or mongrel with out the - d switch. I have no problem using the library from the commandline and with Webrick or mongrel whn I use the -d switch. The other perplexing thing is I have mongrel_cluster working on another server that runs Fedora Core 4. I upgraded that box with Fedora Core 5 and it still works correctly. But the other server is a clean install of Fedora Core 5 and no joy. Does anybody have an idea what to check or add so that this will work correctly? I suspect permissions or environment variables are the problem, but how would I know? Thanks, Phill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061204/e85d0879/attachment.html From kigsteronline at mac.com Mon Dec 4 14:50:32 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Mon, 4 Dec 2006 11:50:32 -0800 Subject: [Mongrel] Mongrel and Mongrel Cluster Library LoadErrors In-Reply-To: <73A2B50B-0E02-40BE-8F93-FF3D80867D7F@mac.com> References: <73A2B50B-0E02-40BE-8F93-FF3D80867D7F@mac.com> Message-ID: <8D117540-3C12-4C35-9861-D417B054FC51@mac.com> You may need to check your LD_LIBRARY_PATH variable. My guess is that Oracle OCI library lives somewhere where oracle is installed ($ORACLE_HOME/lib). So I would try to make sure that when mongrel starts, LD_LIBRARY_PATH and ORACLE_HOME are setup correctly in mongrel's environment. Hope this helps Konstantin On Dec 4, 2006, at 10:48 AM, Phillip Novess wrote: > Hello, > > I'm a noobie to Rails and even more to mongrel. I have an issue > with one server that I've installed mongrel. Its a Fedora Core 5 > box, and it is having problems loading the Oracle OCI8 libraries. > However, this only occurs when I use mongrel_cluster, or mongrel > with out the -d switch. I have no problem using the library from > the commandline and with Webrick or mongrel whn I use the -d > switch. The other perplexing thing is I have mongrel_cluster > working on another server that runs Fedora Core 4. I upgraded that > box with Fedora Core 5 and it still works correctly. But the other > server is a clean install of Fedora Core 5 and no joy. > > Does anybody have an idea what to check or add so that this will > work correctly? I suspect permissions or environment variables are > the problem, but how would I know? > > Thanks, > Phill > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From dwayne at futmedia.com Mon Dec 4 15:32:32 2006 From: dwayne at futmedia.com (Dwayne Purper) Date: Mon, 4 Dec 2006 15:32:32 -0500 Subject: [Mongrel] Log problem on stop/restart In-Reply-To: <1617B1FF-A04A-4981-AAEB-D0DD6E4087F9@futmedia.com> References: <2A0E0AE1-13D8-40D0-9A9C-FA41BA9E937A@futmedia.com> <45746697.3080303@supercool.nl> <1617B1FF-A04A-4981-AAEB-D0DD6E4087F9@futmedia.com> Message-ID: Ah, found it. The mongrel_cluster processes that were running were old ones, from Dec 1. I thought that date, plus the -c /var/www/apps/central (without the 'current') looked fishy. I killed them and restarted, and I'm now getting the Rails welcome page. > Good point: > > mongrel_cluster.yml > ------------------- > user: dwayne > cwd: /var/www/apps/central/current > port: "8000" > environment: production > group: mongrel > address: 127.0.0.1 > pid_file: log/mongrel.pid > servers: 3 > ------------------- > > Commenting out the pid_file line makes no difference. Still the same > issue. > > >> Maybe also share your mongrel_cluster.yml >> >> Jeroen >> >> Dwayne Purper wrote: >>> I'm using the mongrel_cluster recipes for Capistrano as laid out by >>> codahale.com and the new ed. of the Agile Development book, but I'm >>> having problems on restart and stop: >>> >>> I can start: >>> >>> [root current]# mongrel_rails cluster::start >>> Starting 3 Mongrel servers... >>> >>> >>> And I can see 3 processes running: >>> >>> [root current]# ps aux | grep mongrel >>> mongrel 1947 0.0 8.2 24684 10776 ? S Dec01 0:00 / >>> usr/ >>> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e >>> production -p >>> 8000 -a 127.0.0.1 -P log/mongrel.8000.pid -c /var/www/apps/ >>> central -- >>> user mongrel --group mongrel --prefix /central >>> mongrel 1950 0.0 12.4 24716 16336 ? S Dec01 0:00 / >>> usr/ >>> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e >>> production -p >>> 8001 -a 127.0.0.1 -P log/mongrel.8001.pid -c /var/www/apps/ >>> central -- >>> user mongrel --group mongrel --prefix /central >>> mongrel 1953 0.0 12.0 24696 15768 ? S Dec01 0:00 / >>> usr/ >>> local/bin/ruby /usr/local/bin/mongrel_rails start -d -e >>> production -p >>> 8002 -a 127.0.0.1 -P log/mongrel.8002.pid -c /var/www/apps/ >>> central -- >>> user mongrel --group mongrel --prefix /central >>> root 6687 0.0 0.5 3912 688 pts/1 R+ 05:21 0:00 >>> grep >>> mongrel >>> >>> >>> But when I check the page, I get a 404: >>> >>> [root current]# curl -I http://127.0.0.1:8000 >>> HTTP/1.1 404 Not Found >>> Connection: close >>> Server: Mongrel 0.3.18 >>> >>> >>> When I stop (or restart), I get .pid does not exist messages: >>> >>> [root current]# mongrel_rails cluster::stop >>> Stopping 3 Mongrel servers... >>> !!! PID file log/mongrel.8000.pid does not exist. Not running? >>> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h >>> to get help. >>> mongrel_rails stop -P log/mongrel.8000.pid -c /var/www/apps/central/ >>> current >>> >>> !!! PID file log/mongrel.8001.pid does not exist. Not running? >>> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h >>> to get help. >>> mongrel_rails stop -P log/mongrel.8001.pid -c /var/www/apps/central/ >>> current >>> >>> !!! PID file log/mongrel.8002.pid does not exist. Not running? >>> mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h >>> to get help. >>> mongrel_rails stop -P log/mongrel.8002.pid -c /var/www/apps/central/ >>> current >>> >>> >>> So is it a permissions issue? >>> >>> Permissions for current directory have log owned by >>> dwayne:dwayne ... : >>> >>> [root current]# ls -l >>> total 60 >>> drwxr-xr-x 7 dwayne dwayne 4096 Dec 5 05:06 app >>> drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 components >>> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 config >>> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 db >>> drwxr-xr-x 3 dwayne dwayne 4096 Dec 5 05:06 doc >>> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 lib >>> lrwxrwxrwx 1 dwayne dwayne 32 Dec 5 05:06 log -> /var/www/apps/ >>> central/shared/log >>> drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 public >>> -rw-r--r-- 1 dwayne dwayne 307 Dec 5 05:06 Rakefile >>> -rw-r--r-- 1 dwayne dwayne 7264 Dec 5 05:06 README >>> drwxr-xr-x 5 dwayne dwayne 4096 Dec 5 05:06 script >>> drwxr-xr-x 8 dwayne dwayne 4096 Dec 5 05:06 test >>> drwxr-xr-x 6 dwayne dwayne 4096 Dec 5 05:06 tmp >>> -rw-r--r-- 1 dwayne dwayne 1930 Dec 5 05:06 TODO >>> drwxr-xr-x 4 dwayne dwayne 4096 Dec 5 05:06 vendor >>> >>> >>> But that's a symlink to shared directory created by Capistrano. I >>> changed the shared log directory in /var/www/apps/central/shared/log >>> to group mongrel, but that doesn't seem to help: >>> >>> [root current]# ls -l /var/www/apps/central/shared >>> total 12 >>> drwxrwxrwx 2 dwayne mongrel 4096 Dec 5 03:08 log >>> drwxrwxrwx 2 dwayne dwayne 4096 Dec 4 16:01 pids >>> drwxrwxr-x 2 dwayne dwayne 4096 Dec 4 16:01 system >>> >>> >>> I changed existing mongrel.log to group mongrel also: >>> >>> [root current]# ls -l /var/www/apps/central/shared/log >>> total 76 >>> -rw-r--r-- 1 root root 73 Dec 4 16:24 development.log >>> -rw-rw-rw- 1 dwayne mongrel 67050 Dec 5 05:20 mongrel.log >>> >>> >>> It seems like mongrel_cluster should have what it needs to create >>> the >>> pid files. What am I missing? >>> >>> Thanks for any help. I know others have had this .pid issue, but >>> from >>> what I've read, it usually involves not starting the cluster from >>> the >>> proper directory or with proper permissions. >>> >>> -- >>> Dwayne >>> _______________________________________________ >>> 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 >> >> > > -- > Dwayne Purper > Futura : Durham, NC USA > print : web : multimedia > www.futuracreative.com > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Dwayne Purper Futura : Durham, NC USA print : web : multimedia www.futuracreative.com From andy.koch at pc-doctor.com Mon Dec 4 14:10:33 2006 From: andy.koch at pc-doctor.com (Andy Koch) Date: Mon, 04 Dec 2006 11:10:33 -0800 Subject: [Mongrel] mongrel install on win32 XP problems Message-ID: <457472A9.5050404@pc-doctor.com> I can't get mongrel installed on a Win XP. I keep getting some unknown error with this "win32-service-0.5.2". While it states results are logged, the file is empty - not much help. I even tried complete uninstall of ruby and reinstalled ruby 1.8.5-21. But no luck. Oddly, I had no problem installing earlier on a Win 2K machine. Is there something special about XP? here is output from... gem install mongrel --include-dependencies result is... 43. Cancel installation > 2 Building native extensions. This could take a while... ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2 for inspection. Results logged to c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2/gem_make.out Thank you -- Andy Koch, Web Applications Developer PC-Doctor, Inc. 9805 Double R Boulevard Suite 301 Reno, NV 89521 775.336.4079 andy.koch at pc-doctor.com CONFIDENTIALITY The information contained in this message is confidential. It is intended to be read only by the individual or entity to whom it is addressed or by an authorized designee. If the reader of this message is not the intended recipient, be aware that distribution of this message in any form is strictly prohibited. If you have received this message in error, please immediately notify the sender and destroy any copy of this message. From luislavena at gmail.com Mon Dec 4 17:34:22 2006 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 4 Dec 2006 19:34:22 -0300 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <457472A9.5050404@pc-doctor.com> References: <457472A9.5050404@pc-doctor.com> Message-ID: <71166b3b0612041434h5e587ca9ma2beb1272fcbde67@mail.gmail.com> On 12/4/06, Andy Koch wrote: > I can't get mongrel installed on a Win XP. I keep getting some unknown > error with this "win32-service-0.5.2". While it states results are > logged, the file is empty - not much help. I even tried complete > uninstall of ruby and reinstalled ruby 1.8.5-21. But no luck. > The problem is that mongrel depends on win32-service >= 0.5.0 We (Zed and I) hacked a gem of win32-service for 0.5.0, but win32utils guys start distributing a source only version of 0.5.2 (which requires compilers to build it). Since that, rubyforge removed the pre-build gem made by us. A workaround that problem is: Download the service.so from the win32utils project (service-0.5.2-vc6.so): http://rubyforge.org/frs/?group_id=85&release_id=8093 Renamed it to "service.so" and place it into: C:\Ruby\lib\ruby\gems\1.8\gems\win32-service-0.5.2\lib\win32 THEN, install mongrel gem. Hope we resolve that "issue" for the next release, removing the dependency on the service gem. > Oddly, I had no problem installing earlier on a Win 2K machine. Is > there something special about XP? Guess is that because you already have the gem installed. > > here is output from... [snip] > > > Thank you > HTH, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From zedshaw at zedshaw.com Mon Dec 4 18:26:21 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 4 Dec 2006 18:26:21 -0500 Subject: [Mongrel] [SECURITY] DOS In cgi.rb Announced, Upgrade Your Ruby Message-ID: <20061204182621.cfac0052.zedshaw@zedshaw.com> It's time again for your monthly cgi.rb DOS vulnerability. This latest vulnerability is different from the one that cgi_multipart_eof_fix.gem fixed. This one is related to the boundary taken from the web client being used incorrectly. You can read about the vulnerability: http://www.ruby-lang.org/en/news/2006/12/04/another-dos-vulnerability-in-cgi-library The applicable PATCH is here: http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/lib/cgi.rb?cvsroot=src&r1=1.68.2.18&r2=1.68.2.19 For just this vulnerability and if you want both this one and the previous then it's: http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/lib/cgi.rb?cvsroot=src&r1=1.68.2.17&r2=1.68.2.19 The full source is here: http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5-p2.tar.gz And the original posting from Urabe Shyouhei: http://groups-beta.google.com/group/comp.lang.ruby/browse_frm/thread/bdc7a5f5f48827b2/d39e95b3bb035162#d39e95b3bb035162 I will NOT be releasing a similar fix gem for Mongrel, and instead will encourage people to either upgrade or apply the patch themselves. I'll sort out if I can do a Mongrel release now that doesn't have the original cgi_multipart_eof_fix gem included as well. FULL DESCRIPTION The vulnerability is that when the web browser sends the HTTP request it decides what the boundary should be. The web server has to protect against the client choosing malicious boundaries since it can't be trusted. In cgi.rb the boundary variable originally was used directly in the later regex without being quoted. This means a client can pick an actual regex that eats the CPU and inject it into the final regex used to find matching boundaries. COURSE OF ACTION You have three possible things you can do right now: 1) Apply the above patch to cgi.rb and restart all your mongrel servers. 2) Upgrade to the 1.8.5-p2 version of ruby. Some systems have already started pushing this out. 3) If you can, restrict multipart mime requests to only the URLs that should accept them, and possibly even restrict requests that don't have only alpha-numeric characters in them and dashes. This is risky still, but it might get you over the hump. GETTING HELP If you are totally stuck and still need help I'll be hanging out in the Lingr room for the rest of the evening: http://www.lingr.com/room/3yXhqKbfPy8 Feel free to bug me with questions. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jamesludlow at gmail.com Tue Dec 5 11:43:42 2006 From: jamesludlow at gmail.com (JDL) Date: Tue, 5 Dec 2006 10:43:42 -0600 Subject: [Mongrel] [SECURITY] DOS In cgi.rb Announced, Upgrade Your Ruby In-Reply-To: <20061204182621.cfac0052.zedshaw@zedshaw.com> References: <20061204182621.cfac0052.zedshaw@zedshaw.com> Message-ID: On 12/4/06, Zed A. Shaw wrote: > It's time again for your monthly cgi.rb DOS vulnerability. This latest vulnerability is different from the one that cgi_multipart_eof_fix.gem fixed. This one is related to the boundary taken from the web client being used incorrectly. > > You can read about the vulnerability: [snip] Thank you very much for this announcement. I took the route of upgrading Ruby. So far so good. If I run into anything crazy, I'll be sure to report it. -- James From Daniel.Berger at qwest.com Tue Dec 5 11:23:28 2006 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 5 Dec 2006 10:23:28 -0600 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <71166b3b0612041434h5e587ca9ma2beb1272fcbde67@mail.gmail.com> Message-ID: <7524A45A1A5B264FA4809E2156496CFB0D0DAD@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: mongrel-users-bounces at rubyforge.org > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Luis Lavena > Sent: Monday, December 04, 2006 3:34 PM > To: mongrel-users at rubyforge.org > Subject: Re: [Mongrel] mongrel install on win32 XP problems > > > On 12/4/06, Andy Koch wrote: > > I can't get mongrel installed on a Win XP. I keep getting some > > unknown error with this "win32-service-0.5.2". While it states > > results are logged, the file is empty - not much help. I > even tried > > complete uninstall of ruby and reinstalled ruby 1.8.5-21. But no > > luck. > > > > The problem is that mongrel depends on win32-service >= 0.5.0 > We (Zed and I) hacked a gem of win32-service for 0.5.0, but > win32utils guys start distributing a source only version of > 0.5.2 (which requires compilers to build it). Since this seems to be causing quite a few headaches all around, I'll get cracking on a binary distribution for the gem tonight and try to get it released asap. The only downside is that it will be compiled with VC++ 6.0, which means a couple of the Win32Service struct members will be unavailable in the Service.services method (and you won't be able to specify a 'group'). This won't affect the Daemon class, though. Ideally I'd like to be able to set this up as an either-or, with something like "gem install win32-service --from-source" to force a build if the user wants to build from source instead of using the binary. Is such an option possible? Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From luislavena at gmail.com Tue Dec 5 12:36:09 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 5 Dec 2006 14:36:09 -0300 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB0D0DAD@ITOMAE2KM01.AD.QINTRA.COM> References: <71166b3b0612041434h5e587ca9ma2beb1272fcbde67@mail.gmail.com> <7524A45A1A5B264FA4809E2156496CFB0D0DAD@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <71166b3b0612050936w704dbe75m9351cef2b1cc9c10@mail.gmail.com> On 12/5/06, Berger, Daniel wrote: > > -----Original Message----- > > From: mongrel-users-bounces at rubyforge.org > > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Luis Lavena > > Sent: Monday, December 04, 2006 3:34 PM > > To: mongrel-users at rubyforge.org > > Subject: Re: [Mongrel] mongrel install on win32 XP problems > > > > > > On 12/4/06, Andy Koch wrote: > > > I can't get mongrel installed on a Win XP. I keep getting some > > > unknown error with this "win32-service-0.5.2". While it states > > > results are logged, the file is empty - not much help. I > > even tried > > > complete uninstall of ruby and reinstalled ruby 1.8.5-21. But no > > > luck. > > > > > > > The problem is that mongrel depends on win32-service >= 0.5.0 > > We (Zed and I) hacked a gem of win32-service for 0.5.0, but > > win32utils guys start distributing a source only version of > > 0.5.2 (which requires compilers to build it). > > > > Since this seems to be causing quite a few headaches all around, I'll > get cracking on a binary distribution for the gem tonight and try to get > it released asap. > > The only downside is that it will be compiled with VC++ 6.0, which means > a couple of the Win32Service struct members will be unavailable in the > Service.services method (and you won't be able to specify a 'group'). > This won't affect the Daemon class, though. > > Ideally I'd like to be able to set this up as an either-or, with > something like "gem install win32-service --from-source" to force a > build if the user wants to build from source instead of using the > binary. Is such an option possible? > Daniel, Based on rubygems documentation and experience, if you have two gems with the same version, but both with different platforms (ruby and mswin32), rubygems will offer you a choice on which one will be installed. Basically, if you want the user build the native extensions by himself, download the ruby version, any other case (ala no compiler), download the prebuild gem. > Thanks, > > Dan > Thanks to you Dan, I scheduled a few hours this afternoon to solve this issue, but guess your work will ease the things a bit :-) -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Tue Dec 5 12:41:04 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 5 Dec 2006 14:41:04 -0300 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <71166b3b0612050936w704dbe75m9351cef2b1cc9c10@mail.gmail.com> References: <71166b3b0612041434h5e587ca9ma2beb1272fcbde67@mail.gmail.com> <7524A45A1A5B264FA4809E2156496CFB0D0DAD@ITOMAE2KM01.AD.QINTRA.COM> <71166b3b0612050936w704dbe75m9351cef2b1cc9c10@mail.gmail.com> Message-ID: <71166b3b0612050941s34d1c0e3m2047e70370c34aeb@mail.gmail.com> On 12/5/06, Luis Lavena wrote: > On 12/5/06, Berger, Daniel wrote: > > > -----Original Message----- [snip] > > > > The only downside is that it will be compiled with VC++ 6.0, which means > > a couple of the Win32Service struct members will be unavailable in the > > Service.services method (and you won't be able to specify a 'group'). > > This won't affect the Daemon class, though. Dan, I packaged the VisualC++ 2003 Toolkit, with latest Platform SDK (2003 R2), along with VC6 in 35MB (7z). I use that environment to switch compilers testing compatibility issues. Contact me off the list and I could provide you a link (the 2003 Toolkit is no longer downloadable online, that's why I'm offering this to you). Regards, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From superjoe at gmail.com Tue Dec 5 15:39:39 2006 From: superjoe at gmail.com (Joseph McDonald) Date: Tue, 5 Dec 2006 12:39:39 -0800 Subject: [Mongrel] mongrel and long lived connections Message-ID: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> Hi, I found this article http://cyll.org/blog/tech/2006-08-09-themongrelcomet.html on mongrel and COMET very interesting. I ran the code, and it worked just as Christopher explained. The one thing I don't understand is why mongrel can only handle 1 connection at a time. I thought that mongrel used a thread per connection. It appears that each registered handler can only handle 1 connection. So if a request comes into another handler, it will be handled. My question is: Is there a way to allow a single handler to serve multple connections? I'm going to try debugging this to see why the handler is blocked, but if someone knows the answer before I find out, please shout it out. thanks, -joe From luislavena at gmail.com Tue Dec 5 15:52:37 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 5 Dec 2006 17:52:37 -0300 Subject: [Mongrel] mongrel and long lived connections In-Reply-To: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> References: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> Message-ID: <71166b3b0612051252l78c1890p3a7a533851a35436@mail.gmail.com> On 12/5/06, Joseph McDonald wrote: > Hi, > > I found this article > http://cyll.org/blog/tech/2006-08-09-themongrelcomet.html on mongrel > and COMET very interesting. > > I ran the code, and it worked just as Christopher explained. The one > thing I don't understand is why mongrel can only handle 1 connection > at a time. I thought that mongrel used a thread per connection. > Let me correct you on this: Mongrel CAN handle multiple incoming connections, Rails can't. Rails is not thread-safe, mongrel is. So: using mongrel with rails (ala, mongrel_rails command line util) will put a lock around Rails dispatcher to avoid issues with ActiveRecord. > It appears that each registered handler can only handle 1 connection. > So if a request comes into another handler, it will be handled. > Thats RailsHandler, other frameworks (AFAIK, IOWA, MERB) are thread safe in that aspect. > My question is: Is there a way to allow a single handler to serve > multple connections? > > I'm going to try debugging this to see why the handler is blocked, but > if someone knows the answer before I find out, please shout it out. > Besides issue with the use of select() by ruby, also the use of green(ala fake) threads instead of native ones... guess there is not much help on this area. Please, If I'm wrong in some of the things I have said, don't start a flamewar, just point me in the right direction and correct my ignorance :-) -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From david at vrensk.com Tue Dec 5 15:54:11 2006 From: david at vrensk.com (David Vrensk) Date: Tue, 5 Dec 2006 21:54:11 +0100 Subject: [Mongrel] mongrel and long lived connections In-Reply-To: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> References: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> Message-ID: <81b453920612051254i84a6265ve2cbc54f87443bb3@mail.gmail.com> On 12/5/06, Joseph McDonald wrote: > > I ran the code, and it worked just as Christopher explained. The one > thing I don't understand is why mongrel can only handle 1 connection > at a time. I thought that mongrel used a thread per connection. The simple answer: Mongrel is multithreaded, but Rails is not thread-safe. See question two in the FAQ: http://mongrel.rubyforge.org/faq.html /David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061205/7da2a2ed/attachment.html From superjoe at gmail.com Tue Dec 5 16:08:14 2006 From: superjoe at gmail.com (Joseph McDonald) Date: Tue, 5 Dec 2006 13:08:14 -0800 Subject: [Mongrel] mongrel and long lived connections In-Reply-To: <81b453920612051254i84a6265ve2cbc54f87443bb3@mail.gmail.com> References: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> <81b453920612051254i84a6265ve2cbc54f87443bb3@mail.gmail.com> Message-ID: <73096a160612051308i6035968bsb887179355386a9d@mail.gmail.com> I understand that rails is not thread safe, but this is not using rails or any part of rails. It just sets up a simple handler. but registering that handler seems to allow only one instance of that handler to run at a time. On 12/5/06, David Vrensk wrote: > On 12/5/06, Joseph McDonald wrote: > > I ran the code, and it worked just as Christopher explained. The one > > thing I don't understand is why mongrel can only handle 1 connection > > at a time. I thought that mongrel used a thread per connection. > > > The simple answer: Mongrel is multithreaded, but Rails is not thread-safe. > See question two in the FAQ: > http://mongrel.rubyforge.org/faq.html > > /David > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From g.vishnu at gmail.com Tue Dec 5 16:31:56 2006 From: g.vishnu at gmail.com (Vishnu Gopal) Date: Wed, 6 Dec 2006 03:01:56 +0530 Subject: [Mongrel] mongrel and long lived connections In-Reply-To: <73096a160612051308i6035968bsb887179355386a9d@mail.gmail.com> References: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> <81b453920612051254i84a6265ve2cbc54f87443bb3@mail.gmail.com> <73096a160612051308i6035968bsb887179355386a9d@mail.gmail.com> Message-ID: If you read that wikipedia article, you'll note that Comet actually does want this to happen: one connection to be kept alive. Mongrel afai understand it is not meant to be used with keep-alive-ish sort of connections. Polling (via AJAX) would more often than not serve your purpose, and if it doesn't, a switch to Java or Cometd seems to be the way to go. Vish On 12/6/06, Joseph McDonald wrote: > > I understand that rails is not thread safe, but this is not using > rails or any part of rails. It just sets up a simple handler. but > registering that handler seems to allow only one instance of that > handler to run at a time. > > > On 12/5/06, David Vrensk wrote: > > On 12/5/06, Joseph McDonald wrote: > > > I ran the code, and it worked just as Christopher explained. The one > > > thing I don't understand is why mongrel can only handle 1 connection > > > at a time. I thought that mongrel used a thread per connection. > > > > > > The simple answer: Mongrel is multithreaded, but Rails is not > thread-safe. > > See question two in the FAQ: > > http://mongrel.rubyforge.org/faq.html > > > > /David > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/a220b9df/attachment.html From superjoe at gmail.com Tue Dec 5 17:02:52 2006 From: superjoe at gmail.com (Joseph McDonald) Date: Tue, 5 Dec 2006 14:02:52 -0800 Subject: [Mongrel] mongrel and long lived connections In-Reply-To: References: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> <81b453920612051254i84a6265ve2cbc54f87443bb3@mail.gmail.com> <73096a160612051308i6035968bsb887179355386a9d@mail.gmail.com> Message-ID: <73096a160612051402i58fc35a4j4c847862139a4429@mail.gmail.com> OK. I'm just trying to understand why/where mongrel is blocking when more than 1 request comes in for a particular uri. I'm thinking there may be something different with this particular httphandler. Or maybe not... maybe mongrel can't service more than 1 request for a particular uri at a time. It's interesting that more than 1 can run at a time, you just need to associate them with different uri's. I'd like to find out why that is, and if that's changeable. -joe On 12/5/06, Vishnu Gopal wrote: > If you read that wikipedia article, you'll note that Comet actually does > want this to happen: one connection to be kept alive. Mongrel afai > understand it is not meant to be used with keep-alive-ish sort of > connections. Polling (via AJAX) would more often than not serve your > purpose, and if it doesn't, a switch to Java or Cometd seems to be the way > to go. > > Vish > > > On 12/6/06, Joseph McDonald wrote: > > I understand that rails is not thread safe, but this is not using > > rails or any part of rails. It just sets up a simple handler. but > > registering that handler seems to allow only one instance of that > > handler to run at a time. > > > > > > On 12/5/06, David Vrensk wrote: > > > On 12/5/06, Joseph McDonald wrote: > > > > I ran the code, and it worked just as Christopher explained. The one > > > > thing I don't understand is why mongrel can only handle 1 connection > > > > at a time. I thought that mongrel used a thread per connection. > > > > > > > > > The simple answer: Mongrel is multithreaded, but Rails is not > thread-safe. > > > See question two in the FAQ: > > > http://mongrel.rubyforge.org/faq.html > > > > > > /David > > > > > > _______________________________________________ > > > 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 superjoe at gmail.com Tue Dec 5 17:30:23 2006 From: superjoe at gmail.com (Joseph McDonald) Date: Tue, 5 Dec 2006 14:30:23 -0800 Subject: [Mongrel] mongrel and long lived connections In-Reply-To: <73096a160612051402i58fc35a4j4c847862139a4429@mail.gmail.com> References: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> <81b453920612051254i84a6265ve2cbc54f87443bb3@mail.gmail.com> <73096a160612051308i6035968bsb887179355386a9d@mail.gmail.com> <73096a160612051402i58fc35a4j4c847862139a4429@mail.gmail.com> Message-ID: <73096a160612051430m204d27c5g78ea2000b37690@mail.gmail.com> well i think i found the problem... I think it's my browser. I could not open more than 1 connection with firefox, but if i opened msie and opera on the url, the data came streaming on down simultaneously. sorry for the false alarm! -joe On 12/5/06, Joseph McDonald wrote: > OK. I'm just trying to understand why/where mongrel is blocking when > more than 1 request comes in for a particular uri. I'm thinking there > may be something different with this particular httphandler. Or maybe > not... maybe mongrel can't service more than 1 request for a > particular uri at a time. > > It's interesting that more than 1 can run at a time, you just need to > associate them with different uri's. I'd like to find out why that > is, and if that's changeable. > > -joe > > On 12/5/06, Vishnu Gopal wrote: > > If you read that wikipedia article, you'll note that Comet actually does > > want this to happen: one connection to be kept alive. Mongrel afai > > understand it is not meant to be used with keep-alive-ish sort of > > connections. Polling (via AJAX) would more often than not serve your > > purpose, and if it doesn't, a switch to Java or Cometd seems to be the way > > to go. > > > > Vish > > > > > > On 12/6/06, Joseph McDonald wrote: > > > I understand that rails is not thread safe, but this is not using > > > rails or any part of rails. It just sets up a simple handler. but > > > registering that handler seems to allow only one instance of that > > > handler to run at a time. > > > > > > > > > On 12/5/06, David Vrensk wrote: > > > > On 12/5/06, Joseph McDonald wrote: > > > > > I ran the code, and it worked just as Christopher explained. The one > > > > > thing I don't understand is why mongrel can only handle 1 connection > > > > > at a time. I thought that mongrel used a thread per connection. > > > > > > > > > > > > The simple answer: Mongrel is multithreaded, but Rails is not > > thread-safe. > > > > See question two in the FAQ: > > > > http://mongrel.rubyforge.org/faq.html > > > > > > > > /David > > > > > > > > _______________________________________________ > > > > 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 Daniel.Berger at qwest.com Tue Dec 5 17:11:25 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Tue, 05 Dec 2006 15:11:25 -0700 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <71166b3b0612050936w704dbe75m9351cef2b1cc9c10@mail.gmail.com> References: <71166b3b0612041434h5e587ca9ma2beb1272fcbde67@mail.gmail.com><75 24A45A1A5B264FA4809E2156496CFB0D0DAD@ITOMAE2KM01.AD.QINTRA.COM> <71166b3b0612050936w704dbe75m9351cef2b1cc9c10@mail.gmail.com> Message-ID: <4575EE8D.2070309@qwest.com> Luis Lavena wrote: >> Ideally I'd like to be able to set this up as an either-or, with >> something like "gem install win32-service --from-source" to force a >> build if the user wants to build from source instead of using the >> binary. Is such an option possible? >> > > Daniel, > > Based on rubygems documentation and experience, if you have two gems > with the same version, but both with different platforms (ruby and > mswin32), rubygems will offer you a choice on which one will be > installed. > > Basically, if you want the user build the native extensions by > himself, download the ruby version, any other case (ala no compiler), > download the prebuild gem. I thought about that, but I worry it will just confuse the newbs. I can see it now - "Hey, which of these am I suppose to install?". Assuming gems doesn't provide an alternative I'll just have to deal with it I guess. Thanks, Dan From luislavena at gmail.com Tue Dec 5 18:06:12 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 5 Dec 2006 20:06:12 -0300 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <4575EE8D.2070309@qwest.com> References: <71166b3b0612041434h5e587ca9ma2beb1272fcbde67@mail.gmail.com> <71166b3b0612050936w704dbe75m9351cef2b1cc9c10@mail.gmail.com> <4575EE8D.2070309@qwest.com> Message-ID: <71166b3b0612051506g1167dd67vbfa1092a32a5f2fa@mail.gmail.com> On 12/5/06, Daniel Berger wrote: > Luis Lavena wrote: > > > >> Ideally I'd like to be able to set this up as an either-or, with > >> something like "gem install win32-service --from-source" to force a > >> build if the user wants to build from source instead of using the > >> binary. Is such an option possible? > >> > > > > Daniel, > > > > Based on rubygems documentation and experience, if you have two gems > > with the same version, but both with different platforms (ruby and > > mswin32), rubygems will offer you a choice on which one will be > > installed. > > > > Basically, if you want the user build the native extensions by > > himself, download the ruby version, any other case (ala no compiler), > > download the prebuild gem. > > I thought about that, but I worry it will just confuse the newbs. I can > see it now - "Hey, which of these am I suppose to install?". Assuming > gems doesn't provide an alternative I'll just have to deal with it I guess. > The problem with gemspecs: If you define something in "extensions", rubygems will try to run the extconf for that extension. To avoid that, extensions must be cleared (extensions.clear()) like we are doing with mongrel gems: http://rubyforge.org/viewvc/trunk/Rakefile?revision=441&root=mongrel&view=markup Guess a notice / faq should be used to warn the user about this: Q. When installing gem 'name', two versions are shown, which one should I choose? A. If you're a Windows user, mostly you don't have a compiler/build environment like Visual C to compile and build the extensions bundled with the gem. In that case, please choose the pre-built version (marked as platform specific gem: mswin32). -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Tue Dec 5 19:15:56 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 5 Dec 2006 21:15:56 -0300 Subject: [Mongrel] [ANN] Win32 gems for mongrel (0.3.18) and mongrel_service (0.3.1) Message-ID: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com> Hello Users!, Since the pre-release 0.3.18 (last week) Lot of things happen in ruby-land (check the DoS security bulletin, please). Anyway, the win32 folks being left on the side of the road, and cannot provide feedback of stability due lack of binaries for the latest releases. So, I managed to upload the pre-built gem to my host: http://www.mmediasys.com/releases/mongrel-0.3.18-mswin32.gem rubygems still don't like my yaml specifications, so you can use --source option with 'gem install' Please download it and perform a manual install. Don't forget to install also the latest mongrel_service from the same place: http://www.mmediasys.com/releases/mongrel_service-0.3.1-mswin32.gem Regards and hope this provides a better feedback on the forum/list about stability issues with mongrel and win32. Later, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From will at hotgazpacho.com Tue Dec 5 19:39:53 2006 From: will at hotgazpacho.com (Will Green) Date: Tue, 05 Dec 2006 19:39:53 -0500 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB0D0DAD@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFB0D0DAD@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <45761159.6030006@hotgazpacho.com> I have an MSDN subscription. Send me a solution file and build instructions, and I will try to build it with VS.Net 2003 (VC 7.1) or VS.Net 2005 (VC 8), or if you give me a day, VS.Net (VC 7). == Will Berger, Daniel wrote: >>-----Original Message----- >>From: mongrel-users-bounces at rubyforge.org >>[mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Luis Lavena >>Sent: Monday, December 04, 2006 3:34 PM >>To: mongrel-users at rubyforge.org >>Subject: Re: [Mongrel] mongrel install on win32 XP problems >> >> >>On 12/4/06, Andy Koch wrote: >> >> >>>I can't get mongrel installed on a Win XP. I keep getting some >>>unknown error with this "win32-service-0.5.2". While it states >>>results are logged, the file is empty - not much help. I >>> >>> >>even tried >> >> >>>complete uninstall of ruby and reinstalled ruby 1.8.5-21. But no >>>luck. >>> >>> >>> >>The problem is that mongrel depends on win32-service >= 0.5.0 >>We (Zed and I) hacked a gem of win32-service for 0.5.0, but >>win32utils guys start distributing a source only version of >>0.5.2 (which requires compilers to build it). >> >> > > > >Since this seems to be causing quite a few headaches all around, I'll >get cracking on a binary distribution for the gem tonight and try to get >it released asap. > >The only downside is that it will be compiled with VC++ 6.0, which means >a couple of the Win32Service struct members will be unavailable in the >Service.services method (and you won't be able to specify a 'group'). >This won't affect the Daemon class, though. > >Ideally I'd like to be able to set this up as an either-or, with >something like "gem install win32-service --from-source" to force a >build if the user wants to build from source instead of using the >binary. Is such an option possible? > >Thanks, > >Dan > > >This communication is the property of Qwest and may contain confidential or >privileged information. Unauthorized use of this communication is strictly >prohibited and may be unlawful. If you have received this communication >in error, please immediately notify the sender by reply e-mail and destroy >all copies of the communication and any attachments. >_______________________________________________ >Mongrel-users mailing list >Mongrel-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/mongrel-users > > From zedshaw at zedshaw.com Tue Dec 5 20:34:41 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 5 Dec 2006 17:34:41 -0800 Subject: [Mongrel] mongrel and long lived connections In-Reply-To: <73096a160612051308i6035968bsb887179355386a9d@mail.gmail.com> References: <73096a160612051239j2aac11b3tee591476ab20d59e@mail.gmail.com> <81b453920612051254i84a6265ve2cbc54f87443bb3@mail.gmail.com> <73096a160612051308i6035968bsb887179355386a9d@mail.gmail.com> Message-ID: <20061205173441.02466dc3.zedshaw@zedshaw.com> On Tue, 5 Dec 2006 13:08:14 -0800 "Joseph McDonald" wrote: > I understand that rails is not thread safe, but this is not using > rails or any part of rails. It just sets up a simple handler. but > registering that handler seems to allow only one instance of that > handler to run at a time. I think part of your confusion (and others) is the association of HttpHandlers with HttpRequests and HttpResponses. Also, how they're run in the life cycle of a Mongrel HTTP request process. First, Mongrel accepts remote clients and creates one Thread for each request. Mongrel also enforces a single request/response using Connect:close headers because Ruby only supports 1024 files (so far). If Mongrel doesn't do this then people like yourself can write a simple "trickle attack" client that hits the Mongrel server, opens a bunch of continuous connections, and then eat up all available files very quickly. Basically, a DDoS attack that's very simple to do. So, keep that in mind with your comet thing. You'll have to also keep track of the number of active connections and start getting into old school capacity planning to figure out how many mongrel processes are needed to service your appropriate user load. Second thing is that you can register multiple HttpHandler objects with a URIClassifier at a URL path, but that each one is run in sequence and they are run across all the threads. This means that *you* have to keep the threading straight in your HttpHandler since that same object's state could be used by 500+ threads at once. This is also why each handler's process(req,resp) method is given all the stuff it needs in the parameters. For example, this is *really* bad: class DumbAssHandler < HttpHandler def initialize() @afile = open("somefile.txt") end def process(req, response) @afile.write(req.params["X-Someheader"]) end end The problem is a *single* instance of DumbAssHandler is shared amongst *ALL* the threads that call DumbAssHandler::process(). When you start writing to @afile it'll get all nasty and confused on you, but what's worse is Ruby's threading isn't so clear on this so it *might* work most of the time, and then one day you hit that magic thread or switch to Linux and all hell breaks loose. Finally, each client processing Thread gets its very own HttpRequest and HttpResponse object, so within the process() method you can go to town on it without worrying about locking problems. If you need to store stuff someplace so that it's not shared then just toss it into the req.params[] as a symbol with a funky name. You can also use Thread.current[] to store things, but there's a hidden danger: The GC doesn't run on Threads very often and not the same as other stuff, so things in Thread.current[] tend to live for longer than you expect. Anyway, hope that helps you out. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From Daniel.Berger at qwest.com Wed Dec 6 09:42:46 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Wed, 06 Dec 2006 07:42:46 -0700 Subject: [Mongrel] [ANN] Win32 gems for mongrel (0.3.18) and mongrel_service(0.3.1) In-Reply-To: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com> References: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com> Message-ID: <4576D6E6.8020708@qwest.com> Luis Lavena wrote: > Hello Users!, > > Since the pre-release 0.3.18 (last week) Lot of things happen in > ruby-land (check the DoS security bulletin, please). > > Anyway, the win32 folks being left on the side of the road, and cannot > provide feedback of stability due lack of binaries for the latest > releases. Huh? > So, I managed to upload the pre-built gem to my host: > > http://www.mmediasys.com/releases/mongrel-0.3.18-mswin32.gem This wasn't necessary. I told you I would add a binary gem last night, and I did. If you want the precompiled binary, select the "mswin32" gem version. If you want to build from source, select the "ruby" gem version. Regards, Dan From frazer.list at gmail.com Wed Dec 6 10:32:59 2006 From: frazer.list at gmail.com (frazer horn) Date: Wed, 6 Dec 2006 10:32:59 -0500 Subject: [Mongrel] [ANN] Win32 gems for mongrel (0.3.18) and mongrel_service (0.3.1) In-Reply-To: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com> References: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com> Message-ID: Hi Luis One minor issue encountered thats a minor gotcha C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- C:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.3.1/lib/mongrel_service/init.rb (LoadError) from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from C:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.1/lib/gem_plugin.rb:130:in `load' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:95:in `each' from C:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.1/lib/gem_plugin.rb:112:in `load' from C:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.18-mswin32 /bin/mongrel_rails:232 from c:\ruby\bin\mongrel_rails:18 from -e:3 The gem gets installed as C:/ruby/lib/ruby/gems/1.8/gems/mongrel_service- 0.3.1-mswin32 I took off the the -mswin32 and now its all good. Frazer On 12/5/06, Luis Lavena wrote: > > Hello Users!, > > Since the pre-release 0.3.18 (last week) Lot of things happen in > ruby-land (check the DoS security bulletin, please). > > Anyway, the win32 folks being left on the side of the road, and cannot > provide feedback of stability due lack of binaries for the latest > releases. > > So, I managed to upload the pre-built gem to my host: > > http://www.mmediasys.com/releases/mongrel-0.3.18-mswin32.gem > > rubygems still don't like my yaml specifications, so you can use > --source option with 'gem install' > > Please download it and perform a manual install. > > Don't forget to install also the latest mongrel_service from the same > place: > > http://www.mmediasys.com/releases/mongrel_service-0.3.1-mswin32.gem > > Regards and hope this provides a better feedback on the forum/list > about stability issues with mongrel and win32. > > Later, > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/c6beaa88/attachment-0001.html From Daniel.Berger at qwest.com Wed Dec 6 10:46:08 2006 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 6 Dec 2006 09:46:08 -0600 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <45761159.6030006@hotgazpacho.com> Message-ID: <7524A45A1A5B264FA4809E2156496CFB0D0DAF@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: mongrel-users-bounces at rubyforge.org > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Will Green > Sent: Tuesday, December 05, 2006 5:40 PM > To: mongrel-users at rubyforge.org > Subject: Re: [Mongrel] mongrel install on win32 XP problems > > > I have an MSDN subscription. Send me a solution file and build > instructions, and I will try to build it with VS.Net 2003 (VC 7.1) or > VS.Net 2005 (VC 8), or if you give me a day, VS.Net (VC 7). > > == > Will You don't need a solution file. The gem should build from source just fine with VC 7. Or, you can download the zip file and do "ruby extconf.rb; nmake; nmake install". I'm not so sure about VC 8, since I don't think Ruby itself builds successfully with VC 8. - Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From luislavena at gmail.com Wed Dec 6 12:22:24 2006 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 6 Dec 2006 14:22:24 -0300 Subject: [Mongrel] [ANN] Win32 gems for mongrel (0.3.18) and mongrel_service(0.3.1) In-Reply-To: <4576D6E6.8020708@qwest.com> References: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com> <4576D6E6.8020708@qwest.com> Message-ID: <71166b3b0612060922r1e1e3eacg57486c5281be632c@mail.gmail.com> On 12/6/06, Daniel Berger wrote: > Luis Lavena wrote: > > Hello Users!, > > > > Since the pre-release 0.3.18 (last week) Lot of things happen in > > ruby-land (check the DoS security bulletin, please). > > > > Anyway, the win32 folks being left on the side of the road, and cannot > > provide feedback of stability due lack of binaries for the latest > > releases. > > Huh? > Mongrel need to compile the http11 extension, since you require a compiler (on any platform) to build the extensions, I provided a prebuilt version (like before). > > So, I managed to upload the pre-built gem to my host: > > > > http://www.mmediasys.com/releases/mongrel-0.3.18-mswin32.gem > > This wasn't necessary. I told you I would add a binary gem last night, > and I did. > Daniel, I was talking about Mongrel gem, not win32-service. > If you want the precompiled binary, select the "mswin32" gem version. > If you want to build from source, select the "ruby" gem version. > Again, was talking about Mongrel, not win32-service. > Regards, > > Dan > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Wed Dec 6 12:32:54 2006 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 6 Dec 2006 14:32:54 -0300 Subject: [Mongrel] [ANN] Win32 gems for mongrel (0.3.18) and mongrel_service (0.3.1) In-Reply-To: References: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com> Message-ID: <71166b3b0612060932v605d2e21pf1c2be20e12bd399@mail.gmail.com> On 12/6/06, frazer horn wrote: > Hi Luis > > One minor issue encountered thats a minor gotcha > > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__': no such file to load -- > C:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.3.1 > /lib/mongrel_service/init.rb (LoadError) > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' > from > C:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.1/lib/gem_plugin.rb:130:in > `load' > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:95:in > `each' > from > C:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.1/lib/gem_plugin.rb:112:in > `load' > from C:/ruby/lib/ruby/gems/1.8/gems/mongrel- > 0.3.18-mswin32/bin/mongrel_rails:232 > from c:\ruby\bin\mongrel_rails:18 > from -e:3 > > The gem gets installed as > C:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.3.1-mswin32 > I took off the the -mswin32 and now its all good. > That its due a bug in gem_plugin. Was fixed on SVN, but never released. I uploaded a update from SVN (0.2.2) to my host: http://www.mmediasys.com/releases/gem_plugin-0.2.2.gem Install it and the problem "platform" on ANY gem_plugin will go away. Regards, > Frazer > > > On 12/5/06, Luis Lavena wrote: > > > > Hello Users!, > > > > Since the pre-release 0.3.18 (last week) Lot of things happen in > > ruby-land (check the DoS security bulletin, please). > > > > Anyway, the win32 folks being left on the side of the road, and cannot > > provide feedback of stability due lack of binaries for the latest > > releases. > > > > So, I managed to upload the pre-built gem to my host: > > > > > http://www.mmediasys.com/releases/mongrel-0.3.18-mswin32.gem > > > > rubygems still don't like my yaml specifications, so you can use > > --source option with 'gem install' > > > > Please download it and perform a manual install. > > > > Don't forget to install also the latest mongrel_service from the same > place: > > > > > http://www.mmediasys.com/releases/mongrel_service-0.3.1-mswin32.gem > > > > Regards and hope this provides a better feedback on the forum/list > > about stability issues with mongrel and win32. > > > > Later, > > > > -- > > Luis Lavena > > Multimedia systems > > - > > Leaders are made, they are not born. They are made by hard effort, > > which is the price which all of us must pay to achieve any goal that > > is worthwhile. > > Vince Lombardi > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From bkeepers at gmail.com Wed Dec 6 12:34:51 2006 From: bkeepers at gmail.com (Brandon Keepers) Date: Wed, 6 Dec 2006 12:34:51 -0500 Subject: [Mongrel] shared hosting for an ISP Message-ID: <34C3ABD6-30B2-480E-A5A7-B0BF55211792@gmail.com> A hosting company has contacted me and is interested in providing Ruby on Rails hosting for their customers. They provide both dedicated and shared hosting. I know there are a lot of shared hosts that support Rails, but most of them (that I've seen) are using mod_fastcgi, or a similar setup. I'm curious what people think about accomplishing this with mongrel with Apache 2.2. I'm thinking I could use some capistrano tasks or extend their web interface to manage the mongrel and apache configurations. Each user has jailed SSH access, so I could just run the mongrel processes as that user. Does anyone see any issues with this setup? Thanks, Brandon From luislavena at gmail.com Wed Dec 6 12:37:22 2006 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 6 Dec 2006 14:37:22 -0300 Subject: [Mongrel] mongrel install on win32 XP problems In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB0D0DAF@ITOMAE2KM01.AD.QINTRA.COM> References: <45761159.6030006@hotgazpacho.com> <7524A45A1A5B264FA4809E2156496CFB0D0DAF@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <71166b3b0612060937y7c1c3363jb187aba7b7f271ff@mail.gmail.com> On 12/6/06, Berger, Daniel wrote: > > -----Original Message----- > > From: mongrel-users-bounces at rubyforge.org > > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Will Green > > Sent: Tuesday, December 05, 2006 5:40 PM > > To: mongrel-users at rubyforge.org > > Subject: Re: [Mongrel] mongrel install on win32 XP problems > > > > > > I have an MSDN subscription. Send me a solution file and build > > instructions, and I will try to build it with VS.Net 2003 (VC 7.1) or > > VS.Net 2005 (VC 8), or if you give me a day, VS.Net (VC 7). > > > > == > > Will > > You don't need a solution file. The gem should build from source just > fine with VC 7. Or, you can download the zip file and do "ruby > extconf.rb; nmake; nmake install". > > I'm not so sure about VC 8, since I don't think Ruby itself builds > successfully with VC 8. > VC8 (Express 2005) will not build any ruby extension without tweaking. Thats due the manifest need the me included in the assemblies. (Don't ask me about that, was a loooong topic on the ruby-talk about this and make ruby compile fine under VC2005). You need to build ruby with VC8 (to link against msvcrt8.lib/dll) for successfully compile the extensions. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From wyhaines at gmail.com Wed Dec 6 13:02:09 2006 From: wyhaines at gmail.com (Kirk Haines) Date: Wed, 6 Dec 2006 11:02:09 -0700 Subject: [Mongrel] shared hosting for an ISP In-Reply-To: <34C3ABD6-30B2-480E-A5A7-B0BF55211792@gmail.com> References: <34C3ABD6-30B2-480E-A5A7-B0BF55211792@gmail.com> Message-ID: On 12/6/06, Brandon Keepers wrote: > A hosting company has contacted me and is interested in providing > Ruby on Rails hosting for their customers. They provide both > dedicated and shared hosting. I know there are a lot of shared hosts > that support Rails, but most of them (that I've seen) are using > mod_fastcgi, or a similar setup. I'm curious what people think about > accomplishing this with mongrel with Apache 2.2. I do this with Mongrel. Not rails hosting, but so long as the shared host is prepared for the Rails resource usage, using Rails wouldn't be any different than what I do. I have no problems at all running things in this way, but I do have total control of the server, so I can plan and control port usage myself, too, which makes it easier. I have found that using Mongrel in a shared hosting environment is my simplest option for deploying new sites and applications. Kirk Haines From Daniel.Berger at qwest.com Wed Dec 6 13:08:23 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Wed, 06 Dec 2006 11:08:23 -0700 Subject: [Mongrel] [ANN] Win32 gems for mongrel (0.3.18) andmongrel_service(0.3.1) In-Reply-To: <71166b3b0612060922r1e1e3eacg57486c5281be632c@mail.gmail.com> References: <71166b3b0612051615i226d39a2nc6b8eca0818a96c2@mail.gmail.com><45 76D6E6.8020708@qwest.com> <71166b3b0612060922r1e1e3eacg57486c5281be632c@mail.gmail.com> Message-ID: <45770717.6070402@qwest.com> Luis Lavena wrote: > On 12/6/06, Daniel Berger wrote: >> Luis Lavena wrote: >>> Hello Users!, >>> >>> Since the pre-release 0.3.18 (last week) Lot of things happen in >>> ruby-land (check the DoS security bulletin, please). >>> >>> Anyway, the win32 folks being left on the side of the road, and cannot >>> provide feedback of stability due lack of binaries for the latest >>> releases. >> Huh? >> > > Mongrel need to compile the http11 extension, since you require a > compiler (on any platform) to build the extensions, I provided a > prebuilt version (like before). > >>> So, I managed to upload the pre-built gem to my host: >>> >>> http://www.mmediasys.com/releases/mongrel-0.3.18-mswin32.gem >> This wasn't necessary. I told you I would add a binary gem last night, >> and I did. >> > > Daniel, I was talking about Mongrel gem, not win32-service. In that case, my apologies. Anyway, I decided to take the route you suggested, i.e. the "mswin32" gem version is the precompiled binary, and the "ruby" gem version is for those who want to compile from source. Regards, Dan From dallas.devries at gmail.com Wed Dec 6 16:56:02 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Wed, 6 Dec 2006 16:56:02 -0500 Subject: [Mongrel] Debugging high CPU with Mongrel Message-ID: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> I'm running a site that gets ~30k to 40k page hits per day. In the last 4 days my mongrel processes have been jumping into high CPU usage a couple of times a day to the point where my site becomes unresponsive (database on a diff machine with no load). The only way for me to resolve the problem and reduce load on the machine is to delete my rails cache directory (I have plenty of space and I'm not hitting any filesystem limit in terms of # of files and directories). I initially thought it was the DOS vulnerability posted a couple of days ago but I upgraded to ruby 1.8.5p2 with mongrel 0.3.18 and we are still experiencing the same problem multiple times a day. Is there some way to debug where in our application/rails/mongrel the cpu is getting spiked from? I'm just not sure how to proceed further in debugging this. Pen Mongrel 0.3.18 ( 5 running ) ruby 1.8.5p2 Thanks, Dallas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/b936ecd2/attachment.html From zedshaw at zedshaw.com Wed Dec 6 17:19:54 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Wed, 6 Dec 2006 14:19:54 -0800 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 Message-ID: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> I need people to answer a survey super quick for the next little release of Mongrel. Basically, nobody ever agrees on mime types, especially defaults, which is why Mongrel has none and you set your own. Sometimes people just refuse to set their own and want Mongrel to do everything for them, but if that happens then people will complain about the defaults. Damned if I do, damned if I don't. So, let's put this to the test: 1) Should Mongrel support a larger set of default mime types? 2) What should those defaults be? Post a YAML file somewhere so I can compare the various answers. 3) What should be the default mime type if a file doesn't match? 3a) Where do you get this default? 4) Would anyone object to Mongrel moving the default mime type list into a YAML file in the source tree that it loads? **You'd still be able to override like normal.** 5) If your favorite web server does it a particular way, do you actually think this is the real standard or just what that web server does? 5a) Do you think this default could be improved on depending on the situation? Think development vs. production deployments. Being the most vocal or ranting will get your votes discounted. Keep it rational and support it with external evidence, not rhetoric. People can go round in circles forever over something this idiotically simple. I'm indifferent BTW, just annoyed at more work on mime types so I'd like to put it to rest once and for all and make whatever seems to be the most popular as the mongrel policy. Finally, if nobody has an opinion then I'll just leave it as-is in order to get Mongrel 1.0 RC1 out. Thanks for your time. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From kigsteronline at mac.com Wed Dec 6 17:44:53 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Wed, 6 Dec 2006 14:44:53 -0800 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> Message-ID: <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> Not sure I have an answer to your question, but we are running mongrel (x5) and apache 2.0 (mod_proxy_balancer) also separately from the database, on a single 2-CPU low-end server with about 30K page hits a day, with no caching at all, and the load on the box is nearly zero all the time. I see that you are using pen which is a TCP based load balancer? Does it server your static files, or does mongrel do that? If you are serving static files with mongrel I can see how you can be overloading your box so easily. We have 40+ apache processes in front of mongrel which serve two purposes: 1. they serve static files very quickly and free up mongrel to only handle actual RoR actions 2. they push the data over the network, so that slow clients do not hold up scarce mongrel processes. Also note that each apache process is abount 2-3Mb. Our mongrel is about 80Mb in comparison. Again, it's a lot cheaper to server as much content as possible without hitting mongrel. Hope this helps, Konstantin On Dec 6, 2006, at 1:56 PM, Dallas DeVries wrote: > I'm running a site that gets ~30k to 40k page hits per day. In the > last 4 days my mongrel processes have been jumping into high CPU > usage a couple of times a day to the point where my site becomes > unresponsive (database on a diff machine with no load). The only > way for me to resolve the problem and reduce load on the machine is > to delete my rails cache directory (I have plenty of space and I'm > not hitting any filesystem limit in terms of # of files and > directories). I initially thought it was the DOS vulnerability > posted a couple of days ago but I upgraded to ruby 1.8.5p2 with > mongrel 0.3.18 and we are still experiencing the same problem > multiple times a day. > > Is there some way to debug where in our application/rails/mongrel > the cpu is getting spiked from? I'm just not sure how to proceed > further in debugging this. > > Pen > Mongrel 0.3.18 ( 5 running ) > ruby 1.8.5p2 > > Thanks, > Dallas > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From nicksieger at gmail.com Wed Dec 6 17:50:53 2006 From: nicksieger at gmail.com (Nick Sieger) Date: Wed, 6 Dec 2006 16:50:53 -0600 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: On 12/6/06, Zed A. Shaw wrote: > > > 1) Should Mongrel support a larger set of default mime types? Yes. The hardcore folks who have opinions will probably want to customize theirs anyway, but the people who don't care (probably the majority of users) will appreciate having some "suitable" defaults. (Dodging the issue of what's "suitable" here; see below.) 2) What should those defaults be? Post a YAML file somewhere so I can > compare the various answers. require 'webrick/httputils' require 'yaml' puts YAML::dump(Hash[*WEBrick::HTTPUtils::DefaultMimeTypes.map {|k,v| [".#{k}", v]}.zip.flatten]) 3) What should be the default mime type if a file doesn't match? application/octet-stream 3a) Where do you get this default? RFC 1521, by virtue of it being mentioned as the primary subtype. 4) Would anyone object to Mongrel moving the default mime type list into a > YAML file in the source tree that it loads? **You'd still be able to > override like normal.** No objection. 5) If your favorite web server does it a particular way, do you actually > think this is the real standard or just what that web server does? Well, I wouldn't say WEBrick is my favorite, it was just close at hand, the types seemed reasonable, and it's a smaller set of types than, say, Apache's default mime.types file. I think getting consensus from the community on the default set of types is totally a bikeshed issue waiting to happen; you'll have to end up drawing a line in the sand on the set of default types, and a smaller set is probably better than a larger one. Picking one that's already in the Ruby distro is maybe a cop-out, but then it gives you leverage to push back on differences and say that they'd have to be accepted into the standard library (bwah ha ha). 5a) Do you think this default could be improved on depending on the > situation? Think development vs. production deployments. I could see a larger set of defaults in a dev environment, or possibly changing the default-if-not-found to "text/plain" or some other for debugging purposes. Cheers, /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/7c14249e/attachment.html From anjan.summit at gmail.com Wed Dec 6 17:56:59 2006 From: anjan.summit at gmail.com (anjan bacchu) Date: Wed, 6 Dec 2006 14:56:59 -0800 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: On 12/6/06, Zed A. Shaw wrote: > > I need people to answer a survey super quick for the next little release > of Mongrel. Basically, nobody ever agrees on mime types, especially > defaults, which is why Mongrel has none and you set your own. Sometimes > people just refuse to set their own and want Mongrel to do everything for > them, but if that happens then people will complain about the defaults. > > Damned if I do, damned if I don't. > > So, let's put this to the test: > > 1) Should Mongrel support a larger set of default mime types? YES. 2) What should those defaults be? Post a YAML file somewhere so I can > compare the various answers. Can't we have MIME types be an intersection of Apache (2.2) and IIS ? 3) What should be the default mime type if a file doesn't match? > 3a) Where do you get this default? > 4) Would anyone object to Mongrel moving the default mime type list into a > YAML file in the source tree that it loads? **You'd still be able to > override like normal.** > 5) If your favorite web server does it a particular way, do you actually > think this is the real standard or just what that web server does? > 5a) Do you think this default could be improved on depending on the > situation? Think development vs. production deployments. > Thank you, BR, ~A -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/e82c30cf/attachment.html From jw at innerewut.de Wed Dec 6 18:00:28 2006 From: jw at innerewut.de (Jonathan Weiss) Date: Thu, 07 Dec 2006 00:00:28 +0100 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <45774B8C.2070703@innerewut.de> > > 1) Should Mongrel support a larger set of default mime types? Yes, please! > 2) What should those defaults be? I'm fine with Apache's default list. > 3) What should be the default mime type if a file doesn't match? application/occtect-stream? But I really don't care. > 3a) Where do you get this default? > 4) Would anyone object to Mongrel moving the default mime type > list into a YAML file in the source tree that it loads? > **You'd still be able to override like normal.** no, I would appreciate like such default behavior. > 5) If your favorite web server does it a particular way, > do you actually think this is the real standard or just what that web server does? No idea if Apache's settings are the real standard, in doubt it is reasonable. > 5a) Do you think this default could be improved on depending > on the situation? Think development vs. production deployments. > no opinion here. Generally I think that a small default set for html/css/javascript/xml/zip/img/png&co is really useful. > Thanks for your time. > Jonathan -- Jonathan Weiss http://blog.innerewut.de From dallas.devries at gmail.com Wed Dec 6 18:13:13 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Wed, 6 Dec 2006 18:13:13 -0500 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> Message-ID: <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> Thanks Konstantin, We will give that a try (apache+mod_proxy). We try to cache everything (using fragment caching) we can. Gets to be tens of thousands of files quickly(never too many in one directory). It just seemed bizarre to us that load goes way up periodically( and only recently) and that removing our cache directory fixes this. Just restarting mongrel seemingly has no effect until we do remove the cache. Anyways we will try with a clean install and use apache. Thanks for the info. Cheers, Dallas On 12/6/06, kigsteronline at mac.com wrote: > > Not sure I have an answer to your question, but we are running > mongrel (x5) and apache 2.0 (mod_proxy_balancer) also separately from > the database, on a single 2-CPU low-end server with about 30K page > hits a day, with no caching at all, and the load on the box is nearly > zero all the time. > > I see that you are using pen which is a TCP based load balancer? > Does it server your static files, or does mongrel do that? > > If you are serving static files with mongrel I can see how you can be > overloading your box so easily. We have 40+ apache processes in > front of mongrel which serve two purposes: > > 1. they serve static files very quickly and free up mongrel to only > handle actual RoR actions > 2. they push the data over the network, so that slow clients do not > hold up scarce mongrel processes. > > Also note that each apache process is abount 2-3Mb. Our mongrel is > about 80Mb in comparison. Again, it's a lot cheaper to server as much > content as possible without hitting mongrel. > > Hope this helps, > Konstantin > > > > On Dec 6, 2006, at 1:56 PM, Dallas DeVries wrote: > > > I'm running a site that gets ~30k to 40k page hits per day. In the > > last 4 days my mongrel processes have been jumping into high CPU > > usage a couple of times a day to the point where my site becomes > > unresponsive (database on a diff machine with no load). The only > > way for me to resolve the problem and reduce load on the machine is > > to delete my rails cache directory (I have plenty of space and I'm > > not hitting any filesystem limit in terms of # of files and > > directories). I initially thought it was the DOS vulnerability > > posted a couple of days ago but I upgraded to ruby 1.8.5p2 with > > mongrel 0.3.18 and we are still experiencing the same problem > > multiple times a day. > > > > Is there some way to debug where in our application/rails/mongrel > > the cpu is getting spiked from? I'm just not sure how to proceed > > further in debugging this. > > > > Pen > > Mongrel 0.3.18 ( 5 running ) > > ruby 1.8.5p2 > > > > Thanks, > > Dallas > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/4e05ebf6/attachment-0001.html From david at loudthinking.com Wed Dec 6 18:06:21 2006 From: david at loudthinking.com (David Heinemeier Hansson) Date: Wed, 6 Dec 2006 17:06:21 -0600 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206144029.314b5689.zedshaw@zedshaw.com> References: <20061206144029.314b5689.zedshaw@zedshaw.com> Message-ID: <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> > So, let's put this to the test: > > 1) Should Mongrel support a larger set of default mime types? I'm strongly in favor of this. Especially for core defaults like xml, atom, and rss. It would mean that Rails page caching would Just Work even for these common caching types. > 2) What should those defaults be? Post a YAML file somewhere so I > can compare the various answers. existing + application/atom+xml application/rss+xml application/xml text/calendar text/csv application/x-yaml ...that also just happens to correspond with the default Mime types that Rails ships with ;) > 3) What should be the default mime type if a file doesn't match? application/octet-stream. That causes browsers to force the file to be downloaded. Which is most likely what you'll want since unknown file types are usually of a binary format. Like flash/wmp/quicktime movies, PDFs, etc. > 3a) Where do you get this default? Preferably it would just ship in Mongrel, but be override-able by -- default-mime-type > 4) Would anyone object to Mongrel moving the default mime type list > into a YAML file in the source tree that it loads? **You'd still > be able to override like normal.** +1 > 5) If your favorite web server does it a particular way, do you > actually think this is the real standard or just what that web > server does? There are no "real" standards on this as far as I know. Just defacto standards (like application/octet-stream for unknown types). > 5a) Do you think this default could be improved on depending on the > situation? Think development vs. production deployments. I'd prefer consistent behavior from the web server across the environments. For the same reason that I tend to want to run the same version of Apache, lighttpd, MySQL, and Ruby between development and production. -- David Heinemeier Hansson -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1940 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/ead955a7/attachment-0001.bin From ezmobius at gmail.com Wed Dec 6 18:23:06 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Wed, 6 Dec 2006 15:23:06 -0800 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <11241DA5-EA37-44DA-A12D-8E4DC58E0865@brainspl.at> On Dec 6, 2006, at 2:19 PM, Zed A. Shaw wrote: > 1) Should Mongrel support a larger set of default mime types? Yes I think this would be very useful. In production most of the extra mime types are not needed because a front end web server handles most filetypes. But in dev mode its nice to use plain mongrel and still be able to serve different media types and such. > 2) What should those defaults be? Post a YAML file somewhere so I > can compare the various answers. Here is the default set of mime types for nginx. I have been running with these on a lot of sites and haven't had to add one yet http://pastie.caboo.se/26234 > 3) What should be the default mime type if a file doesn't match? application/octet-stream > 3a) Where do you get this default? it is the default for nginx and lighty. > 4) Would anyone object to Mongrel moving the default mime type list > into a YAML file in the source tree that it loads? **You'd still > be able to override like normal.** please go for it. > 5) If your favorite web server does it a particular way, do you > actually think this is the real standard or just what that web > server does? The list of mime types linked above has served me well on close to 100 installs without needing additions. I am not certain if it varies compared to whatever is considered standard. I don't know what the authority on mime types for webservers is. > 5a) Do you think this default could be improved on depending on the > situation? Think development vs. production deployments. I am not really sure. I think application/octet-stream is good default as long as it can be over-ridden then it should meet everyones needs. Thanks Zed- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From rmdf at stimble.net Wed Dec 6 18:27:54 2006 From: rmdf at stimble.net (Michael Fairchild) Date: Wed, 6 Dec 2006 15:27:54 -0800 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <11241DA5-EA37-44DA-A12D-8E4DC58E0865@brainspl.at> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> <11241DA5-EA37-44DA-A12D-8E4DC58E0865@brainspl.at> Message-ID: <2ef9bb620612061527h33061910n9b6096802f81cde6@mail.gmail.com> On 12/6/06, Ezra Zygmuntowicz wrote: > > > On Dec 6, 2006, at 2:19 PM, Zed A. Shaw wrote: > > > 1) Should Mongrel support a larger set of default mime types? I think this would be great. Just last week I added a mimes.yml file to my application. Seems like adding a few more defaults, as long as they are overridable would mean one less thing for my small brain to need to learn. ~Michael F -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/2ce52006/attachment.html From kylekochis at gmail.com Wed Dec 6 18:27:58 2006 From: kylekochis at gmail.com (Kyle Kochis) Date: Wed, 6 Dec 2006 16:27:58 -0700 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <6a7034b0612061527p73fdcbf1jaf61f5268467f587@mail.gmail.com> On 12/6/06, Zed A. Shaw wrote: > I need people to answer a survey super quick for the next little release of Mongrel. Basically, nobody ever agrees on mime types, especially defaults, which is why Mongrel has none and you set your own. Sometimes people just refuse to set their own and want Mongrel to do everything for them, but if that happens then people will complain about the defaults. > > Damned if I do, damned if I don't. > > So, let's put this to the test: > > 1) Should Mongrel support a larger set of default mime types? No-ish. I say no for a similar reason that Nick said yes. If people need some weird mime type for files then they should be able to add those but I think the majority of people just need the basics. Perhaps there are a few other types that would be nice to have in the list as well but I don't see the point in having a large list when so many people will never use it. That said, if mongrel adopts the Apache list (or something like it) I won't belly ache. > 2) What should those defaults be? Post a YAML file somewhere so I can compare the various answers. > 3) What should be the default mime type if a file doesn't match? application/octet-stream > 3a) Where do you get this default? RFC 1521, by virtue of it being mentioned as the primary subtype. - Quoted from Nick > 4) Would anyone object to Mongrel moving the default mime type list into a YAML file in the source tree that it loads? **You'd still be able to override like normal.** no objection. i like the idea. > 5) If your favorite web server does it a particular way, do you actually think this is the real standard or just what that web server does? My favorite web servers are currently mongrel and nginx. I am happy with the way mongrel does things for the most part. I am not a fan of nginx's obvious preference of certain linux packaging mimes in their list but it doesn't bother me either. > 5a) Do you think this default could be improved on depending on the situation? Think development vs. production deployments. I don't see a real need to make them different. If I need to change something, I will depending on the situation anyways. Zed, personally I don't think you need to worry too much about people not liking mongrels mime types. If someone needs to add/remove/edit anything in the list, they will and chances are that most people won't need to. If there comes a time when a mime type gains popularity, then sure, add it but I don't think you should bother yourself too much in making every niche group happy and having a huge list. Kyle Kochis From kigsteronline at mac.com Wed Dec 6 18:35:15 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Wed, 6 Dec 2006 15:35:15 -0800 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> Message-ID: <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> Dallas, One more thing to consider. I remember doing research on file system management for common OS choices a few years back. There was a paper published by someone at NetApp R&D that analyzed the time it takes to open a file by name when there are thousands of files in the same directory. As I understand it, this requires scanning the directory file until you find the given file, then determining it's i-node and then reading the file blocks directly from the i-node. This should tell you that depending on how the directory file is structured, and how the search is conducted will have a dramatic affect on the performance. Their whole point was that in standard Linux file system implementations (and most other UNIXes) the access time would increase exponentially with the number of files in the directory. When you reach 10-100K files in a single directory you may notice the slowdown without a stopwatch. NetApp's own file system was designed to have a constant access time regardless of the number of files in the directory (that was their claim to fame anyway). Bottom line is that I wouldn't assume that a directory with 10K+ files is not the main reason for your performance degradation. Hope this helps, Konstantin On Dec 6, 2006, at 3:13 PM, Dallas DeVries wrote: > Thanks Konstantin, > > We will give that a try (apache+mod_proxy). We try to cache > everything (using fragment caching) we can. Gets to be tens of > thousands of files quickly(never too many in one directory). It > just seemed bizarre to us that load goes way up periodically( and > only recently) and that removing our cache directory fixes this. > Just restarting mongrel seemingly has no effect until we do remove > the cache. Anyways we will try with a clean install and use > apache. Thanks for the info. From jason at joyent.com Wed Dec 6 18:03:26 2006 From: jason at joyent.com (Jason A. Hoffman) Date: Wed, 6 Dec 2006 15:03:26 -0800 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <0F4F9623-1E7F-4AA3-BB65-11313F279398@joyent.com> On Dec 6, 2006, at 2:19 PM, Zed A. Shaw wrote: > I need people to answer a survey super quick for the next little > release of Mongrel. Basically, nobody ever agrees on mime types, > especially defaults, which is why Mongrel has none and you set your > own. Sometimes people just refuse to set their own and want > Mongrel to do everything for them, but if that happens then people > will complain about the defaults. > > Damned if I do, damned if I don't. > > So, let's put this to the test: > > 1) Should Mongrel support a larger set of default mime types? > 2) What should those defaults be? Post a YAML file somewhere so I > can compare the various answers. > 3) What should be the default mime type if a file doesn't match? > 3a) Where do you get this default? > 4) Would anyone object to Mongrel moving the default mime type list > into a YAML file in the source tree that it loads? **You'd still > be able to override like normal.** > 5) If your favorite web server does it a particular way, do you > actually think this is the real standard or just what that web > server does? > 5a) Do you think this default could be improved on depending on the > situation? Think development vs. production deployments. > > Being the most vocal or ranting will get your votes discounted. > Keep it rational and support it with external evidence, not > rhetoric. People can go round in circles forever over something > this idiotically simple. > > I'm indifferent BTW, just annoyed at more work on mime types so I'd > like to put it to rest once and for all and make whatever seems to > be the most popular as the mongrel policy. > > Finally, if nobody has an opinion then I'll just leave it as-is in > order to get Mongrel 1.0 RC1 out. > > Thanks for your time. I'm indifferent as well from the userside of things but I suspect that if you did support a larger set it could make your support life easier. If you want something that might be "quick and easy" (and I put that in quotes because I'm talking out of my ass and it might not be easy outside of hey-here-is-a-file) I've just added to apache's default etc/mime.types over the last 2.5 years of textdrive, and if that just copied over and put into a mimetypes.yml A fine default is application/octet-stream or plain text. Regards, Jason From anjan.summit at gmail.com Wed Dec 6 19:26:46 2006 From: anjan.summit at gmail.com (anjan bacchu) Date: Wed, 6 Dec 2006 16:26:46 -0800 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> Message-ID: > > directory. When you reach 10-100K files in a single directory you > may notice the slowdown without a stopwatch. NetApp's own file > system was designed to have a constant access time regardless of the > number of files in the directory (that was their claim to fame anyway). > > Bottom line is that I wouldn't assume that a directory with 10K+ > files is not the main reason for your performance degradation. > > Hope this helps, > Konstantin > > > Hi Konstantin, You're right on. Dallas : ReiserFS is designed to perform well in such a situation of having a lot of small files in the same directory. Can you switch to ReiserFS ? If not, can you switch to memcached ? Are you expiring your sessions ? BR, ~A -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/9ccaaf6d/attachment.html From jeroen at supercool.nl Thu Dec 7 02:13:03 2006 From: jeroen at supercool.nl (Jeroen Houben) Date: Thu, 07 Dec 2006 08:13:03 +0100 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> References: <20061206144029.314b5689.zedshaw@zedshaw.com> <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> Message-ID: <4577BEFF.8080101@supercool.nl> David Heinemeier Hansson wrote: >> So, let's put this to the test: >> >> 1) Should Mongrel support a larger set of default mime types? > > I'm strongly in favor of this. Especially for core defaults like xml, > atom, and rss. It would mean that Rails page caching would Just Work > even for these common caching types. Could you explain this? Mongrel is very unlikely to serve cached pages. That's usually handled by apache/lighty. I ran into this the other day and had to adjust my apache rewrite rules to look for cached .xml files rather than just .html files. Jeroen From luislavena at gmail.com Thu Dec 7 06:46:03 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 7 Dec 2006 08:46:03 -0300 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <71166b3b0612070346n4a9dbe18l156dd89c0b9e771f@mail.gmail.com> On 12/6/06, Zed A. Shaw wrote: [snip] > > 1) Should Mongrel support a larger set of default mime types? Yes, I agree with Nick Seiger on extend it using WEBrick default mime types which are similar to those Ezra pointed. Regarding Rails caching (DHH), still don't get it... Shouldn't Mongrel also serve the cached query even if his extension differ from .html? or that should be done by the Parent webserver? > 2) What should those defaults be? Post a YAML file somewhere so I can compare the various answers. WEBrick default mime types looks fine. the nginx types just add a few definitions for octet-stream, like deb packages, iso and msi installers, including executables. So guess that will fallback into the "default" mime type for unknown elements. > 3) What should be the default mime type if a file doesn't match? appplication/octet-stream > 3a) Where do you get this default? Most of the webservers fall back to that. Some bizarre ones defaults to text/plain but guess that is not suitable (what if the unknown type is actually a binary file). > 4) Would anyone object to Mongrel moving the default mime type list into a YAML file in the source tree that it loads? **You'd still be able to override like normal.** Guess that will be more maintainable, right? not hard coded into the code but loadable. Adding mime types (using my one mime.conf file) should ADD functionality and could override the defaults, but not remove them (something to check when doing merge!) > 5) If your favorite web server does it a particular way, do you actually think this is the real standard or just what that web server does? > 5a) Do you think this default could be improved on depending on the situation? Think development vs. production deployments. > I do similar things like Nick (set the default to text/plain in development) for debugging purposes. Support the minimal set, and let the user (us) add the specific mime requirements instead of maintaining we-own-all-the-mimes-in-the-world approach (apache?) > Being the most vocal or ranting will get your votes discounted. Keep it rational and support it with external evidence, not rhetoric. People can go round in circles forever over something this idiotically simple. > Excuse the bits of rhetoric comments in this message :-) > I'm indifferent BTW, just annoyed at more work on mime types so I'd like to put it to rest once and for all and make whatever seems to be the most popular as the mongrel policy. > I like your approach of "policy", when you draw the line, you stick to it ;-) > Finally, if nobody has an opinion then I'll just leave it as-is in order to get Mongrel 1.0 RC1 out. > Excellent!, thought about mswin32 builds put on the pre release gem repository? > Thanks for your time. > Thanks to you Zed, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From hutch at recursive.ca Thu Dec 7 08:24:45 2006 From: hutch at recursive.ca (Bob Hutchison) Date: Thu, 7 Dec 2006 08:24:45 -0500 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <2A36938A-7A99-44EB-AB88-8E4CAB669827@recursive.ca> Hi, On 6-Dec-06, at 5:19 PM, Zed A. Shaw wrote: > > 1) Should Mongrel support a larger set of default mime types? I think so, as long as it is easy to both add new mime types and override the whole thing. At the start of a project I don't really want to be worrying about configuring stuff like mime types, and I can't really imagine who would be wanting to worry about stuff like that early on. After a bit of development this can become more 'interesting' to think about, at which point tweaking or overriding would be necessary. > 2) What should those defaults be? Post a YAML file somewhere so I > can compare the various answers. Something correct, and by that I mean something that works. Using Apache's would be a good shot at something that works. > 3) What should be the default mime type if a file doesn't match? application/octet-stream > 3a) Where do you get this default? Well, my understanding is that this is meant to be the default. But in truth, it is the only thing that makes sense in practice... I think trying to figure out something clever to do in the default situation is a really bad idea. > 4) Would anyone object to Mongrel moving the default mime type list > into a YAML file in the source tree that it loads? **You'd still > be able to override like normal.** No.... Okay, why might we object? > 5) If your favorite web server does it a particular way, do you > actually think this is the real standard or just what that web > server does? :-) Well I don't know about favourites, but practically speaking, whatever Apache does might as well be a standard. > 5a) Do you think this default could be improved on depending on the > situation? Think development vs. production deployments. No. Please don't do that! I really don't like behaviour, especially behaviour that affects a user, changing when switching from development to production. > > Being the most vocal or ranting will get your votes discounted. > Keep it rational and support it with external evidence, not > rhetoric. People can go round in circles forever over something > this idiotically simple. > > I'm indifferent BTW, just annoyed at more work on mime types so I'd > like to put it to rest once and for all and make whatever seems to > be the most popular as the mongrel policy. > > Finally, if nobody has an opinion then I'll just leave it as-is in > order to get Mongrel 1.0 RC1 out. That's fine with me. > > Thanks for your time. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur -- xampl for Ruby -- From wayneeseguin at gmail.com Thu Dec 7 09:30:50 2006 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Thu, 7 Dec 2006 09:30:50 -0500 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <5AEABF00-B766-412E-AFA1-959AF4684D46@gmail.com> On Dec 06, 2006, at 17:19 , Zed A. Shaw wrote: > 1) Should Mongrel support a larger set of default mime types? Absolutely. > 2) What should those defaults be? Post a YAML file somewhere so I > can compare the various answers. After reading through the previous posts from last night, My list matches Ezra's at http://pastie.caboo.se/26234 > 3) What should be the default mime type if a file doesn't match? application/octet-stream > 3a) Where do you get this default? Default for Lighttpd > 4) Would anyone object to Mongrel moving the default mime type list > into a YAML file in the source tree that it loads? **You'd still > be able to override like normal.** Sounds like a great idea, this also would allow for people to override the defaults for an entire server (shared hosting environments). > 5) If your favorite web server does it a particular way, do you > actually think this is the real standard or just what that web > server does? Apache is pretty much the best "standard" to follow in this area I believe. > 5a) Do you think this default could be improved on depending on the > situation? Think development vs. production deployments. This would be useful in my opinion. ~Wayne From dallas.devries at gmail.com Thu Dec 7 09:30:44 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Thu, 7 Dec 2006 09:30:44 -0500 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> Message-ID: <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> Hi guys thanks for the response, Yeah I initially figured that the # of files in the directory was the problem and it was the first thing I changed earlier this week. I changed my caching to use many more subdirectories so that I don't have 10,000+ files in one directory any more. Right now my largest directory has about 2000-3000 files most the rest are much smaller than this. Unfortunately that change did not help the problem...I can have upwards of 50,000 files so I'm not sure how feasible memcached is at the moment. Anyways I'm almost done with a clean install with apache/mongrel cluster mentioned by Konstantin so hopefully that solves my problem. Cheers, Dallas On 12/6/06, anjan bacchu wrote: > > directory. When you reach 10-100K files in a single directory you > > may notice the slowdown without a stopwatch. NetApp's own file > > system was designed to have a constant access time regardless of the > > number of files in the directory (that was their claim to fame anyway). > > > > Bottom line is that I wouldn't assume that a directory with 10K+ > > files is not the main reason for your performance degradation. > > > > Hope this helps, > > Konstantin > > > > > > > Hi Konstantin, > > You're right on. > > Dallas : ReiserFS is designed to perform well in such a situation of > having a lot of small files in the same directory. Can you switch to > ReiserFS ? If not, can you switch to memcached ? Are you expiring your > sessions ? > > BR, > ~A > > _______________________________________________ > 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/20061207/f5c868a4/attachment.html From wayneeseguin at gmail.com Thu Dec 7 09:32:36 2006 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Thu, 7 Dec 2006 09:32:36 -0500 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> References: <20061206144029.314b5689.zedshaw@zedshaw.com> <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> Message-ID: On Dec 06, 2006, at 18:06 , David Heinemeier Hansson wrote: > I'm strongly in favor of this. Especially for core defaults like > xml, atom, and rss. It would mean that Rails page caching would > Just Work even for these common caching types. I agree with your point however could you elaborate on the last sentence a little bit? ~Wayne From david at loudthinking.com Thu Dec 7 10:26:25 2006 From: david at loudthinking.com (David Heinemeier Hansson) Date: Thu, 7 Dec 2006 09:26:25 -0600 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <4577BEFF.8080101@supercool.nl> References: <20061206144029.314b5689.zedshaw@zedshaw.com> <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> <4577BEFF.8080101@supercool.nl> Message-ID: <874CDE32-F5A5-4A41-826E-4B64E7D1AA68@loudthinking.com> >>> So, let's put this to the test: >>> >>> 1) Should Mongrel support a larger set of default mime types? >> >> I'm strongly in favor of this. Especially for core defaults like xml, >> atom, and rss. It would mean that Rails page caching would Just Work >> even for these common caching types. > > Could you explain this? Mongrel is very unlikely to serve cached > pages. > That's usually handled by apache/lighty. I ran into this the other day > and had to adjust my apache rewrite rules to look for cached .xml > files > rather than just .html files. There are plenty of situations where the load requirements do not dictate involving another web server. It'd be nice if Mongrel was feature-wise capable of standing on its own. Mongrel is still capable of serving hundreds of static files per second on most machines. That's plenty for a large array of applications, including predominately internal ones. -- David Heinemeier Hansson -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1940 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061207/ddbe5c9d/attachment.bin From cleaner416 at gmail.com Thu Dec 7 12:43:02 2006 From: cleaner416 at gmail.com (cleaner416) Date: Thu, 7 Dec 2006 12:43:02 -0500 Subject: [Mongrel] Cluster restart leaving orphaned processes? Message-ID: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> First off, a big thank you to Zed and the development team for mongrel and mongrel cluster. I've deployed it for two apps (through an apache 2.2 proxy) and it's amazing how much snappier everything is. Previously we were using lighttpd and lighttpd-fastcgi proxying through apache 2.0, which was turning into a hassle for lots of reasons, most notably the ruby fcgi bindings. I was shocked at how easy everything was to get everything up and running with mongrel, and found the documentation to be just what I needed - not more or less. My only question is this: when I run mongrel_rails cluster::restart or mongrel_rails cluster::stop/start the old processes do not get killed off and I have to do it manually. I've noticed this on 3 boxes, all running FC5 with user/group mongrel/mongrel. Any ideas? (Just as an aside, is there a gateway somewhere where I can search this list?) From fxn at hashref.com Thu Dec 7 13:03:44 2006 From: fxn at hashref.com (Xavier Noria) Date: Thu, 7 Dec 2006 19:03:44 +0100 Subject: [Mongrel] compress and max upload size? Message-ID: I am using mongrel_cluster with mod_proxy_balancer and would like to enable compression (assuming it improves throughtput) and limit file size upload. I configured mod_deflate and LimitRequestSize in Apache, but in my trials looks like the proxied calls bypass those directives (the conf goes below). Is there a way to get this? -- fxn # Adapt this .example locally, as usual. # # To be included in the main httpd.conf with a line at the bottom like this # # Include /path/to/example/conf/httpd.conf NameVirtualHost *:80 # Configure the balancer to dispatch to the Mongrel cluster. BalancerMember http://127.0.0.1:3001 BalancerMember http://127.0.0.1:3002 BalancerMember http://127.0.0.1:3003 # Setup the VirtualHost for your Rails application ServerAdmin admin at example.com ServerName www.example.com ServerAlias localhost LimitRequestSize 102400 DocumentRoot /path/to/example/public Options FollowSymLinks AllowOverride None Order allow,deny Allow from all ProxyPass / balancer://example_cluster/ ProxyPassReverse / balancer://example_cluster/ # Setup your Rewrite rules here RewriteEngine On # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Send all requests that are not found as existing files to the cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://example_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml text/ css application/x-javascript # Error logs ErrorLog /path/to/example/log/apache_error_log CustomLog /path/to/example/log/apache_access_log combined From fxn at hashref.com Thu Dec 7 13:17:22 2006 From: fxn at hashref.com (Xavier Noria) Date: Thu, 7 Dec 2006 19:17:22 +0100 Subject: [Mongrel] compression + max file size upload liimit? Message-ID: <0D82B0A1-02EE-45B8-9D39-FF2E1323A170@hashref.com> I am using Mongrel Cluster with Apache 2.2.3 + mod_proxy_balancer and would like to enable compression (assuming it improves throughtput) and limit file size upload. I configured mod_deflate and LimitRequestSize in Apache, but in my trials looks like the proxied calls bypass those directives (the conf goes below). Is there a way to get this? -- fxn NameVirtualHost *:80 # Configure the balancer to dispatch to the Mongrel cluster. BalancerMember http://127.0.0.1:3001 BalancerMember http://127.0.0.1:3002 BalancerMember http://127.0.0.1:3003 # Setup the VirtualHost for your Rails application ServerAdmin admin at example.com ServerName www.example.com ServerAlias localhost LimitRequestSize 102400 DocumentRoot /path/to/example/public Options FollowSymLinks AllowOverride None Order allow,deny Allow from all ProxyPass / balancer://example_cluster/ ProxyPassReverse / balancer://example_cluster/ # Setup your Rewrite rules here RewriteEngine On # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Send all requests that are not found as existing files to the cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://example_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml text/ css application/x-javascript # Error logs ErrorLog /path/to/example/log/apache_error_log CustomLog /path/to/example/log/apache_access_log combined From jeroen at supercool.nl Thu Dec 7 14:42:25 2006 From: jeroen at supercool.nl (Jeroen Houben) Date: Thu, 07 Dec 2006 20:42:25 +0100 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <874CDE32-F5A5-4A41-826E-4B64E7D1AA68@loudthinking.com> References: <20061206144029.314b5689.zedshaw@zedshaw.com> <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> <4577BEFF.8080101@supercool.nl> <874CDE32-F5A5-4A41-826E-4B64E7D1AA68@loudthinking.com> Message-ID: <45786EA1.9060101@supercool.nl> David Heinemeier Hansson wrote: >>>> So, let's put this to the test: >>>> >>>> 1) Should Mongrel support a larger set of default mime types? >>> >>> I'm strongly in favor of this. Especially for core defaults like xml, >>> atom, and rss. It would mean that Rails page caching would Just Work >>> even for these common caching types. >> >> Could you explain this? Mongrel is very unlikely to serve cached pages. >> That's usually handled by apache/lighty. I ran into this the other day >> and had to adjust my apache rewrite rules to look for cached .xml files >> rather than just .html files. > > There are plenty of situations where the load requirements do not > dictate involving another web server. It'd be nice if Mongrel was > feature-wise capable of standing on its own. Mongrel is still capable of > serving hundreds of static files per second on most machines. That's > plenty for a large array of applications, including predominately > internal ones. Okay that makes sense then. I have never tried page caching with mongrel only. I know that on apache I need to add mod_rewrite rules for each mime-type/extension (or maybe there's a smarter way..) If I use the default rewrite rules a cached version of public/somecontroller/index.xml will never get served for instance, because it's looking for index.html. You're saying page caching on a mongrel only setup will just work as long as the mime-types are properly configured? Oh, and just out of curiosity, does 37 signals use mongrel or still lighty? Jeroen From jeroen at supercool.nl Thu Dec 7 14:52:17 2006 From: jeroen at supercool.nl (Jeroen Houben) Date: Thu, 07 Dec 2006 20:52:17 +0100 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> Message-ID: <457870F1.8090808@supercool.nl> cleaner416 wrote: > My only question is this: when I run mongrel_rails cluster::restart > or mongrel_rails cluster::stop/start the old processes do not get > killed off and I have to do it manually. I've noticed this on 3 > boxes, all running FC5 with user/group mongrel/mongrel. Any ideas? Do you get any error messages? Are you in the right directory? usually /path/to/app/current? Do you run the commands as root? Jeroen From david at loudthinking.com Thu Dec 7 14:57:20 2006 From: david at loudthinking.com (David Heinemeier Hansson) Date: Thu, 7 Dec 2006 13:57:20 -0600 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <45786EA1.9060101@supercool.nl> References: <20061206144029.314b5689.zedshaw@zedshaw.com> <8277CAC9-CAEF-44FE-823F-ED875A23EC18@loudthinking.com> <4577BEFF.8080101@supercool.nl> <874CDE32-F5A5-4A41-826E-4B64E7D1AA68@loudthinking.com> <45786EA1.9060101@supercool.nl> Message-ID: > You're saying page caching on a mongrel only setup will just work as > long as the mime-types are properly configured? Yes. The approach is the same as with lighttpd and Apache. First the web server looks on the file system, if it doesn't find it, it'll redirect to the 404 handler, which is Rails. So if you have /products/5.xml in public, the web server will always serve that rather than let Rails try. Thus, we need to make sure that the file is then returned with application/xml mime type. > Oh, and just out of curiosity, does 37 signals use mongrel or still > lighty? Both. We also use Apache. But newer deployments are happening on Mongrel. -- David -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1940 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061207/ec79bc16/attachment.bin From cleaner416 at gmail.com Thu Dec 7 15:19:12 2006 From: cleaner416 at gmail.com (cleaner416) Date: Thu, 7 Dec 2006 15:19:12 -0500 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: <457870F1.8090808@supercool.nl> References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> <457870F1.8090808@supercool.nl> Message-ID: <873DA678-F45C-46F5-9C01-502B0766EB25@gmail.com> On Dec 7, 2006, at 2:52 PM, Jeroen Houben wrote: > cleaner416 wrote: >> My only question is this: when I run mongrel_rails cluster::restart >> or mongrel_rails cluster::stop/start the old processes do not get >> killed off and I have to do it manually. I've noticed this on 3 >> boxes, all running FC5 with user/group mongrel/mongrel. Any ideas? > > Do you get any error messages? Are you in the right directory? usually > /path/to/app/current? Do you run the commands as root? > Yeah, ran as root, no error messages, in the root directory of the app. Smells like a permissions issue? Root is doing the restarting, the app files are all owned by nobody/nobody (expect for config/mongrel.log) and now I'm seeing that no log/mongrel.pid is getting created. Here's the config/mongrel.yml: --- user: mongrel cwd: /data/wwwroot/myapp port: "8000" environment: production group: mongrel address: 127.0.0.1 pid_file: log/mongrel.pid servers: 3 > Jeroen > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From zedshaw at zedshaw.com Thu Dec 7 15:44:14 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 7 Dec 2006 12:44:14 -0800 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> Message-ID: <20061207124414.2cc5805e.zedshaw@zedshaw.com> On Thu, 7 Dec 2006 12:43:02 -0500 cleaner416 wrote: > First off, a big thank you to Zed and the development team for > mongrel and mongrel cluster. I've deployed it for two apps (through > an apache 2.2 proxy) and it's amazing how much snappier everything > is. Previously we were using lighttpd and lighttpd-fastcgi proxying > through apache 2.0, which was turning into a hassle for lots of > reasons, most notably the ruby fcgi bindings. I was shocked at how > easy everything was to get everything up and running with mongrel, > and found the documentation to be just what I needed - not more or less. Awesome. It's nice to hear people move to a simpler tech AND have it seem snappier for them. > My only question is this: when I run mongrel_rails cluster::restart > or mongrel_rails cluster::stop/start the old processes do not get > killed off and I have to do it manually. I've noticed this on 3 > boxes, all running FC5 with user/group mongrel/mongrel. Any ideas? There is kind of a dumb race condition I've gotta fix this week where if you stop a mongrel process, but mongrel needs to wait on some threads to finish, and then start a new one, all hell breaks loose. Check if this is the case by doing this: 1) Tail the mongrel.log in a window off to the side. 2) Start some requests or something that's common usage. 3) Stop mongrel and look for log messages saying that process is waiting on threads to finish. 4) Right away start a new mongrel to replace this one. The .pid file gets wiped out by this, and since the previous process is waiting, the new process can't bind. 5) Once the original process dies you'll be in the situation you've got. See if that's the problem. If it is then hang on as I'm beefing up the start/stop logic to be a bit smarter about this. > (Just as an aside, is there a gateway somewhere where I can search > this list?) Here's the mailman page, but otherwise you'll need to search it with google: http://rubyforge.org/mailman/listinfo/mongrel-users -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From fxn at hashref.com Thu Dec 7 15:54:22 2006 From: fxn at hashref.com (Xavier Noria) Date: Thu, 7 Dec 2006 21:54:22 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: References: Message-ID: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> On Dec 7, 2006, at 7:03 PM, Xavier Noria wrote: > I am using mongrel_cluster with mod_proxy_balancer and would like to > enable compression (assuming it improves throughtput) and limit file > size upload. I configured mod_deflate and LimitRequestSize in Apache, > but in my trials looks like the proxied calls bypass those directives > (the conf goes below). Heh, sorry I was doing a telnet to check the response by hand and forgot to add the header that triggers compression. It is working fine with the config I sent (minus the typo I mention below). > LimitRequestSize 102400 This should read LimitRequestBody, and still looks like it does not affect to requests proxied to Mongrel. Which is the way to set the limit Apache + mod_proxy_balancer + Mongrel Cluster? -- fxn From jeroen at supercool.nl Thu Dec 7 15:55:23 2006 From: jeroen at supercool.nl (Jeroen Houben) Date: Thu, 07 Dec 2006 21:55:23 +0100 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: <873DA678-F45C-46F5-9C01-502B0766EB25@gmail.com> References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> <457870F1.8090808@supercool.nl> <873DA678-F45C-46F5-9C01-502B0766EB25@gmail.com> Message-ID: <45787FBB.1050601@supercool.nl> cleaner416 wrote: > On Dec 7, 2006, at 2:52 PM, Jeroen Houben wrote: > >> cleaner416 wrote: >>> My only question is this: when I run mongrel_rails cluster::restart >>> or mongrel_rails cluster::stop/start the old processes do not get >>> killed off and I have to do it manually. I've noticed this on 3 >>> boxes, all running FC5 with user/group mongrel/mongrel. Any ideas? >> Do you get any error messages? Are you in the right directory? usually >> /path/to/app/current? Do you run the commands as root? >> > > Yeah, ran as root, no error messages, in the root directory of the > app. Smells like a permissions issue? Root is doing the > restarting, the app files are all owned by nobody/nobody (expect for > config/mongrel.log) and now I'm seeing that no log/mongrel.pid is > getting created. > > > Here's the config/mongrel.yml: > > --- > user: mongrel > cwd: /data/wwwroot/myapp > port: "8000" > environment: production > group: mongrel > address: 127.0.0.1 > pid_file: log/mongrel.pid > servers: 3 Can you do a mongrel_rails cluster::restart -v That should tell you a little more. Also, are you using capistrano? HTH Jeroen From ezmobius at gmail.com Thu Dec 7 16:23:20 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 7 Dec 2006 13:23:20 -0800 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: <20061207124414.2cc5805e.zedshaw@zedshaw.com> References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> <20061207124414.2cc5805e.zedshaw@zedshaw.com> Message-ID: On Dec 7, 2006, at 12:44 PM, Zed A. Shaw wrote: > On Thu, 7 Dec 2006 12:43:02 -0500 > cleaner416 wrote: > > >> My only question is this: when I run mongrel_rails cluster::restart >> or mongrel_rails cluster::stop/start the old processes do not get >> killed off and I have to do it manually. I've noticed this on 3 >> boxes, all running FC5 with user/group mongrel/mongrel. Any ideas? > > There is kind of a dumb race condition I've gotta fix this week > where if you stop a mongrel process, but mongrel needs to wait on > some threads to finish, and then start a new one, all hell breaks > loose. > > Check if this is the case by doing this: > > 1) Tail the mongrel.log in a window off to the side. > 2) Start some requests or something that's common usage. > 3) Stop mongrel and look for log messages saying that process is > waiting on threads to finish. > 4) Right away start a new mongrel to replace this one. The .pid > file gets wiped out by this, and since the previous process is > waiting, the new process can't bind. > 5) Once the original process dies you'll be in the situation you've > got. > > See if that's the problem. If it is then hang on as I'm beefing up > the start/stop logic to be a bit smarter about this. > Hey Zed- I have been seeing this a lot when deploying apps from capistrano. It would be awesome to get it fixed in mongrel. What I have been doing for now is using gentoo's init.d script options so it will invoke the stop command and wait for 15 seconds, if mongrel doesn't go down by then it issues a kill -9 and then starts things up again. Here is an init.d script I use if anyone is interested. Its gentoo specifc afaik. #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx-r1,v 1.1 2006/07/04 16:58:38 voxus Exp $ # Modified by tmornini at engineyard.com for mongrel_cluster startup EY_USER=whatever EY_CONF=/data/$EY_USER/current/config/mongrel_cluster.yml depend() { need net use dns logger after gfs } start() { ebegin "Starting mongrel_cluster" start-stop-daemon --start \ --name mongrel_rails \ --chuid $EY_USER \ --exec /usr/bin/mongrel_rails -- cluster::start -C $EY_CONF eend $? "Failed to start mongrel_cluster" } stop() { ebegin "Stopping mongrel_cluster" start-stop-daemon --stop --retry 15 --oknodo --name mongrel_rails eend $? "Failed to stop mongrel_cluster" } It's the --retry 15 --oknodo part that does the right thing. Before I set this we had random mongrel restart failures during deploys because of this issue. I'd love to see mongrel stop be a bit more robust though for sure. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From luislavena at gmail.com Thu Dec 7 16:36:05 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 7 Dec 2006 18:36:05 -0300 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> <20061207124414.2cc5805e.zedshaw@zedshaw.com> Message-ID: <71166b3b0612071336ya931e1dg97c5080a6c2f789e@mail.gmail.com> On 12/7/06, Ezra Zygmuntowicz wrote: > > On Dec 7, 2006, at 12:44 PM, Zed A. Shaw wrote: > > > On Thu, 7 Dec 2006 12:43:02 -0500 > > cleaner416 wrote: > > > > > >> My only question is this: when I run mongrel_rails cluster::restart > >> or mongrel_rails cluster::stop/start the old processes do not get > >> killed off and I have to do it manually. I've noticed this on 3 > >> boxes, all running FC5 with user/group mongrel/mongrel. Any ideas? > > > > There is kind of a dumb race condition I've gotta fix this week > > where if you stop a mongrel process, but mongrel needs to wait on > > some threads to finish, and then start a new one, all hell breaks > > loose. > > > > Check if this is the case by doing this: > > > > 1) Tail the mongrel.log in a window off to the side. > > 2) Start some requests or something that's common usage. > > 3) Stop mongrel and look for log messages saying that process is > > waiting on threads to finish. > > 4) Right away start a new mongrel to replace this one. The .pid > > file gets wiped out by this, and since the previous process is > > waiting, the new process can't bind. > > 5) Once the original process dies you'll be in the situation you've > > got. > > > > See if that's the problem. If it is then hang on as I'm beefing up > > the start/stop logic to be a bit smarter about this. > > > > Hey Zed- > > I have been seeing this a lot when deploying apps from capistrano. > It would be awesome to get it fixed in mongrel. What I have been > doing for now is using gentoo's init.d script options so it will > invoke the stop command and wait for 15 seconds, if mongrel doesn't > go down by then it issues a kill -9 and then starts things up again. > On similar topic, but different platform (win32). I have been doing the same, and changed mongrel_service to perform in the same way. [snip] > ... I'd love to see mongrel stop be a bit > more robust though for sure. > How do you think we should fix this? how will be the step by step needed by mongrel to perform when restarting (mongrel and cluster). Later, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From cleaner416 at gmail.com Thu Dec 7 16:57:09 2006 From: cleaner416 at gmail.com (cleaner416) Date: Thu, 7 Dec 2006 16:57:09 -0500 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: <20061207124414.2cc5805e.zedshaw@zedshaw.com> References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> <20061207124414.2cc5805e.zedshaw@zedshaw.com> Message-ID: <4D2146BC-29B5-443A-B6FE-31F998382842@gmail.com> On Dec 7, 2006, at 3:44 PM, Zed A. Shaw wrote: > > There is kind of a dumb race condition I've gotta fix this week > where if you stop a mongrel process, but mongrel needs to wait on > some threads to finish, and then start a new one, all hell breaks > loose. > > Check if this is the case by doing this: > > 1) Tail the mongrel.log in a window off to the side. > 2) Start some requests or something that's common usage. > 3) Stop mongrel and look for log messages saying that process is > waiting on threads to finish. > 4) Right away start a new mongrel to replace this one. The .pid > file gets wiped out by this, and since the previous process is > waiting, the new process can't bind. > 5) Once the original process dies you'll be in the situation you've > got. > > See if that's the problem. If it is then hang on as I'm beefing up > the start/stop logic to be a bit smarter about this. Yep, that's it. Thanks for the reply - I'll just hang on for now. Cheers From cleaner416 at gmail.com Thu Dec 7 16:58:16 2006 From: cleaner416 at gmail.com (cleaner416) Date: Thu, 7 Dec 2006 16:58:16 -0500 Subject: [Mongrel] Cluster restart leaving orphaned processes? In-Reply-To: <45787FBB.1050601@supercool.nl> References: <710272F8-5B82-402B-BEFD-9DC2B406A758@gmail.com> <457870F1.8090808@supercool.nl> <873DA678-F45C-46F5-9C01-502B0766EB25@gmail.com> <45787FBB.1050601@supercool.nl> Message-ID: <34CD0754-CFAF-4245-ADD9-698D7D5DB3DB@gmail.com> Thanks for the help, Joroen. See Zed's reply ... From al-mongrelusers at none.at Fri Dec 8 08:36:04 2006 From: al-mongrelusers at none.at (Aleksandar Lazic) Date: Fri, 8 Dec 2006 14:36:04 +0100 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> Message-ID: <20061208133604.GA30839@none.at> Hi, On Don 07.12.2006 09:30, Dallas DeVries wrote: >Anyways I'm almost done with a clean install with apache/mongrel >cluster mentioned by Konstantin so hopefully that solves my problem. how about to look into nginx with mongrel?! http://brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster http://www.brainspl.at/articles/2006/09/12/new-nginx-conf-with-rails-caching The Doku wiki ;-) http://wiki.codemongers.com/ Regards Aleks From mroghelia at topsailtech.com Fri Dec 8 16:20:40 2006 From: mroghelia at topsailtech.com (Mark Roghelia) Date: Fri, 8 Dec 2006 16:20:40 -0500 Subject: [Mongrel] windows service auto start problems Message-ID: <8A74B915-9621-458D-A67C-CB8646EB30C3@topsailtech.com> I have a small Rails app deployed on Windows Server 2003 and Mongrel 0.3.13.3. Everything works well, except when the Windows box is rebooted. I have mongrel_service installed and the service is configured to start automatically, however Mongrel consistently fails to start after a reboot. Windows reports the service's status as "Started", but attempts to access the app fail and checking Task Manager reveals there is no ruby process running. If I manually stop and start the service at that point everything comes up fine. I don't see anything of note in any of the log files in the Rails "log" directory, or in the Event Viewer. Has anyone else seen this kind of behavior? If so, do you have any suggestions about how to work around it? I understand that work is currently being done to retool mongrel_service. Is this possibly a known issue and something that is being addressed? Thanks, Mark Roghelia From kevin.olbrich at gmail.com Fri Dec 8 18:26:26 2006 From: kevin.olbrich at gmail.com (Kevin Olbrich) Date: Fri, 8 Dec 2006 18:26:26 -0500 Subject: [Mongrel] windows service auto start problems In-Reply-To: <8A74B915-9621-458D-A67C-CB8646EB30C3@topsailtech.com> References: <8A74B915-9621-458D-A67C-CB8646EB30C3@topsailtech.com> Message-ID: I actually had a worse experience recently. Partly of my own doing. Win 2003 small business server. 1. installed instantrails 2. At one point configured apache to monitor port 3000 in an aborted attempt to set up proxying. 3. gave up on apache for the moment, but got a mongrel_service running monitoring the same port 4. started getting segfaults from mongrel (run in debug mode to see them) 5. updated some other software and restarted Server hung during the login process and never allowed me to sign on. After some digging I discovered the problem, I think. Instant Rails was set to startup and run Apache, which captured port 3000 The mongrel service started and tried to capture the same port, but couldnt. So it failed, and because I had it set to restart the service, this just kept going around in circles. Had to login in safe mode and deactivated the mongrel service. FWIW, I still get segfaults with mongrel as a service (but not if run directly). Haven't researched it enough to file a bug report yet. _Kevin On 12/8/06, Mark Roghelia wrote: > I have a small Rails app deployed on Windows Server 2003 and Mongrel > 0.3.13.3. Everything works well, except when the Windows box is > rebooted. I have mongrel_service installed and the service is > configured to start automatically, however Mongrel consistently fails > to start after a reboot. Windows reports the service's status as > "Started", but attempts to access the app fail and checking Task > Manager reveals there is no ruby process running. If I manually stop > and start the service at that point everything comes up fine. I > don't see anything of note in any of the log files in the Rails "log" > directory, or in the Event Viewer. > > Has anyone else seen this kind of behavior? If so, do you have any > suggestions about how to work around it? > > I understand that work is currently being done to retool > mongrel_service. Is this possibly a known issue and something that > is being addressed? > > Thanks, > > Mark Roghelia > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Kevin Olbrich kevin.olbrich at gmail.com CONFIDENTIAL Unless otherwise indicated or obvious from the nature of the following communication, the information contained herein is a privileged and confidential information/work product. The communication is intended for the use of the individual or entity named above. It the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error or are not sure whether it is privileged, please immediately notify us by return e-mail and destroy any copies, electronic, paper, or otherwise, which you may have of this communication. From luislavena at gmail.com Fri Dec 8 19:30:05 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 8 Dec 2006 21:30:05 -0300 Subject: [Mongrel] windows service auto start problems In-Reply-To: <8A74B915-9621-458D-A67C-CB8646EB30C3@topsailtech.com> References: <8A74B915-9621-458D-A67C-CB8646EB30C3@topsailtech.com> Message-ID: <71166b3b0612081630n523e6b6ft1c3e06d6def205d1@mail.gmail.com> On 12/8/06, Mark Roghelia wrote: > I have a small Rails app deployed on Windows Server 2003 and Mongrel > 0.3.13.3. Everything works well, except when the Windows box is > rebooted. I have mongrel_service installed and the service is > configured to start automatically, however Mongrel consistently fails > to start after a reboot. Windows reports the service's status as > "Started", but attempts to access the app fail and checking Task > Manager reveals there is no ruby process running. If I manually stop > and start the service at that point everything comes up fine. I > don't see anything of note in any of the log files in the Rails "log" > directory, or in the Event Viewer. > > Has anyone else seen this kind of behavior? If so, do you have any > suggestions about how to work around it? > Yes, that behavior happens if mongrel_service tries to start prior the network stack get up (it fails to bind to tcp/ip). > I understand that work is currently being done to retool > mongrel_service. Is this possibly a known issue and something that > is being addressed? > This is something that current and new implementation lack of solution. I'm reworking ServiceFB framework to allow complete control of service dependencies and make it "start" after all network services are up, to solve this issue. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Fri Dec 8 19:34:44 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 8 Dec 2006 21:34:44 -0300 Subject: [Mongrel] windows service auto start problems In-Reply-To: References: <8A74B915-9621-458D-A67C-CB8646EB30C3@topsailtech.com> Message-ID: <71166b3b0612081634k5d5074b4jcf25130242f754bd@mail.gmail.com> On 12/8/06, Kevin Olbrich wrote: > I actually had a worse experience recently. Partly of my own doing. > Win 2003 small business server. > > 1. installed instantrails > 2. At one point configured apache to monitor port 3000 in an aborted > attempt to set up proxying. > 3. gave up on apache for the moment, but got a mongrel_service running > monitoring the same port > 4. started getting segfaults from mongrel (run in debug mode to see them) > 5. updated some other software and restarted > > Server hung during the login process and never allowed me to sign on. > > After some digging I discovered the problem, I think. > > Instant Rails was set to startup and run Apache, which captured port 3000 > The mongrel service started and tried to capture the same port, but > couldnt. So it failed, and because I had it set to restart the > service, this just kept going around in circles. > > Had to login in safe mode and deactivated the mongrel service. > There some changes I'll implement to mongrel_rails to actually log something in log/mongrel.log about ports already taken. That way you could "see" why the service failed to start... > FWIW, I still get segfaults with mongrel as a service (but not if run > directly). Haven't researched it enough to file a bug report yet. > That's because you're using mongrel_service 0.1.0, which is based on win32-service and currently (guess still will show problems) just crash due mixing of green threads and Service Control Manager handling. The new implementation solves this using a standalone, precompiled binary that just "fire" mongrel_rails in its own ruby process, no more hacking of gem_plugins crashing the service. That also allow me code the cluster implementation, but is delayed due rework on ServiceFB framework. > On 12/8/06, Mark Roghelia wrote: [snip] -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From fxn at hashref.com Sat Dec 9 05:19:45 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 9 Dec 2006 11:19:45 +0100 Subject: [Mongrel] max upload size? (was: compress and max upload size?) In-Reply-To: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> Message-ID: <6175E681-A0B1-4FCB-9A26-4CF9C32DB9E4@hashref.com> On Dec 7, 2006, at 9:54 PM, Xavier Noria wrote: >> LimitRequestSize 102400 > > This should read LimitRequestBody, and still looks like it does not > affect to requests proxied to Mongrel. Which is the way to set the > limit Apache + mod_proxy_balancer + Mongrel Cluster? I have not found a way within Apache, and the constants defined in Mongrel /* Defines the maximum allowed lengths for various input elements.*/ DEF_MAX_LENGTH(FIELD_NAME, 256); DEF_MAX_LENGTH(FIELD_VALUE, 80 * 1024); DEF_MAX_LENGTH(REQUEST_URI, 1024 * 2); DEF_MAX_LENGTH(REQUEST_PATH, 1024); DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10)); DEF_MAX_LENGTH(HEADER, (1024 * (80 + 32))); do no take the request body into account. There is a MAX_BODY somewhere but that is just a threshold Mongrel uses to decide when to switch from StringIO into a tempfile when it handles uploads. I am not sure what to do next, the client wants a limit. Could you accomplish that with lighty or any other web server + balancer. -- fxn From zedshaw at zedshaw.com Sat Dec 9 05:41:40 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Sat, 9 Dec 2006 02:41:40 -0800 Subject: [Mongrel] max upload size? (was: compress and max upload size?) In-Reply-To: <6175E681-A0B1-4FCB-9A26-4CF9C32DB9E4@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <6175E681-A0B1-4FCB-9A26-4CF9C32DB9E4@hashref.com> Message-ID: <20061209024140.f7eceaf0.zedshaw@zedshaw.com> On Sat, 9 Dec 2006 11:19:45 +0100 Xavier Noria wrote: > On Dec 7, 2006, at 9:54 PM, Xavier Noria wrote: > > >> LimitRequestSize 102400 > > > > This should read LimitRequestBody, and still looks like it does not > > affect to requests proxied to Mongrel. Which is the way to set the > > limit Apache + mod_proxy_balancer + Mongrel Cluster? > > I have not found a way within Apache, and the constants defined in > Mongrel If you desperately need this then your best bet is to look how the handler in mongrel_upload_progress is written, modify it to monitor the request and abort anything over your limit, and then attach that to the front of your rails request. Should be easy if you read the code and follow it. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From al-mongrelusers at none.at Sat Dec 9 06:01:17 2006 From: al-mongrelusers at none.at (Aleksandar Lazic) Date: Sat, 9 Dec 2006 12:01:17 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> Message-ID: <20061209110117.GA11316@none.at> Hi, On Don 07.12.2006 21:54, Xavier Noria wrote: >On Dec 7, 2006, at 7:03 PM, Xavier Noria wrote: > >> LimitRequestSize 102400 > >This should read LimitRequestBody, and still looks like it does not >affect to requests proxied to Mongrel. Which is the way to set the >limit Apache + mod_proxy_balancer + Mongrel Cluster? Do you mean this Option? http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody If it doesn't work with mod_proxy_* then it could be a bug in apache, how about to ask on http-user list? Hth ;-) Aleks From fxn at hashref.com Sat Dec 9 08:38:05 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 9 Dec 2006 14:38:05 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: <20061209110117.GA11316@none.at> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> Message-ID: <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> On Dec 9, 2006, at 12:01 PM, Aleksandar Lazic wrote: > Hi, > > On Don 07.12.2006 21:54, Xavier Noria wrote: >> On Dec 7, 2006, at 7:03 PM, Xavier Noria wrote: >> >>> LimitRequestSize 102400 >> >> This should read LimitRequestBody, and still looks like it does not >> affect to requests proxied to Mongrel. Which is the way to set the >> limit Apache + mod_proxy_balancer + Mongrel Cluster? > > Do you mean this Option? > > http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody > > If it doesn't work with mod_proxy_* then it could be a bug in apache, > how about to ask on http-user list? Yeah, I tried that yesterday and got no response so far. Before patching Mongrel, looks like ngnix supports that limit and would be a good or even better choice for our application than Apache, I am right now testing it. -- fxn From fxn at hashref.com Sat Dec 9 10:57:58 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 9 Dec 2006 16:57:58 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> Message-ID: On Dec 9, 2006, at 2:38 PM, Xavier Noria wrote: > Yeah, I tried that yesterday and got no response so far. Before > patching Mongrel, looks like ngnix supports that limit and would be a > good or even better choice for our application than Apache, I am > right now testing it. Well, looks like the limit is working with Nginx, but I get very poor performance compared to Apache, same server machine, same (remote) stress machine. Apache is serving about 17 req/s, whereas Nginx is serving about 5 req/s. Since Nginx is known to be fast I bet my config, albeit simple, is somehow wrong. I attach it below in case some experienced eye catches something. -- fxn tested with: ab -t 60 -c 5 -H 'Accept-Encoding: gzip' url_to_dynamic_page Nginx (5 req/s) --------------- user daemon; error_log logs/error.log; pid logs/nginx.pid; events { worker_connections 1024; } http { include conf/mime.types; default_type application/octet-stream; sendfile on; gzip on; gzip_proxied any; gzip_types text/html text/plain text/xml text/css application/x- javascript; client_max_body_size 1M; upstream mongrel { server 127.0.0.1:3001; server 127.0.0.1:3002; server 127.0.0.1:3003; } server { listen 80; server_name www.example.com; root /home/oper/www/public; location ^~ \.flv$ { flv; } location / { if (!-f $request_filename) { proxy_pass http://mongrel; } } error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } } Apache (17 req/s) ----------------- NameVirtualHost *:80 # Configure the balancer to dispatch to the Mongrel cluster. BalancerMember http://127.0.0.1:3001 BalancerMember http://127.0.0.1:3002 BalancerMember http://127.0.0.1:3003 # Setup the VirtualHost for your Rails application ServerAdmin admin at example.com ServerName www.example.com ServerAlias localhost DocumentRoot /path/to/example/public Options FollowSymLinks AllowOverride None Order allow,deny Allow from all ProxyPass / balancer://example_cluster/ ProxyPassReverse / balancer://example_cluster/ # Setup your Rewrite rules here RewriteEngine On # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Send all requests that are not found as existing files to the cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://example_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml text/ css application/x-javascript # Error logs ErrorLog /path/to/example/log/apache_error_log CustomLog /path/to/example/log/apache_access_log combined From al-mongrelusers at none.at Sat Dec 9 11:21:47 2006 From: al-mongrelusers at none.at (Aleksandar Lazic) Date: Sat, 9 Dec 2006 17:21:47 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> Message-ID: <20061209162147.GA3313@none.at> Hi, On Sam 09.12.2006 16:57, Xavier Noria wrote: > >Well, looks like the limit is working with Nginx, but I get very poor >performance compared to Apache, same server machine, same (remote) >stress machine. Apache is serving about 17 req/s, whereas Nginx is >serving about 5 req/s. Since Nginx is known to be fast I bet my config, >albeit simple, is somehow wrong. I attach it below in case some >experienced eye catches something. This sounds very bad?! Sorry if I have overseen but on with os,hw and so on do you run both server?! >tested with: ab -t 60 -c 5 -H 'Accept-Encoding: gzip' >url_to_dynamic_page > >Nginx (5 req/s) > >user daemon; > >error_log logs/error.log; >pid logs/nginx.pid; Just for my curiosity please can you add: worker_processes 4; >events { > worker_connections 1024; >} > >http { > include conf/mime.types; > default_type application/octet-stream; > > sendfile on; > > gzip on; > gzip_proxied any; can you try to add this to your config after the test with the worker_processes ;-): gzip_min_length 1100; gzip_buffers 4 8k; Have your some errors in the error log?! Hth && regards Aleks From al-mongrelusers at none.at Sat Dec 9 11:34:04 2006 From: al-mongrelusers at none.at (Aleksandar Lazic) Date: Sat, 9 Dec 2006 17:34:04 +0100 Subject: [Mongrel] [addenum] Re: compress and max upload size? In-Reply-To: References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> Message-ID: <20061209163404.GA4697@none.at> On Sam 09.12.2006 16:57, Xavier Noria wrote: >On Dec 9, 2006, at 2:38 PM, Xavier Noria wrote: [snipp] > location / { > if (!-f $request_filename) { > proxy_pass http://mongrel; What do you get if you turn of proxy_buffering: http://wiki.codemongers.com/NginxHttpProxyModule#proxy_buffering Regards Aleks From fxn at hashref.com Sat Dec 9 13:15:20 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 9 Dec 2006 19:15:20 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> Message-ID: <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> On Dec 9, 2006, at 4:57 PM, Xavier Noria wrote: > Well, looks like the limit is working with Nginx, but I get very poor > performance compared to Apache, same server machine, same (remote) > stress machine. Apache is serving about 17 req/s, whereas Nginx is > serving about 5 req/s. Since Nginx is known to be fast I bet my > config, albeit simple, is somehow wrong. I attach it below in case > some experienced eye catches something. I think I got something. The Content-Length reported by ab for Apache is 4K, and for Nginx is 19K, so my guess is that compression is not being triggered. If I use wget content is not compressed either. But it comes compressed if I use Firefox. That would explain the difference. I will try another stress tool then. -- fxn From fxn at hashref.com Sat Dec 9 14:05:04 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 9 Dec 2006 20:05:04 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> Message-ID: <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> On Dec 9, 2006, at 7:15 PM, Xavier Noria wrote: > On Dec 9, 2006, at 4:57 PM, Xavier Noria wrote: > >> Well, looks like the limit is working with Nginx, but I get very poor >> performance compared to Apache, same server machine, same (remote) >> stress machine. Apache is serving about 17 req/s, whereas Nginx is >> serving about 5 req/s. Since Nginx is known to be fast I bet my >> config, albeit simple, is somehow wrong. I attach it below in case >> some experienced eye catches something. > > I think I got something. The Content-Length reported by ab for Apache > is 4K, and for Nginx is 19K, so my guess is that compression is not > being triggered. If I use wget content is not compressed either. But > it comes compressed if I use Firefox. > > That would explain the difference. I will try another stress tool > then. Indeed, that was the problem. Once I've got compressed content, we go up to about 10 req/s, still not close to the 17 req/s of Apache. I think I don't have evidence of the speed of Nginx + mongrel_cluster for my particular application at least, so I'll get back to Apache 2.2.3 + mod_proxy_balancer. -- fxn The Nginx config is: user daemon; error_log logs/error.log; pid logs/nginx.pid; events { worker_connections 1024; } http { include conf/mime.types; default_type application/octet-stream; gzip on; gzip_types text/plain text/css application/x-javascript text/xml; gzip_proxied any; gzip_comp_level 2; gzip_http_version 1.0; # for ab and wget upstream mongrel { server 127.0.0.1:3001; server 127.0.0.1:3002; server 127.0.0.1:3003; } # based on http://brainspl.at/articles/2006/09/12/new-nginx-conf- with-rails-caching server { listen 80; root /home/oper/www/public; client_max_body_size 1M; # this rewrites all the requests to the maintenance.html # page if it exists in the doc root. This is for capistrano's # disable web task if (-f $document_root/maintenance.html){ rewrite ^(.*)$ /maintenance.html last; break; } location ^~ \.flv$ { flv; } location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; if (!-f $request_filename) { proxy_pass http://mongrel; break; } } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } } From ezmobius at gmail.com Sat Dec 9 15:37:15 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Sat, 9 Dec 2006 12:37:15 -0800 Subject: [Mongrel] compress and max upload size? In-Reply-To: <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> Message-ID: On Dec 9, 2006, at 11:05 AM, Xavier Noria wrote: > On Dec 9, 2006, at 7:15 PM, Xavier Noria wrote: > >> On Dec 9, 2006, at 4:57 PM, Xavier Noria wrote: >> >>> Well, looks like the limit is working with Nginx, but I get very >>> poor >>> performance compared to Apache, same server machine, same (remote) >>> stress machine. Apache is serving about 17 req/s, whereas Nginx is >>> serving about 5 req/s. Since Nginx is known to be fast I bet my >>> config, albeit simple, is somehow wrong. I attach it below in case >>> some experienced eye catches something. >> >> I think I got something. The Content-Length reported by ab for Apache >> is 4K, and for Nginx is 19K, so my guess is that compression is not >> being triggered. If I use wget content is not compressed either. But >> it comes compressed if I use Firefox. >> >> That would explain the difference. I will try another stress tool >> then. > > Indeed, that was the problem. > > Once I've got compressed content, we go up to about 10 req/s, still > not close to the 17 req/s of Apache. I think I don't have evidence of > the speed of Nginx + mongrel_cluster for my particular application at > least, so I'll get back to Apache 2.2.3 + mod_proxy_balancer. > > -- fxn I think the reason you are seeing a difference between apache and nginx in this situation is that your apache config is rewriting stuff so that apache serves all static content. With your nginx config you are sending all requests including those for static files to mongrel. You need the appropriate rewite rules in nginx.conf in order to make a fair comparison. Here is a complete nginx config for use with mongrel. It does all the rewites toi assure static content is served by nginx. try this one out for a more fair comparison http://brainspl.at/nginx.conf.txt Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From fxn at hashref.com Sat Dec 9 16:12:47 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 9 Dec 2006 22:12:47 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> Message-ID: On Dec 9, 2006, at 9:37 PM, Ezra Zygmuntowicz wrote: > I think the reason you are seeing a difference between apache and > nginx in this situation is that your apache config is rewriting stuff > so that apache serves all static content. With your nginx config you > are sending all requests including those for static files to mongrel. > You need the appropriate rewite rules in nginx.conf in order to make > a fair comparison. > > Here is a complete nginx config for use with mongrel. It does all > the rewites toi assure static content is served by nginx. try this > one out for a more fair comparison > > http://brainspl.at/nginx.conf.txt Thank you Ezra. I am not sure that is the case however, my config file is based on that one. Both are very similar because of that, and in particular both have the test if (!-f $request_filename) { proxy_pass http://mongrel; break; } -- fxn From al-mongrelusers at none.at Sat Dec 9 16:16:25 2006 From: al-mongrelusers at none.at (Aleksandar Lazic) Date: Sat, 9 Dec 2006 22:16:25 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> Message-ID: <20061209211625.GA23657@none.at> On Sam 09.12.2006 20:05, Xavier Noria wrote: > >Once I've got compressed content, we go up to about 10 req/s, still not >close to the 17 req/s of Apache. I think I don't have evidence of the >speed of Nginx + mongrel_cluster for my particular application at >least, so I'll get back to Apache 2.2.3 + mod_proxy_balancer. Hm, with which options do you have build nginx? On witch OS, HW, ...? Have you tried the worker_processes option? >The Nginx config is: > >user daemon; > >error_log logs/error.log; >pid logs/nginx.pid; > >events { > worker_connections 1024; >} > >http { > include conf/mime.types; > default_type application/octet-stream; Please add: sendfile on; > gzip on; > gzip_types text/plain text/css application/x-javascript text/xml; > gzip_proxied any; > gzip_comp_level 2; ^^^^^^^^ Please comment this out > gzip_http_version 1.0; # for ab and wget Please can you tell me what's in error log! Thanks aleks From fxn at hashref.com Sat Dec 9 16:50:49 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 9 Dec 2006 22:50:49 +0100 Subject: [Mongrel] compress and max upload size? In-Reply-To: <20061209211625.GA23657@none.at> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> <20061209211625.GA23657@none.at> Message-ID: <2B4F3CD4-BD08-4962-A2C6-DD0461A7D261@hashref.com> On Dec 9, 2006, at 10:16 PM, Aleksandar Lazic wrote: > On Sam 09.12.2006 20:05, Xavier Noria wrote: >> >> Once I've got compressed content, we go up to about 10 req/s, >> still not >> close to the 17 req/s of Apache. I think I don't have evidence of the >> speed of Nginx + mongrel_cluster for my particular application at >> least, so I'll get back to Apache 2.2.3 + mod_proxy_balancer. > > Hm, with which options do you have build nginx? I used --with-http_ssl_module --with-http_flv_module. > On witch OS, HW, ...? That's a Debian $ uname -a Linux machine.dedi.acens.net 2.6.8-3-686-smp #1 \ SMP Thu Sep 7 04:39:15 UTC 2006 i686 GNU/Linux > Have you tried the worker_processes option? Yes, I tried all the things proposed in your email, but there was no noticeable difference. > Please add: > sendfile on; That was on most of the time, I think I removed it towards the end doing configuration combinatorics :-). > >> gzip on; >> gzip_types text/plain text/css application/x-javascript text/ >> xml; >> gzip_proxied any; >> gzip_comp_level 2; > ^^^^^^^^ > Please comment this out With default compression level I get a response which is bigger than the one sent by Apache. Since I am comparing both setups I tweaked that documented parameter to match them. >> gzip_http_version 1.0; # for ab and wget > > Please can you tell me what's in error log! Sure, there's nothing. There were some traces when in my trials I execeeded client_max_body_size on purpose. When benchmarks run there's nothing printed to the error log. -- fxn From al-mongrelusers at none.at Sat Dec 9 17:05:54 2006 From: al-mongrelusers at none.at (Aleksandar Lazic) Date: Sat, 9 Dec 2006 23:05:54 +0100 Subject: [Mongrel] nginx conf (was: Re: compress and max upload size?) In-Reply-To: <2B4F3CD4-BD08-4962-A2C6-DD0461A7D261@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> <9622C374-FB14-4306-9E31-720A881F4BA8@hashref.com> <20061209211625.GA23657@none.at> <2B4F3CD4-BD08-4962-A2C6-DD0461A7D261@hashref.com> Message-ID: <20061209220554.GA26446@none.at> On Sam 09.12.2006 22:50, Xavier Noria wrote: >On Dec 9, 2006, at 10:16 PM, Aleksandar Lazic wrote: > >> Hm, with which options do you have build nginx? > >I used --with-http_ssl_module --with-http_flv_module. > >> On witch OS, HW, ...? > >That's a Debian > > $ uname -a > Linux machine.dedi.acens.net 2.6.8-3-686-smp #1 \ > SMP Thu Sep 7 04:39:15 UTC 2006 i686 GNU/Linux Thanks, you should use the worker_processes option if you want to use the other cpus ;-) >> Have you tried the worker_processes option? > >Yes, I tried all the things proposed in your email, but there was no >noticeable difference. Aha?! >> Please add: >> sendfile on; > >That was on most of the time, I think I removed it towards the end >doing configuration combinatorics :-). I think if you haven't problems yust let it on, mabe some other on this list have some bad expirence with this option? >>> gzip on; >>> gzip_types text/plain text/css application/x-javascript text/ >>> xml; >>> gzip_proxied any; >>> gzip_comp_level 2; >> ^^^^^^^^ >> Please comment this out > >With default compression level I get a response which is bigger than >the one sent by Apache. Since I am comparing both setups I tweaked that >documented parameter to match them. Ah ok thanks for explanation. >>> gzip_http_version 1.0; # for ab and wget >> >> Please can you tell me what's in error log! > >Sure, there's nothing. There were some traces when in my trials I >execeeded client_max_body_size on purpose. When benchmarks run there's >nothing printed to the error log. Thanks ;-) Regards Aleks From will at hotgazpacho.com Sat Dec 9 18:02:10 2006 From: will at hotgazpacho.com (Will Green) Date: Sat, 09 Dec 2006 18:02:10 -0500 Subject: [Mongrel] compress and max upload size? In-Reply-To: <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <20061209110117.GA11316@none.at> <43CDC58F-6A26-4CA9-86EE-7EA9B6DA24E8@hashref.com> <2ACEF1F2-7EB7-427E-BC1B-52216CDD77CA@hashref.com> Message-ID: <457B4072.4030103@hotgazpacho.com> You need to have your stress testing tool send the following request header to trigger compressed content: Accept-Encoding: gzip,deflate for wget, that's: wget --header="Accept-Encoding: gzip,deflate" == Will Xavier Noria wrote: > On Dec 9, 2006, at 4:57 PM, Xavier Noria wrote: > >> Well, looks like the limit is working with Nginx, but I get very poor >> performance compared to Apache, same server machine, same (remote) >> stress machine. Apache is serving about 17 req/s, whereas Nginx is >> serving about 5 req/s. Since Nginx is known to be fast I bet my >> config, albeit simple, is somehow wrong. I attach it below in case >> some experienced eye catches something. > > I think I got something. The Content-Length reported by ab for Apache > is 4K, and for Nginx is 19K, so my guess is that compression is not > being triggered. If I use wget content is not compressed either. But > it comes compressed if I use Firefox. > > That would explain the difference. I will try another stress tool then. > > -- fxn > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From fxn at hashref.com Sun Dec 10 05:03:18 2006 From: fxn at hashref.com (Xavier Noria) Date: Sun, 10 Dec 2006 11:03:18 +0100 Subject: [Mongrel] [SUMMARY] max upload size? (was: compress and max upload size?) In-Reply-To: <6175E681-A0B1-4FCB-9A26-4CF9C32DB9E4@hashref.com> References: <84D1ECF6-1C8B-4468-B640-8B52224173EC@hashref.com> <6175E681-A0B1-4FCB-9A26-4CF9C32DB9E4@hashref.com> Message-ID: <7698C611-9190-447C-8674-BA74D300E66C@hashref.com> Aleksandar Lazic and I spent a couple of hours on the IRC yesterday night playing around with different configurations. We were comparing the setups discussed in this thread: Apache 2.2.3 + mod_proxy_balancer + mod_deflate versus Nginx, both servers proxying dynamic pages to 3 Mongrels. The test page is a dynamic page, requested hundreds of times with ab: ab [-k] -t 60 -c 5 -H 'Accept-Encoding: gzip' URL Both servers run on the same machine, alternatively as needed. We got much better performance than before in Nginx increasing the worker processes and disabling buffering in the proxy (proxy_buffering off). In Aleksandar's machine that raised the speed to almost 17 req/s, versus almost 19 req/s of Apache (always in mean, a couple of runs, you know). Compression level was the same in both servers. If we disabled compression both Apache and Nginx served that page at about the same speed, 11 req/s, so looks like the small difference comes from the usage of zlib somehow. Aleksandar has already written to the Nginx mailing list about it. -- fxn From shinji at kuwayama.com Sun Dec 10 20:34:28 2006 From: shinji at kuwayama.com (Shinji Kuwayama) Date: Sun, 10 Dec 2006 19:34:28 -0600 Subject: [Mongrel] Does mongrel look at the Rails page cache? Message-ID: Hi all. I'm trying to skip the Rails page cache if the user is logged in: --- # Rewrite index to check for static RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] --- It does seem to work -- here's sample rewrite debug for "/": --- (2) init rewrite engine with requested uri / (3) applying pattern '^.*$' to uri '/' (4) RewriteCond: input='/var/sites/production/public/system/ maintenance.html' pattern='-f' => not-matched (3) applying pattern '^/$' to uri '/' (4) RewriteCond: input='[other cookies]; logged_in=yes;' pattern='! ^.*logged_in=yes.*$' => not-matched (3) applying pattern '^([^.]+)$' to uri '/' (4) RewriteCond: input='[other cookies]; logged_in=yes;' pattern='! ^.*logged_in=yes.*$' => not-matched (3) applying pattern '^/(.*)$' to uri '/' (4) RewriteCond: input='/var/sites/production/public//' pattern='!-f' => matched (2) rewrite '/' -> 'balancer://mongrel_cluster/' (2) forcing proxy-throughput with balancer://mongrel_cluster/ (1) go-ahead with proxy request proxy:balancer://mongrel_cluster/ [OK] --- (As opposed to "go-ahead with /var/sites/production/public/ index.html", if the user's not logged in.) Problem: The static file is still being served to the browser. Can anyone tell me what I'm missing here? Shinji Kuwayama shinji at kuwayama.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061210/61cbe612/attachment.html From cdcarter at gmail.com Sun Dec 10 21:09:17 2006 From: cdcarter at gmail.com (Chris Carter) Date: Sun, 10 Dec 2006 20:09:17 -0600 Subject: [Mongrel] Does mongrel look at the Rails page cache? In-Reply-To: References: Message-ID: <86987bdf0612101809v5939adbdq80533f45e7725542@mail.gmail.com> Hi, Do you store logged_in in a cookie, or in the session? On 12/10/06, Shinji Kuwayama wrote: > > Hi all. I'm trying to skip the Rails page cache if the user is logged in: > > --- > # Rewrite index to check for static > RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ > RewriteRule ^/$ /index.html [QSA] > > # Rewrite to check for Rails cached page > RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ > RewriteRule ^([^.]+)$ $1.html [QSA] > > # Redirect all non-static requests to cluster > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteRule ^/(.*)$ > balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] > --- > > It does seem to work -- here's sample rewrite debug for "/": > > --- > (2) init rewrite engine with requested uri / > (3) applying pattern '^.*$' to uri '/' > (4) RewriteCond: > input='/var/sites/production/public/system/maintenance.html' > pattern='-f' => not-matched > (3) applying pattern '^/$' to uri '/' > (4) RewriteCond: input='[other cookies]; logged_in=yes;' > pattern='!^.*logged_in=yes.*$' => not-matched > (3) applying pattern '^([^.]+)$' to uri '/' > (4) RewriteCond: input='[other cookies]; logged_in=yes;' > pattern='!^.*logged_in=yes.*$' => not-matched > (3) applying pattern '^/(.*)$' to uri '/' > (4) RewriteCond: input='/var/sites/production/public//' > pattern='!-f' => matched > (2) rewrite '/' -> 'balancer://mongrel_cluster/' > (2) forcing proxy-throughput with balancer://mongrel_cluster/ > (1) go-ahead with proxy request > proxy:balancer://mongrel_cluster/ [OK] > --- > > (As opposed to "go-ahead with > /var/sites/production/public/index.html", if the user's not > logged in.) > > Problem: The static file is still being served to the browser. Can anyone > tell me what I'm missing here? > > > > Shinji Kuwayama > shinji at kuwayama.com > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Chris Carter concentrationstudios.com brynmawrcs.com From shinji at kuwayama.com Sun Dec 10 21:38:03 2006 From: shinji at kuwayama.com (Shinji Kuwayama) Date: Sun, 10 Dec 2006 20:38:03 -0600 Subject: [Mongrel] Does mongrel look at the Rails page cache? In-Reply-To: <86987bdf0612101809v5939adbdq80533f45e7725542@mail.gmail.com> References: <86987bdf0612101809v5939adbdq80533f45e7725542@mail.gmail.com> Message-ID: <2A74AE8A-0497-48A3-AA20-906DEA6BBC7E@kuwayama.com> Oh, it's definitely in a cookie. That part seems to be working ok; if "logged_in=yes" cookie exists: (1) go-ahead with proxy request proxy:balancer://mongrel_cluster/ [OK] if not: (1) go-ahead with /var/sites/production/public/index.html [OK] ... which seems right. It's just that the static file shows up in the browser either way. On Dec 10, 2006, at 8:09 PM, Chris Carter wrote: > Hi, > Do you store logged_in in a cookie, or in the session? > > On 12/10/06, Shinji Kuwayama wrote: >> >> Hi all. I'm trying to skip the Rails page cache if the user is >> logged in: >> >> --- >> # Rewrite index to check for static >> RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ >> RewriteRule ^/$ /index.html [QSA] >> >> # Rewrite to check for Rails cached page >> RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ >> RewriteRule ^([^.]+)$ $1.html [QSA] >> >> # Redirect all non-static requests to cluster >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f >> RewriteRule ^/(.*)$ >> balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] >> --- >> >> It does seem to work -- here's sample rewrite debug for "/": >> >> --- >> (2) init rewrite engine with requested uri / >> (3) applying pattern '^.*$' to uri '/' >> (4) RewriteCond: >> input='/var/sites/production/public/system/maintenance.html' >> pattern='-f' => not-matched >> (3) applying pattern '^/$' to uri '/' >> (4) RewriteCond: input='[other cookies]; logged_in=yes;' >> pattern='!^.*logged_in=yes.*$' => not-matched >> (3) applying pattern '^([^.]+)$' to uri '/' >> (4) RewriteCond: input='[other cookies]; logged_in=yes;' >> pattern='!^.*logged_in=yes.*$' => not-matched >> (3) applying pattern '^/(.*)$' to uri '/' >> (4) RewriteCond: input='/var/sites/production/public//' >> pattern='!-f' => matched >> (2) rewrite '/' -> 'balancer://mongrel_cluster/' >> (2) forcing proxy-throughput with balancer://mongrel_cluster/ >> (1) go-ahead with proxy request >> proxy:balancer://mongrel_cluster/ [OK] >> --- >> >> (As opposed to "go-ahead with >> /var/sites/production/public/index.html", if the user's not >> logged in.) >> >> Problem: The static file is still being served to the browser. Can >> anyone >> tell me what I'm missing here? >> >> >> >> Shinji Kuwayama >> shinji at kuwayama.com >> >> >> >> >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> >> > > > -- > Chris Carter > concentrationstudios.com > brynmawrcs.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users Shinji Kuwayama shinji at kuwayama.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061210/a2eeadee/attachment-0001.html From snacktime at gmail.com Mon Dec 11 03:40:48 2006 From: snacktime at gmail.com (snacktime) Date: Mon, 11 Dec 2006 00:40:48 -0800 Subject: [Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1 In-Reply-To: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> References: <20061206141954.7b59ae5c.zedshaw@zedshaw.com> Message-ID: <1f060c4c0612110040s2c06459bi3dae77f45130ae8@mail.gmail.com> On 12/6/06, Zed A. Shaw wrote: > I need people to answer a survey super quick for the next little release of Mongrel. Basically, nobody ever agrees on mime types, especially defaults, which is why Mongrel has none and you set your own. Sometimes people just refuse to set their own and want Mongrel to do everything for them, but if that happens then people will complain about the defaults. > > Damned if I do, damned if I don't. > > So, let's put this to the test: > > 1) Should Mongrel support a larger set of default mime types? Yes. And I like the idea of a separate yaml file for them. From shawn at brmethod.com Wed Dec 13 15:11:38 2006 From: shawn at brmethod.com (Shawn Hill) Date: Wed, 13 Dec 2006 14:11:38 -0600 Subject: [Mongrel] windows service auto start problems In-Reply-To: <8A74B915-9621-458D-A67C-CB8646EB30C3@topsailtech.com> Message-ID: <0MKp2t-1GuaN33Owb-0000J8@mrelay.perfora.net> Mark, I am not sure about your stack, but the following fixed this problem for for me: For each of you mongrel services: In services panel: set startup type to automatic Under recovery tab, Set 1st and 2nd failure to restart In regedit: under My computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\{mongrel_servi ce_name} right click and add a new string value "DependOnService" set it to "IIS Admin Service" If you are using Apache or lighty, set it to the service name for that web server. Shawn Hill shawn at hillacious.com -----Original Message----- From: mongrel-users-bounces at rubyforge.org [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Mark Roghelia Sent: Friday, December 08, 2006 3:21 PM To: mongrel-users at rubyforge.org Subject: [Mongrel] windows service auto start problems I have a small Rails app deployed on Windows Server 2003 and Mongrel 0.3.13.3. Everything works well, except when the Windows box is rebooted. I have mongrel_service installed and the service is configured to start automatically, however Mongrel consistently fails to start after a reboot. Windows reports the service's status as "Started", but attempts to access the app fail and checking Task Manager reveals there is no ruby process running. If I manually stop and start the service at that point everything comes up fine. I don't see anything of note in any of the log files in the Rails "log" directory, or in the Event Viewer. Has anyone else seen this kind of behavior? If so, do you have any suggestions about how to work around it? I understand that work is currently being done to retool mongrel_service. Is this possibly a known issue and something that is being addressed? Thanks, Mark Roghelia _______________________________________________ Mongrel-users mailing list Mongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users From dallas.devries at gmail.com Wed Dec 13 21:41:27 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Wed, 13 Dec 2006 21:41:27 -0500 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> Message-ID: <1200dbac0612131841g5e0121a4u3bf04a5fb672e70@mail.gmail.com> Alright, so I started clean on a different machine (3Ghz, 2 Gigs RAM) - pen/mongrel (tried prerelease and stable - 7 instances) -> apache/mongrel_cluster/mongrel prerelease (9 instances) - debian sarge -> ubuntu stable Unfortunately I'm still getting hangs. Things run fine for hours at a time and tens of thousands of page hits. - Plenty of RAM left - No Swap being used - CPU hanging 80-95% on mongrel processes - Killing on mongrel processes and restarting will not fix it until I delete cache directory Couple of the many things I tried - lsof -i -P | grep CLOSE_WAIT and got no mongrels in the list - killall -USR1 mongrel_rails to run the server in debug mode ** USR1 received, toggling $mongrel_debug_client to true X 9 However this toggle didn't seem to provide any extra information than what was normally outputted. I'm not sure if I'm using it wrong or not. If anyone has any insight or other suggestions to try it would be greatly appreciated! Cheers, Dallas On 12/7/06, Dallas DeVries wrote: > > Hi guys thanks for the response, > > Yeah I initially figured that the # of files in the directory was the > problem and it was the first thing I changed earlier this week. I changed > my caching to use many more subdirectories so that I don't have 10,000+ > files in one directory any more. Right now my largest directory has about > 2000-3000 files most the rest are much smaller than this. Unfortunately that > change did not help the problem...I can have upwards of 50,000 files so I'm > not sure how feasible memcached is at the moment. Anyways I'm almost done > with a clean install with apache/mongrel cluster mentioned by Konstantin > so hopefully that solves my problem. > > Cheers, > Dallas > > On 12/6/06, anjan bacchu wrote: > > > directory. When you reach 10-100K files in a single directory you > > > may notice the slowdown without a stopwatch. NetApp's own file > > > system was designed to have a constant access time regardless of the > > > number of files in the directory (that was their claim to fame > > > anyway). > > > > > > Bottom line is that I wouldn't assume that a directory with 10K+ > > > files is not the main reason for your performance degradation. > > > > > > Hope this helps, > > > Konstantin > > > > > > > > > > > Hi Konstantin, > > > > You're right on. > > > > Dallas : ReiserFS is designed to perform well in such a situation of > > having a lot of small files in the same directory. Can you switch to > > ReiserFS ? If not, can you switch to memcached ? Are you expiring your > > sessions ? > > > > BR, > > ~A > > > > _______________________________________________ > > 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/20061213/50d3015a/attachment.html From mwhitt89 at gmail.com Thu Dec 14 09:56:46 2006 From: mwhitt89 at gmail.com (Matthew Whittaker) Date: Thu, 14 Dec 2006 09:56:46 -0500 Subject: [Mongrel] Status: 500 Internal Server Error Message-ID: <0B7CE1C2-E7F2-470C-9EDD-4469BB245B50@gmail.com> I deployed my application to production one week ago. After letting the app run overnight, every morning I wake up to a strange 500 Internal Server Error. After resetting the mongrel cluster the application works fine until the next morning. I have tired setting the ENV to development and I am still getting the errors. I turned on the mongrel debugging and this morning I noticed that the request was coming into mongrel and being picked up in rails.log and threads.log, however it would not show up in production.log. I also noticed that I got the error on specific mongrel instances. I originally started with 3 instances and two would go bad and one was alive in the morning. When I went to two, one would die and one would live in the morning. I just stuck four out there to see if three will die and one will live tomorrow morning. I have no idea where to go from here, HELP! My Environment is as follows: Debian 3.1 Rails 1.1.6 Ruby 1.8.5 Mongrel 0.3.13.4 Mongrel Cluster 0.2.1 Apache 2.2.3 I am using the de facto Apache mod_proxy deployment. Any help into the solution or further steps on how to debug this would be appreciated. Kind Regards, Matt From mongrel_users at homerlex.mailshell.com Thu Dec 14 10:53:08 2006 From: mongrel_users at homerlex.mailshell.com (mongrel_users at homerlex.mailshell.com) Date: Thu, 14 Dec 2006 07:53:08 -0800 Subject: [Mongrel] Does send_file act differently with Mongrel than with Webrick? Message-ID: <1166111588.45817364a2588@www.mailshell.com> Mongrel 0.3.13.3 Windows XP Rails 1.1.6 I have a rails app that serves up mp3 files via the send_file command. We create a playlist (M3U) with URLs to the mp3s. These play just fine using Windows Media Player. However using WinAmp we get an error "error syncing to stream" when it tries to request the mp3. After playing around I found that if I am running Rails under Webrick WinAmp is able to retrieve the mp3s just fine. Does anyone have any idea what the problem is when using Mongrel? Regards _______________________________________________________ The FREE service that prevents junk email http://www.mailshell.com From luislavena at gmail.com Thu Dec 14 11:20:12 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 14 Dec 2006 13:20:12 -0300 Subject: [Mongrel] Does send_file act differently with Mongrel than with Webrick? In-Reply-To: <1166111588.45817364a2588@www.mailshell.com> References: <1166111588.45817364a2588@www.mailshell.com> Message-ID: <71166b3b0612140820i1b772397se6640a5c7a834e96@mail.gmail.com> On 12/14/06, mongrel_users at homerlex.mailshell.com wrote: > Mongrel 0.3.13.3 > Windows XP > Rails 1.1.6 > > I have a rails app that serves up mp3 files via the send_file command. We create a playlist (M3U) with URLs to the mp3s. These play just fine using Windows Media Player. However using WinAmp we get an error "error syncing to stream" when it tries to request the mp3. > > After playing around I found that if I am running Rails under Webrick WinAmp is able to retrieve the mp3s just fine. > > Does anyone have any idea what the problem is when using Mongrel? > Maybe I'll sound too stupid, but default mime types in WEBrick cover .mp3 files. Maybe you aren't using a mime.yml file with mongrel? > Regards > > _______________________________________________________ > The FREE service that prevents junk email http://www.mailshell.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From jacob at jacobatzen.dk Thu Dec 14 11:57:33 2006 From: jacob at jacobatzen.dk (Jacob Atzen) Date: Thu, 14 Dec 2006 17:57:33 +0100 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <1200dbac0612131841g5e0121a4u3bf04a5fb672e70@mail.gmail.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> <1200dbac0612131841g5e0121a4u3bf04a5fb672e70@mail.gmail.com> Message-ID: <20061214165733.GA66691@apoc.jacobatzen.dk> On Wed, Dec 13, 2006 at 09:41:27PM -0500, Dallas DeVries wrote: > Alright, so I started clean on a different machine (3Ghz, 2 Gigs RAM) > > - pen/mongrel (tried prerelease and stable - 7 instances) -> > apache/mongrel_cluster/mongrel prerelease (9 instances) > > > - debian sarge -> ubuntu stable > > > Unfortunately I'm still getting hangs. Things run fine for hours at a time > and tens of thousands of page hits. Are you using mentalguy's fastthread? If not, try it out and see if it helps. -- Cheers, - Jacob Atzen From mongrel_users at homerlex.mailshell.com Thu Dec 14 12:13:59 2006 From: mongrel_users at homerlex.mailshell.com (mongrel_users at homerlex.mailshell.com) Date: Thu, 14 Dec 2006 09:13:59 -0800 Subject: [Mongrel] Does send_file act differently with Mongrel than withWebrick? Message-ID: <1166116439.458186579aa15@www.mailshell.com> I tried the mime thing but it did not help. I didn't think it was that because I can get the mp3 served OK hitting the URL in a browser. I just noticed that I am getting an error in Mongrel when WinAmp make the request for the mp3 file: BAD CLIENT (127.0.0.1): Invalid HTTP format, parsing fails. I don't think Mongrel has a problem with the URL itself because if a browser requests the same URL it succeeds: "GET /playlist/play_track/0%3A720913 HTTP/1.1" Any thoughts on this? Regards > On 12/14/06, mongrel_users at homerlex.mailshell.com > wrote: >> Mongrel 0.3.13.3 >> Windows XP >> Rails 1.1.6 >> >> I have a rails app that serves up mp3 files via the send_file command. We create a playlist (M3U) with URLs to the mp3s. These play just fine using Windows Media Player. However using WinAmp we get an error "error syncing to stream" when it tries to request the mp3. >> >> After playing around I found that if I am running Rails under Webrick WinAmp is able to retrieve the mp3s just fine. >> >> Does anyone have any idea what the problem is when using Mongrel? >> > Maybe I'll sound too stupid, but default mime types in WEBrick cover .mp3 files. > Maybe you aren't using a mime.yml file with mongrel? _______________________________________________________ The FREE service that prevents junk email http://www.mailshell.com From luislavena at gmail.com Thu Dec 14 12:26:43 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 14 Dec 2006 14:26:43 -0300 Subject: [Mongrel] Does send_file act differently with Mongrel than withWebrick? In-Reply-To: <1166116439.458186579aa15@www.mailshell.com> References: <1166116439.458186579aa15@www.mailshell.com> Message-ID: <71166b3b0612140926i4f08fe2fv2da9f2a2d1cbb418@mail.gmail.com> On 12/14/06, mongrel_users at homerlex.mailshell.com wrote: > I tried the mime thing but it did not help. I didn't think it was that because I can get the mp3 served OK hitting the URL in a browser. > > I just noticed that I am getting an error in Mongrel when WinAmp make the request for the mp3 file: > > BAD CLIENT (127.0.0.1): Invalid HTTP format, parsing fails. > Ohhh, bad client! Often that means the application (in this case, winamp) didn't create a valid, compliant HTTP header/request and mongrel decided to protect you, your server and your investment on this "revolutionary" technology dropping the connection. There was some user scenario that IE created bad URL request and mongrel dropped them too, so check back in the mailing list or try using the beta/prerelease gem I build for win32. (I suggest this because you're using 0.13.3, and a lot of things happend since then). http://rubyforge.org/pipermail/mongrel-users/2006-December/002352.html > I don't think Mongrel has a problem with the URL itself because if a browser requests the same URL it succeeds: > You're right, is not (directly) mongrel's fault, but Winamp in this case. > "GET /playlist/play_track/0%3A720913 HTTP/1.1" > > Any thoughts on this? > As suggested above... try with the latest build and please drop some feedback if that help you. > Regards > > > On 12/14/06, mongrel_users at homerlex.mailshell.com > > wrote: > >> Mongrel 0.3.13.3 > >> Windows XP > >> Rails 1.1.6 > >> > >> I have a rails app that serves up mp3 files via the send_file command. We create a playlist (M3U) with URLs to the mp3s. These play just fine using Windows Media Player. However using WinAmp we get an error "error syncing to stream" when it tries to request the mp3. > >> > >> After playing around I found that if I am running Rails under Webrick WinAmp is able to retrieve the mp3s just fine. > >> > >> Does anyone have any idea what the problem is when using Mongrel? > >> > > > Maybe I'll sound too stupid, but default mime types in WEBrick cover .mp3 files. > > > Maybe you aren't using a mime.yml file with mongrel? > > > > _______________________________________________________ > The FREE service that prevents junk email http://www.mailshell.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From dallas.devries at gmail.com Thu Dec 14 12:39:43 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Thu, 14 Dec 2006 12:39:43 -0500 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <20061214165733.GA66691@apoc.jacobatzen.dk> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> <1200dbac0612131841g5e0121a4u3bf04a5fb672e70@mail.gmail.com> <20061214165733.GA66691@apoc.jacobatzen.dk> Message-ID: <1200dbac0612140939u3d60d32fo6578e08d4f4dd823@mail.gmail.com> Thanks I will give it a whirl. I assume I just need to do this with the mongrel 0.3.18pr I have gem install fastthread --source=http://mongrel.rubyforge.org/releases/ Thanks! Dallas On 12/14/06, Jacob Atzen wrote: > > On Wed, Dec 13, 2006 at 09:41:27PM -0500, Dallas DeVries wrote: > > Alright, so I started clean on a different machine (3Ghz, 2 Gigs RAM) > > > > - pen/mongrel (tried prerelease and stable - 7 instances) -> > > apache/mongrel_cluster/mongrel prerelease (9 instances) > > > > > > - debian sarge -> ubuntu stable > > > > > > Unfortunately I'm still getting hangs. Things run fine for hours at a > time > > and tens of thousands of page hits. > > Are you using mentalguy's fastthread? If not, try it out and see if it > helps. > > -- > Cheers, > - Jacob Atzen > _______________________________________________ > 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/20061214/7ac933a1/attachment.html From zedshaw at zedshaw.com Fri Dec 15 06:42:11 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 15 Dec 2006 03:42:11 -0800 Subject: [Mongrel] [ANN] Mongrel 0.3.19 -- The Gnostic MIME Type Release Message-ID: <20061215034211.a686c44f.zedshaw@zedshaw.com> Hello All, I'm putting out a quick half-release because there's some work on the MIME types I've included that needs to be done by all of you. Read at the end to understand your role in what you started. This release features two major capitulations on Mongrel's stance of not being a full web server. The first is Mongrel now sports a YAML file with 739 MIME types in it that it will use. The second is Mongrel will now accept clients who insist on doing their requests with "GET http://host:3000/index.html HTTP/1.1" even though it's not understood by a web server (that's for *proxies* people). It also features a patch to allow for multiple listeners on the request chains, so anyone running *mongrel_upload_progress* should test it heavily. Finally, we're getting close to having a clean build for win32, and my apology for holding things back on that. Install with: $ gem install fastthread --source=http://mongrel.rubyforge.org/releases $ gem install mongrel --source=http://mongrel.rubyforge.org/releases If you get an error about the missing mime_types.yml file then uninstall Mongrel completely and reinstall. THE MIME TYPES SHALL BE DECIDED BY COMBAT Now, the MIME types are not finalized because, after looking at several sources I found out everyone is completely out to lunch. I gathered together severalsources and recommended mime types, merged them all together, sorted and made them unique. I now have a wiki page entitle The Gnostic MIME Types: http://wiki.rubyonrails.org/rails/pages/TheGnosticMimeTypes And I'm going to leave it up for the next 24 hours. People can edit the list to remove what they think are invalid, correct the list, and fight over wiki wars to make the MIME type list. Whatever survives after the wars will become the official Mongrel MIME types. The ones that remain will be labeled "The Gnostic MIME Types" and simply documented on the Mongrel site so people know what happened. Let the battle begin! WIN32 I STILL LOVE YOU I'm still working on this last change or two and then I'm going to chain myself to win32 for the next week until that side is rock solid. Luis has been working extra hard making the sweet new service management app, so this should be a great next release for you folks. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jgeiger at gmail.com Fri Dec 15 09:42:15 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Fri, 15 Dec 2006 08:42:15 -0600 Subject: [Mongrel] [ANN] Mongrel 0.3.19 -- The Gnostic MIME Type Release In-Reply-To: <20061215034211.a686c44f.zedshaw@zedshaw.com> References: <20061215034211.a686c44f.zedshaw@zedshaw.com> Message-ID: <466af3440612150642y403bb708lea3bbca8786c743b@mail.gmail.com> I just installed this, replacing mongrel 0.3.13.4 and the single cookie issue I reported earlier is still happening. If I send multiple cookies out, only the first one is being created. The rails development log shows that all 3 cookies are being sent. START DEV LOG Cookie set: chekusername=user; domain=.website.com; path=/; expires=Fri, 15 Dec 2006 15:07:43 GMT Cookie set: chekdomain=website.com; domain=.website.com; path=/; expires=Fri, 15 Dec 2006 15:07:43 GMT Cookie set: cheksession=1234abcd1234abcd; domain=.website.com; path=/; expires=Fri, 15 Dec 2006 15:07:43 GMT Redirected to http://webmail.website.com/frame.php Completed in 0.24335 (4 reqs/sec) | DB: 0.02167 (8%) | 302 Found [http://dev.website.com/myOMC/webmail] END DEV LOG Only the chekusername cookie is set in the browser after the request is rendered. Thanks. On 12/15/06, Zed A. Shaw wrote: > Hello All, > > I'm putting out a quick half-release because there's some work on the MIME types I've included that needs to be done by all of you. Read at the end to understand your role in what you started. > > This release features two major capitulations on Mongrel's stance of not being a full web server. The first is Mongrel now sports a YAML file with 739 MIME types in it that it will use. The second is Mongrel will now accept clients who insist on doing their requests with "GET http://host:3000/index.html HTTP/1.1" even though it's not understood by a web server (that's for *proxies* people). > > It also features a patch to allow for multiple listeners on the request chains, so anyone running *mongrel_upload_progress* should test it heavily. Finally, we're getting close to having a clean build for win32, and my apology for holding things back on that. > > Install with: > > $ gem install fastthread --source=http://mongrel.rubyforge.org/releases > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases > > If you get an error about the missing mime_types.yml file then uninstall Mongrel completely and reinstall. > > > THE MIME TYPES SHALL BE DECIDED BY COMBAT > > Now, the MIME types are not finalized because, after looking at several sources I found out everyone is completely out to lunch. I gathered together severalsources and recommended mime types, merged them all together, sorted and made them unique. > > I now have a wiki page entitle The Gnostic MIME Types: > > http://wiki.rubyonrails.org/rails/pages/TheGnosticMimeTypes > > And I'm going to leave it up for the next 24 hours. People can edit the list to > remove what they think are invalid, correct the list, and fight over wiki wars > to make the MIME type list. > > Whatever survives after the wars will become the official Mongrel MIME types. > The ones that remain will be labeled "The Gnostic MIME Types" and simply > documented on the Mongrel site so people know what happened. > > Let the battle begin! > > > WIN32 I STILL LOVE YOU > > I'm still working on this last change or two and then I'm going to chain myself to win32 for the next week until that side is rock solid. Luis has been working extra hard making the sweet new service management app, so this should be a great next release for you folks. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From mwhitt89 at gmail.com Fri Dec 15 10:01:23 2006 From: mwhitt89 at gmail.com (Matthew Whittaker) Date: Fri, 15 Dec 2006 10:01:23 -0500 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error Message-ID: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> So I have updated to the latest mongrel and fastthread and my environment is as follows: Debian 3.1 Rails 1.1.6 Ruby 1.8.5 Mongrel 0.3.18 Fastthread 0.4 Mongrel Cluster 0.2.1 Apache 2.2.3 I again woke up this morning to my disappointment of seeing the strange Status: 500 Internal Server error. It happens the same every morning, I have three mongrels running, two give the error, one processes the request successfully. This error is not being reported in ANY logs. Apache, Mongrel debug, rails, nothing. The only thing I notice while tailing the logs is that the request reaches mongrel and is reported in both rails.log and threads.log, however the request is NOT being reported in ruby / rails production.log. This appears to be craping out in mongrel. Again this only happens overnight when there is no activity with the site. PLEASE HELP. Is there any way to take a core dump of mongrel? How can I get more logs to see what is happening. Regards, Matt Whittaker From eimorton at gmail.com Fri Dec 15 10:17:10 2006 From: eimorton at gmail.com (Erik Morton) Date: Fri, 15 Dec 2006 10:17:10 -0500 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error In-Reply-To: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> References: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> Message-ID: Have you ruled out the MySQL connection timeout issue? Erik On Dec 15, 2006, at 10:01 AM, Matthew Whittaker wrote: > So I have updated to the latest mongrel and fastthread and my > environment is as follows: > > Debian 3.1 > Rails 1.1.6 > Ruby 1.8.5 > Mongrel 0.3.18 > Fastthread 0.4 > Mongrel Cluster 0.2.1 > Apache 2.2.3 > > I again woke up this morning to my disappointment of seeing the > strange Status: 500 Internal Server error. It happens the same every > morning, I have three mongrels running, two give the error, one > processes the request successfully. > > This error is not being reported in ANY logs. Apache, Mongrel debug, > rails, nothing. The only thing I notice while tailing the logs is > that the request reaches mongrel and is reported in both rails.log > and threads.log, however the request is NOT being reported in ruby / > rails production.log. This appears to be craping out in mongrel. > Again this only happens overnight when there is no activity with the > site. PLEASE HELP. Is there any way to take a core dump of mongrel? > How can I get more logs to see what is happening. > > Regards, > > Matt Whittaker > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From runner at berkeley.edu Fri Dec 15 10:36:30 2006 From: runner at berkeley.edu (Steven Hansen) Date: Fri, 15 Dec 2006 07:36:30 -0800 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error In-Reply-To: References: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> Message-ID: <4582C0FE.2000202@berkeley.edu> I second this. These symptoms are very similar to something that I experienced and the culprit ended up being the MySql timeout issue. I talk more about my solution here: http://rubyforge.org/pipermail/mongrel-users/2006-November/002178.html Cheers, Steven Erik Morton wrote: > Have you ruled out the MySQL connection timeout issue? > > Erik > On Dec 15, 2006, at 10:01 AM, Matthew Whittaker wrote: > > >> So I have updated to the latest mongrel and fastthread and my >> environment is as follows: >> >> Debian 3.1 >> Rails 1.1.6 >> Ruby 1.8.5 >> Mongrel 0.3.18 >> Fastthread 0.4 >> Mongrel Cluster 0.2.1 >> Apache 2.2.3 >> >> I again woke up this morning to my disappointment of seeing the >> strange Status: 500 Internal Server error. It happens the same every >> morning, I have three mongrels running, two give the error, one >> processes the request successfully. >> >> This error is not being reported in ANY logs. Apache, Mongrel debug, >> rails, nothing. The only thing I notice while tailing the logs is >> that the request reaches mongrel and is reported in both rails.log >> and threads.log, however the request is NOT being reported in ruby / >> rails production.log. This appears to be craping out in mongrel. >> Again this only happens overnight when there is no activity with the >> site. PLEASE HELP. Is there any way to take a core dump of mongrel? >> How can I get more logs to see what is happening. >> >> Regards, >> >> Matt Whittaker >> _______________________________________________ >> 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 mwhitt89 at gmail.com Fri Dec 15 10:54:59 2006 From: mwhitt89 at gmail.com (Matthew Whittaker) Date: Fri, 15 Dec 2006 10:54:59 -0500 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error In-Reply-To: <4582C0FE.2000202@berkeley.edu> References: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> <4582C0FE.2000202@berkeley.edu> Message-ID: <8FD8CD05-43C4-433F-B0A2-7A070911EE8E@gmail.com> Thanks, I will look into it. Cheers, Matt On Dec 15, 2006, at 10:36 AM, Steven Hansen wrote: > > I second this. These symptoms are very similar to something that I > experienced and the culprit ended up being the MySql timeout issue. > > I talk more about my solution here: > http://rubyforge.org/pipermail/mongrel-users/2006-November/002178.html > > > Cheers, > Steven > > > Erik Morton wrote: >> Have you ruled out the MySQL connection timeout issue? >> >> Erik >> On Dec 15, 2006, at 10:01 AM, Matthew Whittaker wrote: >> >> >>> So I have updated to the latest mongrel and fastthread and my >>> environment is as follows: >>> >>> Debian 3.1 >>> Rails 1.1.6 >>> Ruby 1.8.5 >>> Mongrel 0.3.18 >>> Fastthread 0.4 >>> Mongrel Cluster 0.2.1 >>> Apache 2.2.3 >>> >>> I again woke up this morning to my disappointment of seeing the >>> strange Status: 500 Internal Server error. It happens the same every >>> morning, I have three mongrels running, two give the error, one >>> processes the request successfully. >>> >>> This error is not being reported in ANY logs. Apache, Mongrel >>> debug, >>> rails, nothing. The only thing I notice while tailing the logs is >>> that the request reaches mongrel and is reported in both rails.log >>> and threads.log, however the request is NOT being reported in ruby / >>> rails production.log. This appears to be craping out in mongrel. >>> Again this only happens overnight when there is no activity with the >>> site. PLEASE HELP. Is there any way to take a core dump of >>> mongrel? >>> How can I get more logs to see what is happening. >>> >>> Regards, >>> >>> Matt Whittaker >>> _______________________________________________ >>> 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 donald.ball at nashville.gov Fri Dec 15 11:02:13 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Fri, 15 Dec 2006 10:02:13 -0600 Subject: [Mongrel] running mongrel in production on win32 Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814DE@HOBVSISMS01.nashville.org> Hey guys, I'm running the mongrel server that comes with rails-1.2rc1 for development on a winxp box, anticipating taking it into production on a win2k3 box in the next few weeks. I've had a couple of crashes occur during development that give me pause, however. I made a ticket for the last one here: http://dev.rubyonrails.org/ticket/6841 I know, or at least believe, that mongrel isn't responsible for these, but I'm curious if or how folks maintain stable production services relying on mongrel on win32. If installed as a service, does the service restart cleanly if the mongrel instance crashes? (I've seen reports to indicate this is not the case.) Am I just asking for trouble pursuing this as a production environment? Is the mongrel_cluster code ready for primetime on win32 yet? Thanks for any tips. Cheers. - donald From luislavena at gmail.com Fri Dec 15 12:04:05 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 15 Dec 2006 14:04:05 -0300 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <918A0DD3EFA7F248BFBF447187F8A9320814DE@HOBVSISMS01.nashville.org> References: <918A0DD3EFA7F248BFBF447187F8A9320814DE@HOBVSISMS01.nashville.org> Message-ID: <71166b3b0612150904y2f682681s92a92f8785080f0c@mail.gmail.com> On 12/15/06, Ball, Donald A Jr (Library) wrote: > Hey guys, I'm running the mongrel server that comes with rails-1.2rc1 > for development on a winxp box, anticipating taking it into production > on a win2k3 box in the next few weeks. Ok, which version of mongrel is bundled with rails-1.2? Please list the gems you have installed, because, AFAIK, script\server will only load mongrel if the gem is found. You are starting it using mongrel_rails or script/server? > I've had a couple of crashes > occur during development that give me pause, however. I made a ticket > for the last one here: > > http://dev.rubyonrails.org/ticket/6841 That bug seems weird, also unrelated to rails but Ruby itself. > > I know, or at least believe, that mongrel isn't responsible for these, > but I'm curious if or how folks maintain stable production services > relying on mongrel on win32. If installed as a service, does the service > restart cleanly if the mongrel instance crashes? (I've seen reports to > indicate this is not the case.) Am I just asking for trouble pursuing > this as a production environment? Is the mongrel_cluster code ready for > primetime on win32 yet? > Lastest mongrel_service gem provide what you need, if somehow the ruby process die (due a unhandled exception) the service will automatically spawn a new one. There is no way (yet, still need to test some things) to monitor deeply if the ruyb process hang and not die. The mongrel_cluster base his "magic" on daemonize, which requires fork() and isn't compatible with win32. Its planned for mongrel_service to provide this functionality, maybe during january. > Thanks for any tips. Cheers. > > - donald Will be very helpful if you provide more information about your database (and version), mongrel, rails, ruby and windows version to we could get a better picture of your situation. Regards and good weekend, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From jgeiger at gmail.com Fri Dec 15 12:14:20 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Fri, 15 Dec 2006 11:14:20 -0600 Subject: [Mongrel] RMagick=bad, ???=good Message-ID: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> I know that Zed has made mention of the fact that using RMagick with mongrel and rails is a bad thing. I'm currently using FlexImage (which in turn uses RMagick) on my application and really haven't had too many problems. We get a restart for memory usage every 8-10 hours on one mongrel of twelve running, but I'm not sure if that's an RMagick issue. Either way, I'd like to make my system better if I can. Right now I've got controllers that are using both send_data (sending image stored in the db, using RMagick to crop/resize before sending) and send_file (sending a static image on the site that needs to be sent inline). Image upload is being handled by FlexImage, which will save the image to the DB, resizing it to 640x480 before saving if it's too big. My question is, what then is the preferred method of doing image manipulation while running mongrel? Convert FlexImage to use mini-magick? Create a custom system to offload the image processing to another process? If someone can provide some insight or examples, it would be appreciated. From robert at kitchendemocracy.org Fri Dec 15 12:15:10 2006 From: robert at kitchendemocracy.org (Robert Vogel) Date: Fri, 15 Dec 2006 10:15:10 -0700 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error Message-ID: <20061215101510.c41e0b8117d7637a8f09ddbc78878a27.99886a3f6f.wbe@email.secureserver.net> I, too had a similar problem - which persisted even after I inserted this: ActiveRecord::Base.verification_timeout = 14400 Into my config/production.rb On close inspection of my apache logs I discovered that a robot was hitting my application with a (near) simultaneous pair of get requests with identical session_id's. The session_id was new - and so both rails processes attempted to insert a new record into the session table, causing the database to report a duplicate key violation on the second insert. Apparently the second rails process determined that the session_id was new before the first rails process had finished its insert. Hope this is helpful. Robert From dallas.devries at gmail.com Fri Dec 15 12:36:47 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Fri, 15 Dec 2006 12:36:47 -0500 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <1200dbac0612140939u3d60d32fo6578e08d4f4dd823@mail.gmail.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> <1200dbac0612131841g5e0121a4u3bf04a5fb672e70@mail.gmail.com> <20061214165733.GA66691@apoc.jacobatzen.dk> <1200dbac0612140939u3d60d32fo6578e08d4f4dd823@mail.gmail.com> Message-ID: <1200dbac0612150936p79f211a3pcd3e892fca16fb54@mail.gmail.com> Alright so I got fastthread installed yesterday. Unfortunately the massive load spike happened again (until rails cache was deleted of course). I'm just wondering if I'm using killall -USR1 mongrel_rails the proper way. What sort of messages should I be looking for? They are suppose to be in mongrel.log right? Other than turning the toggling debugging mode to true I don't seem to be getting any extra info in that mongrel.log or production.log. Is there some lower level thing I can try? If it really is a cache thing and there is a way for me to see it stuck in some process loading or building a fragment or something... Are the 0.3.19pr items pretty much centered around the MIME type stuff or should I try upgrading to that from .18pr? Thanks Again, Dallas On 12/14/06, Dallas DeVries < dallas.devries at gmail.com> wrote: > > Thanks I will give it a whirl. I assume I just need to do this with the > mongrel 0.3.18pr I have > > gem install fastthread --source= http://mongrel.rubyforge.org/releases/ > > Thanks! > Dallas > > > On 12/14/06, Jacob Atzen < jacob at jacobatzen.dk> wrote: > > > > On Wed, Dec 13, 2006 at 09:41:27PM -0500, Dallas DeVries wrote: > > > Alright, so I started clean on a different machine (3Ghz, 2 Gigs RAM) > > > > > > - pen/mongrel (tried prerelease and stable - 7 instances) -> > > > apache/mongrel_cluster/mongrel prerelease (9 instances) > > > > > > > > > - debian sarge -> ubuntu stable > > > > > > > > > Unfortunately I'm still getting hangs. Things run fine for hours at a > > time > > > and tens of thousands of page hits. > > > > Are you using mentalguy's fastthread? If not, try it out and see if it > > helps. > > > > -- > > Cheers, > > - Jacob Atzen > > _______________________________________________ > > 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/20061215/98ced44b/attachment.html From rancor at mindspring.com Fri Dec 15 12:59:35 2006 From: rancor at mindspring.com (Jim Powers) Date: Fri, 15 Dec 2006 12:59:35 -0500 Subject: [Mongrel] RMagick=bad, ???=good In-Reply-To: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> References: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> Message-ID: <20061215125935.05ee13bb@nomad-ii.powershouse.bogus> On Fri, 15 Dec 2006 11:14:20 -0600 "Joey Geiger" wrote: > I know that Zed has made mention of the fact that using RMagick with > mongrel and rails is a bad thing. I'm currently using FlexImage (which > in turn uses RMagick) on my application and really haven't had too > many problems. We get a restart for memory usage every 8-10 hours on > one mongrel of twelve running, but I'm not sure if that's an RMagick > issue. Either way, I'd like to make my system better if I can. > > Right now I've got controllers that are using both send_data (sending > image stored in the db, using RMagick to crop/resize before sending) > and send_file (sending a static image on the site that needs to be > sent inline). Image upload is being handled by FlexImage, which will > save the image to the DB, resizing it to 640x480 before saving if it's > too big. > > My question is, what then is the preferred method of doing image > manipulation while running mongrel? > Convert FlexImage to use mini-magick? > Create a custom system to offload the image processing to another > process? > > If someone can provide some insight or examples, it would be I work on a large Web site devoted to handling large numbers of photographic imagery. Although our site is not running in Ruby, yet, we have worked through a number of approaches to handling this, but only one has the desired properties we need, which is automatic recovery and minimal impact to running code on failure: exec out another process to do image manipulation. If you're doing something small, feel free to use RMagick+death+recovery if you want, but exec-ing out really is the way to go. Jim -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061215/f31b35c1/attachment.bin From kigsteronline at mac.com Fri Dec 15 13:16:35 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Fri, 15 Dec 2006 10:16:35 -0800 Subject: [Mongrel] RMagick=bad, ???=good In-Reply-To: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> References: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> Message-ID: <1A722642-1532-485C-BEFA-C81E1EDDD0B9@mac.com> Just to chime in - we are using RMagick with Gruff on mongrel/apache combo without any memory leaks or restart problems. Our cluster happily runs for weeks at a time, before we restart it (usual because of new code released). I am also curious to know what specific problems are reported related to RMagick. Thanks Konstantin On Dec 15, 2006, at 9:14 AM, Joey Geiger wrote: > I know that Zed has made mention of the fact that using RMagick with > mongrel and rails is a bad thing. I'm currently using FlexImage (which > in turn uses RMagick) on my application and really haven't had too > many problems. We get a restart for memory usage every 8-10 hours on > one mongrel of twelve running, but I'm not sure if that's an RMagick > issue. Either way, I'd like to make my system better if I can. > > Right now I've got controllers that are using both send_data (sending > image stored in the db, using RMagick to crop/resize before sending) > and send_file (sending a static image on the site that needs to be > sent inline). Image upload is being handled by FlexImage, which will > save the image to the DB, resizing it to 640x480 before saving if it's > too big. > > My question is, what then is the preferred method of doing image > manipulation while running mongrel? > Convert FlexImage to use mini-magick? > Create a custom system to offload the image processing to another > process? > > If someone can provide some insight or examples, it would be > appreciated. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From david at loudthinking.com Fri Dec 15 13:25:32 2006 From: david at loudthinking.com (David Heinemeier Hansson) Date: Fri, 15 Dec 2006 12:25:32 -0600 Subject: [Mongrel] RMagick=bad, ???=good In-Reply-To: <20061215125935.05ee13bb@nomad-ii.powershouse.bogus> References: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> <20061215125935.05ee13bb@nomad-ii.powershouse.bogus> Message-ID: <4D62AC7A-00D1-4707-A1AD-5C515B939984@loudthinking.com> > Although our site is > not running in Ruby, yet, we have worked through a number of > approaches > to handling this, but only one has the desired properties we need, > which is automatic recovery and minimal impact to running code on > failure: exec out another process to do image manipulation. I must admit that we do the same thing at 37signals. But actually not because of memory leaks, but because we found it easier to do: def thumbnail(temp, target) system "convert #{escape(temp)} -resize 48x48! #{escape(target)}" end Rather than to get the full RMagick machinery cooking. -- David Heinemeier Hansson http://www.37signals.com -- Basecamp, Campfire, Backpack, Getting Real http://www.rubyonrails.com -- Web-application framework http://www.loudthinking.com -- Broadcasting Brain -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1940 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061215/045b55d4/attachment-0001.bin From nathan.mealey at simmons.edu Fri Dec 15 13:33:20 2006 From: nathan.mealey at simmons.edu (Nathan Mealey) Date: Fri, 15 Dec 2006 13:33:20 -0500 Subject: [Mongrel] Help w/ Apache Proxying Mongrel Message-ID: <200612151833.kBFIXLZv006792@althea.simmons.edu> I'm running Apache 2.0 as a proxy to several Mongrel/Rails apps, so that all of my Mongrel apps can be routed through the single Apache IP address. Apache 2.0 is already in use on the system, which is why I haven't decided to use Apache 2.2. The problem I'm having is that this setup only works for Rails apps that do not use the public/index.html file as the main page. For any apps that do use public/index.html as the main page, none of the links off of index.html work. So no stylesheet info, no images, and no links to other parts of the application. Even though I've installed the reverse_proxy_fix plugin. The tutorial from here (http://www.napcsweb.com/howto/rails/deployment/RailsWithApacheAndMong... ) didn't cover this type of error, and I've been stuck fiddling with it for a while. Has anyone else had this problem and resolved it? Any help is much appreciated. My httpd-proxy.conf file is included below: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so ProxyRequests Off Order deny,allow Allow from all #Proxy information for project application Alias /project "e:/rails_apps/project/public" Options Indexes FollowSymLinks AllowOverride none Order allow,deny Allow from all ProxyPass /project/images ! ProxyPass /project/stylesheets ! ProxyPass /project/javascripts ! ProxyPass /project/ http://127.0.0.1:4000/ ProxyPass /project http://127.0.0.1:4000/ ProxyPassReverse /project/ http://127.0.0.1:4000/ #Proxy information for research guides application #this is the application not working properly Alias /research "e:/rails_apps/research/public" Options Indexes FollowSymLinks AllowOverride none Order allow,deny Allow from all ProxyPass /research/images ! ProxyPass /research/stylesheets ! ProxyPass /research/javascripts ! ProxyPass /research/ http://127.0.0.1:4002/ ProxyPass /research http://127.0.0.1:4002/ ProxyPassReverse /research/ http://127.0.0.1:4002/ Thanks! -- Nathan Mealey Systems Librarian Simmons College 617.521.2755 nathan.mealey at simmons.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061215/5c363d9d/attachment.html From donald.ball at nashville.gov Fri Dec 15 13:58:11 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Fri, 15 Dec 2006 12:58:11 -0600 Subject: [Mongrel] running mongrel in production on win32 Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814DF@HOBVSISMS01.nashville.org> > On 12/15/06, Ball, Donald A Jr (Library) > wrote: > > Hey guys, I'm running the mongrel server that comes with > rails-1.2rc1 > > for development on a winxp box, anticipating taking it into > production > > on a win2k3 box in the next few weeks. > > Ok, which version of mongrel is bundled with rails-1.2? > Please list the gems you have installed, because, AFAIK, > script\server will only load mongrel if the gem is found. I'm using mongrel-0.3.13.3-mswin32, the latest publicly available mswin32 gem, along with mongrel_service-0.2, though I'm not using the service in development. I tried to install 0.3.19 but got odd compilation warnings when I did so and the server failed to start. > You are starting it using mongrel_rails or script/server? script/server > > I've had a couple of crashes > > occur during development that give me pause, however. I > made a ticket > > for the last one here: > > > > http://dev.rubyonrails.org/ticket/6841 > > That bug seems weird, also unrelated to rails but Ruby itself. So you believe I've run into a bug in ruby-1.8.4-mswin32? Looked to me more like an unhandled exception in activesupport, but the rails folks seemed to think that was not the case. > Lastest mongrel_service gem provide what you need, if somehow > the ruby process die (due a unhandled exception) the service > will automatically spawn a new one. I'll give that a whirl, thanks! Would the log files indicate when/if this occurs? > There is no way (yet, still need to test some things) to > monitor deeply if the ruyb process hang and not die. > > The mongrel_cluster base his "magic" on daemonize, which requires > fork() and isn't compatible with win32. > > Its planned for mongrel_service to provide this > functionality, maybe during january. If I can help in this endeavor in any way, please let me know. I'm a beginning ruby developer, but I've been doing web development for time out of mind and I have a copy of visual studio 2003 if needed for compilation. > Will be very helpful if you provide more information about > your database (and version), mongrel, rails, ruby and windows > version to we could get a better picture of your situation. Sure thing. I'm using mssql2k with the ADO driver, mongrel-0.3.13.3, rails-1.2rc1, ruby-1.8.4, winxpsp2 (but will be deploying to win2k3). I am using RMagick with file_column, though the crashes have not (yet) occurred while testing that portion of the application. > Regards and good weekend, Thanks for your help and for your work in providing rails folks with a potentially workable solution for win32 deployment! It would not be my choice for a production environment, but it's out of my hands. - donald From dallas.devries at gmail.com Fri Dec 15 14:15:24 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Fri, 15 Dec 2006 14:15:24 -0500 Subject: [Mongrel] Help w/ Apache Proxying Mongrel In-Reply-To: <200612151833.kBFIXLZv006792@althea.simmons.edu> References: <200612151833.kBFIXLZv006792@althea.simmons.edu> Message-ID: <1200dbac0612151115s52d46667g1406d5a1ea1b36eb@mail.gmail.com> It should be pretty easy to upgrade to Apache 2.2. This article was quite helpful for getting 2.2 up (on Debian/Ubuntu at least). Setting up Apache http://davidwinter.me.uk/articles/2006/10/17/building-apache-22-from-source-for-ubuntu-dapper/ I referenced these for setup as well. http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ http://mongrel.rubyforge.org/docs/mongrel_cluster.html http://www.simplisticcomplexity.com/2006/8/13/apache-2-2-mod*proxy* balancer-mongrel-on-ubuntu-6-06 Hope this helps. Cheers, Dallas On 12/15/06, Nathan Mealey wrote: > > I'm running Apache 2.0 as a proxy to several Mongrel/Rails apps, so that > all of my Mongrel apps can be routed through the single Apache IP address. > Apache 2.0 is already in use on the system, which is why I haven't decided > to use Apache 2.2. > > > > The problem I'm having is that this setup only works for Rails apps that > do not use the public/index.html file as the main page. For any apps that do > use public/index.html as the main page, none of the links off of > index.html work. So no stylesheet info, no images, and no links to other > parts of the application. Even though I've installed the reverse_proxy_fix > plugin. > > The tutorial from here ( > http://www.napcsweb.com/howto/rails/deployment/RailsWithApacheAndMong...) > didn't cover this type of error, and I've been stuck fiddling with it for a > while. > > Has anyone else had this problem and resolved it? > > Any help is much appreciated. My httpd-proxy.conf file is included below: > > LoadModule proxy_module modules/mod_proxy.so > LoadModule proxy_http_module modules/mod_proxy_http.so > ProxyRequests Off > > > Order deny,allow > Allow from all > > > #Proxy information for project application > Alias /project "e:/rails_apps/project/public" > > Options Indexes FollowSymLinks > AllowOverride none > Order allow,deny > Allow from all > > > ProxyPass /project/images ! > ProxyPass /project/stylesheets ! > ProxyPass /project/javascripts ! > > ProxyPass /project/ http://127.0.0.1:4000/ > > ProxyPass /project http://127.0.0.1:4000/ > ProxyPassReverse /project/ http://127.0.0.1:4000/ > > #Proxy information for research guides application > #this is the application not working properly > Alias /research "e:/rails_apps/research/public" > > Options Indexes FollowSymLinks > AllowOverride none > Order allow,deny > Allow from all > > > ProxyPass /research/images ! > ProxyPass /research/stylesheets ! > ProxyPass /research/javascripts ! > > ProxyPass /research/ http://127.0.0.1:4002/ > > ProxyPass /research http://127.0.0.1:4002/ > ProxyPassReverse /research/ http://127.0.0.1:4002/ > > Thanks! > -- > > Nathan Mealey > > Systems Librarian > > Simmons College > > 617.521.2755 > > nathan.mealey at simmons.edu > > > > _______________________________________________ > 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/20061215/0b4cd699/attachment.html From technoweenie at gmail.com Fri Dec 15 14:24:56 2006 From: technoweenie at gmail.com (Rick Olson) Date: Fri, 15 Dec 2006 13:24:56 -0600 Subject: [Mongrel] RMagick=bad, ???=good In-Reply-To: <4D62AC7A-00D1-4707-A1AD-5C515B939984@loudthinking.com> References: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> <20061215125935.05ee13bb@nomad-ii.powershouse.bogus> <4D62AC7A-00D1-4707-A1AD-5C515B939984@loudthinking.com> Message-ID: <48fe25b0612151124r75500610nb09f4a9a320d80f2@mail.gmail.com> On 12/15/06, David Heinemeier Hansson wrote: > > Although our site is > > not running in Ruby, yet, we have worked through a number of > > approaches > > to handling this, but only one has the desired properties we need, > > which is automatic recovery and minimal impact to running code on > > failure: exec out another process to do image manipulation. > > I must admit that we do the same thing at 37signals. But actually not > because of memory leaks, but because we found it easier to do: > > def thumbnail(temp, target) > system "convert #{escape(temp)} -resize 48x48! #{escape(target)}" > end > > Rather than to get the full RMagick machinery cooking. There's also minimagick, which is a shell around imagemagick commands. Probably easier if you want to do more complex operations on your images. Oh, and ImageScience, which uses FreeImage and a light inline ruby wrapper. http://seattlerb.rubyforge.org/ImageScience.html -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com From mongrel at philip.pjkh.com Fri Dec 15 15:04:26 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Fri, 15 Dec 2006 14:04:26 -0600 (CST) Subject: [Mongrel] RMagick=bad, ???=good In-Reply-To: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> References: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> Message-ID: <20061215140026.A47366@bravo.pjkh.com> > I know that Zed has made mention of the fact that using RMagick with > mongrel and rails is a bad thing. I'm currently using FlexImage (which > in turn uses RMagick) on my application and really haven't had too > many problems. We get a restart for memory usage every 8-10 hours on > one mongrel of twelve running, but I'm not sure if that's an RMagick > issue. Either way, I'd like to make my system better if I can. > > Right now I've got controllers that are using both send_data (sending > image stored in the db, using RMagick to crop/resize before sending) > and send_file (sending a static image on the site that needs to be > sent inline). Image upload is being handled by FlexImage, which will > save the image to the DB, resizing it to 640x480 before saving if it's > too big. > > My question is, what then is the preferred method of doing image > manipulation while running mongrel? > Convert FlexImage to use mini-magick? > Create a custom system to offload the image processing to another process? > > If someone can provide some insight or examples, it would be appreciated. Just to add to what others have said there is also the GD2 library and if you're willing to shell out, netpbm. Although I would imagine GD2 has the same potential for memory leaks as ImageMagick if I understand the issue correctly (that is ruby not knowing about memory allocated by the extension). We use rmagick now, but don't upload that many images (admin interface only). My last job (not Rails, but that doesn't matter) we shelled out to netpbm for a couple of reasons -- we were dealing with a lot of arcane formats (PCX with specific header formats) and because I'd run some tests converting/scaling images using GD, ImageMagick, and netpbm and netpbm seemed to do the best job and delivery the smallest file. Now... that was about six years ago so things may certainly have changed. -philip From zedshaw at zedshaw.com Fri Dec 15 16:54:08 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 15 Dec 2006 13:54:08 -0800 Subject: [Mongrel] [ANN] Mongrel 0.3.19 -- The Gnostic MIME Type Release In-Reply-To: <466af3440612150642y403bb708lea3bbca8786c743b@mail.gmail.com> References: <20061215034211.a686c44f.zedshaw@zedshaw.com> <466af3440612150642y403bb708lea3bbca8786c743b@mail.gmail.com> Message-ID: <20061215135408.7a92d355.zedshaw@zedshaw.com> On Fri, 15 Dec 2006 08:42:15 -0600 "Joey Geiger" wrote: > I just installed this, replacing mongrel 0.3.13.4 and the single > cookie issue I reported earlier is still happening. If I send multiple > cookies out, only the first one is being created. The rails > development log shows that all 3 cookies are being sent. > Yeah, I remembered that I missed this last night. Next release it'll have a whitelist for the cookies that should be allowed to duplicate (and you can modify it if you need to). Thanks for catching this. I'll be doing another release tonight so try it then. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Dec 15 17:00:17 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 15 Dec 2006 14:00:17 -0800 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <1200dbac0612150936p79f211a3pcd3e892fca16fb54@mail.gmail.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <347CFD18-D616-458D-B406-BFD583AD1491@mac.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> <1200dbac0612131841g5e0121a4u3bf04a5fb672e70@mail.gmail.com> <20061214165733.GA66691@apoc.jacobatzen.dk> <1200dbac0612140939u3d60d32fo6578e08d4f4dd823@mail.gmail.com> <1200dbac0612150936p79f211a3pcd3e892fca16fb54@mail.gmail.com> Message-ID: <20061215140017.e8d27676.zedshaw@zedshaw.com> On Fri, 15 Dec 2006 12:36:47 -0500 "Dallas DeVries" wrote: > Alright so I got fastthread installed yesterday. Unfortunately the massive > load spike happened again (until rails cache was deleted of course). I'm > just wondering if I'm using killall -USR1 mongrel_rails the proper way. > What sort of messages should I be looking for? They are suppose to be in > mongrel.log right? Other than turning the toggling debugging mode to true I > don't seem to be getting any extra info in that mongrel.log or > production.log. Is there some lower level thing I can try? If it really is > a cache thing and there is a way for me to see it stuck in some process > loading or building a fragment or something... If you turn on USR1 and don't see any log messages than most likely it's a problem that isn't triggering one of the exceptions. You're turning it on right, and you should see a little log message saying it's on. If you've got a process that's "stuck" for some reason, try strace -p PID. Using strace you can see what system calls the process is calling and then see if it's in some loop or something. Another option--which is more advanced--is to attach to the process with gdb and then interrupt it and step through. I haven't used this yet, but check out Jamis Buck's blog and a few others for handy macros that can dump the Ruby callstack. > Are the 0.3.19pr items pretty much centered around the MIME type stuff or > should I try upgrading to that from .18pr? Yeah, it's MIME that was put into the 0.3.19 and just a few fastthread changes. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Sat Dec 16 01:18:33 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 15 Dec 2006 22:18:33 -0800 Subject: [Mongrel] [ANN] Mongrel 0.3.20 -- 5 Hours Deadline Message-ID: <20061215221833.3c4d5bd9.zedshaw@zedshaw.com> Another fancy release with just a few little changes from yesterday: * Set-Cookie, Set-Cookie2, Warning, and WWW-Authenticate are allowed as duplicate headers. * mongrel_rails stop now has a --wait option to go with --force. It will wait for either the given timeout in SECONDS or the PID file to go away. If the PID file goes away it just exits. If the timeout happens then it does a kill -9 on the mongrel process. * The MIME types as of 22:00 PDT are included in this release. Five more hours to make changes and complain if you don't like them. Edit the wiki: to make a difference. * Default MIME type is application/octet-stream (it was with 0.3.19, but now you all know). Install with: $ gem install fastthread --source=http://mongrel.rubyforge.org/releases $ gem install mongrel --source=http://mongrel.rubyforge.org/releases This release will be what goes in the 1.0 RC1 with the exception of any changes we have to make for win32 and the final version of the MIME types. 5 HOURS LEFT Make sure you edit the MIME types wiki: http://wiki.rubyonrails.org/rails/pages/TheGnosticMimeTypes It looks like lots of types have mapping from one extension to two types. In the case of a tie like this I'll have a program randomly pick. :-) USING THE FORCE Mongrel is *very* conservative when it shuts down. It will wait up to 60 seconds for threads to exit before it finally exits gracefully. Most people don't understand this so they think Mongrel is stuck, when actually it's doing what everyone also wants which is not lose a single connection. The hypocrisy is that people want Mongrel's shutdown to be "robust" but mean two things. "Robust" when you've gotta have Mongrel down NOW to avoid the digg to your fancy social network mashup with potato porn means "down now! now! NOW! don't wait! NOW!" "Robust" when you're rolling out the latest version of your crafted ultimate killer online PIM software your company has banked its reputation on means "very carefully, we don't want to lose a single byte in any request ever." Don't ask me why these people are using HTTP but oh well. Mongrel is "robust" in the second form. To make Mongrel "robust" in the first form, you use the force: $ mongrel_rails stop --force This sends mongrel a kill -9 and then *you* must delete the .pid file. If you don't mongrel now does this when you try to start: $ mongrel_rails start -e production -d ** !!! PID file log/mongrel.pid already exists. Mongrel could be running already. Check your log/mongrel.log for errors. ** !!! Exiting with error. You must stop mongrel and clear the .pid before I'll attempt a start. So, if you had to force it down, you've gotta do the clean-up. Now, let's say you do want to give most requests a chance to get out, but maybe not the usual time, you can now use --wait with force: $ mongrel_rails stop --force --wait 15 The --wait parameter only makes sense with --force. When you do this, Mongrel will watch the mongrel.pid file for 15 seconds. If the PID file goes away on its own (meaning the process exited anyway) then the stop command is ignored and mongrel_rails exits. If 15 seconds pass by and the PID file is still there *then* mongrel sends kill -9 to ruin your customer's day. But don't worry, you've probably planned your outages and have scheduled this with your customers and have "come back later" pages right? -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From eden.li at gmail.com Sat Dec 16 06:39:29 2006 From: eden.li at gmail.com (Eden Li) Date: Sat, 16 Dec 2006 19:39:29 +0800 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error In-Reply-To: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> References: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> Message-ID: <565dbdd40612160339s684b30c9rc218309f1706f23b@mail.gmail.com> How are you handling log rotation? I was encountering really strange, non-logged 500 errors every week because I used some bad log rotation advice from the Rails wiki. I don't have the link handy since it seems the wiki is down right now, but I found this thread: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/218107 The jist: Don't let Logger rotate the log. Instead, let Rails log as much as it wants to into production.log and rely on some out-of-process log rotation daemon (eg, logrotate). Or, switch to some ruby-based logging solution that works when more than one process tries to rotate the same log file. I personally use the former. HTH, eden On 12/15/06, Matthew Whittaker wrote: > So I have updated to the latest mongrel and fastthread and my > environment is as follows: > > Debian 3.1 > Rails 1.1.6 > Ruby 1.8.5 > Mongrel 0.3.18 > Fastthread 0.4 > Mongrel Cluster 0.2.1 > Apache 2.2.3 > > I again woke up this morning to my disappointment of seeing the > strange Status: 500 Internal Server error. It happens the same every > morning, I have three mongrels running, two give the error, one > processes the request successfully. > > This error is not being reported in ANY logs. Apache, Mongrel debug, > rails, nothing. The only thing I notice while tailing the logs is > that the request reaches mongrel and is reported in both rails.log > and threads.log, however the request is NOT being reported in ruby / > rails production.log. This appears to be craping out in mongrel. > Again this only happens overnight when there is no activity with the > site. PLEASE HELP. Is there any way to take a core dump of mongrel? > How can I get more logs to see what is happening. > > Regards, > > Matt Whittaker > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From mwhitt89 at gmail.com Sat Dec 16 12:00:28 2006 From: mwhitt89 at gmail.com (Matthew Whittaker) Date: Sat, 16 Dec 2006 12:00:28 -0500 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error In-Reply-To: <565dbdd40612160339s684b30c9rc218309f1706f23b@mail.gmail.com> References: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> <565dbdd40612160339s684b30c9rc218309f1706f23b@mail.gmail.com> Message-ID: <2FB59D73-E04B-40C6-8BE7-7FBB87ECED50@gmail.com> THANK YOU EDEN! I have my production log on rotate! I am going to go change this now. I will post the results. Cheers, matt On Dec 16, 2006, at 6:39 AM, Eden Li wrote: > How are you handling log rotation? I was encountering really strange, > non-logged 500 errors every week because I used some bad log rotation > advice from the Rails wiki. I don't have the link handy since it > seems the wiki is down right now, but I found this thread: > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/218107 > > The jist: Don't let Logger rotate the log. > > Instead, let Rails log as much as it wants to into production.log and > rely on some out-of-process log rotation daemon (eg, logrotate). Or, > switch to some ruby-based logging solution that works when more than > one process tries to rotate the same log file. I personally use the > former. > > HTH, > eden > > On 12/15/06, Matthew Whittaker wrote: >> So I have updated to the latest mongrel and fastthread and my >> environment is as follows: >> >> Debian 3.1 >> Rails 1.1.6 >> Ruby 1.8.5 >> Mongrel 0.3.18 >> Fastthread 0.4 >> Mongrel Cluster 0.2.1 >> Apache 2.2.3 >> >> I again woke up this morning to my disappointment of seeing the >> strange Status: 500 Internal Server error. It happens the same every >> morning, I have three mongrels running, two give the error, one >> processes the request successfully. >> >> This error is not being reported in ANY logs. Apache, Mongrel debug, >> rails, nothing. The only thing I notice while tailing the logs is >> that the request reaches mongrel and is reported in both rails.log >> and threads.log, however the request is NOT being reported in ruby / >> rails production.log. This appears to be craping out in mongrel. >> Again this only happens overnight when there is no activity with the >> site. PLEASE HELP. Is there any way to take a core dump of mongrel? >> How can I get more logs to see what is happening. >> >> Regards, >> >> Matt Whittaker >> _______________________________________________ >> 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 patcito at gmail.com Sat Dec 16 14:10:11 2006 From: patcito at gmail.com (Patrick Aljord) Date: Sat, 16 Dec 2006 20:10:11 +0100 Subject: [Mongrel] trying to add another app Message-ID: <6b6419750612161110t9a119cfu718fd21d031dad43@mail.gmail.com> hey all, I have an app working great with apache2 and mongrel_cluster. However, I'm trying to run another application and now when I go to app1.comit falls to app2.com and the opposite. That's probably because I messed up somewhere with the cluster. this is the content of my conf.d/app1.proxy_cluster.conf: BalancerMember http://app1.com:8000 BalancerMember http://app1.com:8001 BalancerMember http://app1.com:8002 and this is my conf.d/app2.proxy_cluster.conf: BalancerMember http://app2.com:8003 BalancerMember http://app2.com:8004 Maybe I need to change the name of my mongrel_cluster but I'm not sure how to do this :/ this is my sites-enabled/app1.conf: NameVirtualHost app1.com:80 ServerName app1.com ServerAlias www.app1.com DocumentRoot /home/patcito/testapp/public/ Include /etc/apache2/conf.d/testapp.common this is my conf.d/app1.common: Options FollowSymLinks AllowOverride None Order allow,deny Allow from all RewriteEngine On # Make sure people go to www.myapp.com, not myapp.com RewriteCond %{HTTP_HOST} ^app1.com$ [NC] RewriteRule ^(.*)$ http://www.app1.com$1 [R=301,L] # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! #continue with other static files that should be served by apache Alias /images /home/patcito/testapp/public/images Alias /stylesheets /home/patcito/testapp/public/stylesheets Alias /javascripts /home/patcito/testapp/public/javascripts those two files for app2 are similar. Any idea what's wrong? thanx in advance Pat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061216/e6724e3e/attachment-0001.html From mental at rydia.net Sat Dec 16 14:48:19 2006 From: mental at rydia.net (MenTaLguY) Date: Sat, 16 Dec 2006 14:48:19 -0500 Subject: [Mongrel] [ANN] fastthread 0.5.3 Message-ID: <1166298500.6690.11.camel@localhost.localdomain> I've just committed fastthread 0.5.3, which finally gives us a working SizedQueue (which hadn't really ever worked in previous versions). Mostly it was just a matter of refactoring Queue and SizedQueue into a single class behind the scenes, so I could move the signalling of the SizedQueue-specific condition variable inside the queue's critical section. Failing to do so had led to a race and all sorts of badness. Unless someone finds more bugs, this version of fastthread will eventually become 1.0. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061216/799d9ba7/attachment.bin From zedshaw at zedshaw.com Sat Dec 16 18:40:18 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Sat, 16 Dec 2006 15:40:18 -0800 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error In-Reply-To: <2FB59D73-E04B-40C6-8BE7-7FBB87ECED50@gmail.com> References: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> <565dbdd40612160339s684b30c9rc218309f1706f23b@mail.gmail.com> <2FB59D73-E04B-40C6-8BE7-7FBB87ECED50@gmail.com> Message-ID: <20061216154018.a18c31db.zedshaw@zedshaw.com> On Sat, 16 Dec 2006 12:00:28 -0500 Matthew Whittaker wrote: > THANK YOU EDEN! > > I have my production log on rotate! I am going to go change this now. > > I will post the results. Hmmm, I may have to put this in the FAQ. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From carl.lerche at gmail.com Sun Dec 17 01:56:53 2006 From: carl.lerche at gmail.com (Carl Lerche) Date: Sat, 16 Dec 2006 22:56:53 -0800 Subject: [Mongrel] Apache slows to a grinding halt... Did I screw up or is something wrong? Message-ID: Hello, So, I just got through a very stressful couple of hours. I've been running a rails application for a few months on a dedicated server. The application isn't really that intensive and has been serving roughly 50k requests / day. It's been handling really well, really fast, and all is good. The deployment configuration I am using is apache 2.2.3 with mod_proxy_balancer proxying to 3 mongrel processes. It's' been really good to me so far handling the load like a champ. Now, 2 hours ago, everything is seemingly normal when all of a sudden the site grinds to a halt. Yet, it doesn't seem like I'm getting a surge of traffic. I check the server and it is 90% idle. I check my mongrel processes and they are still dishing out the site like champs. The culprit is apache! It takes it 20 - 40 seconds to server a small static html file. Something is wrong. This is where me being a server admin noob sucks. After way too long I find out that apache is maxing out the connections. Apache is configured to handle 256 max connections with a 300 second timeout. Keep alive is off. This has been working for months and for no apparent reason doesn't seem to work anymore. Long story short, I reduced the timeout setting to 15 seconds and it seems fine now. It maxes out at roughly 90 connections now. I pretty much only use apache as a front for mongrel, so I ask here. Were my original settings completely dumb or is something else wrong? Maybe something I can look at with how I configured apache to proxy to mongrel? Why are so many connections staying open? I'm no amazing system administrator, so I'm hoping that it's something I did wrong and stupid and having a 300 second timeout is just a mistake I made. Any insight? -carl -- EPA Rating: 3000 Lines of Code / Gallon (of coffee) From _ at whats-your.name Sun Dec 17 02:37:43 2006 From: _ at whats-your.name (carmen) Date: Sun, 17 Dec 2006 02:37:43 -0500 Subject: [Mongrel] Apache slows to a grinding halt... Did I screw up or is something wrong? In-Reply-To: References: Message-ID: <20061217073743.GA1659@replic.net> > > Now, 2 hours ago, everything is seemingly normal when all of a sudden > the site grinds to a halt. Yet, it doesn't seem like I'm getting a > surge of traffic. I check the server and it is 90% idle. I check my > mongrel processes and they are still dishing out the site like champs. > The culprit is apache! It takes it 20 - 40 seconds to server a small > static html file. Something is wrong. > > I pretty much only use apache as a front for mongrel, so I ask here. > Were my original settings completely dumb or is something else wrong? it's hard to configure apache correctly, even if you discount for the step of finding /etc/apache2/modules/mods-enabled/41_my_unfavorite_module.mod .. if its any consolation, i can't get apache to not unescape the URLs before handing off to mongrel, even when manually constructing the proxypass URI and explicitly leaving out any unescape statements.. i had a similar experience trying to configure mod_perl, and weird performance issues like the one above (when using fastCGI anyways).. > > I'm no amazing system administrator, so I'm hoping that it's something > I did wrong and stupid and having a 300 second timeout is just a > mistake I made. > > Any insight? try ngina or lighty if its ust a random halt then finally a failure (or success), it coudl be a DNS issue.. From will at hotgazpacho.com Sun Dec 17 09:11:02 2006 From: will at hotgazpacho.com (Will Green) Date: Sun, 17 Dec 2006 09:11:02 -0500 Subject: [Mongrel] trying to add another app In-Reply-To: <6b6419750612161110t9a119cfu718fd21d031dad43@mail.gmail.com> References: <6b6419750612161110t9a119cfu718fd21d031dad43@mail.gmail.com> Message-ID: <45854FF6.30508@hotgazpacho.com> You must have Unique names for your balancer clusters. Right now, they are both named balancer://mongrel_cluster Try balancer://app1_cluster and balancer://app2_cluster You also probably need to include specific rewrite rules inside each app's VirtualHost directive, or things will probably continue to not work right. Hope that helps! == Will Patrick Aljord wrote: > hey all, > I have an app working great with apache2 and mongrel_cluster. > However, I'm trying to run another application and now when I go to > app1.com it falls to app2.com and > the opposite. That's probably because I messed up somewhere with the > cluster. > this is the content of my conf.d/app1.proxy_cluster.conf: > > BalancerMember http://app1.com:8000 > BalancerMember http://app1.com:8001 > BalancerMember http://app1.com:8002 > > > > and this is my conf.d/app2.proxy_cluster.conf: > > BalancerMember http://app2.com:8003 > BalancerMember http://app2.com:8004 > > > > Maybe I need to change the name of my mongrel_cluster but I'm not sure > how to do this :/ > this is my sites-enabled/app1.conf: > NameVirtualHost app1.com:80 > > > > ServerName app1.com > ServerAlias www.app1.com > DocumentRoot /home/patcito/testapp/public/ > Include /etc/apache2/conf.d/testapp.common > > > this is my conf.d/app1.common: > > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > > > RewriteEngine On > > # Make sure people go to www.myapp.com , not > myapp.com > RewriteCond %{HTTP_HOST} ^app1.com$ [NC] > RewriteRule ^(.*)$ http://www.app1.com$1 [R=301,L] > > # Check for maintenance file and redirect all requests > RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f > RewriteCond %{SCRIPT_FILENAME} !maintenance.html > RewriteRule ^.*$ /system/maintenance.html [L] > > # Rewrite index to check for static > RewriteRule ^/$ /index.html [QSA] > > # Rewrite to check for Rails cached page > RewriteRule ^([^.]+)$ $1.html [QSA] > > # Redirect all non-static requests to cluster > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] > > # Deflate > AddOutputFilterByType DEFLATE text/html text/plain text/xml > application/xml application/xhtml+xml text/javascript text/css > BrowserMatch ^Mozilla/4 gzip-only-text/html > BrowserMatch ^Mozilla/4.0[678] no-gzip > BrowserMatch \bMSIE !no-gzip !gzip-only-text/html > > ProxyPass /images ! > ProxyPass /stylesheets ! > ProxyPass /javascripts ! > > #continue with other static files that should be served by apache > > Alias /images /home/patcito/testapp/public/images > Alias /stylesheets /home/patcito/testapp/public/stylesheets > Alias /javascripts /home/patcito/testapp/public/javascripts > > those two files for app2 are similar. Any idea what's wrong? > thanx in advance > > Pat > > > ------------------------------------------------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From mwhitt89 at gmail.com Sun Dec 17 10:29:28 2006 From: mwhitt89 at gmail.com (Matthew Whittaker) Date: Sun, 17 Dec 2006 10:29:28 -0500 Subject: [Mongrel] Early morning strange error saying: Status: 500 Internal Server Error In-Reply-To: <20061216154018.a18c31db.zedshaw@zedshaw.com> References: <6539E9D9-7B31-481C-B7EA-2F8DF6841AE3@gmail.com> <565dbdd40612160339s684b30c9rc218309f1706f23b@mail.gmail.com> <2FB59D73-E04B-40C6-8BE7-7FBB87ECED50@gmail.com> <20061216154018.a18c31db.zedshaw@zedshaw.com> Message-ID: I changed the ruby logger to not rotate anymore and the problem is fixed. Zed - This would be a good one to put on the FAQ. DO NOT have ruby logger rotate itself in a mongrel clustered environment. Thanks again Eden! On Dec 16, 2006, at 6:40 PM, Zed A. Shaw wrote: > On Sat, 16 Dec 2006 12:00:28 -0500 > Matthew Whittaker wrote: > >> THANK YOU EDEN! >> >> I have my production log on rotate! I am going to go change this >> now. >> >> I will post the results. > > Hmmm, I may have to put this in the FAQ. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From luislavena at gmail.com Sun Dec 17 15:46:28 2006 From: luislavena at gmail.com (Luis Lavena) Date: Sun, 17 Dec 2006 17:46:28 -0300 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <918A0DD3EFA7F248BFBF447187F8A9320814DF@HOBVSISMS01.nashville.org> References: <918A0DD3EFA7F248BFBF447187F8A9320814DF@HOBVSISMS01.nashville.org> Message-ID: <71166b3b0612171246n793a8a79ve875056a12f8a133@mail.gmail.com> On 12/15/06, Ball, Donald A Jr (Library) wrote: > > On 12/15/06, Ball, Donald A Jr (Library) > > wrote: > > > Hey guys, I'm running the mongrel server that comes with > > rails-1.2rc1 > > > for development on a winxp box, anticipating taking it into > > production > > > on a win2k3 box in the next few weeks. > > > > Ok, which version of mongrel is bundled with rails-1.2? > > Please list the gems you have installed, because, AFAIK, > > script\server will only load mongrel if the gem is found. > > I'm using mongrel-0.3.13.3-mswin32, the latest publicly available > mswin32 gem, along with mongrel_service-0.2, though I'm not using the > service in development. I tried to install 0.3.19 but got odd > compilation warnings when I did so and the server failed to start. > That is the *latest* stable gem available via rubyforge, but no the latest one: http://rubyforge.org/pipermail/mongrel-users/2006-December/002352.html >From my site you could download the pre-compiled win32 gem based on latest svn. Just change 0.3.18 to 0.3.20 and you're done. Install it manually using 'gem install' and the full pathname, including extension of the gem file. > > You are starting it using mongrel_rails or script/server? > > script/server > Then is rails which is loading mongrel, and not the way around. Please try doing: mongrel_rails start inside your application folder and see if that report any problem > > > I've had a couple of crashes > > > occur during development that give me pause, however. I > > made a ticket > > > for the last one here: > > > > > > http://dev.rubyonrails.org/ticket/6841 > > > > That bug seems weird, also unrelated to rails but Ruby itself. > > So you believe I've run into a bug in ruby-1.8.4-mswin32? Looked to me > more like an unhandled exception in activesupport, but the rails folks > seemed to think that was not the case. > Its look like a bug with the GC, but I only could say that if your application isn't doing something memory intensive or nasty to the whole Ruby VM. > > Lastest mongrel_service gem provide what you need, if somehow > > the ruby process die (due a unhandled exception) the service > > will automatically spawn a new one. > > I'll give that a whirl, thanks! Would the log files indicate when/if > this occurs? > The current mongrel_service will report when something like that happens, but, mea culpa, I forgot to include timestamp information of that! (will do a fix in the svn). > > There is no way (yet, still need to test some things) to > > monitor deeply if the ruyb process hang and not die. > > > > The mongrel_cluster base his "magic" on daemonize, which requires > > fork() and isn't compatible with win32. > > > > Its planned for mongrel_service to provide this > > functionality, maybe during january. > > If I can help in this endeavor in any way, please let me know. I'm a > beginning ruby developer, but I've been doing web development for time > out of mind and I have a copy of visual studio 2003 if needed for > compilation. > So far testing for one or N child process is the same, I'll want to test the single service a bit longer to iron the logging issues it currently present (or lack of). > > Will be very helpful if you provide more information about > > your database (and version), mongrel, rails, ruby and windows > > version to we could get a better picture of your situation. > > Sure thing. I'm using mssql2k with the ADO driver, mongrel-0.3.13.3, > rails-1.2rc1, ruby-1.8.4, winxpsp2 (but will be deploying to win2k3). I > am using RMagick with file_column, though the crashes have not (yet) > occurred while testing that portion of the application. > Ok, are you sure about RMagick? you know when your application crashes? doing what, which kind of request, the exact line of the controller or something? The stack trace on this situation will be very helpful. Based on some web searching, the "rb_gc_mark: unknown data type" bug is related to some memory allocated that didn't conform any of the known data types by the Garbage Collector. Maybe some C extension (RMagick or any other) is allocating memory and not freeing it in the right way. > > Regards and good weekend, > > Thanks for your help and for your work in providing rails folks with a > potentially workable solution for win32 deployment! It would not be my > choice for a production environment, but it's out of my hands. > You're welcome, but you should thank a lot of ppl, win32utils guys and Zed for their work directly or indirectly to this :-) Regards and good weekend. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From dallas.devries at gmail.com Sun Dec 17 22:39:14 2006 From: dallas.devries at gmail.com (Dallas DeVries) Date: Sun, 17 Dec 2006 22:39:14 -0500 Subject: [Mongrel] Debugging high CPU with Mongrel In-Reply-To: <20061215140017.e8d27676.zedshaw@zedshaw.com> References: <1200dbac0612061356r34c18adi9e79ed5c7d7c150d@mail.gmail.com> <1200dbac0612061513u67f7591do1770472749a3c33e@mail.gmail.com> <4944AE27-B684-4D20-8FCB-3C211CBCE922@mac.com> <1200dbac0612070630l2b86b057k19acfdb2b51f2288@mail.gmail.com> <1200dbac0612131841g5e0121a4u3bf04a5fb672e70@mail.gmail.com> <20061214165733.GA66691@apoc.jacobatzen.dk> <1200dbac0612140939u3d60d32fo6578e08d4f4dd823@mail.gmail.com> <1200dbac0612150936p79f211a3pcd3e892fca16fb54@mail.gmail.com> <20061215140017.e8d27676.zedshaw@zedshaw.com> Message-ID: <1200dbac0612171939h7fa93924rd7b872a674ca6b08@mail.gmail.com> Thanks for the strace tip Zed. It helped me figure out what was wrong. I noticed stat64() flying by on pretty much every cache file I have. Apparently expire_fragment using a regular expression as the argument will actually go through every single cache file and by midday I have about 30000+ of them so I'm pretty sure that's the cause. I thought it only tried matching files in the controller and action it was called from or specified, this does not appear to be the case. So I guess I'll have to write a plugin to change caching or find someone else who solved the same problem. Thanks for the help. Cheers, Dallas On 12/15/06, Zed A. Shaw wrote: > > On Fri, 15 Dec 2006 12:36:47 -0500 > "Dallas DeVries" wrote: > > > Alright so I got fastthread installed yesterday. Unfortunately the > massive > > load spike happened again (until rails cache was deleted of > course). I'm > > just wondering if I'm using killall -USR1 mongrel_rails the proper way. > > What sort of messages should I be looking for? They are suppose to be > in > > mongrel.log right? Other than turning the toggling debugging mode to > true I > > don't seem to be getting any extra info in that mongrel.log or > > production.log. Is there some lower level thing I can try? If it really > is > > a cache thing and there is a way for me to see it stuck in some process > > loading or building a fragment or something... > > If you turn on USR1 and don't see any log messages than most likely it's a > problem that isn't triggering one of the exceptions. You're turning it on > right, and you should see a little log message saying it's on. > > If you've got a process that's "stuck" for some reason, try strace -p > PID. Using strace you can see what system calls the process is calling and > then see if it's in some loop or something. > > Another option--which is more advanced--is to attach to the process with > gdb and then interrupt it and step through. I haven't used this yet, but > check out Jamis Buck's blog and a few others for handy macros that can dump > the Ruby callstack. > > > Are the 0.3.19pr items pretty much centered around the MIME type stuff > or > > should I try upgrading to that from .18pr? > > Yeah, it's MIME that was put into the 0.3.19 and just a few fastthread > changes. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061217/c2fa660a/attachment-0001.html From eule at space.ch Mon Dec 18 03:52:45 2006 From: eule at space.ch (Kaspar Schiess) Date: Mon, 18 Dec 2006 09:52:45 +0100 Subject: [Mongrel] mongrel_cluster: selective restarts Message-ID: Hi list, I have tried to reach Bradley (author of mongrel_cluster) by mail, but have not gotten a response. So I'll try trough this channel: I have 'developed'[1] a small extension to mongrel_cluster that allows selective restart of any one listener in a configuration that contains more than one listener by using a command like mongrel_rails cluster::selectivestart -c config.file -p 3000 This will try to find a listener on port 3000 in the configuration given and start it (selectively). This is super useful in a monit controlled environment, where a rule could now be: start program = "mongrel_rails cluster::selectivestart -C mongrel_cluster.yml -p 3000" Of course, I have a stop action, too. Now the question: Bradley, if this reaches you, are you interested in including this into mongrel_cluster? Or should I just go ahead and release this independently? Is anyone interested in this? best greetings kaspar [1] By using Apple C, Apple V mostly... From zedshaw at zedshaw.com Mon Dec 18 04:53:31 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 18 Dec 2006 01:53:31 -0800 Subject: [Mongrel] mongrel_cluster: selective restarts In-Reply-To: References: Message-ID: <20061218015331.265afcba.zedshaw@zedshaw.com> On Mon, 18 Dec 2006 09:52:45 +0100 Kaspar Schiess wrote: > Hi list, > > I have tried to reach Bradley (author of mongrel_cluster) by mail, but > have not gotten a response. So I'll try trough this channel: > Send it to me offlist and I'll take a look at it. Thanks. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From krisleech at interkonect.com Mon Dec 18 05:30:17 2006 From: krisleech at interkonect.com (Kris Leech) Date: Mon, 18 Dec 2006 10:30:17 +0000 Subject: [Mongrel] Using a network drive to share files between Mongrel/Rails instances...? Message-ID: <45866DB9.7030703@interkonect.com> I have a Apache proxying to a number of Mongrel's on different physical machines. What I need to do next is share files between the Rails instances. I am creating dynamic files which will be created by Rails and stored on disk. The file is then recovered and served at a later date by an ajax request. But because of the proxying the ajax call my be routed to a different machine. Therefore I am considering setting up a shared drive to which all Rails instances will save the files. At the moment I am working on Windows but this will be Linux or FreeBSD in the end... I'm guessing shared drives are simply paths in both cases. Is there anything I need to consider with this method? Many thanks, K. PS. I am aware of other methods for doing this eg. sticky sessions and some kind of message que, and I am open to suggestions :) From phillip.oertel at openbc.com Mon Dec 18 05:43:52 2006 From: phillip.oertel at openbc.com (Phillip Oertel) Date: Mon, 18 Dec 2006 11:43:52 +0100 Subject: [Mongrel] mongrel_cluster: selective restarts In-Reply-To: <20061218015331.265afcba.zedshaw@zedshaw.com> References: <20061218015331.265afcba.zedshaw@zedshaw.com> Message-ID: <249F19EE-5D42-4640-95D9-F7E4D81DBEF6@openbc.com> hi all, wouldn't this be really useful for updating production servers as well? instead of taking down all mongrels at once, you could restart one after another. so you have zero downtime, and depeding on how smart your script is even cancel restart of mongrel n+1 if mongrel n hasn't come up successfully. cheers, phillip --- Am 18.12.2006 um 10:53 schrieb Zed A. Shaw: > On Mon, 18 Dec 2006 09:52:45 +0100 > Kaspar Schiess wrote: > >> Hi list, >> >> I have tried to reach Bradley (author of mongrel_cluster) by mail, >> but >> have not gotten a response. So I'll try trough this channel: >> > > Send it to me offlist and I'll take a look at it. Thanks. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > > ------------- Phillip Oertel Manager Engineering phillip.oertel at xing.com Open Business Club AG, XING Gaensemarkt 43, 20354 Hamburg, Germany Tel +49 40 41 91 31-754, Fax +49 40 41 91 31-11 Please join my network on XING: http://www.xing.com/profile/Phillip_Oertel This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden and may be unlawful. From zedshaw at zedshaw.com Mon Dec 18 06:14:58 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 18 Dec 2006 03:14:58 -0800 Subject: [Mongrel] mongrel_cluster: selective restarts In-Reply-To: <249F19EE-5D42-4640-95D9-F7E4D81DBEF6@openbc.com> References: <20061218015331.265afcba.zedshaw@zedshaw.com> <249F19EE-5D42-4640-95D9-F7E4D81DBEF6@openbc.com> Message-ID: <20061218031458.cbb03b35.zedshaw@zedshaw.com> On Mon, 18 Dec 2006 11:43:52 +0100 Phillip Oertel wrote: > hi all, > > wouldn't this be really useful for updating production servers as well? > instead of taking down all mongrels at once, you could restart one > after another. > so you have zero downtime, and depeding on how smart your script is > even cancel restart of > mongrel n+1 if mongrel n hasn't come up successfully. Problem is this gets ultra complex and everyone wants it done differently. Most folks who want this simply write their own version and get exactly what they want. A general solution seems to be a whopper of a task (trust me I've tried a few times). If you can write something up and post it out then go for it. Mongrel gives folks the tools to do custom management processes with this in mind. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From phillip.oertel at openbc.com Mon Dec 18 08:49:37 2006 From: phillip.oertel at openbc.com (Phillip Oertel) Date: Mon, 18 Dec 2006 14:49:37 +0100 Subject: [Mongrel] mongrel_cluster: selective restarts In-Reply-To: <20061218031458.cbb03b35.zedshaw@zedshaw.com> References: <20061218015331.265afcba.zedshaw@zedshaw.com> <249F19EE-5D42-4640-95D9-F7E4D81DBEF6@openbc.com> <20061218031458.cbb03b35.zedshaw@zedshaw.com> Message-ID: <01B57D13-D155-4C46-B85D-F52CBC2D773E@openbc.com> Am 18.12.2006 um 12:14 schrieb Zed A. Shaw: > On Mon, 18 Dec 2006 11:43:52 +0100 > Phillip Oertel wrote: > >> hi all, >> >> wouldn't this be really useful for updating production servers as >> well? >> instead of taking down all mongrels at once, you could restart one >> after another. >> so you have zero downtime, and depeding on how smart your script is >> even cancel restart of >> mongrel n+1 if mongrel n hasn't come up successfully. > > Problem is this gets ultra complex and everyone wants it done > differently. Most folks who want this simply write their own > version and get exactly what they want. A general solution seems > to be a whopper of a task (trust me I've tried a few times). > > If you can write something up and post it out then go for it. > Mongrel gives folks the tools to do custom management processes > with this in mind. very cool :-) so i'll try to write up something for our environment, and depending on how much i like it i'll post it. we don't need that urgently yet, so it might be some time. cheers, phillip From patcito at gmail.com Mon Dec 18 15:22:05 2006 From: patcito at gmail.com (Patrick Aljord) Date: Mon, 18 Dec 2006 21:22:05 +0100 Subject: [Mongrel] trying to add another app In-Reply-To: <45854FF6.30508@hotgazpacho.com> References: <6b6419750612161110t9a119cfu718fd21d031dad43@mail.gmail.com> <45854FF6.30508@hotgazpacho.com> Message-ID: <6b6419750612181222v2de8d399la539bde29acb8f7@mail.gmail.com> ok thanx a lot. I still have an issue though with my alias. see, in my app1.com I have this: ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! Alias /images /home/patcito/railsprojects/app1/public/images Alias /stylesheets /home/patcito/railsprojects/app1/public/stylesheets Alias /javascripts /home/patcito/railsprojects/app1/public/javascript and in my app2.common I have that: ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! Alias /images /home/patcito/railsprojects/app2/public/images Alias /stylesheets /home/patcito/railsprojects/app2/public/stylesheets Alias /javascripts /home/patcito/railsprojects/app2/public/javascript now when I reload apache I get: The Alias directive in /etc/apache2/conf.d/app1.common at line 56 will probably never match because it overlaps an earlier Alias. and css don't get displayed in my app1.com Any idea how I can fix that? thanx in advance Pat From jgeiger at gmail.com Mon Dec 18 17:55:04 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Mon, 18 Dec 2006 16:55:04 -0600 Subject: [Mongrel] trying to add another app In-Reply-To: <6b6419750612181222v2de8d399la539bde29acb8f7@mail.gmail.com> References: <6b6419750612161110t9a119cfu718fd21d031dad43@mail.gmail.com> <45854FF6.30508@hotgazpacho.com> <6b6419750612181222v2de8d399la539bde29acb8f7@mail.gmail.com> Message-ID: <466af3440612181455y2e222c15jae494f4488e833b5@mail.gmail.com> I think you need to put those directives into the virtual host sections. You get the error that they will overwrite each other because they do. On 12/18/06, Patrick Aljord wrote: > ok thanx a lot. I still have an issue though with my alias. > see, in my app1.com I have this: > > ProxyPass /images ! > ProxyPass /stylesheets ! > ProxyPass /javascripts ! > > Alias /images /home/patcito/railsprojects/app1/public/images > Alias /stylesheets /home/patcito/railsprojects/app1/public/stylesheets > Alias /javascripts /home/patcito/railsprojects/app1/public/javascript > > and in my app2.common I have that: > ProxyPass /images ! > ProxyPass /stylesheets ! > ProxyPass /javascripts ! > > Alias /images /home/patcito/railsprojects/app2/public/images > Alias /stylesheets /home/patcito/railsprojects/app2/public/stylesheets > Alias /javascripts /home/patcito/railsprojects/app2/public/javascript > > now when I reload apache I get: > The Alias directive in /etc/apache2/conf.d/app1.common at line 56 will > probably never match because it overlaps an earlier Alias. and css > don't get displayed in my app1.com > > Any idea how I can fix that? > > thanx in advance > > Pat > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From kigsteronline at mac.com Mon Dec 18 17:56:11 2006 From: kigsteronline at mac.com (kigsteronline at mac.com) Date: Mon, 18 Dec 2006 14:56:11 -0800 Subject: [Mongrel] Using a network drive to share files between Mongrel/Rails instances...? In-Reply-To: <45866DB9.7030703@interkonect.com> References: <45866DB9.7030703@interkonect.com> Message-ID: <6319C916-EB38-4C5D-A9FA-7AAF101DB182@mac.com> Kris, I assume you mean network shared drive (as in NFS)? While I think that NFS is the simplest solution - where you have one file server that exports a share, and your web servers mount the share, there are plenty of operational issues with NFS, enough that I would strongly consider any other options before deciding to make NFS share part of your production system. There are a couple of problems with NFS that one should consider. First of all it's rather slow, but that does not have to be a huge problem (plus file system caching may alleviate this somewhat). The bigger problem is the hanging mounts, which may happen if your server goes away temporarily from the network (either crashes, or network failure, or network overload). In my experience hosts that mount NFS shares from a server which disappears may become frozen / unresponsive / impossible to fix without a hard reboot. This comes from observing a particular production system running Linux / Solaris machines and using NFS for exactly the described purpose. If you are creating these files, but not really deleting them by the application in real time, you may consider writing them locally on each server to a given directory, and serving them from another local directory, which is populated by a periodic script. The script would run on each participating machine and would clone a batch of newly created files to each participating server. More management overhead, but if you are running a mission critical and performance hungry application with lots of components, that would be my first choice. For non-mission critical apps, or where performance is not a huge deal the NFS approach is by far the simplest. Hope this helps, Konstantin On Dec 18, 2006, at 2:30 AM, Kris Leech wrote: > I have a Apache proxying to a number of Mongrel's on different > physical > machines. > > What I need to do next is share files between the Rails instances. > I am > creating dynamic files which will be created by Rails and stored on > disk. The file is then recovered and served at a later date by an ajax > request. > > But because of the proxying the ajax call my be routed to a different > machine. Therefore I am considering setting up a shared drive to which > all Rails instances will save the files. At the moment I am working on > Windows but this will be Linux or FreeBSD in the end... I'm guessing > shared drives are simply paths in both cases. > > Is there anything I need to consider with this method? > > > Many thanks, K. > > > > PS. I am aware of other methods for doing this eg. sticky sessions and > some kind of message que, and I am open to suggestions :) > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From patcito at gmail.com Mon Dec 18 19:01:42 2006 From: patcito at gmail.com (Patrick Aljord) Date: Tue, 19 Dec 2006 01:01:42 +0100 Subject: [Mongrel] trying to add another app In-Reply-To: <466af3440612181455y2e222c15jae494f4488e833b5@mail.gmail.com> References: <6b6419750612161110t9a119cfu718fd21d031dad43@mail.gmail.com> <45854FF6.30508@hotgazpacho.com> <6b6419750612181222v2de8d399la539bde29acb8f7@mail.gmail.com> <466af3440612181455y2e222c15jae494f4488e833b5@mail.gmail.com> Message-ID: <6b6419750612181601i1099aae6h595ba75689d7f3d3@mail.gmail.com> On 12/18/06, Joey Geiger wrote: > I think you need to put those directives into the virtual host sections. > > You get the error that they will overwrite each other because they do. you mean both the ProxyPass and the Alias or just the Alias? thanx From will at hotgazpacho.com Mon Dec 18 20:08:28 2006 From: will at hotgazpacho.com (Will Green) Date: Mon, 18 Dec 2006 20:08:28 -0500 Subject: [Mongrel] trying to add another app In-Reply-To: <6b6419750612181601i1099aae6h595ba75689d7f3d3@mail.gmail.com> References: <6b6419750612161110t9a119cfu718fd21d031dad43@mail.gmail.com> <45854FF6.30508@hotgazpacho.com> <6b6419750612181222v2de8d399la539bde29acb8f7@mail.gmail.com> <466af3440612181455y2e222c15jae494f4488e833b5@mail.gmail.com> <6b6419750612181601i1099aae6h595ba75689d7f3d3@mail.gmail.com> Message-ID: <45873B8C.4060003@hotgazpacho.com> Both. Think of each VirtualHost directive as its own server (because, for all intents and purposes, it is). If you don't set up a Proxies and Aliases for each server, then they only apply to the default server. Patrick Aljord wrote: > On 12/18/06, Joey Geiger wrote: >> I think you need to put those directives into the virtual host sections. >> >> You get the error that they will overwrite each other because they do. > > you mean both the ProxyPass and the Alias or just the Alias? > > thanx > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From michael.dauria at gmail.com Tue Dec 19 01:17:53 2006 From: michael.dauria at gmail.com (Michael D'Auria) Date: Tue, 19 Dec 2006 01:17:53 -0500 Subject: [Mongrel] mongrel_config has no output Message-ID: <1907e2ca0612182217y566c59d8tb1405e58104f8d65@mail.gmail.com> I am not sure what i am doing wrong here, but no matter what i try i get no output from mongrel_config: $ mongrel_rails configtool $ telnet localhost 3001 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /config/ HTTP/1.1 HTTP/1.1 200 OK Connection: close Date: Tue, 19 Dec 2006 05:33:16 GMT Content-Type: text/html Content-Length: 0 Connection closed by foreign host. Here is a YAML dump of the $server object: --- &id001 !ruby/object:Mongrel::HttpServer acceptor: !ruby/object:Thread {} classifier: !ruby/object:Mongrel::URIClassifier handler_map: /log: - !ruby/object:Mongrel::DirHandler default_content_type: application/octet-stream index_html: index.html listener: *id001 listing_allowed: true path: /home/michael/hhp/trebleNation/log /favicon.ico: - !ruby/object:Mongrel::Error404Handler listener: *id001 response: |- HTTP/1.1 404 Not Found Connection: close Server: Mongrel 0.3.20 NOT FOUND /config/resources: - !ruby/object:Mongrel::DirHandler default_content_type: application/octet-stream index_html: index.html listener: *id001 listing_allowed: true path: /usr/local/lib/ruby/gems/1.8/gems/mongrel_config-0.3/resources /config: - !ruby/object:Mongrel::Camping::CampingHandler files: !ruby/object:Mongrel::DirHandler default_content_type: application/octet-stream index_html: index.html listing_allowed: false path: / guard: !ruby/object:Mutex {} klass: !ruby/object:Module {} listener: *id001 death_time: 60 host: 0.0.0.0 num_processors: 1073741823 port: "3001" socket: !ruby/object:TCPServer {} timeout: 0 workers: !ruby/object:ThreadGroup {} What's weird is that i can go to: http://localhost:3001/config/resources and see the erb template output with <% .. %>. Currently I am running Mongrel 0.3.20 but i had the issue with 0.3.18 as well. System is an Ubuntu Edgy on 2.6.17-10 kernel. Any help would be greatly appreciated, .: Michael :. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061219/61f0e795/attachment.html From donald.ball at nashville.gov Tue Dec 19 11:23:59 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Tue, 19 Dec 2006 10:23:59 -0600 Subject: [Mongrel] running mongrel in production on win32 Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814E3@HOBVSISMS01.nashville.org> > > I'm using mongrel-0.3.13.3-mswin32, the latest publicly available > > mswin32 gem, along with mongrel_service-0.2, though I'm not > using the > > service in development. I tried to install 0.3.19 but got odd > > compilation warnings when I did so and the server failed to start. > > That is the *latest* stable gem available via rubyforge, but > no the latest one: > > http://rubyforge.org/pipermail/mongrel-users/2006-December/002352.html huh, that's handy, might be worthwhile posting that on the mongrel site somewhere if you want to encourage win32 users to test it. > Then is rails which is loading mongrel, and not the way > around. Please try doing: > > mongrel_rails start > > inside your application folder and see if that report any problem Sure. Actually, I have a problem to report already... sessions are not working when I start mongrel in this fashion. Is there somewhere i should be configuring session behavior that I'm not? To be more specific, the browser doesn't report a session_id cookie in its cookie list. The server-side code happily stores objects in the session, but the session is empty on the next request. For the record, both webrick and mongrel started via script/server have working sessions. > > So you believe I've run into a bug in ruby-1.8.4-mswin32? > Looked to me > > more like an unhandled exception in activesupport, but the > rails folks > > seemed to think that was not the case. > > Its look like a bug with the GC, but I only could say that if > your application isn't doing something memory intensive or > nasty to the whole Ruby VM. I can pretty much guarantee that's not the case. It's a very vanilla application, the most weird thing I'm doing is a lot of screen scraping with Mechanize. > The current mongrel_service will report when something like > that happens, but, mea culpa, I forgot to include timestamp > information of that! (will do a fix in the svn). Cool. Note I haven't yet installed or tested mongrel_service, hope to be able to do that soon. > > > Will be very helpful if you provide more information about your > > > database (and version), mongrel, rails, ruby and windows > version to > > > we could get a better picture of your situation. > > > > Sure thing. I'm using mssql2k with the ADO driver, > mongrel-0.3.13.3, > > rails-1.2rc1, ruby-1.8.4, winxpsp2 (but will be deploying > to win2k3). > > I am using RMagick with file_column, though the crashes > have not (yet) > > occurred while testing that portion of the application. > > Ok, are you sure about RMagick? you know when your > application crashes? doing what, which kind of request, the > exact line of the controller or something? Well, it's only crashed twice, with different stacktraces, so searching for a common proximate cause is likely to be a fruitless endeavor. I'll be sure to save all the information if this recurs in the future. Appreciate the time and advice, and I look forward to helping you get mongrel for win32 ready for production use. - donald From bradley at railsmachine.com Tue Dec 19 12:02:07 2006 From: bradley at railsmachine.com (Bradley Taylor) Date: Tue, 19 Dec 2006 12:02:07 -0500 Subject: [Mongrel] mongrel_cluster: selective restarts In-Reply-To: References: Message-ID: <45881B0F.40709@railsmachine.com> > I have 'developed'[1] a small extension to mongrel_cluster that allows > selective restart of any one listener in a configuration that contains > more than one listener by using a command like > > mongrel_rails cluster::selectivestart -c config.file -p 3000 > > This will try to find a listener on port 3000 in the configuration given > and start it (selectively). > > Now the question: Bradley, if this reaches you, are you interested in > including this into mongrel_cluster? Or should I just go ahead and > release this independently? Is anyone interested in this? Hi Kaspar: I just found your mail buried deep in my fluxura box. Sorry about that! I guess my main question is why would you use mongrel_cluster instead of the Mongrel configuration file option (-C) and specify the port on the command line like 'mongrel_rails start -C /path/to/your/file -p 3000'? Regards, Bradley Taylor Rails Machine Virtual Clusters for Web Deployments http://railsmachine.com From donald.ball at nashville.gov Tue Dec 19 12:15:58 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Tue, 19 Dec 2006 11:15:58 -0600 Subject: [Mongrel] running mongrel in production on win32 Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> > Sure. Actually, I have a problem to report already... > sessions are not working when I start mongrel in this > fashion. Is there somewhere i should be configuring session > behavior that I'm not? > > To be more specific, the browser doesn't report a session_id > cookie in its cookie list. The server-side code happily > stores objects in the session, but the session is empty on > the next request. > > For the record, both webrick and mongrel started via > script/server have working sessions. The problem turns out to be fairly simple, but it's beyond my capability to fix. The problem is that mongrel is only passing one and only one cookie on to the user. If that's _session_id, great, but if it's one of the other cookies that I'm creating, the user's session is lost. To be clear, I'm using mongrel-0.3.18 from Luis. Note that I was incorrect when I said the problem didn't occur when mongrel is stared with script\server. Mongrel has this problem regardless, while webrick works fine. - donald From jgeiger at gmail.com Tue Dec 19 13:13:37 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Tue, 19 Dec 2006 12:13:37 -0600 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> Message-ID: <466af3440612191013o1cd7eafcl9a98a2871d4ec7f3@mail.gmail.com> This is something I mentioned on here to Zed, and he said it will be fixed coming up with the next release. I do know that 0.3.14 works, which I believe was the last stable release for ruby (and 0.3.13 which was the windows stable release?) On 12/19/06, Ball, Donald A Jr (Library) wrote: > > Sure. Actually, I have a problem to report already... > > sessions are not working when I start mongrel in this > > fashion. Is there somewhere i should be configuring session > > behavior that I'm not? > > > > To be more specific, the browser doesn't report a session_id > > cookie in its cookie list. The server-side code happily > > stores objects in the session, but the session is empty on > > the next request. > > > > For the record, both webrick and mongrel started via > > script/server have working sessions. > > The problem turns out to be fairly simple, but it's beyond my capability > to fix. The problem is that mongrel is only passing one and only one > cookie on to the user. If that's _session_id, great, but if it's one of > the other cookies that I'm creating, the user's session is lost. > > To be clear, I'm using mongrel-0.3.18 from Luis. Note that I was > incorrect when I said the problem didn't occur when mongrel is stared > with script\server. Mongrel has this problem regardless, while webrick > works fine. > > - donald > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From michael.dauria at gmail.com Tue Dec 19 13:33:45 2006 From: michael.dauria at gmail.com (Michael D'Auria) Date: Tue, 19 Dec 2006 13:33:45 -0500 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> Message-ID: <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> You should upgrade to the newest version: 0.3.20 as it allows multiple Set-Cookie header statements. For reference:http://mongrel.rubyforge.org/news.html To Install: $ gem install fastthread --source=http://mongrel.rubyforge.org/releases $ gem install mongrel --source=http://mongrel.rubyforge.org/releases Then you should be back on track :) .: Michael :. On 12/19/06, Ball, Donald A Jr (Library) wrote: > > > Sure. Actually, I have a problem to report already... > > sessions are not working when I start mongrel in this > > fashion. Is there somewhere i should be configuring session > > behavior that I'm not? > > > > To be more specific, the browser doesn't report a session_id > > cookie in its cookie list. The server-side code happily > > stores objects in the session, but the session is empty on > > the next request. > > > > For the record, both webrick and mongrel started via > > script/server have working sessions. > > The problem turns out to be fairly simple, but it's beyond my capability > to fix. The problem is that mongrel is only passing one and only one > cookie on to the user. If that's _session_id, great, but if it's one of > the other cookies that I'm creating, the user's session is lost. > > To be clear, I'm using mongrel-0.3.18 from Luis. Note that I was > incorrect when I said the problem didn't occur when mongrel is stared > with script\server. Mongrel has this problem regardless, while webrick > works fine. > > - donald > _______________________________________________ > 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/20061219/a0a9b656/attachment.html From wayneeseguin at gmail.com Tue Dec 19 13:41:56 2006 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Tue, 19 Dec 2006 13:41:56 -0500 Subject: [Mongrel] Using a network drive to share files between Mongrel/Rails instances...? In-Reply-To: <6319C916-EB38-4C5D-A9FA-7AAF101DB182@mac.com> References: <45866DB9.7030703@interkonect.com> <6319C916-EB38-4C5D-A9FA-7AAF101DB182@mac.com> Message-ID: <40849554-9B04-4831-9D60-E4B5C5618842@gmail.com> Kris, Another option, depending on the size of the files of course, is to create a secondary database for the application and store the files within that database. I am not claiming that this is optimal for your instance, just that it is a very effective option and should be at least thought about. If the files are smaller and you increase your database caching "sufficiently" then this can prove to be a very viable option and quite simple to implement. ~Wayne From donald.ball at nashville.gov Tue Dec 19 14:30:46 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Tue, 19 Dec 2006 13:30:46 -0600 Subject: [Mongrel] running mongrel in production on win32 Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814E8@HOBVSISMS01.nashville.org> Sadly, I cannot upgrade to 0.3.20 as I'm on win32, there's no gem available for it yet, and I apparently cannot compile the http parser (nmake launches cl.exe which complains: c:\ruby\lib\ruby\1.8\i386-mswin32\config.h(2) : fatal error C1189: #error : MSC version unmatch (In point of fact, this error message was from trying to install 0.3.19, but the point remains - mswin32 users seem to need precompiled gems.) - donald -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061219/3f6df518/attachment.html From jgeiger at gmail.com Tue Dec 19 14:37:14 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Tue, 19 Dec 2006 13:37:14 -0600 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> Message-ID: <466af3440612191137qc241d40o7918a94605cf7501@mail.gmail.com> Gives you 0.3.19 $ gem install mongrel --source=http://mongrel.rubyforge.org/releases Gives you 0.3.20 $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/ just FYI On 12/19/06, Michael D'Auria wrote: > You should upgrade to the newest version: 0.3.20 as it allows multiple > Set-Cookie header statements. > > For reference:http://mongrel.rubyforge.org/news.html > > To Install: > $ gem install fastthread > --source=http://mongrel.rubyforge.org/releases > $ gem install mongrel > --source=http://mongrel.rubyforge.org/releases > > Then you should be back on track :) > > .: Michael :. > > > On 12/19/06, Ball, Donald A Jr (Library) wrote: > > > Sure. Actually, I have a problem to report already... > > > sessions are not working when I start mongrel in this > > > fashion. Is there somewhere i should be configuring session > > > behavior that I'm not? > > > > > > To be more specific, the browser doesn't report a session_id > > > cookie in its cookie list. The server-side code happily > > > stores objects in the session, but the session is empty on > > > the next request. > > > > > > For the record, both webrick and mongrel started via > > > script/server have working sessions. > > > > The problem turns out to be fairly simple, but it's beyond my capability > > to fix. The problem is that mongrel is only passing one and only one > > cookie on to the user. If that's _session_id, great, but if it's one of > > the other cookies that I'm creating, the user's session is lost. > > > > To be clear, I'm using mongrel-0.3.18 from Luis. Note that I was > > incorrect when I said the problem didn't occur when mongrel is stared > > with script\server. Mongrel has this problem regardless, while webrick > > works fine. > > > > - donald > > _______________________________________________ > > 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 jerrod at indierockmedia.com Tue Dec 19 15:35:34 2006 From: jerrod at indierockmedia.com (Jerrod Blavos) Date: Tue, 19 Dec 2006 15:35:34 -0500 Subject: [Mongrel] mongrel_upload_progress + upload.rb +background (daemon?) Message-ID: <6824A484-F697-43F4-81B7-14FE3CA9F80F@indierockmedia.com> Im checking out the mongrel_upload_progress plugin and have it working beautifully on my dev box. however, now that i am ready to push this up into production i have run into a few gotchas that i cannot seem to find any documentation or examples for. the lib/upload.rb doesnt seem to want to run in the background. perhaps im doing something wrong? Does anyone have any experience deploying this sort of setup using capistrano? how would i start/stop/restart the upload server? any tips/idea are greatly appreciated. -jerrod From luislavena at gmail.com Tue Dec 19 16:05:45 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 19 Dec 2006 18:05:45 -0300 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> Message-ID: <71166b3b0612191305i57b05a7bx6462e4303eee1fc3@mail.gmail.com> On 12/19/06, Michael D'Auria wrote: > You should upgrade to the newest version: 0.3.20 as it allows multiple > Set-Cookie header statements. > > For reference:http://mongrel.rubyforge.org/news.html > > To Install: > $ gem install fastthread > --source=http://mongrel.rubyforge.org/releases > $ gem install mongrel > --source=http://mongrel.rubyforge.org/releases > > Then you should be back on track :) > > .: Michael :. > The gems available in the mongrel.rubyforge.org/releases are ONLY source, which requires a compiler. The problem in mswin32 is that compilers compatible with ruby are only VC6, which also requires you purchased it. I'll upadte the gem in my webserver tonight and put a mail on the list (AFAIK, Zed already modified to allow multiple cookies). > > On 12/19/06, Ball, Donald A Jr (Library) wrote: > > > Sure. Actually, I have a problem to report already... > > > sessions are not working when I start mongrel in this > > > fashion. Is there somewhere i should be configuring session > > > behavior that I'm not? > > > > > > To be more specific, the browser doesn't report a session_id > > > cookie in its cookie list. The server-side code happily > > > stores objects in the session, but the session is empty on > > > the next request. > > > > > > For the record, both webrick and mongrel started via > > > script/server have working sessions. > > > > The problem turns out to be fairly simple, but it's beyond my capability > > to fix. The problem is that mongrel is only passing one and only one > > cookie on to the user. If that's _session_id, great, but if it's one of > > the other cookies that I'm creating, the user's session is lost. > > > > To be clear, I'm using mongrel-0.3.18 from Luis. Note that I was > > incorrect when I said the problem didn't occur when mongrel is stared > > with script\server. Mongrel has this problem regardless, while webrick > > works fine. > > > > - donald > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From zedshaw at zedshaw.com Tue Dec 19 16:23:46 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 19 Dec 2006 13:23:46 -0800 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <466af3440612191137qc241d40o7918a94605cf7501@mail.gmail.com> References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> <466af3440612191137qc241d40o7918a94605cf7501@mail.gmail.com> Message-ID: <20061219132346.132d1871.zedshaw@zedshaw.com> On Tue, 19 Dec 2006 13:37:14 -0600 "Joey Geiger" wrote: > Gives you 0.3.19 > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases > > Gives you 0.3.20 > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Man that is SO annoying. Nobody can tell me why though and I think I messed up the documentation too. Thanks for reminding me Joey. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Tue Dec 19 16:24:18 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 19 Dec 2006 13:24:18 -0800 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> Message-ID: <20061219132418.737800e7.zedshaw@zedshaw.com> On Tue, 19 Dec 2006 11:15:58 -0600 "Ball, Donald A Jr (Library)" wrote: > > Sure. Actually, I have a problem to report already... > > sessions are not working when I start mongrel in this > > fashion. Is there somewhere i should be configuring session > > behavior that I'm not? > > > > To be more specific, the browser doesn't report a session_id > > cookie in its cookie list. The server-side code happily > > stores objects in the session, but the session is empty on > > the next request. > > > > For the record, both webrick and mongrel started via > > script/server have working sessions. I'll get you a win32 gem today. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From frazer.list at gmail.com Tue Dec 19 16:28:45 2006 From: frazer.list at gmail.com (frazer horn) Date: Tue, 19 Dec 2006 16:28:45 -0500 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: <71166b3b0612191305i57b05a7bx6462e4303eee1fc3@mail.gmail.com> References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> <71166b3b0612191305i57b05a7bx6462e4303eee1fc3@mail.gmail.com> Message-ID: Luis I am using your latest build of mongrel service in production with your latest build of mongrel from your site too. Everything is running really well. Do you have a build of fastthread for windows yet? Will fastthread even be available for win32? Thanks for all the excellent work Fraz On 12/19/06, Luis Lavena wrote: > > On 12/19/06, Michael D'Auria wrote: > > You should upgrade to the newest version: 0.3.20 as it allows multiple > > Set-Cookie header statements. > > > > For reference:http://mongrel.rubyforge.org/news.html > > > > To Install: > > $ gem install fastthread > > --source=http://mongrel.rubyforge.org/releases > > $ gem install mongrel > > --source=http://mongrel.rubyforge.org/releases > > > > Then you should be back on track :) > > > > .: Michael :. > > > > The gems available in the mongrel.rubyforge.org/releases are ONLY > source, which requires a compiler. > > The problem in mswin32 is that compilers compatible with ruby are only > VC6, which also requires you purchased it. > > I'll upadte the gem in my webserver tonight and put a mail on the list > (AFAIK, Zed already modified to allow multiple cookies). > > > > > On 12/19/06, Ball, Donald A Jr (Library) > wrote: > > > > Sure. Actually, I have a problem to report already... > > > > sessions are not working when I start mongrel in this > > > > fashion. Is there somewhere i should be configuring session > > > > behavior that I'm not? > > > > > > > > To be more specific, the browser doesn't report a session_id > > > > cookie in its cookie list. The server-side code happily > > > > stores objects in the session, but the session is empty on > > > > the next request. > > > > > > > > For the record, both webrick and mongrel started via > > > > script/server have working sessions. > > > > > > The problem turns out to be fairly simple, but it's beyond my > capability > > > to fix. The problem is that mongrel is only passing one and only one > > > cookie on to the user. If that's _session_id, great, but if it's one > of > > > the other cookies that I'm creating, the user's session is lost. > > > > > > To be clear, I'm using mongrel-0.3.18 from Luis. Note that I was > > > incorrect when I said the problem didn't occur when mongrel is stared > > > with script\server. Mongrel has this problem regardless, while webrick > > > works fine. > > > > > > - donald > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061219/377b327d/attachment-0001.html From donald.ball at nashville.gov Tue Dec 19 18:16:57 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Tue, 19 Dec 2006 17:16:57 -0600 Subject: [Mongrel] running mongrel in production on win32 Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814E9@HOBVSISMS01.nashville.org> > I'll get you a win32 gem today. You're my hero. - donald From luislavena at gmail.com Tue Dec 19 19:27:34 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 19 Dec 2006 21:27:34 -0300 Subject: [Mongrel] running mongrel in production on win32 In-Reply-To: References: <918A0DD3EFA7F248BFBF447187F8A9320814E7@HOBVSISMS01.nashville.org> <1907e2ca0612191033u2b6ef105nff91f54f410bd6ac@mail.gmail.com> <71166b3b0612191305i57b05a7bx6462e4303eee1fc3@mail.gmail.com> Message-ID: <71166b3b0612191627w437a867ag3f4287db9264e506@mail.gmail.com> On 12/19/06, frazer horn wrote: > Luis > > I am using your latest build of mongrel service in production with your > latest build of mongrel from your site too. Everything is running really > well. > I'm glad to heard, I was having troubles getting rubygem recognize my yaml definitions for a gem mirror, mostly due line terminations that differ between platforms. Until I solve that issue, or Zed made a "official" release for win32, this will be the only way (manual download). > Do you have a build of fastthread for windows yet? Will fastthread even be > available for win32? > I have builds from previous versions, latest svn code is broken for win32 (a small fix we are trying with mental). Anyway, doing some performance testing and process information collecting for the past days and didn't find any "improvements" on mongrel process using or not fastthread. Guess the Mutex leaking problem is worse in *nix or isn't noticeable under win32. (At least that will be a huge win for mswin32 :-) Will talk with Zed and mental tonight and get some fixes for these issues. Maybe we could have win32 fastthread *just in case* Later, > Thanks for all the excellent work > > Fraz > > > On 12/19/06, Luis Lavena wrote: > > On 12/19/06, Michael D'Auria wrote: > > > You should upgrade to the newest version: 0.3.20 as it allows multiple > > > Set-Cookie header statements. > > > > > > For reference:http://mongrel.rubyforge.org/news.html > > > > > > To Install: > > > $ gem install fastthread > > > --source=http://mongrel.rubyforge.org/releases > > > $ gem install mongrel > > > --source= http://mongrel.rubyforge.org/releases > > > > > > Then you should be back on track :) > > > > > > .: Michael :. > > > > > > > The gems available in the mongrel.rubyforge.org/releases are ONLY > > source, which requires a compiler. > > > > The problem in mswin32 is that compilers compatible with ruby are only > > VC6, which also requires you purchased it. > > > > I'll upadte the gem in my webserver tonight and put a mail on the list > > (AFAIK, Zed already modified to allow multiple cookies). > > > > > > > > On 12/19/06, Ball, Donald A Jr (Library) > wrote: > > > > > Sure. Actually, I have a problem to report already... > > > > > sessions are not working when I start mongrel in this > > > > > fashion. Is there somewhere i should be configuring session > > > > > behavior that I'm not? > > > > > > > > > > To be more specific, the browser doesn't report a session_id > > > > > cookie in its cookie list. The server-side code happily > > > > > stores objects in the session, but the session is empty on > > > > > the next request. > > > > > > > > > > For the record, both webrick and mongrel started via > > > > > script/server have working sessions. > > > > > > > > The problem turns out to be fairly simple, but it's beyond my > capability > > > > to fix. The problem is that mongrel is only passing one and only one > > > > cookie on to the user. If that's _session_id, great, but if it's one > of > > > > the other cookies that I'm creating, the user's session is lost. > > > > > > > > To be clear, I'm using mongrel-0.3.18 from Luis. Note that I was > > > > incorrect when I said the problem didn't occur when mongrel is stared > > > > with script\server. Mongrel has this problem regardless, while webrick > > > > works fine. > > > > > > > > - donald > > > > _______________________________________________ > > > > Mongrel-users mailing list > > > > Mongrel-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > > > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > > > > -- > > Luis Lavena > > Multimedia systems > > - > > Leaders are made, they are not born. They are made by hard effort, > > which is the price which all of us must pay to achieve any goal that > > is worthwhile. > > Vince Lombardi > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From graham at bravenet.com Tue Dec 19 19:45:17 2006 From: graham at bravenet.com (Graham White) Date: Tue, 19 Dec 2006 16:45:17 -0800 Subject: [Mongrel] Mongrel version in headers Message-ID: <07896569A892834B8221EE90F6A9912702BB9D5B@bdc-pv1.pv.bravenet.com> Is it possible to have mongrel not advertise itself or at least its version in response headers ie. Server: Mongrel 0.3.13.4 Sorry if I missed this directive in the docs but I couldn't find it anywhere. Thanks GW -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061219/025d1383/attachment.html From zedshaw at zedshaw.com Wed Dec 20 00:11:45 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 19 Dec 2006 21:11:45 -0800 Subject: [Mongrel] Mongrel version in headers In-Reply-To: <07896569A892834B8221EE90F6A9912702BB9D5B@bdc-pv1.pv.bravenet.com> References: <07896569A892834B8221EE90F6A9912702BB9D5B@bdc-pv1.pv.bravenet.com> Message-ID: <20061219211145.dde49164.zedshaw@zedshaw.com> On Tue, 19 Dec 2006 16:45:17 -0800 "Graham White" wrote: > Is it possible to have mongrel not advertise itself or at least its > version in response headers ie. > Server: Mongrel 0.3.13.4 > > Sorry if I missed this directive in the docs but I couldn't find it > anywhere. Thanks Nope, best bet is to have your fronting proxy strip this header off or change it to something bogus. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Wed Dec 20 01:16:53 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 19 Dec 2006 22:16:53 -0800 Subject: [Mongrel] [ANN] Mongrel 1.0 RC1 Full Win32 Build Message-ID: <20061219221653.8affc3f8.zedshaw@zedshaw.com> Hello Minions! It's *finally* here. Mongrel 1.0 RC1 for everyone to test, even the win32 folks. I managed to get everything to build on windows, including fastthread, and even cleaned up the "releases source":http://mongrel.rubyforge.org/releases/ so that it should install cleaner. Win32 will have to try and report problems, as it seems rubygems is real finicky on win32. UNIX Install with: $ gem install mongrel --source=http://mongrel.rubyforge.org/releases WIN32 Install with: $ gem uninstall mongrel $ gem uninstall gem_plugin $ gem uninstall fastthread $ gem install fastthread --source=http://mongrel.rubyforge.org/releases $ gem install mongrel --source=http://mongrel.rubyforge.org/releases $ gem install mongrel_service --source=http://mongrel.rubyforge.org/releases If you have problems with fastthread then skip it, it's optional on Win32. The win32 process is more involved because there hasn't been a stable release of it for a while now. That's why you have to remove everything you can and then re-install. *** Make sure that gem_plugin is version 0.2.2 or the whole thing dies. *** If you have problems installing any of this then add a / to the end of the source: $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Yes, that's retarded, blame the rubygems folks. You can view the ChangeLog for this latest release "in the releases":http://mongrel.rubyforge.org/releases/ChangeLog directory like normal. This ChangeLog covers everything done since 0.3.18 but it's in svn log format so only read it if you're really uptight. And as usual, report any bugs. I'll be posting instructions on using the new mongrel_service when I get them from Luis. IT'S RC1 FOR A REASON Before you go off installing this thing in your production servers because you missed the RC1 identifier, remember that RC means "Release Candidate". Test it to death, use it, report bugs, but only a fool installs it in mission critical situations without fully testing it. OFFICIAL 1.0 (PARTY!) If nobody has any problems with this release then it'll go out on Friday as the official 1.0 release. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From michael.dauria at gmail.com Tue Dec 19 23:44:03 2006 From: michael.dauria at gmail.com (Michael D'Auria) Date: Tue, 19 Dec 2006 23:44:03 -0500 Subject: [Mongrel] [ANN] Mongrel 1.0 RC1 Full Win32 Build In-Reply-To: <20061219221653.8affc3f8.zedshaw@zedshaw.com> References: <20061219221653.8affc3f8.zedshaw@zedshaw.com> Message-ID: <1907e2ca0612192044g162125fcma32e8c286b0983c9@mail.gmail.com> Hey Zed, I'm excited for Mongrel 1.0 final! I do have something i ran into before and still is occurring with the new version. When i run into a 500 based error i seem to get header information as output when using mongrel: Status: 500 Internal Server Error Content-Type: text/html I still get the appropriate page as i should, i just get the header info before the page output. I remember you telling me that Rails is sending back the error and page this way, but is there something that can be done so this is not shown? .: Michael :. On 12/20/06, Zed A. Shaw wrote: > > Hello Minions! > > It's *finally* here. Mongrel 1.0 RC1 for everyone to test, even the win32 > folks. I managed to get everything to build on windows, including > fastthread, and even cleaned up the "releases source": > http://mongrel.rubyforge.org/releases/ so that it should install > cleaner. Win32 will have to try and report problems, as it seems rubygems > is real finicky on win32. > > UNIX Install with: > > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases > > WIN32 Install with: > > $ gem uninstall mongrel > $ gem uninstall gem_plugin > $ gem uninstall fastthread > $ gem install fastthread --source=http://mongrel.rubyforge.org/releases > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases > $ gem install mongrel_service --source= > http://mongrel.rubyforge.org/releases > > If you have problems with fastthread then skip it, it's optional on > Win32. The win32 process is more involved because there hasn't been a > stable release of it for a while now. That's why you have to remove > everything you can and then re-install. > > *** Make sure that gem_plugin is version 0.2.2 or the whole thing > dies. *** > > If you have problems installing any of this then add a / to the end of the > source: > > $ gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > Yes, that's retarded, blame the rubygems folks. > > You can view the ChangeLog for this latest release "in the releases": > http://mongrel.rubyforge.org/releases/ChangeLog directory like > normal. This ChangeLog covers everything done since 0.3.18 but it's in > svn log format so only read it if you're really uptight. > > And as usual, report any bugs. I'll be posting instructions on using the > new mongrel_service when I get them from Luis. > > > IT'S RC1 FOR A REASON > > Before you go off installing this thing in your production servers because > you missed the RC1 identifier, remember that RC means "Release > Candidate". Test it to death, use it, report bugs, but only a fool installs > it in mission critical situations without fully testing it. > > OFFICIAL 1.0 (PARTY!) > > If nobody has any problems with this release then it'll go out on Friday > as the official 1.0 release. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061219/6b35a26a/attachment.html From zedshaw at zedshaw.com Wed Dec 20 05:02:09 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Wed, 20 Dec 2006 02:02:09 -0800 Subject: [Mongrel] [ANN] Mongrel 1.0 RC1 Full Win32 Build In-Reply-To: <1907e2ca0612192044g162125fcma32e8c286b0983c9@mail.gmail.com> References: <20061219221653.8affc3f8.zedshaw@zedshaw.com> <1907e2ca0612192044g162125fcma32e8c286b0983c9@mail.gmail.com> Message-ID: <20061220020209.c717ccde.zedshaw@zedshaw.com> On Tue, 19 Dec 2006 23:44:03 -0500 "Michael D'Auria" wrote: > Hey Zed, > > I'm excited for Mongrel 1.0 final! I do have something i ran into before > and still is occurring with the new version. When i run into a 500 based > error i seem to get header information as output when using mongrel: > > I still get the appropriate page as i should, i just get the header info > before the page output. I remember you telling me that Rails is sending > back the error and page this way, but is there something that can be done so > this is not shown? Yeah, there's not much I can do about it right now without changing how rails works and generates its error reports. I tried to crack it again when DHH complained but it just would take way too much rewriting to fix the rewriting. :-) The plan is to tackle that problem and a host of others in later versions. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From maillist at steelskies.com Wed Dec 20 06:06:46 2006 From: maillist at steelskies.com (Jonathan del Strother) Date: Wed, 20 Dec 2006 11:06:46 +0000 Subject: [Mongrel] [ANN] Mongrel 1.0 RC1 Full Win32 Build In-Reply-To: <20061220020209.c717ccde.zedshaw@zedshaw.com> References: <20061219221653.8affc3f8.zedshaw@zedshaw.com> <1907e2ca0612192044g162125fcma32e8c286b0983c9@mail.gmail.com> <20061220020209.c717ccde.zedshaw@zedshaw.com> Message-ID: <4FFE0FBA-4223-4390-AB6B-0F349D9C5CA4@steelskies.com> On 20 Dec 2006, at 10:02, Zed A. Shaw wrote: > On Tue, 19 Dec 2006 23:44:03 -0500 > "Michael D'Auria" wrote: > >> Hey Zed, >> >> I'm excited for Mongrel 1.0 final! I do have something i ran into >> before >> and still is occurring with the new version. When i run into a >> 500 based >> error i seem to get header information as output when using mongrel: > >> >> I still get the appropriate page as i should, i just get the >> header info >> before the page output. I remember you telling me that Rails is >> sending >> back the error and page this way, but is there something that can >> be done so >> this is not shown? > > Yeah, there's not much I can do about it right now without changing > how rails works and generates its error reports. I tried to crack > it again when DHH complained but it just would take way too much > rewriting to fix the rewriting. :-) > > The plan is to tackle that problem and a host of others in later > versions. I can't seem to find any previous discussion on this in the archives - could you give us a quick rundown on what the cause is? From eule at space.ch Wed Dec 20 06:35:45 2006 From: eule at space.ch (Kaspar Schiess) Date: Wed, 20 Dec 2006 12:35:45 +0100 Subject: [Mongrel] mongrel_cluster: selective restarts In-Reply-To: <45881B0F.40709@railsmachine.com> References: <45881B0F.40709@railsmachine.com> Message-ID: Hi Brad > I just found your mail buried deep in my fluxura box. Sorry about that! > > I guess my main question is why would you use mongrel_cluster instead of > the Mongrel configuration file option (-C) and specify the port on > the command line like 'mongrel_rails start -C /path/to/your/file -p 3000'? The way I understand this command is that it will only ever allow me to start one instance at once. (side note: I am not sure as to if -C does override any other command line options or not.) What I want to be able to do is manage a couple of mongrels all at once using mongrel cluster::start/stop/restart _and_ selectively manipulate mongrels in that cluster, while not breaking pid-file handling, etc.. of mongrel_cluster. If you tell me that I can get all of this with the existing code, I will wield the quick 'rm' on all the new code. But I cannot see how you would accomplish clustering and individual restarting just trough mongrel start/stop/restart. Thanks for getting back to me! kaspar From zedshaw at zedshaw.com Wed Dec 20 10:12:50 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Wed, 20 Dec 2006 07:12:50 -0800 Subject: [Mongrel] [ANN] Mongrel 1.0 RC1 Full Win32 Build In-Reply-To: <4FFE0FBA-4223-4390-AB6B-0F349D9C5CA4@steelskies.com> References: <20061219221653.8affc3f8.zedshaw@zedshaw.com> <1907e2ca0612192044g162125fcma32e8c286b0983c9@mail.gmail.com> <20061220020209.c717ccde.zedshaw@zedshaw.com> <4FFE0FBA-4223-4390-AB6B-0F349D9C5CA4@steelskies.com> Message-ID: <20061220071250.f5cefff0.zedshaw@zedshaw.com> On Wed, 20 Dec 2006 11:06:46 +0000 Jonathan del Strother wrote: > On 20 Dec 2006, at 10:02, Zed A. Shaw wrote: > > > On Tue, 19 Dec 2006 23:44:03 -0500 > > "Michael D'Auria" wrote: > > > >> Hey Zed, > >> > >> I'm excited for Mongrel 1.0 final! I do have something i ran into > >> before > >> and still is occurring with the new version. When i run into a > >> 500 based > >> error i seem to get header information as output when using mongrel: > > > >> > >> I still get the appropriate page as i should, i just get the > >> header info > >> before the page output. I remember you telling me that Rails is > >> sending > >> back the error and page this way, but is there something that can > >> be done so > >> this is not shown? > > > > Yeah, there's not much I can do about it right now without changing > > how rails works and generates its error reports. I tried to crack > > it again when DHH complained but it just would take way too much > > rewriting to fix the rewriting. :-) > > > > The plan is to tackle that problem and a host of others in later > > versions. > > I can't seem to find any previous discussion on this in the archives > - could you give us a quick rundown on what the cause is? In order to get headers and the body out Mongrel has to split the IO in two and the case of Rails fake the cgi.rb stuff out with StringIO objects. The problem is that Rails (and other frameworks) like to mix up header and body production so everything is out of order. Since an HTTP response has headers first then the body, I have to collect the headers in one StringIO, the body in a second, and then after Rails is done, send this out later. Everything works fine until Rails has a catastrophic error that causes your "500 page of death". In this case there was already some headers and some body sent out but the error caused Rails to try to "reset" the output and send something totally different, the 500 page. When it does this reset, the headers get screwed up and the body shows some of the headers. Fixing it would require changing how rails does it's 500 error reporting, or potentially dropping it for an alternative. A simple fix would be to have Rails do a special Mongrel call that tells Mongrel the request failed and Mongrel could produce the 500 page, but then that'd alienate the other methods for deploying rails. Another solution is to rewrite all the carefully tuned Mongrel output processing so that it handles this by buffering everything and writing nothing anywhere until it's really really final. Since Rails is pushing for 1.2, Mongrel is pushing for 1.0, and having a nasty looking 500 page isn't the end of the world, I'm just punting until later. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From mental at rydia.net Wed Dec 20 11:26:24 2006 From: mental at rydia.net (MenTaLguY) Date: Wed, 20 Dec 2006 11:26:24 -0500 Subject: [Mongrel] [ANN] Mongrel 1.0 RC1 Full Win32 Build In-Reply-To: <20061219221653.8affc3f8.zedshaw@zedshaw.com> References: <20061219221653.8affc3f8.zedshaw@zedshaw.com> Message-ID: <1166631984.3792.4.camel@localhost.localdomain> On Tue, 2006-12-19 at 22:16 -0800, Zed A. Shaw wrote: > If you have problems with fastthread then skip it, it's optional on > Win32. But of course, if you all do have problems, please mention them here for my sake so I can address them... -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061220/538cc2b2/attachment.bin From jgeiger at gmail.com Wed Dec 20 15:02:40 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Wed, 20 Dec 2006 14:02:40 -0600 Subject: [Mongrel] [ANN] Mongrel 1.0 RC1 Full Win32 Build In-Reply-To: <1166631984.3792.4.camel@localhost.localdomain> References: <20061219221653.8affc3f8.zedshaw@zedshaw.com> <1166631984.3792.4.camel@localhost.localdomain> Message-ID: <466af3440612201202q28a88c76r57257c8ea9fe659b@mail.gmail.com> This morning I updated to ruby 1.8.5-21 (windows oneclick), updated all my gems, and installed mongrel 1.0 (rc1, but 1.0 as per the install instructions) When I start mongrel in RadRails (0.7.2), the console is no longer showing the request that is being made to the mongrel server. With the 0.3.13, when i made a request to http://local:8001/user/dashboard, I would get a message in the log along the lines of (date - time - /user/dashboard - something). Just checking if this is a bug, or working as intended, or if there is something I can set to get this information back? Thanks. From mongrel at philip.pjkh.com Wed Dec 20 18:34:49 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Wed, 20 Dec 2006 17:34:49 -0600 (CST) Subject: [Mongrel] [ANN] OSX Dashboard Widget for managing mongrels... Message-ID: <20061220173049.R77901@bravo.pjkh.com> Hey everyone - I recently switched to using a Mac and have several different rails projects going and was getting tired of starting/stopping mongrels via the shell so wrote my first dashboard widget to do it for me. More details at the URL below... http://blog.pjkh.com/2006/12/20/mongrel-rails-dashboard-widget Hope those of you on OSX find it handy... feels good to finally give something (even a little something) back :) -philip From jgeiger at gmail.com Wed Dec 20 19:52:49 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Wed, 20 Dec 2006 18:52:49 -0600 Subject: [Mongrel] RMagick=bad, ???=good In-Reply-To: <48fe25b0612151124r75500610nb09f4a9a320d80f2@mail.gmail.com> References: <466af3440612150914h7224c4a0x82c255498c418769@mail.gmail.com> <20061215125935.05ee13bb@nomad-ii.powershouse.bogus> <4D62AC7A-00D1-4707-A1AD-5C515B939984@loudthinking.com> <48fe25b0612151124r75500610nb09f4a9a320d80f2@mail.gmail.com> Message-ID: <466af3440612201652r255fd3ddo113baff532dee577@mail.gmail.com> Just as an update, I went and did some conversion and gutted FlexImage, removing everything but the crop and resize actions, which are the only ones I was using anyway. Removed RMagick and rewrote stuff to use mini_magick. Everything seems to be working OK except an issue with Tempfile on windows. It seems when I run my code on Windows, the Tempfile is created and deleted before I'm done with it. I found some code online that lets me persist tempfiles, which is fine for me in Win32, since I'm only using it for development. I did a bit of testing, and I was able to get the memory use of a single mongrel to max out at about 56mb. Depending on what I was doing with some images, it spiked to 80mb, but dropped back down to 56, which is acceptable. This was on mongrel 1.0rc1 btw. On 12/15/06, Rick Olson wrote: > On 12/15/06, David Heinemeier Hansson wrote: > > > Although our site is > > > not running in Ruby, yet, we have worked through a number of > > > approaches > > > to handling this, but only one has the desired properties we need, > > > which is automatic recovery and minimal impact to running code on > > > failure: exec out another process to do image manipulation. > > > > I must admit that we do the same thing at 37signals. But actually not > > because of memory leaks, but because we found it easier to do: > > > > def thumbnail(temp, target) > > system "convert #{escape(temp)} -resize 48x48! #{escape(target)}" > > end > > > > Rather than to get the full RMagick machinery cooking. > > There's also minimagick, which is a shell around imagemagick commands. > Probably easier if you want to do more complex operations on your > images. > > Oh, and ImageScience, which uses FreeImage and a light inline ruby > wrapper. http://seattlerb.rubyforge.org/ImageScience.html > > -- > Rick Olson > http://weblog.techno-weenie.net > http://mephistoblog.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From jarkko at jlaine.net Thu Dec 21 01:32:26 2006 From: jarkko at jlaine.net (Jarkko Laine) Date: Thu, 21 Dec 2006 08:32:26 +0200 Subject: [Mongrel] [ANN] OSX Dashboard Widget for managing mongrels... In-Reply-To: <20061220173049.R77901@bravo.pjkh.com> References: <20061220173049.R77901@bravo.pjkh.com> Message-ID: <569463D1-FD6E-4383-9ADA-2F063C0BDB23@jlaine.net> On 21.12.2006, at 1.34, Philip Hallstrom wrote: > > More details at the URL below... > > http://blog.pjkh.com/2006/12/20/mongrel-rails-dashboard-widget > > Hope those of you on OSX find it handy... feels good to finally give > something (even a little something) back :) Hey Philip, Kudos, looks great! I'll put in good use :-) //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2417 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061221/3baab595/attachment.bin From chris at oxdi.eu Thu Dec 21 06:25:23 2006 From: chris at oxdi.eu (Chris Farmiloe) Date: Thu, 21 Dec 2006 11:25:23 +0000 Subject: [Mongrel] [ANN] OSX Dashboard Widget for managing mongrels... In-Reply-To: <569463D1-FD6E-4383-9ADA-2F063C0BDB23@jlaine.net> References: <20061220173049.R77901@bravo.pjkh.com> <569463D1-FD6E-4383-9ADA-2F063C0BDB23@jlaine.net> Message-ID: <5D9FC254-56B0-40E0-B995-598B700DAEDD@oxdi.eu> Heh nice ... probably not for me, but I can see myself install this for someone working on the design/css for a site goodshow! Regards. Chris Farmiloe Design & Development Oxygen Brighton, BN2 1ED On 21 Dec 2006, at 06:32, Jarkko Laine wrote: > On 21.12.2006, at 1.34, Philip Hallstrom wrote: >> >> More details at the URL below... >> >> http://blog.pjkh.com/2006/12/20/mongrel-rails-dashboard-widget >> >> Hope those of you on OSX find it handy... feels good to finally give >> something (even a little something) back :) > > Hey Philip, > > Kudos, looks great! I'll put in good use :-) > > //jarkko > > -- > Jarkko Laine > http://jlaine.net > http://dotherightthing.com > http://www.railsecommerce.com > http://odesign.fi > > > _______________________________________________ > 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/20061221/b04e69bc/attachment-0001.html From me at seebq.com Thu Dec 21 13:38:39 2006 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 21 Dec 2006 13:38:39 -0500 Subject: [Mongrel] versioning of win32 versus ruby gems Message-ID: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> I know we already mentioned this before on the list but I couldn't find it in the archives. Is there a way to differentiate the versions for ruby/mswin32 so that I could run a command like: # sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ --include-dependencies --version 1.0 and have it not prompt me like this: Select which gem to install for your platform (i686-linux) 1. mongrel 1.0 (ruby) 2. mongrel 1.0 (mswin32) 3. Cancel installation my feeble attempts at scripting this and trying to automatically pipe or echo 1 into the installation are failing. Anyone know how to do this automatically, or could we somehow add a number or letter to the version? -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com From runner at berkeley.edu Thu Dec 21 13:49:15 2006 From: runner at berkeley.edu (Steven Hansen) Date: Thu, 21 Dec 2006 10:49:15 -0800 Subject: [Mongrel] versioning of win32 versus ruby gems In-Reply-To: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> References: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> Message-ID: <458AD72B.6050203@berkeley.edu> Charles Brian Quinn wrote: > I know we already mentioned this before on the list but I couldn't > find it in the archives. Is there a way to differentiate the versions > for ruby/mswin32 so that I could run a command like: > > # sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ --include-dependencies > --version 1.0 > > and have it not prompt me like this: > > Select which gem to install for your platform (i686-linux) > 1. mongrel 1.0 (ruby) > 2. mongrel 1.0 (mswin32) > 3. Cancel installation > > my feeble attempts at scripting this and trying to automatically pipe > or echo 1 into the installation are failing. > > Anyone know how to do this automatically, or could we somehow add a > number or letter to the version? > > I believe this thread has what you are looking for: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/226938 Regards, Steven From donald.ball at nashville.gov Thu Dec 21 13:49:06 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Thu, 21 Dec 2006 12:49:06 -0600 Subject: [Mongrel] mongrel_service-0.3.1 problems - service will not start Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814F1@HOBVSISMS01.nashville.org> Hey, I just finished a round of testing my app with mongrel-1.0rc1 (pretty good, four segfaults and a gc error in maybe ten thousands requests) and was moving on to mongrel_service to see if it could cope with said segfaults and gc errors. Sadly, the service will not start. I installed using: mongrel_rails service::install -N nplrails -e development -p 3000 claims to be happy. When I try to start either via "net start" or the services control panel, windows says that the service started and then stopped immediately. I saw nothing interesting in the windows application event log, or in c:\sites\npl\log for that matter. The service reports its command-line as: "c:/ruby/bin/mongrel_service.exe" single -e development -p 3000 -a 0.0.0.0 -l "log/mongrel.log" -P "log/mongrel.pid" -c "C:/sites/npl" -t 0 -r "public" -n 1024 which looks appropriate to me. Any suggestions for how to correct this problem? Many thanks. - donald From luislavena at gmail.com Thu Dec 21 13:52:17 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 21 Dec 2006 15:52:17 -0300 Subject: [Mongrel] versioning of win32 versus ruby gems In-Reply-To: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> References: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> Message-ID: <71166b3b0612211052s685a3202re402f1078bef4b8@mail.gmail.com> On 12/21/06, Charles Brian Quinn wrote: > I know we already mentioned this before on the list but I couldn't > find it in the archives. Is there a way to differentiate the versions > for ruby/mswin32 so that I could run a command like: > > # sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ --include-dependencies > --version 1.0 > > and have it not prompt me like this: > > Select which gem to install for your platform (i686-linux) > 1. mongrel 1.0 (ruby) > 2. mongrel 1.0 (mswin32) > 3. Cancel installation > > my feeble attempts at scripting this and trying to automatically pipe > or echo 1 into the installation are failing. > > Anyone know how to do this automatically, or could we somehow add a > number or letter to the version? > That's a rubygem limitation. You could manually download the gem: wget http://mongrel.rubyforge.org/releases/gems/mongrel-1.0.gem or http://mongrel.rubyforge.org/releases/gems/mongrel-1.0-mswin32.gem and do: gem install path/to/gem-name.gem maybe you could ask the rubygem guys or fill a bug report on their tracker: http://rubyforge.org/tracker/?group_id=126 -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From me at seebq.com Thu Dec 21 14:13:12 2006 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 21 Dec 2006 14:13:12 -0500 Subject: [Mongrel] versioning of win32 versus ruby gems In-Reply-To: <458AD72B.6050203@berkeley.edu> References: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> <458AD72B.6050203@berkeley.edu> Message-ID: <3a2de0cd0612211113h7ed03674k7ebf877c5e93e9b0@mail.gmail.com> Thanks Steven, This is using Jamis' net/ssh library and using: sudo cmd do |channel, stream, data| data.each_line do | line | to regex match lines and type in input. this could work, but i was hoping for bash or something simpler.... Guess that means it's time to move my all of my shell scripts over to ruby (except for the one that installs ruby) ;-) Thanks! On 12/21/06, Steven Hansen wrote: > Charles Brian Quinn wrote: > > I know we already mentioned this before on the list but I couldn't > > find it in the archives. Is there a way to differentiate the versions > > for ruby/mswin32 so that I could run a command like: > > > > # sudo gem install mongrel > > --source=http://mongrel.rubyforge.org/releases/ --include-dependencies > > --version 1.0 > > > > and have it not prompt me like this: > > > > Select which gem to install for your platform (i686-linux) > > 1. mongrel 1.0 (ruby) > > 2. mongrel 1.0 (mswin32) > > 3. Cancel installation > > > > my feeble attempts at scripting this and trying to automatically pipe > > or echo 1 into the installation are failing. > > > > Anyone know how to do this automatically, or could we somehow add a > > number or letter to the version? > > > > > > I believe this thread has what you are looking for: > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/226938 > > Regards, > Steven > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com From steven at lumos.us Thu Dec 21 14:20:38 2006 From: steven at lumos.us (Steven Lumos) Date: Thu, 21 Dec 2006 11:20:38 -0800 Subject: [Mongrel] my apache 2.2 conf Message-ID: <86lkl19htl.fsf@bitty.lumos.us> I just finished updating our internal site, which hosts multiple Rails apps, to Apache 2.2.3. It also has a TWiki rewritten into the root, ViewVC mounted on /cvs, and /server-status and /server-info. ServerName int.example.com ServerAlias int CustomLog /var/www/logs/int.example.com/access.log combined ErrorLog /var/www/logs/int.example.com/error.log [...] ## Application Server # APP1 BalancerMember http://127.0.0.1:11001 Alias /app1 /production/app1/public Allow from .example.com RewriteEngine on RewriteRule ^/?$ balancer://app1%{REQUEST_URI} [P,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . balancer://app1%{REQUEST_URI} [P,L] # End APP1 # APP2 BalancerMember http://127.0.0.1:11010 Alias /app2 /dev/app2/public Allow from .example.com RewriteEngine on RewriteRule ^/?$ balancer://app2%{REQUEST_URI} [P,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . balancer://app2%{REQUEST_URI} [P,L] # End APP2 Then I give mongrel_rails --prefix app and done. Almost too easy. And it's going to be almost trivial to add more mongrels whenever we need them and I set up mongrel_cluster. Thanks again Zed and whoever is responsible for mod_proxy(_balance). Steve From donald.ball at nashville.gov Thu Dec 21 14:33:56 2006 From: donald.ball at nashville.gov (Ball, Donald A Jr (Library)) Date: Thu, 21 Dec 2006 13:33:56 -0600 Subject: [Mongrel] mongrel_service-0.3.1 problems - service will not start Message-ID: <918A0DD3EFA7F248BFBF447187F8A9320814F2@HOBVSISMS01.nashville.org> My bad, it appears to have been a permissions problem. When I change the service from the system account to logon as myself, the service starts nicely. And handles the segfault condition relatively gracefully (the process terminates, closing the socket, but restarts). The only problem I see now is that this abnormal condition does not appear in the mongrel/rails log or in the windows event log. Is there somewhere else I should be looking to find these? - donald > -----Original Message----- > From: mongrel-users-bounces at rubyforge.org > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of > Ball, Donald A Jr (Library) > Sent: Thursday, December 21, 2006 12:49 PM > To: mongrel-users at rubyforge.org > Subject: [Mongrel] mongrel_service-0.3.1 problems - service > will not start > > Hey, I just finished a round of testing my app with > mongrel-1.0rc1 (pretty good, four segfaults and a gc error in > maybe ten thousands > requests) and was moving on to mongrel_service to see if it > could cope with said segfaults and gc errors. Sadly, the > service will not start. I installed using: > > mongrel_rails service::install -N nplrails -e development -p 3000 > > claims to be happy. When I try to start either via "net > start" or the services control panel, windows says that the > service started and then stopped immediately. I saw nothing > interesting in the windows application event log, or in > c:\sites\npl\log for that matter. The service reports its > command-line as: > > "c:/ruby/bin/mongrel_service.exe" single -e development -p > 3000 -a 0.0.0.0 -l "log/mongrel.log" -P "log/mongrel.pid" -c > "C:/sites/npl" -t 0 -r "public" -n 1024 > > which looks appropriate to me. Any suggestions for how to > correct this problem? Many thanks. > > - donald > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From mmmaui at gmail.com Thu Dec 21 15:56:08 2006 From: mmmaui at gmail.com (Mark) Date: Thu, 21 Dec 2006 15:56:08 -0500 Subject: [Mongrel] dealing with multipart forms in a Mongrel::HttpHandler Message-ID: <27d098b90612211256s68522774ncc7a94e4b1410b63@mail.gmail.com> Hi everyone, Is there an easy way to parse multipart form requests from within a Mongrel::HttpHandler subclass or do I need to break out RFC 2388 and a bunch of regexps? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061221/9e756aa8/attachment.html From ezmobius at gmail.com Thu Dec 21 16:28:01 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 21 Dec 2006 13:28:01 -0800 Subject: [Mongrel] versioning of win32 versus ruby gems In-Reply-To: <3a2de0cd0612211113h7ed03674k7ebf877c5e93e9b0@mail.gmail.com> References: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> <458AD72B.6050203@berkeley.edu> <3a2de0cd0612211113h7ed03674k7ebf877c5e93e9b0@mail.gmail.com> Message-ID: <2F62845E-AAF2-4EF9-B543-B57C6F8D18A6@brainspl.at> On Dec 21, 2006, at 11:13 AM, Charles Brian Quinn wrote: > Thanks Steven, > > This is using Jamis' net/ssh library and using: > > sudo cmd do |channel, stream, data| > data.each_line do | line | > > to regex match lines and type in input. this could work, but i was > hoping for bash or something simpler.... > > Guess that means it's time to move my all of my shell scripts over to > ruby (except for the one that installs ruby) ;-) > > Thanks! Charles- You and me both. I didn't want to spend the time writing bash scripts for this when I need to do it on tons of machines anyway. So the script he linked to is actually a capistrano plugin. Take the file and put it somewhere in your load path and then require it from a capistrano recipe file and then you can use it like this: require 'cap_gem' task :install_gems, :roles => :app do gem.select 'mongrel' , 'http://mongrel.rubyforge.org/releases' gem.install 'mongrel', 'http://mongrel.rubyforge.org/releases' , '1.0' end select will select the most recent versions for the current platform and install it. install will install a specific version but won't auto select from a menu. So is there are two or more versions of a gem then you want to use select. Here is the more current version of the plugin for cap. This one supports the --source option. require 'rubygems' require 'capistrano' # Installs within Capistrano as the plugin _gem_. # Prefix all calls to the library with gem. # Manages installing gems and versioned gems. module Gem # Default install command # # * doesn't install documentation # * installs all required dependencies automatically. # GEM_INSTALL="gem install -y --no-rdoc" # Upgrade the *gem* system to the latest version. Runs via *sudo* def update_system sudo "gem update --system" end # Updates all the installed gems to the latest version. Runs via *sudo*. # Don't use this command if any of the gems require a version selection. def upgrade sudo "gem update --no-rdoc" end # Removes old versions of gems from installation area. def cleanup sudo "gem cleanup" end # Installs the gems detailed in +packages+, selecting version +version+ if # specified. # # +packages+ can be a single string or an array of strings. # def install(packages, source=nil, version=nil) sudo "#{GEM_INSTALL} #{version ? '-v '+version.to_s : nil} # {source ? '--source='+source : nil } #{packages.to_a.join(' ')}" end def uninstall(package) sudo "gem uninstall #{package}" do |channel, stream, data| data.each_line do |line| if line =~ /\[Yn\]/ channel.send_data "Y\n" end end end end # Auto selects a gem from a list and installs it. # # *gem* has no mechanism on the command line of disambiguating builds for # different platforms, and instead asks the user. This method has the necessary # conversation to select the +version+ relevant to +platform+ (or the one nearest # the top of the list if you don't specify +version+). def select(package, source=nil, version=nil, platform='ruby') selections={} cmd="#{GEM_INSTALL} #{version ? '-v '+version.to_s : nil} # {package} #{source ? '--source='+source : nil }" sudo cmd do |channel, stream, data| data.each_line do | line | case line when /\s(\d+).*\(#{platform}\)/ if selections[channel[:host]].nil? selections[channel[:host]]=$1.dup+"\n" logger.info "Selecting #$&", "#{stream} :: #{channel[:host]}" end when /\s\d+\./ # Discard other selections from data stream when /^>/ channel.send_data selections[channel[:host]] logger.debug line, "#{stream} :: #{channel[:host]}" else logger.info line, "#{stream} :: #{channel[:host]}" end end end end end Capistrano.plugin :gem, Gem Cheers- -- Ezra Zygmuntowicz-- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From ezmobius at gmail.com Thu Dec 21 16:58:06 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 21 Dec 2006 13:58:06 -0800 Subject: [Mongrel] dealing with multipart forms in a Mongrel::HttpHandler In-Reply-To: <27d098b90612211256s68522774ncc7a94e4b1410b63@mail.gmail.com> References: <27d098b90612211256s68522774ncc7a94e4b1410b63@mail.gmail.com> Message-ID: <3E7A28F0-4A96-4568-AAD5-F613A1F6F837@brainspl.at> On Dec 21, 2006, at 12:56 PM, Mark wrote: > Hi everyone, > > Is there an easy way to parse multipart form requests from within a > Mongrel::HttpHandler subclass or do I need to break out RFC 2388 > and a bunch of regexps? > > Thanks, > > Mark Hey Mark- There is nothing in mongrel to do that for you right now. You can either use the cgi.rb library(yuck!) or you can parse it yourself. You can look at how I do it in merb which is a take off on how camping does it but with some enhancements. You also might want to look at how the serverside gem does the mime parsing. The initialize method here parses the incoming mime stuff including file uploads or multi part forms: http://svn.devjavu.com/merb/lib/merb/merb_controller.rb Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From _ at whats-your.name Thu Dec 21 17:13:26 2006 From: _ at whats-your.name (carmen) Date: Thu, 21 Dec 2006 17:13:26 -0500 Subject: [Mongrel] why gem doesnt use CONFIG["arch"] In-Reply-To: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> References: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> Message-ID: <20061221221326.GC30204@replic.net> On Thu Dec 21, 2006 at 01:38:39PM -0500, Charles Brian Quinn wrote: > I know we already mentioned this before on the list but I couldn't > find it in the archives. Is there a way to differentiate the versions > for ruby/mswin32 so that I could run a command like: > > # sudo gem install mongrel > --source=http://mongrel.rubyforge.org/releases/ --include-dependencies > --version 1.0 > > and have it not prompt me like this: > > Select which gem to install for your platform (i686-linux) > 1. mongrel 1.0 (ruby) > 2. mongrel 1.0 (mswin32) > 3. Cancel installation > > my feeble attempts at scripting this and trying to automatically pipe > or echo 1 into the installation are failing. > > Anyone know how to do this automatically submit a patch to the rubygems package: m ~ # irb irb(main):001:0> include Config => Object irb(main):002:0> CONFIG["arch"] => "x86_64-linux" irb(main):003:0> this should be enough for it to answer its own questions from now on... in the meantime, pay close attention when running 'gem install mongrel'. the ruby version of FastThread is 2), while the ruby version of mongrel is 1) .. by ruby version, do we meen UNIX version? thats a bit confusing. since presumably both versions have C code that is compiled to the platform (ie the 'ruby' choice isnt really pure-ruby) From ra.jones at dpw.clara.co.uk Thu Dec 21 17:48:09 2006 From: ra.jones at dpw.clara.co.uk (RA Jones) Date: Thu, 21 Dec 2006 22:48:09 +0000 Subject: [Mongrel] unitinialized constant Mongrel::HttpHandler (NameError) Message-ID: <458B0F29.4060502@dpw.clara.co.uk> Using RailsLive CD (PCLinuxOS) installed to HD. 'gem install mongrel' reported: Successfully installed mongrel-0.3.13.4. though there is one error: make: *** [/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/http11.so] Error 127 Google is no help for this one as the only reference to this error I could find suggested it might be solved by installing libc, for which I already have the newest version (glibc). Help most welcome. For me no mongrel = no rails :-( From zedshaw at zedshaw.com Thu Dec 21 21:30:25 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 21 Dec 2006 18:30:25 -0800 Subject: [Mongrel] versioning of win32 versus ruby gems In-Reply-To: <3a2de0cd0612211113h7ed03674k7ebf877c5e93e9b0@mail.gmail.com> References: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> <458AD72B.6050203@berkeley.edu> <3a2de0cd0612211113h7ed03674k7ebf877c5e93e9b0@mail.gmail.com> Message-ID: <20061221183025.81fb57c5.zedshaw@zedshaw.com> On Thu, 21 Dec 2006 14:13:12 -0500 "Charles Brian Quinn" wrote: > Thanks Steven, > > This is using Jamis' net/ssh library and using: > > sudo cmd do |channel, stream, data| > data.each_line do | line | > > to regex match lines and type in input. this could work, but i was > hoping for bash or something simpler.... > > Guess that means it's time to move my all of my shell scripts over to > ruby (except for the one that installs ruby) ;-) You know you can make your own gem source right? I think that'd be a hell of a lot better for provisioning a bunch of machines than pulling the stuff of the internet. Take a look in the Rakefile for mongrel at the gem_source target. All you do is grab all the .gem files your systems need, then run the gem indexing tool and rsync them up to your own web server. After that, you just setup all your scripts to always grab from there instead of the internet. Should speed things up and you can even do different sources for win32 vs. unix gems. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From turnip at turnipspatch.com Thu Dec 21 17:15:20 2006 From: turnip at turnipspatch.com (Jonathan Leighton) Date: Thu, 21 Dec 2006 22:15:20 +0000 Subject: [Mongrel] Rails' send_file, Mongrel, and *gasp* memory Message-ID: <1166739320.12307.11.camel@localhost.localdomain> I've had a right fun few days at work trying to figure out why our Rails app (which isn't under very heavy load) kept eating memory and bringing our server to our knees. Eventually I traced it to send_file (which was in a way a relief as it wasn't down to my coding ;) -- every time a user started downloading, the memory consumed by the app would jump, and wouldn't go down again, even when they had cancelled the download (I haven't tested whether the memory would still be consumed after they completed the download). This has become apparent recently as the app has been used for larger files (150MB and upwards). As a fix I've delegated file serving to lighttpd + mod_sec_download, not quite as convenient but probably better in the long run anyway. So the problem is solved, but I was just wondering why this happened in the first place; according to the Rails docs, send_file buffers the response in order to not tie up memory. However, this was clearly not happening -- is this possibly related to how Mongrel interacts with Rails? If so, I gave it a try under lighttpd and still had the problem, any idea why? I'm really just looking to understand the issue better as I hate to walk away from a problem without fully comprehending it :) Thanks, -- Jonathan Leighton, Web Developer Portfolio: http://jonathanleighton.com/ Personal: http://turnipspatch.com/ From gitte at wange.dk Thu Dec 21 20:49:08 2006 From: gitte at wange.dk (Gitte Wange) Date: Fri, 22 Dec 2006 02:49:08 +0100 Subject: [Mongrel] Zed, you're a moron :-) Message-ID: <75F90450-CDAA-4BB2-BE16-18849D1B9DD2@wange.dk> Hi ! My mongrel just starting spitting out these nice lines: The error occured while evaluating nil.accept. TELL ZED HE'S A MORON. !!!!!! UNHANDLED EXCEPTION! You have a nil object when you didn't expect it! Not sure what happened or why, but just FYI: Zed, you are a moron :-) Happy holidays! Gitte Wange From ezmobius at gmail.com Thu Dec 21 21:34:29 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 21 Dec 2006 18:34:29 -0800 Subject: [Mongrel] Rails' send_file, Mongrel, and *gasp* memory In-Reply-To: <1166739320.12307.11.camel@localhost.localdomain> References: <1166739320.12307.11.camel@localhost.localdomain> Message-ID: <3BCFDA3A-809C-4A03-BF64-B54A9034DDE0@brainspl.at> On Dec 21, 2006, at 2:15 PM, Jonathan Leighton wrote: > I've had a right fun few days at work trying to figure out why our > Rails > app (which isn't under very heavy load) kept eating memory and > bringing > our server to our knees. Eventually I traced it to send_file (which > was > in a way a relief as it wasn't down to my coding ;) -- every time a > user > started downloading, the memory consumed by the app would jump, and > wouldn't go down again, even when they had cancelled the download (I > haven't tested whether the memory would still be consumed after they > completed the download). This has become apparent recently as the app > has been used for larger files (150MB and upwards). As a fix I've > delegated file serving to lighttpd + mod_sec_download, not quite as > convenient but probably better in the long run anyway. > > So the problem is solved, but I was just wondering why this > happened in > the first place; according to the Rails docs, send_file buffers the > response in order to not tie up memory. However, this was clearly not > happening -- is this possibly related to how Mongrel interacts with > Rails? If so, I gave it a try under lighttpd and still had the > problem, > any idea why? I'm really just looking to understand the issue > better as > I hate to walk away from a problem without fully comprehending it :) > > Thanks, > > -- > Jonathan Leighton, Web Developer Hey - The rails send_file method is not the same thing as setting an X- SendFile header. If you are already using lighttpd for your server then your in good shape. THe rails send_file method actually does read the whole file into memory as it sends it to the client. SO you will see memory problems like you have if you use it on large files. The nice way to do it is to use the X-SendFile header in lighty. In a rails action that just wants to serve a static file from somewhere off the filesystem you can make it look like this: def download file = File.find params[:file] # or whatever response.headers["X-Sendfile"] = file.path render :nothing => true end When you enable X-SendFIle support in lighty it will see this empty response with just headers set and lighty will serve the static file fast. Here is a good blog post about something similar: http://blog.craz8.com/articles/2006/11/13/lighttpd-proxy-with-x- sendfile-and-action_cache CHeers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From mongrel at philip.pjkh.com Thu Dec 21 21:52:18 2006 From: mongrel at philip.pjkh.com (Philip Hallstrom) Date: Thu, 21 Dec 2006 20:52:18 -0600 (CST) Subject: [Mongrel] Rails' send_file, Mongrel, and *gasp* memory In-Reply-To: <1166739320.12307.11.camel@localhost.localdomain> References: <1166739320.12307.11.camel@localhost.localdomain> Message-ID: <20061221205131.N98588@bravo.pjkh.com> > I've had a right fun few days at work trying to figure out why our Rails > app (which isn't under very heavy load) kept eating memory and bringing > our server to our knees. Eventually I traced it to send_file (which was > in a way a relief as it wasn't down to my coding ;) -- every time a user > started downloading, the memory consumed by the app would jump, and > wouldn't go down again, even when they had cancelled the download (I > haven't tested whether the memory would still be consumed after they > completed the download). This has become apparent recently as the app > has been used for larger files (150MB and upwards). As a fix I've > delegated file serving to lighttpd + mod_sec_download, not quite as > convenient but probably better in the long run anyway. > > So the problem is solved, but I was just wondering why this happened in > the first place; according to the Rails docs, send_file buffers the > response in order to not tie up memory. However, this was clearly not > happening -- is this possibly related to how Mongrel interacts with > Rails? If so, I gave it a try under lighttpd and still had the problem, > any idea why? I'm really just looking to understand the issue better as > I hate to walk away from a problem without fully comprehending it :) You don't say it, but are you using the sendfile gem? There was a lot of talk about there being serious problems with the sendfile gem on various platforms to the point that Zed explicitly told people to stop using it.... Just a thought. From zedshaw at zedshaw.com Fri Dec 22 00:57:39 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 21 Dec 2006 21:57:39 -0800 Subject: [Mongrel] Zed, you're a moron :-) In-Reply-To: <75F90450-CDAA-4BB2-BE16-18849D1B9DD2@wange.dk> References: <75F90450-CDAA-4BB2-BE16-18849D1B9DD2@wange.dk> Message-ID: <20061221215739.b4b5a022.zedshaw@zedshaw.com> Oh sweet! You win the prize. What version of stuff are you running? Can you come hang out with me in http://www.lingr.com/room/3yXhqKbfPy8 to debug it? Thanks for reporting it. That's a first. On Fri, 22 Dec 2006 02:49:08 +0100 Gitte Wange wrote: > Hi ! > > My mongrel just starting spitting out these nice lines: > The error occured while evaluating nil.accept. TELL ZED HE'S A MORON. > !!!!!! UNHANDLED EXCEPTION! You have a nil object when you didn't > expect it! > > Not sure what happened or why, but just FYI: Zed, you are a moron :-) -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Dec 22 01:03:19 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 21 Dec 2006 22:03:19 -0800 Subject: [Mongrel] Zed, you're a moron :-) In-Reply-To: <75F90450-CDAA-4BB2-BE16-18849D1B9DD2@wange.dk> References: <75F90450-CDAA-4BB2-BE16-18849D1B9DD2@wange.dk> Message-ID: <20061221220319.1d16a9aa.zedshaw@zedshaw.com> It looks like the server's internal @socket was set to nil somehow. Do this for me on your servers: 1) Start them up like normal in production mode. 2) killall -USR1 mongrel_rails Let it run, and when you hit this error again you'll get a stack trace. Send that to me so I can fix it. Thanks. On Fri, 22 Dec 2006 02:49:08 +0100 Gitte Wange wrote: > Hi ! > > My mongrel just starting spitting out these nice lines: > The error occured while evaluating nil.accept. TELL ZED HE'S A MORON. > !!!!!! UNHANDLED EXCEPTION! You have a nil object when you didn't > expect it! > > Not sure what happened or why, but just FYI: Zed, you are a moron :-) > > > > Happy holidays! > Gitte Wange > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jeremy at bitsweat.net Thu Dec 21 22:09:33 2006 From: jeremy at bitsweat.net (Jeremy Kemper) Date: Thu, 21 Dec 2006 19:09:33 -0800 Subject: [Mongrel] Rails' send_file, Mongrel, and *gasp* memory In-Reply-To: <3BCFDA3A-809C-4A03-BF64-B54A9034DDE0@brainspl.at> References: <1166739320.12307.11.camel@localhost.localdomain> <3BCFDA3A-809C-4A03-BF64-B54A9034DDE0@brainspl.at> Message-ID: <69a2885c0612211909w582cf83cn971d606734f384fc@mail.gmail.com> On 12/21/06, Ezra Zygmuntowicz wrote: > > The rails send_file method is not the same thing as setting an X- > SendFile header. If you are already using lighttpd for your server > then your in good shape. THe rails send_file method actually does > read the whole file into memory as it sends it to the client. SO you > will see memory problems like you have if you use it on large files. > The nice way to do it is to use the X-SendFile header in lighty. In a > rails action that just wants to serve a static file from somewhere > off the filesystem you can make it look like this: To be clear, send_file does not read the whole file into memory -- it blows chunks into the output stream. Mongrel and pure-Ruby FastCGI use StringIO to buffer the response before sending it to the client. X-Sendfile is definitely the way to go in any case. jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061221/bcb96031/attachment-0001.html From zedshaw at zedshaw.com Fri Dec 22 03:06:22 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 22 Dec 2006 00:06:22 -0800 Subject: [Mongrel] Rails' send_file, Mongrel, and *gasp* memory In-Reply-To: <69a2885c0612211909w582cf83cn971d606734f384fc@mail.gmail.com> References: <1166739320.12307.11.camel@localhost.localdomain> <3BCFDA3A-809C-4A03-BF64-B54A9034DDE0@brainspl.at> <69a2885c0612211909w582cf83cn971d606734f384fc@mail.gmail.com> Message-ID: <20061222000622.866790c2.zedshaw@zedshaw.com> On Thu, 21 Dec 2006 19:09:33 -0800 "Jeremy Kemper" wrote: > On 12/21/06, Ezra Zygmuntowicz wrote: > > > > The rails send_file method is not the same thing as setting an X- > > SendFile header. If you are already using lighttpd for your server > > then your in good shape. THe rails send_file method actually does > > read the whole file into memory as it sends it to the client. SO you > > will see memory problems like you have if you use it on large files. > > The nice way to do it is to use the X-SendFile header in lighty. In a > > rails action that just wants to serve a static file from somewhere > > off the filesystem you can make it look like this: > > > To be clear, send_file does not read the whole file into memory -- it blows > chunks into the output stream. Mongrel and pure-Ruby FastCGI use StringIO to > buffer the response before sending it to the client. > > X-Sendfile is definitely the way to go in any case. Just to be extra clear, neither of the two main systems for hosting Rails would need to buffer the output if Rails didn't alternate between sending headers and body content. And yes, X-Sendfile is the way to go. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From brad at bradediger.com Thu Dec 21 22:17:18 2006 From: brad at bradediger.com (Brad Ediger) Date: Thu, 21 Dec 2006 21:17:18 -0600 Subject: [Mongrel] Zed, you're a moron :-) In-Reply-To: <20061221215739.b4b5a022.zedshaw@zedshaw.com> References: <75F90450-CDAA-4BB2-BE16-18849D1B9DD2@wange.dk> <20061221215739.b4b5a022.zedshaw@zedshaw.com> Message-ID: <84D910C3-3438-4C2A-AC1E-5C01CF1D1441@bradediger.com> Zed, please never stop writing software. :-) On Dec 21, 2006, at 11:57 PM, Zed A. Shaw wrote: > Oh sweet! You win the prize. What version of stuff are you > running? Can you come hang out with me in http://www.lingr.com/ > room/3yXhqKbfPy8 to debug it? > > Thanks for reporting it. That's a first. > > On Fri, 22 Dec 2006 02:49:08 +0100 > Gitte Wange wrote: > >> Hi ! >> >> My mongrel just starting spitting out these nice lines: >> The error occured while evaluating nil.accept. TELL ZED HE'S A >> MORON. >> !!!!!! UNHANDLED EXCEPTION! You have a nil object when you didn't >> expect it! >> >> Not sure what happened or why, but just FYI: Zed, you are a moron :-) > > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From luislavena at gmail.com Fri Dec 22 00:48:21 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 22 Dec 2006 02:48:21 -0300 Subject: [Mongrel] mongrel_service-0.3.1 problems - service will not start In-Reply-To: <918A0DD3EFA7F248BFBF447187F8A9320814F2@HOBVSISMS01.nashville.org> References: <918A0DD3EFA7F248BFBF447187F8A9320814F2@HOBVSISMS01.nashville.org> Message-ID: <71166b3b0612212148le6545e3oc5dd950d25dbefe9@mail.gmail.com> On 12/21/06, Ball, Donald A Jr (Library) wrote: > My bad, it appears to have been a permissions problem. When I change the > service from the system account to logon as myself, the service starts > nicely. Good to know was a permission problem (which often is, btw). You should check if your LocalSystem account have permissions to c:/ruby and the path of your application (check if SYSTEM is allowed in the Properties->Security of your folders). > And handles the segfault condition relatively gracefully (the > process terminates, closing the socket, but restarts). The only problem > I see now is that this abnormal condition does not appear in the > mongrel/rails log or in the windows event log. Is there somewhere else I > should be looking to find these? > It currently don't log information to any place, except internal information to c:/ruby/bin/servicefb.log and service.log. There is a problem with mongrel in the way it handles their logger. by default, unless you specify -d (daemonize), mongrel will "log" to STDOUT (which is console). Now, on windows there isn't daemonize functionality, so STDOUT & STDERR are lost on hidden consoles. I trick mongrel to think there is a valid console, and I created pipes that handle STDOUT and STDERR, but redirecting them to a file could raise a few issues (mostly with file locking on some cluster solutions). I'll try to find a solution by tomorrow, guess will not be at mongrel side, but mongrel_service, parsing the command line and redirecting both STDOUT/ERR to the specified logging file. Comments and suggestions on this are welcome. I'm glad that the process monitoring worked for someone besides me! ;-) Until tomorrow, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From luislavena at gmail.com Fri Dec 22 00:53:58 2006 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 22 Dec 2006 02:53:58 -0300 Subject: [Mongrel] why gem doesnt use CONFIG["arch"] In-Reply-To: <20061221221326.GC30204@replic.net> References: <3a2de0cd0612211038s2b8c2c6fy3674ffdfa8439136@mail.gmail.com> <20061221221326.GC30204@replic.net> Message-ID: <71166b3b0612212153o42304842le4afcae0d2bcde25@mail.gmail.com> On 12/21/06, carmen <_ at whats-your.name> wrote: > On Thu Dec 21, 2006 at 01:38:39PM -0500, Charles Brian Quinn wrote: > > I know we already mentioned this before on the list but I couldn't > > find it in the archives. Is there a way to differentiate the versions > > for ruby/mswin32 so that I could run a command like: > > > > # sudo gem install mongrel > > --source=http://mongrel.rubyforge.org/releases/ --include-dependencies > > --version 1.0 > > > > and have it not prompt me like this: > > > > Select which gem to install for your platform (i686-linux) > > 1. mongrel 1.0 (ruby) > > 2. mongrel 1.0 (mswin32) > > 3. Cancel installation > > > > my feeble attempts at scripting this and trying to automatically pipe > > or echo 1 into the installation are failing. > > > > Anyone know how to do this automatically > > > submit a patch to the rubygems package: > > m ~ # irb > irb(main):001:0> include Config > => Object > irb(main):002:0> CONFIG["arch"] > => "x86_64-linux" > irb(main):003:0> > > this should be enough for it to answer its own questions from now on... > > in the meantime, pay close attention when running 'gem install mongrel'. the ruby version of FastThread is 2), while the ruby version of mongrel is 1) .. > > by ruby version, do we meen UNIX version? thats a bit confusing. since presumably both versions have C code that is compiled to the platform (ie the 'ruby' choice isnt really pure-ruby) That is a problem, nor Zed or me could package precompiled versions of the gem to each platform supported by ruby. Also, each linux distro links against different version of glibc and with different shared libraries, which could turn things bad with a few segfaults due ABI incompatibilities. The "ruby" term used by rubygems could be interpreted as the simplest / plain gem that will work on any platform, if you could provide the conditions required for each particular case (like a compiler or another gem). In the case of mswin32, its also wrong, but is the only way to close the gap between users, and allow ppl without compilers or extensive C development knowledge use packages. I guess that couldn't and, from my POV, will not be fixed, at least on the gems I package or maintain. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From turnip at turnipspatch.com Fri Dec 22 03:57:16 2006 From: turnip at turnipspatch.com (Jonathan Leighton) Date: Fri, 22 Dec 2006 08:57:16 +0000 Subject: [Mongrel] Rails' send_file, Mongrel, and *gasp* memory In-Reply-To: <20061222000622.866790c2.zedshaw@zedshaw.com> References: <1166739320.12307.11.camel@localhost.localdomain> <3BCFDA3A-809C-4A03-BF64-B54A9034DDE0@brainspl.at> <69a2885c0612211909w582cf83cn971d606734f384fc@mail.gmail.com> <20061222000622.866790c2.zedshaw@zedshaw.com> Message-ID: <1166777837.13858.7.camel@localhost.localdomain> On Fri, 2006-12-22 at 00:06 -0800, Zed A. Shaw wrote: > > To be clear, send_file does not read the whole file into memory -- it blows > > chunks into the output stream. Mongrel and pure-Ruby FastCGI use StringIO to > > buffer the response before sending it to the client. > > > > X-Sendfile is definitely the way to go in any case. > > Just to be extra clear, neither of the two main systems for hosting Rails would need to buffer the output if Rails didn't alternate between sending headers and body content. > > And yes, X-Sendfile is the way to go. Thanks for all your responses. Just in case it makes a difference, I'll clarify about my setup. Basically we have an Apache on port 80 which can't be removed from the equation. The Rails app is served directly Apache -> Mongrel, and now I have made it so the /file/ path is proxied Apache -> lighttpd, which serves the files using mod_secdownload. I wasn't actually aware of X-Sendfile so that's interesting -- is this better, worse or equal to using mod_secdownload? I wouldn't have thought it made a difference as they both enable lighttpd to serve the static files, but if people think I should drop the mod_secdownload solution in favour of X-Sendfile I guess I could set up the application to go through lighttpd too. Thanks again, Jon From ms at pccl.info Fri Dec 22 04:48:49 2006 From: ms at pccl.info (Mark Somerville) Date: Fri, 22 Dec 2006 09:48:49 +0000 Subject: [Mongrel] [ANN] fastthread 0.5.3 In-Reply-To: <1166298500.6690.11.camel@localhost.localdomain> References: <1166298500.6690.11.camel@localhost.localdomain> Message-ID: <200612220948.50114.ms@pccl.info> On Saturday 16 December 2006 19:48, MenTaLguY wrote: > Unless someone finds more bugs, this version of fastthread will > eventually become 1.0. I don't know if this is a fastthread, mongrel or gems problem - it might not even be a problem! Since upgrading to fastthread 0.5.3.1 and mongrel 1.0RC1, I get a message - "fastthread not loaded: fastthread must be required before thread" - when starting my DRb upload server (detailed here: http://mongrel.rubyforge.org/docs/upload_progress.html). "require 'fastthread'" doesn't seem to alter anything. I haven't had time to fully check it out, but everything still appears to function alright, at least on my development box. Can anyone explain what's happening? How can I fix it, if I need to? Cheers, Mark From runner at berkeley.edu Fri Dec 22 09:03:29 2006 From: runner at berkeley.edu (Steven Hansen) Date: Fri, 22 Dec 2006 06:03:29 -0800 Subject: [Mongrel] Rails' send_file, Mongrel, and *gasp* memory In-Reply-To: <1166777837.13858.7.camel@localhost.localdomain> References: <1166739320.12307.11.camel@localhost.localdomain> <3BCFDA3A-809C-4A03-BF64-B54A9034DDE0@brainspl.at> <69a2885c0612211909w582cf83cn971d606734f384fc@mail.gmail.com> <20061222000622.866790c2.zedshaw@zedshaw.com> <1166777837.13858.7.camel@localhost.localdomain> Message-ID: <458BE5B1.9070102@berkeley.edu> Hi Jon, I don't know much about mod_secdownload, but I do know that both apache2.x.x and lighttpd can use the X-Sendfile header. See: http://celebnamer.celebworld.ws/stuff/mod_xsendfile/ I have an Apache -> Mongrel setup where I've installed mod_xsendfile for apache. When you want to send a file to the user simply do something like: response.headers['Content-Type'] = "application/force-download" response.headers['Content-Disposition'] = "attachment; filename=\"#{file.short_name}\"" response.headers["X-Sendfile"] = file.name response.headers['Content-length'] = file.size_in_bytes apache will then step in and serve the file. Regards, Steven Jonathan Leighton wrote: > On Fri, 2006-12-22 at 00:06 -0800, Zed A. Shaw wrote: > >>> To be clear, send_file does not read the whole file into memory -- it blows >>> chunks into the output stream. Mongrel and pure-Ruby FastCGI use StringIO to >>> buffer the response before sending it to the client. >>> >>> X-Sendfile is definitely the way to go in any case. >>> >> Just to be extra clear, neither of the two main systems for hosting Rails would need to buffer the output if Rails didn't alternate between sending headers and body content. >> >> And yes, X-Sendfile is the way to go. >> > > Thanks for all your responses. Just in case it makes a difference, I'll > clarify about my setup. Basically we have an Apache on port 80 which > can't be removed from the equation. The Rails app is served directly > Apache -> Mongrel, and now I have made it so the /file/ path is proxied > Apache -> lighttpd, which serves the files using mod_secdownload. I > wasn't actually aware of X-Sendfile so that's interesting -- is this > better, worse or equal to using mod_secdownload? I wouldn't have thought > it made a difference as they both enable lighttpd to serve the static > files, but if people think I should drop the mod_secdownload solution in > favour of X-Sendfile I guess I could set up the application to go > through lighttpd too. > > Thanks again, > > Jon > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From ezmobius at gmail.com Fri Dec 22 13:32:43 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 22 Dec 2006 10:32:43 -0800 Subject: [Mongrel] [ANN] fastthread 0.5.3 In-Reply-To: <200612220948.50114.ms@pccl.info> References: <1166298500.6690.11.camel@localhost.localdomain> <200612220948.50114.ms@pccl.info> Message-ID: On Dec 22, 2006, at 1:48 AM, Mark Somerville wrote: > On Saturday 16 December 2006 19:48, MenTaLguY wrote: >> Unless someone finds more bugs, this version of fastthread will >> eventually become 1.0. > > I don't know if this is a fastthread, mongrel or gems problem - it > might not > even be a problem! > > Since upgrading to fastthread 0.5.3.1 and mongrel 1.0RC1, I get a > message - "fastthread not loaded: fastthread must be required before > thread" - when starting my DRb upload server (detailed here: > http://mongrel.rubyforge.org/docs/upload_progress.html). "require > 'fastthread'" > doesn't seem to alter anything. I haven't had time to fully check > it out, but > everything still appears to function alright, at least on my > development box. > > Can anyone explain what's happening? How can I fix it, if I need to? > > Cheers, > > Mark Mark- When you require 'drb' drb in turn requires thread. If you are using fastthread you must require it before thread gets required thats just the way it works. So in your drb server code file you need to do this: require 'rubygems' require 'fastthread' then require drb and anything else you need. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From careo at fastmail.fm Fri Dec 22 20:50:45 2006 From: careo at fastmail.fm (Dane Jensen) Date: Fri, 22 Dec 2006 17:50:45 -0800 Subject: [Mongrel] exception logging Message-ID: <039AD8A9-3453-48AF-98BD-A82F3190D49B@fastmail.fm> Hi all- I'm running mongrel with a tiny HttpHandler that hooks into a larger library I'm working on. I've run into a snag with trying to debug with it in that I'm not entirely sure how to get the exception logs of errors that are raised. All I get to stderr is this: Fri Dec 22 17:16:14 -0800 2006: ERROR: Couldn't find Models::Contact without an ID While I like knowing an error occurred, I'd really really really love to know where and be able to find why. I'm probably missing something simple in the docs, but how do I turn this on or set it up? Thanks, -Dane From zedshaw at zedshaw.com Fri Dec 22 23:53:54 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 22 Dec 2006 20:53:54 -0800 Subject: [Mongrel] exception logging In-Reply-To: <039AD8A9-3453-48AF-98BD-A82F3190D49B@fastmail.fm> References: <039AD8A9-3453-48AF-98BD-A82F3190D49B@fastmail.fm> Message-ID: <20061222205354.8d304f5e.zedshaw@zedshaw.com> On Fri, 22 Dec 2006 17:50:45 -0800 Dane Jensen wrote: > Hi all- > > I'm running mongrel with a tiny HttpHandler that hooks into a larger > library I'm working on. I've run into a snag with trying to debug > with it in that I'm not entirely sure how to get the exception logs > of errors that are raised. > > All I get to stderr is this: > Fri Dec 22 17:16:14 -0800 2006: ERROR: Couldn't find Models::Contact > without an ID > > While I like knowing an error occurred, I'd really really really love > to know where and be able to find why. > > I'm probably missing something simple in the docs, but how do I turn > this on or set it up? Yep Dane, for the folks who want the exceptions in production (or even just development) you just hit your process with: killall -USR1 mongrel_rails Or send USR1 to a specific mongrel process to get it's light debug output. This is fast enough to run in production mode in case you have a problem you need to debug that only shows up there. When you get the stack trace send it to me. You really should be seeing errors like that at the Mongrel level but rather you should see them at the Rails level. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From curio at free.fr Sat Dec 23 14:30:03 2006 From: curio at free.fr (=?ISO-8859-1?Q?Fran=E7ois_SIMOND?=) Date: Sat, 23 Dec 2006 20:30:03 +0100 Subject: [Mongrel] Spawn mongrel on demand Message-ID: <458D83BB.70401@free.fr> Hello Zed ! Do you knows or plan a way to spawn mongrel processes on demand ? I'm studying options to build an affordable but solid shared hosting solution. You wrote something very promising in your "NEXT STEPS", A combination of the '"mostly C version' and the mongrel_cluster replacement would be an elegant method to save much RAM on servers (until Rails is thread-safe). FastCGI implementations for Apache are good at this. Similar features (min-max processes, idle time before stopping a process, zombie check) for mongrel would be enjoyable :) .. just like inetd many years ago ;) -- Francois Simond Paris on Rails 2006 Speaker : "High availability hosting for ruby on rails" From zedshaw at zedshaw.com Sat Dec 23 23:48:29 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Sat, 23 Dec 2006 20:48:29 -0800 Subject: [Mongrel] Spawn mongrel on demand In-Reply-To: <458D83BB.70401@free.fr> References: <458D83BB.70401@free.fr> Message-ID: <20061223204829.096cdb1c.zedshaw@zedshaw.com> On Sat, 23 Dec 2006 20:30:03 +0100 Fran?ois SIMOND wrote: > Hello Zed ! > > Do you knows or plan a way to spawn mongrel processes on demand ? There's a yes and no answer to your question. The "no" is that on demand spawning isn't a good way to plan your systems. Leaving system usage levels and resource allocation to a program only works for simple stuff. The second you get dugg or slashdotted and your fancy on-demand-spawner goes insane you'll understand why. Typically though this is a problem that geeks *love* to try to solve. Every one of them has burned to the ground trying to do it though. Talk to anyone who's been through Apache on-demand tuning and the deadly oomkiller to find out how nasty this strategy is. Instead, it's better to calculate the resources you have and the processes you'll need to meet your processing demands. Then, monitoring your systems to make sure they're operating within your planned limits helps to identify when this isn't working anymore. At that point your replan and roll out more hardware or some other redesign. I'm sure though all the overly smart people in the room will go insane trying to solve this, so before you do read this: http://www.fudco.com/habitat/archives/000056.html > I'm studying options to build an affordable but solid shared hosting > solution. > > You wrote something very promising in your "NEXT STEPS", > A combination of the '"mostly C version' and the mongrel_cluster > replacement would be an elegant method to save much RAM on servers > (until Rails is thread-safe). So this is the "yes" part of my answer. While I think on-demand spawning is retarded and hasn't worked in practice for any serious activity, there does need to be a much better process management strategy for Mongrel. Nothing's defined yet, but the goal is to make managing process *manually* for mongrel very easy. It won't do on-demand scaling, or try to be smart, but instead just make it easy to flexibly control what processes are running and how many. In your situation of a shared hosting provider, I think you'd be able to setup an interface that allows your customers to pay for a temporary boost and then tell their mongrel cluster to boost up by that amount for that time. > FastCGI implementations for Apache are good at this. > Similar features (min-max processes, idle time before stopping a > process, zombie check) for mongrel would be enjoyable :) > > .. just like inetd many years ago ;) Oh man, do people really not remember their history? This attempt to manage fcgi and doing it poorly is the reason people end up writing their own monitoring software or using something like monit or runit. This just doesn't work. The idea is attractive, but in practice the tools available to monitor and control processes just suck. So, hopefully a middle ground of simple flexible manual process control will be a better solution. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From careo at fastmail.fm Sun Dec 24 01:39:58 2006 From: careo at fastmail.fm (Dane Jensen) Date: Sat, 23 Dec 2006 22:39:58 -0800 Subject: [Mongrel] exception logging In-Reply-To: <20061222205354.8d304f5e.zedshaw@zedshaw.com> References: <039AD8A9-3453-48AF-98BD-A82F3190D49B@fastmail.fm> <20061222205354.8d304f5e.zedshaw@zedshaw.com> Message-ID: On Dec 22, 2006, at 8:53 PM, Zed A. Shaw wrote: > On Fri, 22 Dec 2006 17:50:45 -0800 > Dane Jensen wrote: > >> Hi all- >> >> I'm running mongrel with a tiny HttpHandler that hooks into a larger >> library I'm working on. I've run into a snag with trying to debug >> with it in that I'm not entirely sure how to get the exception logs >> of errors that are raised. >> >> All I get to stderr is this: >> Fri Dec 22 17:16:14 -0800 2006: ERROR: Couldn't find Models::Contact >> without an ID >> >> While I like knowing an error occurred, I'd really really really love >> to know where and be able to find why. >> >> I'm probably missing something simple in the docs, but how do I turn >> this on or set it up? > > Yep Dane, for the folks who want the exceptions in production (or > even just development) you just hit your process with: > > killall -USR1 mongrel_rails > > Or send USR1 to a specific mongrel process to get it's light debug > output. This is fast enough to run in production mode in case you > have a problem you need to debug that only shows up there. > > When you get the stack trace send it to me. You really should be > seeing errors like that at the Mongrel level but rather you should > see them at the Rails level. Zed- Thanks for pointing me towards the USR1 signal. I'm not running mongrel_rails, as I'm not using Rails, and USR1 killed the process outright. I thought that was strange (especially because I recall seeing mongrel spit out something about setting up signal handlers at one point on another project....) and dug into the source. Turns out I needed a simple 'config.setup_signals' before my 'config.join' in my handler. Oops. Thanks! -Dane From ryansking at gmail.com Sun Dec 24 02:38:07 2006 From: ryansking at gmail.com (Ryan King) Date: Sun, 24 Dec 2006 01:38:07 -0600 Subject: [Mongrel] Using a network drive to share files between Mongrel/Rails instances...? In-Reply-To: <6319C916-EB38-4C5D-A9FA-7AAF101DB182@mac.com> References: <45866DB9.7030703@interkonect.com> <6319C916-EB38-4C5D-A9FA-7AAF101DB182@mac.com> Message-ID: <846f30c70612232338x310f08d6l4b25829559bb3f36@mail.gmail.com> On 12/18/06, kigsteronline at mac.com wrote: > > If you are creating these files, but not really deleting them by the > application in real time, you may consider writing them locally on > each server to a given directory, and serving them from another local > directory, which is populated by a periodic script. The script would > run on each participating machine and would clone a batch of newly > created files to each participating server. More management > overhead, but if you are running a mission critical and performance > hungry application with lots of components, that would be my first > choice. For this, I'd reccomend rdist [1]. With a little bit of work, you could produce the files on one of the machines and easily distribute them to other machines. -ryan 1. http://www.magnicomp.com/rdist/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061224/bc66bc0c/attachment.html From zedshaw at zedshaw.com Mon Dec 25 01:53:30 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Sun, 24 Dec 2006 22:53:30 -0800 Subject: [Mongrel] What I Want For Christmas Message-ID: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Calling All Mongrel Minions! I wanna have some fun and would like this as a Christmas present. The site http://www.workingwithrails.com/ has this lame popularity system that's kind of irking some of the main Ruby contributors. I think it's kind of funny, but would like to demonstrate what an army of motivated people can do to these kinds of popularity contests. So, as a present to me, I'd love for everyone to go vote for me on the site. If you can, use fictional or historical characters for your profiles to add to the chaos. The goal is to put me so far ahead of everyone else that they have to reset the system. It's a Chaos Christmas Calamity! You can recommend me by just clicking: http://www.workingwithrails.com/recommendation/new/person/5455-zed-shaw Or, do it by going to: http://www.workingwithrails.com/person/5455-zed-shaw And clicking the difficult to read link in the gray box that says you like me (you really like me!) To sweeten the deal, I'll take all the people who contribute to the mayhem and put them into a lottery to receive 10 of the very first MUDCRAP-CE certificates signed by myself. Now that's a hot deal! Merry Christmas, or happy holidays if you don't celebrate. P.S. I'm *not* promoting or affiliated with the site. I think it's mildly amusing. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From michael.dauria at gmail.com Mon Dec 25 02:10:36 2006 From: michael.dauria at gmail.com (Michael D'Auria) Date: Mon, 25 Dec 2006 02:10:36 -0500 Subject: [Mongrel] What I Want For Christmas In-Reply-To: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Message-ID: <1907e2ca0612242310p4689464by7291d0f16c299002@mail.gmail.com> How could i not recommend the creator on Mongrel? :) On 12/25/06, Zed A. Shaw wrote: > > Calling All Mongrel Minions! > > I wanna have some fun and would like this as a Christmas present. The > site http://www.workingwithrails.com/ has this lame popularity system > that's kind of irking some of the main Ruby contributors. I think it's kind > of funny, but would like to demonstrate what an army of motivated people can > do to these kinds of popularity contests. > > So, as a present to me, I'd love for everyone to go vote for me on the > site. If you can, use fictional or historical characters for your profiles > to add to the chaos. The goal is to put me so far ahead of everyone else > that they have to reset the system. It's a Chaos Christmas Calamity! > > You can recommend me by just clicking: > > http://www.workingwithrails.com/recommendation/new/person/5455-zed-shaw > > Or, do it by going to: > > http://www.workingwithrails.com/person/5455-zed-shaw > > And clicking the difficult to read link in the gray box that says you like > me (you really like me!) > > To sweeten the deal, I'll take all the people who contribute to the mayhem > and put them into a lottery to receive 10 of the very first MUDCRAP-CE > certificates signed by myself. Now that's a hot deal! > > Merry Christmas, or happy holidays if you don't celebrate. > > P.S. I'm *not* promoting or affiliated with the site. I think it's mildly > amusing. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061225/5245ac36/attachment.html From mi-mongrel at moensolutions.com Mon Dec 25 02:42:53 2006 From: mi-mongrel at moensolutions.com (Michael Moen) Date: Sun, 24 Dec 2006 23:42:53 -0800 Subject: [Mongrel] What I Want For Christmas In-Reply-To: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Message-ID: Happy Holidays Zed- You have recommended Zed Shaw. (Change) With the comment: Ruby world yoda is Zed Shaw. It's the best I could come up with at this point in the weekend ;) Hopefully you get this before New Years, my Mongrel posts seem to lag quite a bit. Michael- From zedshaw at zedshaw.com Mon Dec 25 03:46:49 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 25 Dec 2006 00:46:49 -0800 Subject: [Mongrel] What I Want For Christmas In-Reply-To: <1907e2ca0612242310p4689464by7291d0f16c299002@mail.gmail.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <1907e2ca0612242310p4689464by7291d0f16c299002@mail.gmail.com> Message-ID: <20061225004649.b5a160aa.zedshaw@zedshaw.com> On Mon, 25 Dec 2006 02:10:36 -0500 "Michael D'Auria" wrote: > How could i not recommend the creator on Mongrel? :) I know, what the hell has Rick Olson done anyway? :-) Thanks for voting! If we work together we can defeat the demon of Bogus Rating Systems. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Mon Dec 25 03:47:27 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 25 Dec 2006 00:47:27 -0800 Subject: [Mongrel] What I Want For Christmas In-Reply-To: References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Message-ID: <20061225004727.e3fb22b5.zedshaw@zedshaw.com> On Sun, 24 Dec 2006 23:42:53 -0800 Michael Moen wrote: > Happy Holidays Zed- > > You have recommended Zed Shaw. (Change) > With the comment: Ruby world yoda is Zed Shaw. > > It's the best I could come up with at this point in the weekend ;) > > Hopefully you get this before New Years, my Mongrel posts seem to lag > quite a bit. Ha, funny. Yeah I think rubyforge has some issues with it's mail stuff at times. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Mon Dec 25 04:35:52 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 25 Dec 2006 01:35:52 -0800 Subject: [Mongrel] What I Want For Christmas In-Reply-To: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Message-ID: <20061225013552.4cd17022.zedshaw@zedshaw.com> Profile Update! I couldn't resist adding to the mayhem: http://www.workingwithrails.com/person/5455-zed-shaw -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From turnip at turnipspatch.com Mon Dec 25 05:54:36 2006 From: turnip at turnipspatch.com (Jonathan Leighton) Date: Mon, 25 Dec 2006 10:54:36 +0000 Subject: [Mongrel] What I Want For Christmas In-Reply-To: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Message-ID: <1167044076.1145.1.camel@localhost.localdomain> Haha... this is hilarious, I hope you make it - I do think their popularity feature is totally the wrong attitude. You have my recommendation ;) Merry Christmas everyone! On Sun, 2006-12-24 at 22:53 -0800, Zed A. Shaw wrote: > Calling All Mongrel Minions! > > I wanna have some fun and would like this as a Christmas present. The site http://www.workingwithrails.com/ has this lame popularity system that's kind of irking some of the main Ruby contributors. I think it's kind of funny, but would like to demonstrate what an army of motivated people can do to these kinds of popularity contests. > > So, as a present to me, I'd love for everyone to go vote for me on the site. If you can, use fictional or historical characters for your profiles to add to the chaos. The goal is to put me so far ahead of everyone else that they have to reset the system. It's a Chaos Christmas Calamity! > > You can recommend me by just clicking: > > http://www.workingwithrails.com/recommendation/new/person/5455-zed-shaw > > Or, do it by going to: > > http://www.workingwithrails.com/person/5455-zed-shaw > > And clicking the difficult to read link in the gray box that says you like me (you really like me!) > > To sweeten the deal, I'll take all the people who contribute to the mayhem and put them into a lottery to receive 10 of the very first MUDCRAP-CE certificates signed by myself. Now that's a hot deal! > > Merry Christmas, or happy holidays if you don't celebrate. > > P.S. I'm *not* promoting or affiliated with the site. I think it's mildly amusing. > -- Jonathan Leighton, Web Developer Portfolio: http://jonathanleighton.com/ Personal: http://turnipspatch.com/ From jw at innerewut.de Mon Dec 25 07:18:22 2006 From: jw at innerewut.de (Jonathan Weiss) Date: Mon, 25 Dec 2006 13:18:22 +0100 Subject: [Mongrel] What I Want For Christmas In-Reply-To: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Message-ID: <458FC18E.9080004@innerewut.de> Zed A. Shaw wrote: > You can recommend me by just clicking: > > http://www.workingwithrails.com/recommendation/new/person/5455-zed-shaw I would do anything for a MUDCRAP-CE certificate :-) Jonathan -- Jonathan Weiss http://blog.innerewut.de From eugenol at gmail.com Mon Dec 25 09:30:50 2006 From: eugenol at gmail.com (Eugenol) Date: Mon, 25 Dec 2006 15:30:50 +0100 Subject: [Mongrel] Definitive guide for upload progress Message-ID: <8a7ce02e0612250630x68c21d2etba371bf3aeec818e@mail.gmail.com> Hi Is there some definitive guide for upload progress plugin ? We have in this mailing list a lot of testimonials, bug reports, bug fixes, but there are still people like me who cannot use it correctly. Here is my config: - mongrel 1.0RC and upload progress plugin 0.2.1 - a 6 mongrels cluster - config/mongrel_upload_progress.conf: uri "/", :handler => plugin("/handlers/upload", :path_info => '/upload/index', :frequency => 1, :drb => 'druby://0.0.0.0:2999'), :in_front => true - After each cap deployment I manually launch ruby www/current/lib/upload.rb (yes that sucks) require 'rubygems' require 'fastthread' require 'drb' require 'gem_plugin' GemPlugin::Manager.instance.load 'mongrel' => GemPlugin::INCLUDE DRb.start_service 'druby://0.0.0.0:2999', Mongrel::UploadProgress.new DRb.thread.join And all I get during upload ajax process are raised errors: "A NameError occurred in upload#progress: uninitialized constant Mongrel::Uploads". Status remains at 0% and picture is uploaded. The DRb client always lists an empty array during uploads (get_status.list). And in the rails controller I tried: def progress render :update do |page| @status = Mongrel::Uploads.instance.check(params[:upload_id]) page.upload_progress.update(@status['size'], @status['received']) if @status end end as well as the "original" def progress render :update do |page| page.upload_progress.update @status[:size], @status[:received] end if @status = Mongrel::Uploads.check(params[:upload_id]) end Any idea ? Thanks for your help From zedshaw at zedshaw.com Mon Dec 25 17:21:45 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 25 Dec 2006 14:21:45 -0800 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> Message-ID: <20061225142145.2e478066.zedshaw@zedshaw.com> We're at 93 people. That will put me at #2 tonight when the new stats are calculated. But that still isn't enough to dethrone The King of the Internet. Keep on recommending me so we can do this! http://www.workingwithrails.com/recommendation/new/person/5455-zed-shaw To recommend me. And remember, everyone goes into a raffle for 10 MUDCRAP-CE certificates signed by me. And in case you wondered, here's my platform explaining why you should vote for me: http://www.zedshaw.com/blog/2006-12-25.html Merry Christmas! -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From anjan.summit at gmail.com Mon Dec 25 20:30:59 2006 From: anjan.summit at gmail.com (anjan bacchu) Date: Mon, 25 Dec 2006 17:30:59 -0800 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: <20061225142145.2e478066.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <20061225142145.2e478066.zedshaw@zedshaw.com> Message-ID: +1 : voted for you ? Is there a central repository of all the comments left for you ? BR, ~A On 12/25/06, Zed A. Shaw wrote: > > We're at 93 people. That will put me at #2 tonight when the new stats are > calculated. But that still isn't enough to dethrone The King of the > Internet. Keep on recommending me so we can do this! > > http://www.workingwithrails.com/recommendation/new/person/5455-zed-shaw > > To recommend me. And remember, everyone goes into a raffle for 10 > MUDCRAP-CE certificates signed by me. > > And in case you wondered, here's my platform explaining why you should > vote for me: > > http://www.zedshaw.com/blog/2006-12-25.html > > Merry Christmas! > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- BR, Anjan Bacchu Summit Information Systems -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061225/1639407e/attachment.html From technoweenie at gmail.com Mon Dec 25 21:17:14 2006 From: technoweenie at gmail.com (Rick Olson) Date: Mon, 25 Dec 2006 20:17:14 -0600 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <20061225142145.2e478066.zedshaw@zedshaw.com> Message-ID: <48fe25b0612251817t48da6533va02595a0432864c7@mail.gmail.com> On 12/25/06, anjan bacchu wrote: > +1 : voted for you ? Is there a central repository of all the comments left > for you ? http://workingwithrails.com/recommendation/for/person/5455-zed-shaw 107 now! -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com From zedshaw at zedshaw.com Mon Dec 25 21:18:38 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 25 Dec 2006 18:18:38 -0800 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <20061225142145.2e478066.zedshaw@zedshaw.com> Message-ID: <20061225181838.9f75dbe1.zedshaw@zedshaw.com> On Mon, 25 Dec 2006 17:30:59 -0800 "anjan bacchu" wrote: > +1 : voted for you ? Is there a central repository of all the comments left > for you ? Yes there is: http://www.workingwithrails.com/recommendation/for/person/5455-zed-shaw Thanks! -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From wayneeseguin at gmail.com Mon Dec 25 21:34:27 2006 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Mon, 25 Dec 2006 21:34:27 -0500 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: <20061225181838.9f75dbe1.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <20061225142145.2e478066.zedshaw@zedshaw.com> <20061225181838.9f75dbe1.zedshaw@zedshaw.com> Message-ID: <901C106A-7F48-4BB3-A2FF-D33DA7F82261@gmail.com> +2 votes for you! Quite Amusing. ~Wayne From carl.lerche at gmail.com Tue Dec 26 00:59:25 2006 From: carl.lerche at gmail.com (Carl Lerche) Date: Mon, 25 Dec 2006 21:59:25 -0800 Subject: [Mongrel] Definitive guide for upload progress In-Reply-To: <8a7ce02e0612250630x68c21d2etba371bf3aeec818e@mail.gmail.com> References: <8a7ce02e0612250630x68c21d2etba371bf3aeec818e@mail.gmail.com> Message-ID: This might sound dumb, but are you 100% sure you got the upload progress plugin installed? I had that exact same error when I tried launching a site on a new system and forgot to install the plugin. On 12/25/06, Eugenol wrote: > Hi > > Is there some definitive guide for upload progress plugin ? We have in > this mailing list a lot of testimonials, bug reports, bug fixes, but > there are still people like me who cannot use it correctly. > > Here is my config: > - mongrel 1.0RC and upload progress plugin 0.2.1 > - a 6 mongrels cluster > - config/mongrel_upload_progress.conf: > > uri "/", > :handler => plugin("/handlers/upload", > :path_info => '/upload/index', > :frequency => 1, > :drb => 'druby://0.0.0.0:2999'), > :in_front => true > > - After each cap deployment I manually launch ruby > www/current/lib/upload.rb (yes that sucks) > > require 'rubygems' > require 'fastthread' > require 'drb' > require 'gem_plugin' > GemPlugin::Manager.instance.load 'mongrel' => GemPlugin::INCLUDE > DRb.start_service 'druby://0.0.0.0:2999', Mongrel::UploadProgress.new > DRb.thread.join > > > > And all I get during upload ajax process are raised errors: "A > NameError occurred in upload#progress: uninitialized constant > Mongrel::Uploads". Status remains at 0% and picture is uploaded. > > The DRb client always lists an empty array during uploads (get_status.list). > > And in the rails controller I tried: > def progress > render :update do |page| > @status = Mongrel::Uploads.instance.check(params[:upload_id]) > page.upload_progress.update(@status['size'], > @status['received']) if @status > end > end > > as well as the "original" > > def progress > render :update do |page| > page.upload_progress.update @status[:size], @status[:received] > end if @status = Mongrel::Uploads.check(params[:upload_id]) > end > > > > Any idea ? > > Thanks for your help > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- EPA Rating: 3000 Lines of Code / Gallon (of coffee) From eugenol at gmail.com Tue Dec 26 11:50:18 2006 From: eugenol at gmail.com (Eugenol) Date: Tue, 26 Dec 2006 17:50:18 +0100 Subject: [Mongrel] Definitive guide for upload progress In-Reply-To: References: <8a7ce02e0612250630x68c21d2etba371bf3aeec818e@mail.gmail.com> Message-ID: <8a7ce02e0612260850k285534b4k2748a49a918a6d90@mail.gmail.com> On 12/26/06, Carl Lerche wrote: > This might sound dumb, but are you 100% sure you got the upload > progress plugin installed? I had that exact same error when I tried > launching a site on a new system and forgot to install the plugin. > Of course I am :) I wasn't alone on irc last night with the same problem. The issue was to launch Drb at 12.0.0.1:2999 , not 0.0.0.0:2999 (running FreeBSD 6.1) From jeremy.burks at gmail.com Tue Dec 26 14:32:04 2006 From: jeremy.burks at gmail.com (Jeremy Burks) Date: Tue, 26 Dec 2006 13:32:04 -0600 Subject: [Mongrel] Using :config_script to set environment variables Message-ID: I am using mongrel and mongrel_cluster to serve a rails site. The site requires several environment variables to be set. I am thinking about using the :config_script option and writing a script that sets the required environment variables. Is this a good solution or does anyone have any other suggestions? Thanks for your help. jeremy From ezmobius at gmail.com Tue Dec 26 17:04:12 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Tue, 26 Dec 2006 14:04:12 -0800 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem Message-ID: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> Heya Folks- This is mainly for Zed and Mentalguy. I have been playing with the new release of rubygems 0.9.0.8 and I have a major problem with the requirement that fastthread needs to be required before thread. Just requiring rubygems and then requiring fastthread right after that will throw the error: ez _blog $ ruby require 'rubygems' require 'fastthread' __END__ /usr//lib/ruby/gems/1.8/gems/fastthread-0.5.3.1/lib/ fastthread.bundle: fastthread must be required before thread (RuntimeError) from /usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 32:in `require' from -:2 ez _blog $ ruby -v ruby 1.8.5 (2006-08-25) [i686-darwin8.7.1] ez _blog $ gem -v 0.9.0.8 I have been requiring fastthread in Merb but now that mongrel uses it I want to remove my requires for it from merb. But right now with the new version of rubygems I can't use fastthread installed as a gem at all. Is the solution to this just to install fastthread via setup.rb instead of gems so we can require it first? Does fastthread really have to be required first? Can this be changed? Another area where I run into this issue is with rake. rake requires thread when you invoke it form the command line before you get a chance to require fastthread first. So you get the fastthread load error. Whats the best solution to this? Can fastthread be made to be ok if it loads after thread? Fastthread is great and has really improved the mem profile for me in a bunch of installs. But with this new version of rubygems there doesn't seem to be a way to use fastthread at all if it is installed as a gem. Here is the same test run with the current 0.9 version of rubygems: ey00-s00089 ~ # ruby require 'rubygems' require 'fastthread' __END__ ey00-s00089 ~ # ruby -v ruby 1.8.5 (2006-08-25) [x86_64-linux] ey00-s00089 ~ # gem -v 0.9.0 It works fine here. But I suspect this will start affecting more and more folks as they upgrade to rubygems latest. Thoughts? Cheer-s -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From luislavena at gmail.com Tue Dec 26 17:43:57 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 26 Dec 2006 19:43:57 -0300 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem In-Reply-To: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> References: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> Message-ID: <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> On 12/26/06, Ezra Zygmuntowicz wrote: > Heya Folks- > > This is mainly for Zed and Mentalguy. I have been playing with the > new release of rubygems 0.9.0.8 and I have a major problem with the > requirement that fastthread needs to be required before thread. Just > requiring rubygems and then requiring fastthread right after that > will throw the error: > Oh boy, I guess that deserve a post at rubygems mailing list (rubygems-developers at rubyforge.org) > ez _blog $ ruby > require 'rubygems' > require 'fastthread' > __END__ > /usr//lib/ruby/gems/1.8/gems/fastthread-0.5.3.1/lib/ > fastthread.bundle: fastthread must be required before thread > (RuntimeError) > from /usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 32:in `require' > from -:2 > ez _blog $ ruby -v > ruby 1.8.5 (2006-08-25) [i686-darwin8.7.1] > ez _blog $ gem -v > 0.9.0.8 > FastThread "patches" thread library, its required that some things get defined by fastthread prior thread do his thing... (that was mental comment on this issue). I guess rubygems folks added thread part of rubygems now... something that isn't good at all (why I require thread if my application I don't use it?, just to say something). > I have been requiring fastthread in Merb but now that mongrel uses > it I want to remove my requires for it from merb. But right now with > the new version of rubygems I can't use fastthread installed as a gem > at all. > I've been using RUBYOPT=rubygems so guess will suffer from the same illness. > Is the solution to this just to install fastthread via setup.rb > instead of gems so we can require it first? Does fastthread really > have to be required first? Can this be changed? > The setup.rb way is one possibility, the other is ask the rubygems teams to check their code. > Another area where I run into this issue is with rake. rake requires > thread when you invoke it form the command line before you get a > chance to require fastthread first. So you get the fastthread load > error. > Er... you're using fastthread in rake? Could I ask what for? I suppose rake isn't for long running tasks... The other workaround will be hack lib/ruby/1.8/thread.rb and require fastthread there. > Whats the best solution to this? Can fastthread be made to be ok if > it loads after thread? Fastthread is great and has really improved > the mem profile for me in a bunch of installs. But with this new > version of rubygems there doesn't seem to be a way to use fastthread > at all if it is installed as a gem. > > Here is the same test run with the current 0.9 version of rubygems: > > ey00-s00089 ~ # ruby > require 'rubygems' > require 'fastthread' > __END__ > ey00-s00089 ~ # ruby -v > ruby 1.8.5 (2006-08-25) [x86_64-linux] > ey00-s00089 ~ # gem -v > 0.9.0 > > > It works fine here. But I suspect this will start affecting more and > more folks as they upgrade to rubygems latest. > > Thoughts? > > Cheer-s > > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From michael.dauria at gmail.com Tue Dec 26 18:59:01 2006 From: michael.dauria at gmail.com (Michael D'Auria) Date: Tue, 26 Dec 2006 18:59:01 -0500 Subject: [Mongrel] Definitive guide for upload progress In-Reply-To: <8a7ce02e0612260850k285534b4k2748a49a918a6d90@mail.gmail.com> References: <8a7ce02e0612250630x68c21d2etba371bf3aeec818e@mail.gmail.com> <8a7ce02e0612260850k285534b4k2748a49a918a6d90@mail.gmail.com> Message-ID: <1907e2ca0612261559j1897affcma5ed8dce99c7de87@mail.gmail.com> I am hoping you really meant localhost aka 127.0.0.1 :) On 12/26/06, Eugenol wrote: > > On 12/26/06, Carl Lerche wrote: > > This might sound dumb, but are you 100% sure you got the upload > > progress plugin installed? I had that exact same error when I tried > > launching a site on a new system and forgot to install the plugin. > > > > Of course I am :) > > I wasn't alone on irc last night with the same problem. The issue was > to launch Drb at 12.0.0.1:2999 , not 0.0.0.0:2999 (running FreeBSD > 6.1) > _______________________________________________ > 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/20061226/16416454/attachment.html From luislavena at gmail.com Tue Dec 26 20:38:45 2006 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 26 Dec 2006 22:38:45 -0300 Subject: [Mongrel] no log/mongrel.log file on win32, looking for suggestions... Message-ID: <71166b3b0612261738x55a8aa77y830e0d755f440f72@mail.gmail.com> Hello Mongrels around the world! Been thinking a way to unify the issue I described in the subject. For those who aren't aware, mongrel (actually, mongrel_rails) only generate the log file if daemonize was used (-d) That means no log file under windows, due his lack of fork/daemonization capabilities. Now, users that need to run mongrel on windows cannot report and fill the empty spaces with information truly important about why mongrel isn't playing nice (or being a bad dog?). I will like some suggestions on this area, which I think is important, looking to reduce platform specific *notes*. A. Should mongrel on windows redirect the output (log information) from console to a log file, only if -d daemonize was specified (in a similar way like *nix platforms). or B. Or redirect always and suppress all the console information (STDOUT and STDERR). Please, mongrel users on windows affected by this provide feedback. Thanks in advance your time. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From anjan.bacchu at Summit.Fiserv.com Tue Dec 26 20:54:33 2006 From: anjan.bacchu at Summit.Fiserv.com (Bacchu, Anjan) Date: Tue, 26 Dec 2006 17:54:33 -0800 Subject: [Mongrel] no log/mongrel.log file on win32, looking for sugge stions... Message-ID: Hi Luis, answers in CAPS. -----Original Message----- From: Luis Lavena [mailto:luislavena at gmail.com] Sent: Tuesday, December 26, 2006 5:39 PM To: mongrel-users at rubyforge.org Subject: [Mongrel] no log/mongrel.log file on win32, looking for suggestions... Hello Mongrels around the world! Been thinking a way to unify the issue I described in the subject. For those who aren't aware, mongrel (actually, mongrel_rails) only generate the log file if daemonize was used (-d) That means no log file under windows, due his lack of fork/daemonization capabilities. Now, users that need to run mongrel on windows cannot report and fill the empty spaces with information truly important about why mongrel isn't playing nice (or being a bad dog?). I will like some suggestions on this area, which I think is important, looking to reduce platform specific *notes*. A. Should mongrel on windows redirect the output (log information) from console to a log file, only if -d daemonize was specified (in a similar way like *nix platforms). YES! or B. Or redirect always and suppress all the console information (STDOUT and STDERR). Please, mongrel users on windows affected by this provide feedback. Thanks in advance your time. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi _______________________________________________ Mongrel-users mailing list Mongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users From kylekochis at gmail.com Tue Dec 26 22:29:32 2006 From: kylekochis at gmail.com (Kyle Kochis) Date: Tue, 26 Dec 2006 20:29:32 -0700 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: <20061225142145.2e478066.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <20061225142145.2e478066.zedshaw@zedshaw.com> Message-ID: <6a7034b0612261929o5eea48b0g6ec933d99d073c77@mail.gmail.com> i just checked it out: Zed has 133 and David has 131 On 12/25/06, Zed A. Shaw wrote: > > We're at 93 people. That will put me at #2 tonight when the new stats are > calculated. But that still isn't enough to dethrone The King of the > Internet. Keep on recommending me so we can do this! > > http://www.workingwithrails.com/recommendation/new/person/5455-zed-shaw > > To recommend me. And remember, everyone goes into a raffle for 10 > MUDCRAP-CE certificates signed by me. > > And in case you wondered, here's my platform explaining why you should > vote for me: > > http://www.zedshaw.com/blog/2006-12-25.html > > Merry Christmas! > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061226/05bab590/attachment.html From zedshaw at zedshaw.com Tue Dec 26 22:43:43 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 26 Dec 2006 19:43:43 -0800 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: <6a7034b0612261929o5eea48b0g6ec933d99d073c77@mail.gmail.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <20061225142145.2e478066.zedshaw@zedshaw.com> <6a7034b0612261929o5eea48b0g6ec933d99d073c77@mail.gmail.com> Message-ID: <20061226194343.67411456.zedshaw@zedshaw.com> On Tue, 26 Dec 2006 20:29:32 -0700 "Kyle Kochis" wrote: > i just checked it out: Zed has 133 and David has 131 Yes, we're almost there. When midnight roles around the results are final. Here's more information on my platform and my first act as King of the Internet: http://www.zedshaw.com/blog/2006-12-26.html Gotta get working on those MUDCRAP-CE certs too. Fun stuff! -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Tue Dec 26 23:00:01 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 26 Dec 2006 20:00:01 -0800 Subject: [Mongrel] no log/mongrel.log file on win32, looking for suggestions... In-Reply-To: <71166b3b0612261738x55a8aa77y830e0d755f440f72@mail.gmail.com> References: <71166b3b0612261738x55a8aa77y830e0d755f440f72@mail.gmail.com> Message-ID: <20061226200001.627ffe6e.zedshaw@zedshaw.com> On Tue, 26 Dec 2006 22:38:45 -0300 "Luis Lavena" wrote: > Hello Mongrels around the world! Insult! :-) > A. Should mongrel on windows redirect the output (log information) > from console to a log file, only if -d daemonize was specified (in a > similar way like *nix platforms). I don't think this is good since -d means daemonize. If people run it from the command line with -d and it just shows no output then they'll get confused. > or > B. Or redirect always and suppress all the console information (STDOUT > and STDERR). Is it possible that the service can just redirect STDERR and STDOUT to the log file? That'd fall more in line with how daemonize works on Unix. > Please, mongrel users on windows affected by this provide feedback. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From luislavena at gmail.com Tue Dec 26 23:12:37 2006 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 27 Dec 2006 01:12:37 -0300 Subject: [Mongrel] no log/mongrel.log file on win32, looking for suggestions... In-Reply-To: <20061226200001.627ffe6e.zedshaw@zedshaw.com> References: <71166b3b0612261738x55a8aa77y830e0d755f440f72@mail.gmail.com> <20061226200001.627ffe6e.zedshaw@zedshaw.com> Message-ID: <71166b3b0612262012j1024f0fdm5a017bde35d1637b@mail.gmail.com> On 12/27/06, Zed A. Shaw wrote: > On Tue, 26 Dec 2006 22:38:45 -0300 > "Luis Lavena" wrote: > > > Hello Mongrels around the world! > > Insult! :-) > Ok, ok, now you're king hope you don't send troops to execute me :-P > > > A. Should mongrel on windows redirect the output (log information) > > from console to a log file, only if -d daemonize was specified (in a > > similar way like *nix platforms). > > I don't think this is good since -d means daemonize. If people run it from the command line with -d and it just shows no output then they'll get confused. > > > or > > > B. Or redirect always and suppress all the console information (STDOUT > > and STDERR). > > Is it possible that the service can just redirect STDERR and STDOUT to the log file? That'd fall more in line with how daemonize works on Unix. > That is possible, but will force users to run in service mode even if they are just debugging (like I do, open a terminal and run mongrel_rails there). Also, will require mongrel_service be more clever and actually parse the config script or command line for references to log file... something that I don't plan to include in the following weeks (busy with other stuff). > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu BTW, where is my MUDCRAP-CE cert? I voted for you!... ;-) -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From mental at rydia.net Wed Dec 27 00:48:02 2006 From: mental at rydia.net (MenTaLguY) Date: Wed, 27 Dec 2006 00:48:02 -0500 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem In-Reply-To: <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> References: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> Message-ID: <1167198482.5545.18.camel@localhost.localdomain> On Tue, 2006-12-26 at 19:43 -0300, Luis Lavena wrote: > I guess rubygems folks added thread part of rubygems now... something > that isn't good at all (why I require thread if my application I don't > use it?, just to say something). I don't know... it seems reasonable if they need to do something in a threadsafe manner. Even e.g. Singleton needs synchronization, though it doesn't currently use Mutex to do it (IMO it _should_, fastthread weirdness aside). I'm not really sure what the best resolution here is. fastthread is ultimately intended to become a patch to Ruby core, of course. But that can't happen immediately, especially as even with the patch in hand I would still need to sell the ruby-core folks on it... -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061227/4c2bf699/attachment.bin From wilsonb at gmail.com Wed Dec 27 01:42:30 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Wed, 27 Dec 2006 01:42:30 -0500 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem In-Reply-To: <1167198482.5545.18.camel@localhost.localdomain> References: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> <1167198482.5545.18.camel@localhost.localdomain> Message-ID: On 12/27/06, MenTaLguY wrote: > On Tue, 2006-12-26 at 19:43 -0300, Luis Lavena wrote: > > I guess rubygems folks added thread part of rubygems now... something > > that isn't good at all (why I require thread if my application I don't > > use it?, just to say something). > > I don't know... it seems reasonable if they need to do something in a > threadsafe manner. Even e.g. Singleton needs synchronization, though it > doesn't currently use Mutex to do it (IMO it _should_, fastthread > weirdness aside). > > I'm not really sure what the best resolution here is. fastthread is > ultimately intended to become a patch to Ruby core, of course. But that > can't happen immediately, especially as even with the patch in hand I > would still need to sell the ruby-core folks on it... > I asked Eric Hodel about it, and he said it looked like the 'thread' requirement in rubygems was added accidentally. That was after only a few moments of contemplation, so it may turn out differently in the long run. From ms at pccl.info Wed Dec 27 04:36:41 2006 From: ms at pccl.info (Mark Somerville) Date: Wed, 27 Dec 2006 09:36:41 +0000 Subject: [Mongrel] [ANN] fastthread 0.5.3 In-Reply-To: References: <1166298500.6690.11.camel@localhost.localdomain> <200612220948.50114.ms@pccl.info> Message-ID: <200612270936.41946.ms@pccl.info> On Friday 22 December 2006 18:32, Ezra Zygmuntowicz wrote: > On Dec 22, 2006, at 1:48 AM, Mark Somerville wrote: > > On Saturday 16 December 2006 19:48, MenTaLguY wrote: > >> Unless someone finds more bugs, this version of fastthread will > >> eventually become 1.0. > > > > I don't know if this is a fastthread, mongrel or gems problem - it > > might not > > even be a problem! > > > > Since upgrading to fastthread 0.5.3.1 and mongrel 1.0RC1, I get a > > message - "fastthread not loaded: fastthread must be required before > > thread" - when starting my DRb upload server (detailed here: > > http://mongrel.rubyforge.org/docs/upload_progress.html). "require > > 'fastthread'" > > doesn't seem to alter anything. I haven't had time to fully check > > it out, but > > everything still appears to function alright, at least on my > > development box. > > > > Can anyone explain what's happening? How can I fix it, if I need to? > > > > Cheers, > > > > Mark > > Mark- > > When you require 'drb' drb in turn requires thread. If you are using > fastthread you must require it before thread gets required thats just > the way it works. So in your drb server code file you need to do this: > > require 'rubygems' > require 'fastthread' > then require drb and anything else you need. Works a treat. Thank you Ezra. Mark > > Cheers- > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From todd.fisher at gmail.com Wed Dec 27 13:17:28 2006 From: todd.fisher at gmail.com (Todd Fisher) Date: Wed, 27 Dec 2006 13:17:28 -0500 Subject: [Mongrel] Multiple DocRoots Message-ID: I'm wondering if it's possible to setup mongrel to have multiple document roots? The use case I'm trying to solve is one where I have a library of shared CSS/JS/Images and would like multiple rails application to use them. I have written a proxy controller and added some routes to serve the static files and it works reasonably well, but is extremely slow, because it's single threaded. I'd like mongrel to serve these files. I'm wondering if there is a way to use -s option to add an aditional document root handler. Thanks, Todd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061227/80689012/attachment.html From cdcarter at gmail.com Wed Dec 27 13:19:24 2006 From: cdcarter at gmail.com (Chris Carter) Date: Wed, 27 Dec 2006 12:19:24 -0600 Subject: [Mongrel] 93, We Can Do It! (Was: What I Want For Christmas) In-Reply-To: <20061226194343.67411456.zedshaw@zedshaw.com> References: <20061224225330.e4d9a63b.zedshaw@zedshaw.com> <20061225142145.2e478066.zedshaw@zedshaw.com> <6a7034b0612261929o5eea48b0g6ec933d99d073c77@mail.gmail.com> <20061226194343.67411456.zedshaw@zedshaw.com> Message-ID: <86987bdf0612271019h54e410a9y89b41daa474b480a@mail.gmail.com> The results are final! ZED is KING! On 12/26/06, Zed A. Shaw wrote: > On Tue, 26 Dec 2006 20:29:32 -0700 > "Kyle Kochis" wrote: > > > i just checked it out: Zed has 133 and David has 131 > > Yes, we're almost there. When midnight roles around the results are final. > > Here's more information on my platform and my first act as King of the Internet: > > http://www.zedshaw.com/blog/2006-12-26.html > > Gotta get working on those MUDCRAP-CE certs too. Fun stuff! > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Chris Carter concentrationstudios.com brynmawrcs.com From michael.dauria at gmail.com Wed Dec 27 13:41:04 2006 From: michael.dauria at gmail.com (Michael D'Auria) Date: Wed, 27 Dec 2006 13:41:04 -0500 Subject: [Mongrel] Multiple DocRoots In-Reply-To: References: Message-ID: <1907e2ca0612271041j548916a8uc7229d32bc1fbac8@mail.gmail.com> Couldn't you just symlink everything back to the shared location? I'm assuming you are on *nix of course .: Michael :. On 12/27/06, Todd Fisher wrote: > > I'm wondering if it's possible to setup mongrel to have multiple document > roots? The use case I'm trying to solve is one where I have a library of > shared CSS/JS/Images and would like multiple rails application to use them. > I have written a proxy controller and added some routes to serve the static > files and it works reasonably well, but is extremely slow, because it's > single threaded. I'd like mongrel to serve these files. I'm wondering if > there is a way to use -s option to add an aditional document root handler. > > Thanks, > Todd > > _______________________________________________ > 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/20061227/ce08d2ce/attachment.html From zedshaw at zedshaw.com Wed Dec 27 14:20:34 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Wed, 27 Dec 2006 11:20:34 -0800 Subject: [Mongrel] Multiple DocRoots In-Reply-To: References: Message-ID: <20061227112034.dcc1f772.zedshaw@zedshaw.com> On Wed, 27 Dec 2006 13:17:28 -0500 "Todd Fisher" wrote: > I'm wondering if it's possible to setup mongrel to have multiple document > roots? The use case I'm trying to solve is one where I have a library of > shared CSS/JS/Images and would like multiple rails application to use them. > I have written a proxy controller and added some routes to serve the static > files and it works reasonably well, but is extremely slow, because it's > single threaded. I'd like mongrel to serve these files. I'm wondering if > there is a way to use -s option to add an aditional document root handler. Piece of cake. Let's say I want a rails public directory to be at both / and at /newplace/ then I just do this: 1) Put this in a mongrel.conf file: uri "/newplace", :handler => DirHandler.new("public") 2) Run mongrel like this: mongrel_rails start -S mongrel.conf 3) Go to http://localhost:3000/newplace/ and you see the same thing as http://localhost:3000/ That's it. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From todd.fisher at gmail.com Wed Dec 27 14:33:39 2006 From: todd.fisher at gmail.com (Todd Fisher) Date: Wed, 27 Dec 2006 14:33:39 -0500 Subject: [Mongrel] Multiple DocRoots In-Reply-To: <20061227112034.dcc1f772.zedshaw@zedshaw.com> References: <20061227112034.dcc1f772.zedshaw@zedshaw.com> Message-ID: Ah yes, here's the solution I landed on => require 'mongrel/handlers.rb' class MultipleDirHandler < Mongrel::DirHandler # check in each folder for the file def initialize(*path) @paths = path super(@paths[0]) end # check each folder def can_serve(path_info) @paths.each do|path| @path = File.expand_path(path) # to allow RAILS_ROOT ret = super(path_info) return ret unless ret.nil? end @path = @paths[0] return nil end end Working really well. Thank you! -Todd On 12/27/06, Zed A. Shaw wrote: > > On Wed, 27 Dec 2006 13:17:28 -0500 > "Todd Fisher" wrote: > > > I'm wondering if it's possible to setup mongrel to have multiple > document > > roots? The use case I'm trying to solve is one where I have a library > of > > shared CSS/JS/Images and would like multiple rails application to use > them. > > I have written a proxy controller and added some routes to serve the > static > > files and it works reasonably well, but is extremely slow, because it's > > single threaded. I'd like mongrel to serve these files. I'm wondering > if > > there is a way to use -s option to add an aditional document root > handler. > > Piece of cake. Let's say I want a rails public directory to be at both / > and at /newplace/ then I just do this: > > 1) Put this in a mongrel.conf file: > > uri "/newplace", :handler => DirHandler.new("public") > > 2) Run mongrel like this: > > mongrel_rails start -S mongrel.conf > > 3) Go to http://localhost:3000/newplace/ and you see the same thing as > http://localhost:3000/ > > That's it. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061227/d4881eaf/attachment-0001.html From zedshaw at zedshaw.com Wed Dec 27 14:39:40 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Wed, 27 Dec 2006 11:39:40 -0800 Subject: [Mongrel] Thanks For The Present! Message-ID: <20061227113940.0efcd3cc.zedshaw@zedshaw.com> Alright Mongrel people, thanks for contributing to the mayhem around popularity by making me the official King of the Internet. In case you all missed it, here's my blog post on my first act as King: http://www.zedshaw.com/blog/2006-12-26.html Stay tuned for pedro. I want to make this reign very democratic and chaotic. (I wonder if the Nitro folks will help with pedro?) The whole experiment was tons of fun and I think the *best* part was reading the comments: http://www.workingwithrails.com/recommendation/for/person/5455-zed-shaw You folks ROCK. Here's some of my favorite quotes: "It's a web application server, baby." -- Steven Lumos "Zed Shaw was my master when I was learning to rule the world!" -- Genghis Kahn "How can you not vote for Zed after reading his entirely true profile outlining his great deeds." -- The Previous King of the Internet DHH "Zed is even more awesome than I am. It's pretty intense." -- Earl the Incredible Squirrel "the bitch blackmailed me!" -- Ryan Davis (lies!) "Do Canadians write his name 'Z Shaw'?" -- Kevin Olbrich, Ph.D. "Asshole of the best kind." -- Vishnu Gopal Love it! Thanks a bunch, and hang on for the second act. Should be fun. Oh, and I'll announce the MUDCRAP-CE winners in a few days. Probably the same time we do our official 1.0 release. Enjoy! -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jdz99 at hotmail.com Wed Dec 27 14:55:39 2006 From: jdz99 at hotmail.com (Jim Douglas) Date: Wed, 27 Dec 2006 19:55:39 +0000 Subject: [Mongrel] file upload Message-ID: I ma trying to get this upload working, http://mongrel.rubyforge.org/docs/upload_progress.html, ....after starting from the command line, mongrel_rails start -d -p 3001 -S config/mongrel_upload_progress.conf I get this eror in the browser, NameError uninitialized constant UploadProgressRailsController RAILS_ROOT: /usr/opt/tomcat/workspace/upload/config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing' generated/routing/recognition.rb:4:in `recognize_path' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:511:in `recognize!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:78:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `synchronize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:618:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:271:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/command.rb:211:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:243 /usr/bin/mongrel_rails:18:in `load' /usr/bin/mongrel_rails:18 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing' generated/routing/recognition.rb:4:in `recognize_path' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:511:in `recognize!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:78:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `synchronize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:618:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:271:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/command.rb:211:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:243 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing' generated/routing/recognition.rb:4:in `recognize_path' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:511:in `recognize!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:78:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `synchronize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:618:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:271:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/command.rb:211:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:243 /usr/bin/mongrel_rails:18:in `load' /usr/bin/mongrel_rails:18 Request Parameters: None Show session dump Fedora Core 6 Mongrel 3.3.14 Mongrel_Upload_progress - .2 Thanks for the help, Jim _________________________________________________________________ Type your favorite song.? Get a customized station.? Try MSN Radio powered by Pandora. http://radio.msn.com/?icid=T002MSN03A07001 From ezmobius at gmail.com Wed Dec 27 16:31:53 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Wed, 27 Dec 2006 13:31:53 -0800 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem In-Reply-To: <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> References: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> Message-ID: On Dec 26, 2006, at 2:43 PM, Luis Lavena wrote: >> > > Er... you're using fastthread in rake? Could I ask what for? I suppose > rake isn't for long running tasks... Louis- I am not using fastthread directly for rake. But merb uses fastthread and I use rake to run the unit tests and rspec specs. So I guess this isn't too big of a problem as it will just not use fastthread during testing. But I would feel better about my tests if they ran the exact same code as they run in production. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From eugenol at gmail.com Wed Dec 27 21:15:36 2006 From: eugenol at gmail.com (Eugenol) Date: Thu, 28 Dec 2006 03:15:36 +0100 Subject: [Mongrel] file upload In-Reply-To: References: Message-ID: <8a7ce02e0612271815wef14deamf3aa4e84a3aa95d1@mail.gmail.com> On 12/27/06, Jim Douglas wrote: > I ma trying to get this upload working, > > http://mongrel.rubyforge.org/docs/upload_progress.html, > > ....after starting from the command line, > > mongrel_rails start -d -p 3001 -S config/mongrel_upload_progress.conf > > I get this eror in the browser, > > NameError > > uninitialized constant UploadProgressRailsController > Is your controller in a file correctly named upload_progress_rails_controller.rb ? This is typically the kind of error we get when the controlller name doesn't match its filename (check the plural and the CamelName). We never know... From jerome at yayel.com Wed Dec 27 21:17:43 2006 From: jerome at yayel.com (=?UTF-8?Q?J=C3=A9r=C3=B4me_Lipowicz?=) Date: Thu, 28 Dec 2006 03:17:43 +0100 Subject: [Mongrel] Definitive guide for upload progress In-Reply-To: <1907e2ca0612261559j1897affcma5ed8dce99c7de87@mail.gmail.com> References: <8a7ce02e0612250630x68c21d2etba371bf3aeec818e@mail.gmail.com> <8a7ce02e0612260850k285534b4k2748a49a918a6d90@mail.gmail.com> <1907e2ca0612261559j1897affcma5ed8dce99c7de87@mail.gmail.com> Message-ID: <8a7ce02e0612271817v292afe79yece692c4dffac0dc@mail.gmail.com> On 12/27/06, Michael D'Auria wrote: > I am hoping you really meant localhost aka 127.0.0.1 :) :) yes, got some problem with my keybo From jdz99 at hotmail.com Wed Dec 27 22:02:25 2006 From: jdz99 at hotmail.com (Jim Douglas) Date: Thu, 28 Dec 2006 03:02:25 +0000 Subject: [Mongrel] file upload In-Reply-To: <8a7ce02e0612271815wef14deamf3aa4e84a3aa95d1@mail.gmail.com> Message-ID: >From: Eugenol >Reply-To: mongrel-users at rubyforge.org >To: mongrel-users at rubyforge.org >Subject: Re: [Mongrel] file upload >Date: Thu, 28 Dec 2006 03:15:36 +0100 > >On 12/27/06, Jim Douglas wrote: > > I ma trying to get this upload working, > > > > http://mongrel.rubyforge.org/docs/upload_progress.html, > > > > ....after starting from the command line, > > > > mongrel_rails start -d -p 3001 -S config/mongrel_upload_progress.conf > > > > I get this eror in the browser, > > > > NameError > > > > uninitialized constant UploadProgressRailsController > > > >Is your controller in a file correctly named >upload_progress_rails_controller.rb ? This is typically the kind of >error we get when the controlller name doesn't match its filename >(check the plural and the CamelName). > >We never know... >_______________________________________________ >Mongrel-users mailing list >Mongrel-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/mongrel-users It was the controller, so now I get this error, DRb::DRbConnError in UploadController#progress druby://0.0.0.0:2999 - # RAILS_ROOT: /usr/opt/tomcat/workspace/upload/config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/1.8/drb/drb.rb:736:in `open' /usr/lib/ruby/1.8/drb/drb.rb:729:in `each' /usr/lib/ruby/1.8/drb/drb.rb:729:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1189:in `initialize' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `new' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing' /usr/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend' /usr/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing' #{RAILS_ROOT}/app/controllers/upload_controller.rb:6:in `__bind_1167274520_289444' #{RAILS_ROOT}/app/controllers/upload_controller.rb:5:in `progress' /usr/bin/mongrel_rails:18:in `load' /usr/bin/mongrel_rails:18 ...and when I try to run, ..ruby lib/upload.rg I get this error, fastthread not loaded : fastthread must be required before thread How can I load fastthread? Thanks, Jim _________________________________________________________________ Fixing up the home? Live Search can help http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmemailtaglinenov06&FORM=WLMTAG From zedshaw at zedshaw.com Thu Dec 28 03:22:08 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 28 Dec 2006 00:22:08 -0800 Subject: [Mongrel] file upload In-Reply-To: References: <8a7ce02e0612271815wef14deamf3aa4e84a3aa95d1@mail.gmail.com> Message-ID: <20061228002208.3660d8e5.zedshaw@zedshaw.com> On Thu, 28 Dec 2006 03:02:25 +0000 "Jim Douglas" wrote: > It was the controller, so now I get this error, > > DRb::DRbConnError in UploadController#progress > > druby://0.0.0.0:2999 - # connect(2)> > Don't use 0.0.0.0 but instead use 127.0.0.1 for your addresses. I've gotta update the instructions but we're finding out that only Apple thinks 0.0.0.0 is a valid client connect address. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jdz99 at hotmail.com Thu Dec 28 11:40:28 2006 From: jdz99 at hotmail.com (Jim Douglas) Date: Thu, 28 Dec 2006 16:40:28 +0000 Subject: [Mongrel] file upload In-Reply-To: <20061228002208.3660d8e5.zedshaw@zedshaw.com> Message-ID: >From: "Zed A. Shaw" >Reply-To: mongrel-users at rubyforge.org >To: mongrel-users at rubyforge.org >Subject: Re: [Mongrel] file upload >Date: Thu, 28 Dec 2006 00:22:08 -0800 > >On Thu, 28 Dec 2006 03:02:25 +0000 >"Jim Douglas" wrote: > > It was the controller, so now I get this error, > > > > DRb::DRbConnError in UploadController#progress > > > > druby://0.0.0.0:2999 - # > connect(2)> > > > >Don't use 0.0.0.0 but instead use 127.0.0.1 for your addresses. I've gotta >update the instructions but we're finding out that only Apple thinks >0.0.0.0 is a valid client connect address. > >-- >Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu >http://www.zedshaw.com/ >http://www.awprofessional.com/title/0321483502 -- The Mongrel Book >http://mongrel.rubyforge.org/ >http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. >_______________________________________________ >Mongrel-users mailing list >Mongrel-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/mongrel-users ..this is the upload.tb, # lib/upload.rb, the upload drb server require 'rubygems' require 'fastthread' require 'drb' require 'gem_plugin' GemPlugin::Manager.instance.load 'mongrel' => GemPlugin::INCLUDE DRb.start_service 'druby://127.0.0.1:2999', Mongrel::UploadProgress.new DRb.thread.join ...this is the config, # config/mongrel_upload_progress.conf uri "/", :handler => plugin("/handlers/upload", :path_info => '/files/upload', :drb => 'druby://127.0.0.1:2999'), :in_front => true ...when I start mongrel I noticed in the log that mongrel listens on 0.0.0.0:3001 ** Mongrel available at 0.0.0.0:3001 Should Mongrel be listening on 127.0.0.1:3001 also? If so where do you set the confi to do so? ...this is the error I am getting, DRb::DRbConnError in UploadController#progress druby://127.0.0.1:2999 - # RAILS_ROOT: /usr/opt/tomcat/workspace/upload/config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/1.8/drb/drb.rb:736:in `open' /usr/lib/ruby/1.8/drb/drb.rb:729:in `each' /usr/lib/ruby/1.8/drb/drb.rb:729:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1189:in `initialize' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `new' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing' /usr/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend' /usr/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing' #{RAILS_ROOT}/app/controllers/upload_controller.rb:6:in `__bind_1167323541_460888' #{RAILS_ROOT}/app/controllers/upload_controller.rb:5:in `progress' /usr/bin/mongrel_rails:18:in `load' /usr/bin/mongrel_rails:18 /usr/lib/ruby/1.8/drb/drb.rb:736:in `open' /usr/lib/ruby/1.8/drb/drb.rb:729:in `each' /usr/lib/ruby/1.8/drb/drb.rb:729:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1189:in `initialize' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `new' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing' /usr/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend' /usr/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/object/extending.rb:44:in `[]' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/object/extending.rb:44:in `instance_exec' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/helpers/prototype_helper.rb:378:in `initialize' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:687:in `new' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:687:in `render_with_no_layout' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/layout.rb:253:in `render_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:78:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `synchronize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:618:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:271:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/command.rb:211:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:243 /usr/lib/ruby/1.8/drb/drb.rb:736:in `open' /usr/lib/ruby/1.8/drb/drb.rb:729:in `each' /usr/lib/ruby/1.8/drb/drb.rb:729:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1189:in `initialize' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `new' /usr/lib/ruby/1.8/drb/drb.rb:1169:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing' /usr/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend' /usr/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing' #{RAILS_ROOT}/app/controllers/upload_controller.rb:6:in `__bind_1167323541_460888' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/object/extending.rb:44:in `[]' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/object/extending.rb:44:in `instance_exec' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/helpers/prototype_helper.rb:378:in `initialize' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:687:in `new' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:687:in `render_with_no_layout' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/layout.rb:253:in `render_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render' #{RAILS_ROOT}/app/controllers/upload_controller.rb:5:in `progress' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:78:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `synchronize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/rails.rb:76:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:618:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:617:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:736:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel.rb:720:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:271:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/configurator.rb:270:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:127:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/command.rb:211:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0/bin/mongrel_rails:243 /usr/bin/mongrel_rails:18:in `load' /usr/bin/mongrel_rails:18 Thanks, Jim _________________________________________________________________ Experience the magic of the holidays. Talk to Santa on Messenger. http://clk.atdmt.com/MSN/go/msnnkwme0080000001msn/direct/01/?href=http://imagine-windowslive.com/minisites/santabot/default.aspx?locale=en-us From zedshaw at zedshaw.com Thu Dec 28 12:03:57 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 28 Dec 2006 09:03:57 -0800 Subject: [Mongrel] file upload In-Reply-To: References: <20061228002208.3660d8e5.zedshaw@zedshaw.com> Message-ID: <20061228090357.07816fc4.zedshaw@zedshaw.com> On Thu, 28 Dec 2006 16:40:28 +0000 "Jim Douglas" wrote: > ...when I start mongrel I noticed in the log that mongrel listens on > 0.0.0.0:3001 > ** Mongrel available at 0.0.0.0:3001 First, make sure you started your drb server before your mongrel server. The upload progress uses the drb server to keep track of things. Second, unless you told mongrel to use 3001 it shouldn't be. Did you use -p 3001 in the command line or config? Otherwise, listening on 0.0.0.0 is fine, it's just trying to connect to 0.0.0.0 is bad. Some OS allow it but they really shouldn't. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jdz99 at hotmail.com Thu Dec 28 13:26:27 2006 From: jdz99 at hotmail.com (Jim Douglas) Date: Thu, 28 Dec 2006 18:26:27 +0000 Subject: [Mongrel] file upload In-Reply-To: <20061228090357.07816fc4.zedshaw@zedshaw.com> Message-ID: >From: "Zed A. Shaw" >Reply-To: mongrel-users at rubyforge.org >To: mongrel-users at rubyforge.org >Subject: Re: [Mongrel] file upload >Date: Thu, 28 Dec 2006 09:03:57 -0800 > >On Thu, 28 Dec 2006 16:40:28 +0000 >"Jim Douglas" wrote: > > > ...when I start mongrel I noticed in the log that mongrel listens on > > 0.0.0.0:3001 > > ** Mongrel available at 0.0.0.0:3001 > >First, make sure you started your drb server before your mongrel server. >The upload progress uses the drb server to keep track of things. > >Second, unless you told mongrel to use 3001 it shouldn't be. Did you use >-p 3001 in the command line or config? > >Otherwise, listening on 0.0.0.0 is fine, it's just trying to connect to >0.0.0.0 is bad. Some OS allow it but they really shouldn't. > >-- >Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu >http://www.zedshaw.com/ >http://www.awprofessional.com/title/0321483502 -- The Mongrel Book >http://mongrel.rubyforge.org/ >http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. >_______________________________________________ >Mongrel-users mailing list >Mongrel-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/mongrel-users I started mongrel on 3001 Is this how I should be starting the dbr server? ruby lib/upload.rb This is the browser output, try { } catch (e) { alert('RJS error:\n\n' + e.toString()); alert(''); throw e } Thanks a lot Zed, Jim _________________________________________________________________ Dave vs. Carl: The Insignificant Championship Series. ?Who will win? http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://davevscarl.spaces.live.com/?icid=T001MSN38C07001 From zedshaw at zedshaw.com Thu Dec 28 17:06:38 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 28 Dec 2006 14:06:38 -0800 Subject: [Mongrel] An Even Better Thank You! Message-ID: <20061228140638.2e76ff23.zedshaw@zedshaw.com> I really wanted to thank everyone personally for voting for me, but man I don't have the time. So, like a good programmer I just automated it with espeak: $ speak -w thank_you_everyone.wav -s 168 -v en/en-f -p 60 -a 120 -l 50 -f who.txt $ lame -V2 thank_you_everyone.wav thank_you_everyone.mp3 And now you all get a personalized thanks from some electronic British woman: http://www.zedshaw.com/blog/thank_you_everyone.mp3 Some of you might have to wait a while to get your's but it really comes from the heart. And now for pedro! -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From jgeiger at gmail.com Thu Dec 28 18:06:25 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Thu, 28 Dec 2006 17:06:25 -0600 Subject: [Mongrel] Mongrel fails in Win32, mongrel_service missing, with possible fix Message-ID: <466af3440612281506m3775963fy68f504a2c8e46280@mail.gmail.com> I just ran into an issue with a new mongrel install on Win32. When trying to run mongrel from RadRails 0.7.2 on win32, I got an error while loading that it couldn't locate mongrel_service. C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- C:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.3.1/lib/mongrel_service/init.rb (LoadError) My install command/output is below. D:\download>gem install mongrel_service --source=http://mongrel.rubyforge.org/releases Select which gem to install for your platform (i386-mswin32) 1. mongrel_service 0.3.1 (mswin32) 2. Cancel installation > 1 Successfully installed mongrel_service-0.3.1-mswin32 Installing ri documentation for mongrel_service-0.3.1-mswin32... Installing RDoc documentation for mongrel_service-0.3.1-mswin32... If I go into the gems directory and rename mongrel_service-0.3.1-mswin32 to mongrel_service-0.3.1 mongrel will properly load. Just FYI. From zedshaw at zedshaw.com Thu Dec 28 18:22:14 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 28 Dec 2006 15:22:14 -0800 Subject: [Mongrel] Mongrel fails in Win32, mongrel_service missing, with possible fix In-Reply-To: <466af3440612281506m3775963fy68f504a2c8e46280@mail.gmail.com> References: <466af3440612281506m3775963fy68f504a2c8e46280@mail.gmail.com> Message-ID: <20061228152214.06e87f51.zedshaw@zedshaw.com> On Thu, 28 Dec 2006 17:06:25 -0600 "Joey Geiger" wrote: > > If I go into the gems directory and rename > mongrel_service-0.3.1-mswin32 to mongrel_service-0.3.1 mongrel will > properly load. Your version of gem_plugin must not have been updated. You need 0.2.2 to make it all work with the weird rubygems naming convention. Try installing gem_plugin from release and see if that fixes it. I see what I've gotta do is set the version requirement higher for gem_plugin on the official release. Thanks. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From luislavena at gmail.com Thu Dec 28 18:24:18 2006 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 28 Dec 2006 20:24:18 -0300 Subject: [Mongrel] Mongrel fails in Win32, mongrel_service missing, with possible fix In-Reply-To: <466af3440612281506m3775963fy68f504a2c8e46280@mail.gmail.com> References: <466af3440612281506m3775963fy68f504a2c8e46280@mail.gmail.com> Message-ID: <71166b3b0612281524k79801f9kd20b1f7e23761a0e@mail.gmail.com> On 12/28/06, Joey Geiger wrote: > I just ran into an issue with a new mongrel install on Win32. When > trying to run mongrel from RadRails 0.7.2 on win32, I got an error > while loading that it couldn't locate mongrel_service. > > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- > C:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.3.1/lib/mongrel_service/init.rb > (LoadError) > > [snip] > > If I go into the gems directory and rename > mongrel_service-0.3.1-mswin32 to mongrel_service-0.3.1 mongrel will > properly load. > You forgot to update gem_plugin. stable 0.2.1 version will fail to load ANY gem that is platform specific (like the mongrel_service gem). The version in releases is 0.2.2 and solve that issue. gem update --source=http://mongrel.rubyforge.org/releases Will update it, or could manually do with: gem install gem_plugin --source=http://mongrel.rubyforge.org/releases > Just FYI. Zed mention that in his ANN, you must remove all the previous versions of any gem used by mongrel to avoid these issues. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From jgeiger at gmail.com Thu Dec 28 20:43:24 2006 From: jgeiger at gmail.com (Joey Geiger) Date: Thu, 28 Dec 2006 19:43:24 -0600 Subject: [Mongrel] Mongrel fails in Win32, mongrel_service missing, with possible fix In-Reply-To: <71166b3b0612281524k79801f9kd20b1f7e23761a0e@mail.gmail.com> References: <466af3440612281506m3775963fy68f504a2c8e46280@mail.gmail.com> <71166b3b0612281524k79801f9kd20b1f7e23761a0e@mail.gmail.com> Message-ID: <466af3440612281743l64a101a5j5906af41c4a268e1@mail.gmail.com> thanks for the quick responses... I guess I was just going off the original post made by Zed upon the 1.0RC announcement, but reading it closer, it does mention 0.2.2, but I there wasn't a line to *install* it, just remove it. As this was a completely new ruby install, I wasn't removing an old mongrel installation. Zed's solution of changing the gem version requirement should solve the problem for people installing from scratch. Thanks again. ---SNIP original announcement post --- WIN32 Install with: $ gem uninstall mongrel $ gem uninstall gem_plugin $ gem uninstall fastthread $ gem install fastthread --source=http://mongrel.rubyforge.org/releases $ gem install mongrel --source=http://mongrel.rubyforge.org/releases $ gem install mongrel_service --source=http://mongrel.rubyforge.org/releases If you have problems with fastthread then skip it, it's optional on Win32. The win32 process is more involved because there hasn't been a stable release of it for a while now. That's why you have to remove everything you can and then re-install. *** Make sure that gem_plugin is version 0.2.2 or the whole thing dies. *** ---SNIP original announcement post --- From rsanheim at gmail.com Thu Dec 28 20:45:27 2006 From: rsanheim at gmail.com (Rob Sanheim) Date: Thu, 28 Dec 2006 19:45:27 -0600 Subject: [Mongrel] production-izing a popular site Message-ID: Lets say you have a site that is serving, oh, around 100k unique visitors a day (plain ole' browser requests) - plus probably ~ 40k uniques to feeds. Assume this site is 90% read like most of the web, so the traffic looks like your typical news or portal site. There are two web boxes behind a hardware load balancer, each doing apache 2.2.3 -> mongrel_proxy_balancer -> mongrel clusters. One db machine, but that shouldn't be stressed at all due to heavy caching of the content. Where to being with performance testing something like this? How many mongrels per web box to start with? Any comparable sites in production to compare it to (Ezra?) thanks, - Rob From ezmobius at gmail.com Thu Dec 28 22:24:14 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 28 Dec 2006 19:24:14 -0800 Subject: [Mongrel] production-izing a popular site In-Reply-To: References: Message-ID: <10148936-461E-40DB-AAC1-5307B99E076C@brainspl.at> On Dec 28, 2006, at 5:45 PM, Rob Sanheim wrote: > Lets say you have a site that is serving, oh, around 100k unique > visitors a day (plain ole' browser requests) - plus probably ~ 40k > uniques to feeds. Assume this site is 90% read like most of the web, > so the traffic looks like your typical news or portal site. There are > two web boxes behind a hardware load balancer, each doing apache 2.2.3 > -> mongrel_proxy_balancer -> mongrel clusters. One db machine, but > that shouldn't be stressed at all due to heavy caching of the content. > > Where to being with performance testing something like this? How many > mongrels per web box to start with? Any comparable sites in > production to compare it to (Ezra?) > > thanks, > - Rob Hey Rob- I am hosting a site that does about 110k unique visitors per day and about 250k page views/day. I would say it is a typical rails app with about 85% read and then some write and user contributed uploads and such. This app is pretty well optimized and doesn't have any requests except for file uploads that take longer then about 1.5 seconds to complete with most requests going out at about 35-45req/sec. Pretty typical rails app. It is running on two of our slices which are Xen VM's where there is a hardware load balancer up front, then nginx proxying to mongrel cluster on each node. It runs 3 mongrels on each VM for a total of 6. The database is on another super beefy machine but is not dedicated entirely to this app and is shared by others. I think this will be a good place for you to start load testing, 3 - 5 mongrels on each of your app servers. First get a baseline for your hardware by using ab or httperf on a fresh rails app that just does render :text => 'hello' to get the best case scenario for a rails request on your hardware. This is the fastest you can expect rails to serve a dynamic request on your boxes. It will probably be around 100-140req/ sec with sessions turned on. Then do a few more of this same benchmark against one mongrel and a few of your rails actions that represent short and long requests for your app. Write these results down or save them as you go. This is important because I discovered that 3 mongrels performs *better* then 5 mongrels on our architecture. This will vary widely though over different os and hardware configurations. Now its time to add more mongrels until you hit a point of diminishing returns or you are confident in your ability to handle the traffic you expect plus some. ounds like you have two nice boxes for your app servers so start with 3 mongrels on one of the servers. Get this benchmark for the render :text action as well as the other actions you benched in your real app. At this point you should get more req/sec when you measure with concurrent users at 20-50. Then add one mongrel at a time and measure until adding one more mongrel does not buy you any more performance. This is your sweet spot where you are maxing out your proxy_balancers efficiency. Now that you hit the sweet spot for one app server setup the second one the same way and do some more benches at high concurrency. If you have good hardware load balancers you should get a good improvement with the two app servers over just one of them. In reality software load balancers don't multiply the perf of a single mongrel by the number of mongrels. Its more like adding another mongrel may get you 20-50% more until you hit the sweet spot and can't get anymore. But the good hardware load balancers are more efficient and get closer to 50-80% improvement when adding more nodes. Sometimes it's nice to go straight from the hardware load balancers right to mongrel and use an asset_host for static content. I don't think you will need this for the app you are talking about. I suspect you will end up with 4-6 mongrels per app server and this will leave you some overhead for what you need to serve. Another point of reference is the http://yakimaherald.com gets about 75-90k page views/day on 3 mongrels behind apache22 on an xserve. -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From michael.dauria at gmail.com Thu Dec 28 23:36:05 2006 From: michael.dauria at gmail.com (Michael D'Auria) Date: Thu, 28 Dec 2006 23:36:05 -0500 Subject: [Mongrel] production-izing a popular site In-Reply-To: <10148936-461E-40DB-AAC1-5307B99E076C@brainspl.at> References: <10148936-461E-40DB-AAC1-5307B99E076C@brainspl.at> Message-ID: <1907e2ca0612282036k1e590f20h370edbd795db71f8@mail.gmail.com> Great email Ezra, if other people would like a link to what he just said you can check out what Zed has up on the mongrel site: http://mongrel.rubyforge.org/docs/how_many_mongrels.html. I have done this myself and found that 4 mongrels behind nginx was my sweet spot. Some notes however, if you decide to test with sessions turned on, make sure that you clear out the sessions inbetween runs, also make sure you are benchmarking the same setup you have in production, MySql store etc. Lastly, make sure you test over and over again with the same setup at least 5 times per cluster of mongrels to ensure that you get consistent results. You want to hone in on consistency rather than 1 spike in performance. .: Michael :. On 12/28/06, Ezra Zygmuntowicz wrote: > > > On Dec 28, 2006, at 5:45 PM, Rob Sanheim wrote: > > > Lets say you have a site that is serving, oh, around 100k unique > > visitors a day (plain ole' browser requests) - plus probably ~ 40k > > uniques to feeds. Assume this site is 90% read like most of the web, > > so the traffic looks like your typical news or portal site. There are > > two web boxes behind a hardware load balancer, each doing apache 2.2.3 > > -> mongrel_proxy_balancer -> mongrel clusters. One db machine, but > > that shouldn't be stressed at all due to heavy caching of the content. > > > > Where to being with performance testing something like this? How many > > mongrels per web box to start with? Any comparable sites in > > production to compare it to (Ezra?) > > > > thanks, > > - Rob > > > Hey Rob- > > I am hosting a site that does about 110k unique visitors per day > and > about 250k page views/day. I would say it is a typical rails app with > about 85% read and then some write and user contributed uploads and > such. This app is pretty well optimized and doesn't have any requests > except for file uploads that take longer then about 1.5 seconds to > complete with most requests going out at about 35-45req/sec. Pretty > typical rails app. > > It is running on two of our slices which are Xen VM's where there > is > a hardware load balancer up front, then nginx proxying to mongrel > cluster on each node. It runs 3 mongrels on each VM for a total of 6. > The database is on another super beefy machine but is not dedicated > entirely to this app and is shared by others. I think this will be a > good place for you to start load testing, 3 - 5 mongrels on each of > your app servers. First get a baseline for your hardware by using ab > or httperf on a fresh rails app that just does render :text => > 'hello' to get the best case scenario for a rails request on your > hardware. This is the fastest you can expect rails to serve a > dynamic request on your boxes. It will probably be around 100-140req/ > sec with sessions turned on. Then do a few more of this same > benchmark against one mongrel and a few of your rails actions that > represent short and long requests for your app. Write these results > down or save them as you go. This is important because I discovered > that 3 mongrels performs *better* then 5 mongrels on our > architecture. This will vary widely though over different os and > hardware configurations. > > Now its time to add more mongrels until you hit a point of > diminishing returns or you are confident in your ability to handle > the traffic you expect plus some. ounds like you have two nice boxes > for your app servers so start with 3 mongrels on one of the servers. > Get this benchmark for the render :text action as well as the other > actions you benched in your real app. At this point you should get > more req/sec when you measure with concurrent users at 20-50. Then > add one mongrel at a time and measure until adding one more mongrel > does not buy you any more performance. This is your sweet spot where > you are maxing out your proxy_balancers efficiency. > > Now that you hit the sweet spot for one app server setup the > second > one the same way and do some more benches at high concurrency. If you > have good hardware load balancers you should get a good improvement > with the two app servers over just one of them. In reality software > load balancers don't multiply the perf of a single mongrel by the > number of mongrels. Its more like adding another mongrel may get you > 20-50% more until you hit the sweet spot and can't get anymore. But > the good hardware load balancers are more efficient and get closer to > 50-80% improvement when adding more nodes. Sometimes it's nice to go > straight from the hardware load balancers right to mongrel and use an > asset_host for static content. I don't think you will need this for > the app you are talking about. > > I suspect you will end up with 4-6 mongrels per app server and > this > will leave you some overhead for what you need to serve. Another > point of reference is the http://yakimaherald.com gets about 75-90k > page views/day on 3 mongrels behind apache22 on an xserve. > > > > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > _______________________________________________ > 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/20061228/8716973e/attachment-0001.html From rsanheim at gmail.com Fri Dec 29 04:24:08 2006 From: rsanheim at gmail.com (Rob Sanheim) Date: Fri, 29 Dec 2006 03:24:08 -0600 Subject: [Mongrel] production-izing a popular site In-Reply-To: <10148936-461E-40DB-AAC1-5307B99E076C@brainspl.at> References: <10148936-461E-40DB-AAC1-5307B99E076C@brainspl.at> Message-ID: On 12/28/06, Ezra Zygmuntowicz wrote: > > On Dec 28, 2006, at 5:45 PM, Rob Sanheim wrote: > > > Lets say you have a site that is serving, oh, around 100k unique > > visitors a day (plain ole' browser requests) - plus probably ~ 40k > > uniques to feeds. Assume this site is 90% read like most of the web, > > so the traffic looks like your typical news or portal site. There are > > two web boxes behind a hardware load balancer, each doing apache 2.2.3 > > -> mongrel_proxy_balancer -> mongrel clusters. One db machine, but > > that shouldn't be stressed at all due to heavy caching of the content. > > > > Where to being with performance testing something like this? How many > > mongrels per web box to start with? Any comparable sites in > > production to compare it to (Ezra?) > > > > thanks, > > - Rob > > > Hey Rob- > > I am hosting a site that does about 110k unique visitors per day and > about 250k page views/day. I would say it is a typical rails app with > about 85% read and then some write and user contributed uploads and > such. This app is pretty well optimized and doesn't have any requests > except for file uploads that take longer then about 1.5 seconds to > complete with most requests going out at about 35-45req/sec. Pretty > typical rails app. > > It is running on two of our slices which are Xen VM's where there is > a hardware load balancer up front, then nginx proxying to mongrel > cluster on each node. It runs 3 mongrels on each VM for a total of 6. > The database is on another super beefy machine but is not dedicated > entirely to this app and is shared by others. I think this will be a > good place for you to start load testing, 3 - 5 mongrels on each of > your app servers. First get a baseline for your hardware by using ab > or httperf on a fresh rails app that just does render :text => > 'hello' to get the best case scenario for a rails request on your > hardware. This is the fastest you can expect rails to serve a > dynamic request on your boxes. It will probably be around 100-140req/ > sec with sessions turned on. Then do a few more of this same > benchmark against one mongrel and a few of your rails actions that > represent short and long requests for your app. Write these results > down or save them as you go. This is important because I discovered > that 3 mongrels performs *better* then 5 mongrels on our > architecture. This will vary widely though over different os and > hardware configurations. > > Now its time to add more mongrels until you hit a point of > diminishing returns or you are confident in your ability to handle > the traffic you expect plus some. ounds like you have two nice boxes > for your app servers so start with 3 mongrels on one of the servers. > Get this benchmark for the render :text action as well as the other > actions you benched in your real app. At this point you should get > more req/sec when you measure with concurrent users at 20-50. Then > add one mongrel at a time and measure until adding one more mongrel > does not buy you any more performance. This is your sweet spot where > you are maxing out your proxy_balancers efficiency. > > Now that you hit the sweet spot for one app server setup the second > one the same way and do some more benches at high concurrency. If you > have good hardware load balancers you should get a good improvement > with the two app servers over just one of them. In reality software > load balancers don't multiply the perf of a single mongrel by the > number of mongrels. Its more like adding another mongrel may get you > 20-50% more until you hit the sweet spot and can't get anymore. But > the good hardware load balancers are more efficient and get closer to > 50-80% improvement when adding more nodes. Sometimes it's nice to go > straight from the hardware load balancers right to mongrel and use an > asset_host for static content. I don't think you will need this for > the app you are talking about. > > I suspect you will end up with 4-6 mongrels per app server and this > will leave you some overhead for what you need to serve. Another > point of reference is the http://yakimaherald.com gets about 75-90k > page views/day on 3 mongrels behind apache22 on an xserve. > > > > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) Ezra, you the man. I'm gonna read this over a few more times when its not 3 am, and I'm sure it will be very helpful with my current project. thanks a lot, Rob From woufdraft at gmail.com Fri Dec 29 17:22:51 2006 From: woufdraft at gmail.com (Pou Belle) Date: Fri, 29 Dec 2006 23:22:51 +0100 Subject: [Mongrel] Error : No protocol handler was valid for the URL... Message-ID: Hi everybody, I just suscribe to the list because I have a problem using mongrel and mongrel_cluster... I setup a server (debian unstable wich provide apache 2.2.3 as a pakage) but I have an error when I try to access my application : ERROR 403 : Forbidden, You don't have permission to access / on this server. When I check apache's logs I found that : [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule. I googled this error and I found that I have to load 3 differents modules, so I typed : a2enmod proxy a2enmod proxy_http a2enmod proxy_balancer each time I get this return : This module is already enabled! So I have no idea to what can i do ... This is my config : ----------------------- cat /etc/apache2/mods-enabled/proxy.conf #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email. ProxyRequests Off AddDefaultCharset off Order deny,allow Allow from all #Allow from .example.com # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off | On | Full | Block ProxyVia On ----------------------- cat /etc/apache2/sites-enabled/demo.mysite.com ServerName demo.mysite.com DocumentRoot /var/rails/demo.mysite.com/current/public Options FollowSymLinks AllowOverride None Order allow,deny Allow from all BalancerMember BalancerMember BalancerMember RewriteEngine On # Make sure people go to demo.mysite.com, not myapp.com #RewriteCond %{HTTP_HOST} ^myapp.com$ [NC] #RewriteRule ^(.*)$ http://www.myapp.com$1 [R=301,L] # Yes, I've read no-www.com, but my site already has much Google-Fu on # www.blah.com. Feel free to comment this out. # Uncomment for rewrite debugging #RewriteLog logs/myapp_rewrite_log #RewriteLogLevel 9 # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # Uncomment for deflate debugging #DeflateFilterNote Input input_info #DeflateFilterNote Output output_info #DeflateFilterNote Ratio ratio_info #LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate #CustomLog logs/myapp_deflate_log deflate ErrorLog /var/log/apache2/demo.mysite.com_errors_log CustomLog /var/log/apache2/demo.mysite.com_log combined (Configuration comes principaly from http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ ) I need some help, thanks. (Hope you understand my english... I'm french) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061229/564e6742/attachment.html From DGeorgie at wiley.com Fri Dec 29 16:55:26 2006 From: DGeorgie at wiley.com (DGeorgie at wiley.com) Date: Fri, 29 Dec 2006 16:55:26 -0500 Subject: [Mongrel] Dimitar Georgievski is out of the office. Message-ID: I will be out of the office starting 12/29/2006 and will not return until 01/09/2007. I will respond to your message when I return. From zedshaw at zedshaw.com Fri Dec 29 18:13:00 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 29 Dec 2006 15:13:00 -0800 Subject: [Mongrel] Dimitar Georgievski is out of the office. In-Reply-To: References: Message-ID: <20061229151300.1d1ac445.zedshaw@zedshaw.com> On Fri, 29 Dec 2006 16:55:26 -0500 DGeorgie at wiley.com wrote: > > I will be out of the office starting 12/29/2006 and will not return until > 01/09/2007. > > I will respond to your message when I return. I smell office prank! -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From zedshaw at zedshaw.com Fri Dec 29 18:14:44 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 29 Dec 2006 15:14:44 -0800 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: References: Message-ID: <20061229151444.08a6c439.zedshaw@zedshaw.com> On Fri, 29 Dec 2006 23:22:51 +0100 "Pou Belle" wrote: > Hi everybody, > > I just suscribe to the list because I have a problem using mongrel and > mongrel_cluster... I setup a server (debian unstable wich provide apache > 2.2.3 as a pakage) but I have an error when I try to access my application : > ERROR 403 : Forbidden, You don't have permission to access / on this > server. > Your configuration seems rather complex. And it looks like you might have multiple versions of apache on that machine. I'd take a step back, start with a fresh config on a pristine machine, and do the simplest configuration you can. Then slowly build it up to what you need. If that all works then you'll have a stable base to compare with. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From kevwil at gmail.com Fri Dec 29 18:51:55 2006 From: kevwil at gmail.com (Kevin Williams) Date: Fri, 29 Dec 2006 16:51:55 -0700 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: <20061229151444.08a6c439.zedshaw@zedshaw.com> References: <20061229151444.08a6c439.zedshaw@zedshaw.com> Message-ID: <683a886f0612291551x6f0a6b73r4a13dc55c24922c2@mail.gmail.com> I have no idea what else you might be using Apache for (svn, etc.) or how open you are to new ideas, but I use the http://nginx.net server to front my mongrel servers, and I'm extremely pleased. You might want to check it out. On 12/29/06, Zed A. Shaw wrote: > On Fri, 29 Dec 2006 23:22:51 +0100 > "Pou Belle" wrote: > > > Hi everybody, > > > > I just suscribe to the list because I have a problem using mongrel and > > mongrel_cluster... I setup a server (debian unstable wich provide apache > > 2.2.3 as a pakage) but I have an error when I try to access my application : > > ERROR 403 : Forbidden, You don't have permission to access / on this > > server. > > > > Your configuration seems rather complex. And it looks like you might have multiple versions of apache on that machine. > > I'd take a step back, start with a fresh config on a pristine machine, and do the simplest configuration you can. Then slowly build it up to what you need. If that all works then you'll have a stable base to compare with. > > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Cheers, Kevin Williams http://www.almostserio.us/ "Any sufficiently advanced technology is indistinguishable from Magic." - Arthur C. Clarke From eden.li at gmail.com Fri Dec 29 20:12:13 2006 From: eden.li at gmail.com (Eden Li) Date: Fri, 29 Dec 2006 17:12:13 -0800 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: <683a886f0612291551x6f0a6b73r4a13dc55c24922c2@mail.gmail.com> References: <20061229151444.08a6c439.zedshaw@zedshaw.com> <683a886f0612291551x6f0a6b73r4a13dc55c24922c2@mail.gmail.com> Message-ID: <565dbdd40612291712i6fdf5320jba007426cc95245a@mail.gmail.com> Apologies if this has been mentioned before, but is there an updated comparison of all the different mongrel implementation methods out there? I've been on lighty+pen+mongrel for awhile and I don't really see a compelling to switch to nginx... unless someone else has experience with both and can elaborate on the goodness of nginx vs lighty/pen... On 12/29/06, Kevin Williams wrote: > I have no idea what else you might be using Apache for (svn, etc.) or > how open you are to new ideas, but I use the http://nginx.net server > to front my mongrel servers, and I'm extremely pleased. You might want > to check it out. > > On 12/29/06, Zed A. Shaw wrote: > > On Fri, 29 Dec 2006 23:22:51 +0100 > > "Pou Belle" wrote: > > > > > Hi everybody, > > > > > > I just suscribe to the list because I have a problem using mongrel and > > > mongrel_cluster... I setup a server (debian unstable wich provide apache > > > 2.2.3 as a pakage) but I have an error when I try to access my application : > > > ERROR 403 : Forbidden, You don't have permission to access / on this > > > server. > > > > > > > Your configuration seems rather complex. And it looks like you might have multiple versions of apache on that machine. > > > > I'd take a step back, start with a fresh config on a pristine machine, and do the simplest configuration you can. Then slowly build it up to what you need. If that all works then you'll have a stable base to compare with. > > > > > > -- > > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > > http://www.zedshaw.com/ > > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > > http://mongrel.rubyforge.org/ > > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > -- > Cheers, > > Kevin Williams > http://www.almostserio.us/ > > "Any sufficiently advanced technology is indistinguishable from > Magic." - Arthur C. Clarke > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Fri Dec 29 20:47:53 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 29 Dec 2006 17:47:53 -0800 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: <565dbdd40612291712i6fdf5320jba007426cc95245a@mail.gmail.com> References: <20061229151444.08a6c439.zedshaw@zedshaw.com> <683a886f0612291551x6f0a6b73r4a13dc55c24922c2@mail.gmail.com> <565dbdd40612291712i6fdf5320jba007426cc95245a@mail.gmail.com> Message-ID: <20061229174753.db59148c.zedshaw@zedshaw.com> On Fri, 29 Dec 2006 17:12:13 -0800 "Eden Li" wrote: > Apologies if this has been mentioned before, but is there an updated > comparison of all the different mongrel implementation methods out > there? > > I've been on lighty+pen+mongrel for awhile and I don't really see a > compelling to switch to nginx... unless someone else has experience > with both and can elaborate on the goodness of nginx vs lighty/pen... Well, nginx would be one component less than your current combo, and has a equally simple configuration. Unless you have a lighty specific component the lowered complexity would be a main motive. nginx also supports fcgi. Otherwise, if it ain't broke, don't fix it. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From g.vishnu at gmail.com Fri Dec 29 23:18:04 2006 From: g.vishnu at gmail.com (Vishnu Gopal) Date: Sat, 30 Dec 2006 09:48:04 +0530 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: <20061229174753.db59148c.zedshaw@zedshaw.com> References: <20061229151444.08a6c439.zedshaw@zedshaw.com> <683a886f0612291551x6f0a6b73r4a13dc55c24922c2@mail.gmail.com> <565dbdd40612291712i6fdf5320jba007426cc95245a@mail.gmail.com> <20061229174753.db59148c.zedshaw@zedshaw.com> Message-ID: Nginx cannot correctly set X-Forwarder-For headers right? Which means all your requests seem to end up coming from localhost. Is this still true or has something changed? Vish On 12/30/06, Zed A. Shaw wrote: > On Fri, 29 Dec 2006 17:12:13 -0800 > "Eden Li" wrote: > > > Apologies if this has been mentioned before, but is there an updated > > comparison of all the different mongrel implementation methods out > > there? > > > > I've been on lighty+pen+mongrel for awhile and I don't really see a > > compelling to switch to nginx... unless someone else has experience > > with both and can elaborate on the goodness of nginx vs lighty/pen... > > Well, nginx would be one component less than your current combo, and has a equally simple configuration. Unless you have a lighty specific component the lowered complexity would be a main motive. nginx also supports fcgi. > > Otherwise, if it ain't broke, don't fix it. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From ezmobius at gmail.com Fri Dec 29 23:40:52 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 29 Dec 2006 20:40:52 -0800 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: References: <20061229151444.08a6c439.zedshaw@zedshaw.com> <683a886f0612291551x6f0a6b73r4a13dc55c24922c2@mail.gmail.com> <565dbdd40612291712i6fdf5320jba007426cc95245a@mail.gmail.com> <20061229174753.db59148c.zedshaw@zedshaw.com> Message-ID: <43ED3929-E977-4646-A045-CDC257B6BB0E@brainspl.at> Nginx has never had a problem setting X-Forwarded-For ever since I have been using it. Just use these settings as part of the config: # needed for HTTPS only proxy_set_header X_FORWARDED_PROTO https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; You can see a full config file for nginx/mongrel here: http://brainspl.at/nginx.conf.txt -Ezra On Dec 29, 2006, at 8:18 PM, Vishnu Gopal wrote: > Nginx cannot correctly set X-Forwarder-For headers right? Which means > all your requests seem to end up coming from localhost. Is this still > true or has something changed? > > Vish > > On 12/30/06, Zed A. Shaw wrote: >> On Fri, 29 Dec 2006 17:12:13 -0800 >> "Eden Li" wrote: >> >>> Apologies if this has been mentioned before, but is there an updated >>> comparison of all the different mongrel implementation methods out >>> there? >>> >>> I've been on lighty+pen+mongrel for awhile and I don't really see a >>> compelling to switch to nginx... unless someone else has experience >>> with both and can elaborate on the goodness of nginx vs lighty/ >>> pen... >> >> Well, nginx would be one component less than your current combo, >> and has a equally simple configuration. Unless you have a lighty >> specific component the lowered complexity would be a main motive. >> nginx also supports fcgi. >> >> Otherwise, if it ain't broke, don't fix it. >> >> -- >> Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu >> http://www.zedshaw.com/ >> http://www.awprofessional.com/title/0321483502 -- The Mongrel Book >> http://mongrel.rubyforge.org/ >> http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From woufdraft at gmail.com Sat Dec 30 06:03:49 2006 From: woufdraft at gmail.com (Wouf) Date: Sat, 30 Dec 2006 12:03:49 +0100 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: <20061229151444.08a6c439.zedshaw@zedshaw.com> References: <20061229151444.08a6c439.zedshaw@zedshaw.com> Message-ID: <45964795.7000200@gmail.com> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061230/878c4e0c/attachment.html From me at seebq.com Sat Dec 30 08:57:00 2006 From: me at seebq.com (Charles Brian Quinn) Date: Sat, 30 Dec 2006 08:57:00 -0500 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: <45964795.7000200@gmail.com> References: <20061229151444.08a6c439.zedshaw@zedshaw.com> <45964795.7000200@gmail.com> Message-ID: <3a2de0cd0612300557r1bc665f6r692cd2635ef59e03@mail.gmail.com> What happens if you put an index.html file in public and try to access that: http://demo.site.com/index.html or, since you've got the maintencence.html rewrite rule, put a maintenence.html file in the system dir and see if it automatically loads that.... Could you try this conf instead: ServerName myapp.com ProxyPass / http://www.myapp.com:8000/ ProxyPassReverse / http://www.myapp.com:8000 ProxyPreserveHost on with a mongrel listening on 8000 (you may have to use localhost if you've only bound your mongrel to 127.0.0.1 in the configuration). if that works, like Zed, says, start to add back your balancer and the rewrite rules and increase the complexity and see what happens.... if that apache install coexists with the 2.054, it could be reading that one's doc root and skipping over yours. where's your .conf file for that app, and where does it get loaded, starting from, say httpd.conf. For example, /etc/httpd.conf loads vhosts.d/mysite.conf , etc.... good luck, -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com On 12/30/06, Wouf wrote: > > I think my configuration is not complex at all, my debian is a fresh > install with just apache 2.2.3 (just one apache version),svn, ruby, rails, > mongrel, capistrano and that's all. > > Everything works quite well, I cant deploy my local application using > capistrano... mongrel cluster is ok and the process of deploying works well. > The only problem I have is that I can't access my "just deployed" > application through apache... and I want to use apache. > > So you have no idea to where my error come from ? > > Zed A. Shaw a ?crit : > On Fri, 29 Dec 2006 23:22:51 +0100 > "Pou Belle" wrote: > > > > Hi everybody, > > I just suscribe to the list because I have a problem using mongrel and > mongrel_cluster... I setup a server (debian unstable wich provide apache > 2.2.3 as a pakage) but I have an error when I try to access my application : > ERROR 403 : Forbidden, You don't have permission to access / on this > server. > > > Your configuration seems rather complex. And it looks like you might have > multiple versions of apache on that machine. > > I'd take a step back, start with a fresh config on a pristine machine, and > do the simplest configuration you can. Then slowly build it up to what you > need. If that all works then you'll have a stable base to compare with. > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > From mental at rydia.net Sat Dec 30 15:36:58 2006 From: mental at rydia.net (MenTaLguY) Date: Sat, 30 Dec 2006 15:36:58 -0500 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem In-Reply-To: References: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> <1167198482.5545.18.camel@localhost.localdomain> Message-ID: <1167511018.17601.1.camel@localhost.localdomain> On Wed, 2006-12-27 at 01:42 -0500, Wilson Bilkovich wrote: > I asked Eric Hodel about it, and he said it looked like the 'thread' > requirement in rubygems was added accidentally. That was after only a > few moments of contemplation, so it may turn out differently in the > long run. Any updates on this since? -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061230/5aa328cb/attachment.bin From ezmobius at gmail.com Sat Dec 30 18:36:20 2006 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Sat, 30 Dec 2006 15:36:20 -0800 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem In-Reply-To: <1167511018.17601.1.camel@localhost.localdomain> References: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> <1167198482.5545.18.camel@localhost.localdomain> <1167511018.17601.1.camel@localhost.localdomain> Message-ID: <84AEE61E-225A-46D9-BDFB-391C2432A5A0@brainspl.at> On Dec 30, 2006, at 12:36 PM, MenTaLguY wrote: > On Wed, 2006-12-27 at 01:42 -0500, Wilson Bilkovich wrote: >> I asked Eric Hodel about it, and he said it looked like the 'thread' >> requirement in rubygems was added accidentally. That was after >> only a >> few moments of contemplation, so it may turn out differently in the >> long run. > > Any updates on this since? > > -mental Hey Mental- I have been talking with Eric Hodel about this and he had a suggestion. Maybe instead of requiring that fastthread be required before thread we should add the necessary Object.send :remove_const calls to remove Thread and Mutex and friends. would that work? I took the latest fastthread code and made these changes to the C code and recompiled. It seems to be working fine but I am not sure how to tell that fastthread is really loaded instead of thread. Here is what I did: # I removed this test: if (!RTEST(rb_require("thread"))) { rb_raise(rb_eRuntimeError, "fastthread must be required before thread"); } # and added these statements. rb_mod_remove_const(rb_cObject, rb_str_new2("Mutex")); rb_mod_remove_const(rb_cObject, rb_str_new2("ConditionVariable")); rb_mod_remove_const(rb_cObject, rb_str_new2("Queue")); rb_mod_remove_const(rb_cObject, rb_str_new2("SizedQueue")); This seems to work fine but I am unsure. Mental what do you think about this? Now instead of requiring fastthread after thread, we require thread and then require fastthread. Or since rubygems is already gong to require thread this takes care of it. It does seem better to allow fastthread to come after thread like this. In your test cases I also added require 'thread; before the require 'fastthread' to make them work. How can we verify that this is a valid fix? Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From woufdraft at gmail.com Sat Dec 30 18:41:00 2006 From: woufdraft at gmail.com (Wouf) Date: Sun, 31 Dec 2006 00:41:00 +0100 Subject: [Mongrel] Error : No protocol handler was valid for the URL... In-Reply-To: <3a2de0cd0612300557r1bc665f6r692cd2635ef59e03@mail.gmail.com> References: <20061229151444.08a6c439.zedshaw@zedshaw.com> <45964795.7000200@gmail.com> <3a2de0cd0612300557r1bc665f6r692cd2635ef59e03@mail.gmail.com> Message-ID: <4596F90C.9060303@gmail.com> I succeed with your type of configuration, thanks. Charles Brian Quinn a ?crit : > What happens if you put an index.html file in public and try to access that: > > http://demo.site.com/index.html > > or, since you've got the maintencence.html rewrite rule, put a > maintenence.html file in the system dir and see if it automatically > loads that.... > > Could you try this conf instead: > > > ServerName myapp.com > > ProxyPass / http://www.myapp.com:8000/ > ProxyPassReverse / http://www.myapp.com:8000 > ProxyPreserveHost on > > > with a mongrel listening on 8000 (you may have to use localhost if > you've only bound your mongrel to 127.0.0.1 in the configuration). > > if that works, like Zed, says, start to add back your balancer and the > rewrite rules and increase the complexity and see what happens.... > > if that apache install coexists with the 2.054, it could be reading > that one's doc root and skipping over yours. where's your .conf file > for that app, and where does it get loaded, starting from, say > httpd.conf. For example, /etc/httpd.conf loads vhosts.d/mysite.conf , > etc.... > > good luck, > > From mental at rydia.net Sun Dec 31 00:59:06 2006 From: mental at rydia.net (MenTaLguY) Date: Sun, 31 Dec 2006 00:59:06 -0500 Subject: [Mongrel] Rubygems 0.9.0.8 and Fastthread problem In-Reply-To: <84AEE61E-225A-46D9-BDFB-391C2432A5A0@brainspl.at> References: <977C46DF-830B-402F-AAF2-06E5C0714CE3@gmail.com> <71166b3b0612261443r3f097b4v17e38488d0a70305@mail.gmail.com> <1167198482.5545.18.camel@localhost.localdomain> <1167511018.17601.1.camel@localhost.localdomain> <84AEE61E-225A-46D9-BDFB-391C2432A5A0@brainspl.at> Message-ID: <1167544746.17601.51.camel@localhost.localdomain> On Sat, 2006-12-30 at 15:36 -0800, Ezra Zygmuntowicz wrote: > I have been talking with Eric Hodel about this and he had a > suggestion. Maybe instead of requiring that fastthread be required > before thread we should add the necessary Object.send :remove_const > calls to remove Thread and Mutex and friends. would that work? Ahh, it should. That will avoid messing with the classes of already created Mutexes etc. I can go ahead and do another fastthread release with that approach. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061231/380b9621/attachment-0001.bin From mental at rydia.net Sun Dec 31 01:39:11 2006 From: mental at rydia.net (MenTaLguY) Date: Sun, 31 Dec 2006 01:39:11 -0500 Subject: [Mongrel] [ANN] fastthread 0.6 Message-ID: <1167547151.17601.56.camel@localhost.localdomain> I've released fastthread 0.6, which relaxes the order of requires so that fastthread need not be required before thread anymore. Thanks go to Eric and Ezra. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061231/ad1fa62d/attachment.bin From mental at rydia.net Sun Dec 31 02:04:32 2006 From: mental at rydia.net (MenTaLguY) Date: Sun, 31 Dec 2006 02:04:32 -0500 Subject: [Mongrel] [ANN] fastthread 0.6.1 Message-ID: <1167548672.17601.61.camel@localhost.localdomain> I just realized -- if fastthread can be included while Mutex-using code is already running, then the definition and replacement of the classes needs to happen atomically. Otherwise, it creates a race condition where a thread can e.g. end up seeing an incompletely defined Mutex class or none at all. fastthread 0.6.1 addresses this by defining the classes and then atomically swapping the constant definitions as a final step. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20061231/5b51a1ca/attachment.bin From zedshaw at zedshaw.com Sun Dec 31 08:26:24 2006 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Sun, 31 Dec 2006 05:26:24 -0800 Subject: [Mongrel] [ANN] fastthread 0.6.1 In-Reply-To: <1167548672.17601.61.camel@localhost.localdomain> References: <1167548672.17601.61.camel@localhost.localdomain> Message-ID: <20061231052624.b01d4f07.zedshaw@zedshaw.com> On Sun, 31 Dec 2006 02:04:32 -0500 MenTaLguY wrote: > I just realized -- if fastthread can be included while Mutex-using code > is already running, then the definition and replacement of the classes > needs to happen atomically. Otherwise, it creates a race condition > where a thread can e.g. end up seeing an incompletely defined Mutex > class or none at all. > > fastthread 0.6.1 addresses this by defining the classes and then > atomically swapping the constant definitions as a final step. Very nice mental, I'll push out new gems for unix and win32 later today. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. From luislavena at gmail.com Sun Dec 31 23:21:56 2006 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 1 Jan 2007 01:21:56 -0300 Subject: [Mongrel] [ANN] fastthread 0.6.1 In-Reply-To: <20061231052624.b01d4f07.zedshaw@zedshaw.com> References: <1167548672.17601.61.camel@localhost.localdomain> <20061231052624.b01d4f07.zedshaw@zedshaw.com> Message-ID: <71166b3b0612312021i32745625s2b6cbd3453ac7998@mail.gmail.com> On 12/31/06, Zed A. Shaw wrote: > On Sun, 31 Dec 2006 02:04:32 -0500 > MenTaLguY wrote: > > > I just realized -- if fastthread can be included while Mutex-using code > > is already running, then the definition and replacement of the classes > > needs to happen atomically. Otherwise, it creates a race condition > > where a thread can e.g. end up seeing an incompletely defined Mutex > > class or none at all. > > > > fastthread 0.6.1 addresses this by defining the classes and then > > atomically swapping the constant definitions as a final step. > > Very nice mental, I'll push out new gems for unix and win32 later today. > Hey Zed, I already uploaded the mswin32 gem of fastthread 0.6.1 ... btw, Happy New Year! -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi