From gilesb at gmail.com Sun Jul 1 19:04:25 2007 From: gilesb at gmail.com (Giles Bowkett) Date: Sun, 1 Jul 2007 16:04:25 -0700 Subject: [Mongrel] how many Mongrels? Message-ID: <2d81dedb0707011604g8d00313qf96aa19740b3911c@mail.gmail.com> Hi - I've got a pretty popular Rails app on a Mongrel cluster with Apache and mod_proxy_balancer. How do I decide how many Mongrel servers to put in the cluster? I don't have stats for the number of requests hitting the server yet, but I should have that data soon. The server has 2GB of RAM and has to do a lot of work with RMagick, including generating and storing lots of images. My predecessors put all of the image storage on the filesystem, and I won't be able to change that right away. Any & all help massively appreciated. -- Giles Bowkett Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org From gilesb at gmail.com Sun Jul 1 19:06:06 2007 From: gilesb at gmail.com (Giles Bowkett) Date: Sun, 1 Jul 2007 16:06:06 -0700 Subject: [Mongrel] how many Mongrels? In-Reply-To: <2d81dedb0707011604g8d00313qf96aa19740b3911c@mail.gmail.com> References: <2d81dedb0707011604g8d00313qf96aa19740b3911c@mail.gmail.com> Message-ID: <2d81dedb0707011606i56f86322s2bfbe60f474da18d@mail.gmail.com> Whoops. Found this: http://mongrel.rubyforge.org/docs/how_many_mongrels.html Sorry! On 7/1/07, Giles Bowkett wrote: > Hi - I've got a pretty popular Rails app on a Mongrel cluster with > Apache and mod_proxy_balancer. How do I decide how many Mongrel > servers to put in the cluster? > > I don't have stats for the number of requests hitting the server yet, > but I should have that data soon. The server has 2GB of RAM and has to > do a lot of work with RMagick, including generating and storing lots > of images. My predecessors put all of the image storage on the > filesystem, and I won't be able to change that right away. > > Any & all help massively appreciated. > > -- > Giles Bowkett > > Blog: http://gilesbowkett.blogspot.com > Portfolio: http://www.gilesgoatboy.org > -- Giles Bowkett Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org From graham.ashton at gmail.com Thu Jul 5 04:20:59 2007 From: graham.ashton at gmail.com (Graham Ashton) Date: Thu, 5 Jul 2007 09:20:59 +0100 Subject: [Mongrel] Can't serve files with query string to IE Message-ID: <7438eebe0707050120w6f9a18b6u1eb8bdc593115c70@mail.gmail.com> I've been seeing some weird behaviour with IE. I'm running mongrel 1.0.1 with Rails, in a development environment (so Apache/Pound aren't involved yet). IE (versions 6 and 7) are unable to retrieve any static files (e.g. stylesheets or images) from mongrel if the URL contains a question mark and a query string. It's okay with static files that don't have a query string appended. Rather than serve the file, once the query string is appended, mongrel passes the request through to Rails, and I get a routing error. This is unfortunate, as Rails likes to append a question mark to all the CSS and JavaScript URLs, which makes it impossible for IE to retrieve them. I did some packet sniffing, and have narrowed down what it is that causes IE to stumble. It sends a GET request that looks like this: GET http://hostname:3000/path/to/file?foo HTTP/1.1 rather than this: GET /path/to/file?foo HTTP/1.1 I've reproduced the behaviour with telnet. Has anybody else seen this behaviour? I should mention that it's only the copies of IE that run inside my VMs that produce these weird GET requests; another copy of IE in the office works fine, and doesn't prepend http://hostname:3000 to each URL. Browsing the web with this copy of IE appears to be fine. I'm flummoxed by this, and wonder whether anybody might be able to suggest what's causing IE to freak out in my VM. I'm hoping that if I were to run mongrel behind Pound that the issue would just go away, but I'd rather know the cause than just cross my fingers... Cheers, Graham From carpeaqua at gmail.com Fri Jul 6 13:15:51 2007 From: carpeaqua at gmail.com (Justin Williams) Date: Fri, 6 Jul 2007 12:15:51 -0500 Subject: [Mongrel] 503 Errors While Cluster Is Still Active Message-ID: <981f96b60707061015y445cf2f0i3ab877851167dc0a@mail.gmail.com> I've setup a new mongrel cluster on my VPS, and am noticing a lot if 503 errors if I try to hit the server too many times in succession in a few seconds. I've read that this is usually caused by the cluster crashing, but I haven't been seen the cluster crash when I do this. Does anyone have any other ideas what might cause this? I have my server configured how MediaTemple suggested (http://kb.mediatemple.net/article.php?id=279). It just seems like Apache isn't able to always see the cluster. Thanks for your help. - Justin Williams Owner, Second Gear http://www.secondgearllc.com/ From jgeiger at gmail.com Fri Jul 6 18:39:14 2007 From: jgeiger at gmail.com (Joey Geiger) Date: Fri, 6 Jul 2007 17:39:14 -0500 Subject: [Mongrel] 503 Errors While Cluster Is Still Active In-Reply-To: <981f96b60707061015y445cf2f0i3ab877851167dc0a@mail.gmail.com> References: <981f96b60707061015y445cf2f0i3ab877851167dc0a@mail.gmail.com> Message-ID: <466af3440707061539g27ae9194h6e2aa7a69baddc90@mail.gmail.com> I get that when I start up apache and there isn't a mongrel available to answer. I think in your case it may be that all your mongrels are busy, and it's letting you know that. You might need to add more mongrel processes to see if it helps, but that may be an issue if you're only running on a VPS with 64MB.... Mongrel w/rails starts at 32mb and grows for me, so it seems you could have 2 running before you get into performance issues... On 7/6/07, Justin Williams wrote: > I've setup a new mongrel cluster on my VPS, and am noticing a lot if > 503 errors if I try to hit the server too many times in succession in > a few seconds. I've read that this is usually caused by the cluster > crashing, but I haven't been seen the cluster crash when I do this. > > Does anyone have any other ideas what might cause this? I have my > server configured how MediaTemple suggested > (http://kb.mediatemple.net/article.php?id=279). It just seems like > Apache isn't able to always see the cluster. > > Thanks for your help. > > - > Justin Williams > Owner, Second Gear > http://www.secondgearllc.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From will at hotgazpacho.com Fri Jul 6 19:46:01 2007 From: will at hotgazpacho.com (Will Green) Date: Fri, 06 Jul 2007 19:46:01 -0400 Subject: [Mongrel] 503 Errors While Cluster Is Still Active In-Reply-To: <466af3440707061539g27ae9194h6e2aa7a69baddc90@mail.gmail.com> References: <981f96b60707061015y445cf2f0i3ab877851167dc0a@mail.gmail.com> <466af3440707061539g27ae9194h6e2aa7a69baddc90@mail.gmail.com> Message-ID: <468ED439.9090205@hotgazpacho.com> VPS you say? How much memory do you have allocated to you? Rails takes A LOT of memory. I've seen Mongrels running rails eating up 20 Mb EACH for *very* simple actions. I recall people on this list mentioning 50+ Mb when RMagick is involved. Make sure you're not hitting the memory limit on your VPS, which triggers killing off the process, or parts thereof. == Will Green Joey Geiger wrote: > I get that when I start up apache and there isn't a mongrel available to answer. > > I think in your case it may be that all your mongrels are busy, and > it's letting you know that. You might need to add more mongrel > processes to see if it helps, but that may be an issue if you're only > running on a VPS with 64MB.... Mongrel w/rails starts at 32mb and > grows for me, so it seems you could have 2 running before you get into > performance issues... > > On 7/6/07, Justin Williams wrote: >> I've setup a new mongrel cluster on my VPS, and am noticing a lot if >> 503 errors if I try to hit the server too many times in succession in >> a few seconds. I've read that this is usually caused by the cluster >> crashing, but I haven't been seen the cluster crash when I do this. >> >> Does anyone have any other ideas what might cause this? I have my >> server configured how MediaTemple suggested >> (http://kb.mediatemple.net/article.php?id=279). It just seems like >> Apache isn't able to always see the cluster. >> >> Thanks for your help. >> >> - >> Justin Williams >> Owner, Second Gear >> http://www.secondgearllc.com/ >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From carpeaqua at gmail.com Fri Jul 6 23:23:10 2007 From: carpeaqua at gmail.com (Justin Williams) Date: Fri, 6 Jul 2007 22:23:10 -0500 Subject: [Mongrel] 503 Errors While Cluster Is Still Active In-Reply-To: <468ED439.9090205@hotgazpacho.com> References: <981f96b60707061015y445cf2f0i3ab877851167dc0a@mail.gmail.com> <466af3440707061539g27ae9194h6e2aa7a69baddc90@mail.gmail.com> <468ED439.9090205@hotgazpacho.com> Message-ID: <981f96b60707062023h528abef6w7d3e9804a7966790@mail.gmail.com> I've got three Mongrels spawned, each hovering around 40MB each. I also just checked memory usage, and that doesn't seem to be an issue at all. When I try to pound the server, it's not killing off the processes, which is what is weird to me. Usually when I get the 503 error it is because mongrel isn't spawned, but in this case all the processes are up and running fine, and the connection works about half the time. It's just every few actions it will fail. Any other ideas? - j On 7/6/07, Will Green wrote: > VPS you say? How much memory do you have allocated to you? Rails takes A > LOT of memory. I've seen Mongrels running rails eating up 20 Mb EACH for > *very* simple actions. I recall people on this list mentioning 50+ Mb > when RMagick is involved. > > Make sure you're not hitting the memory limit on your VPS, which > triggers killing off the process, or parts thereof. > > == > Will Green > > Joey Geiger wrote: > > I get that when I start up apache and there isn't a mongrel available to answer. > > > > I think in your case it may be that all your mongrels are busy, and > > it's letting you know that. You might need to add more mongrel > > processes to see if it helps, but that may be an issue if you're only > > running on a VPS with 64MB.... Mongrel w/rails starts at 32mb and > > grows for me, so it seems you could have 2 running before you get into > > performance issues... > > > > On 7/6/07, Justin Williams wrote: > >> I've setup a new mongrel cluster on my VPS, and am noticing a lot if > >> 503 errors if I try to hit the server too many times in succession in > >> a few seconds. I've read that this is usually caused by the cluster > >> crashing, but I haven't been seen the cluster crash when I do this. > >> > >> Does anyone have any other ideas what might cause this? I have my > >> server configured how MediaTemple suggested > >> (http://kb.mediatemple.net/article.php?id=279). It just seems like > >> Apache isn't able to always see the cluster. > >> > >> Thanks for your help. > >> > >> - > >> Justin Williams > >> Owner, Second Gear > >> http://www.secondgearllc.com/ > >> _______________________________________________ > >> Mongrel-users mailing list > >> Mongrel-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/mongrel-users > >> > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- - Justin Williams justin at carpeaqua.com work: http://www.secondgearllc.com/ play: http://www.carpeaqua.com From matt.mcknight at gmail.com Fri Jul 6 23:43:02 2007 From: matt.mcknight at gmail.com (Matthew McKnight) Date: Fri, 6 Jul 2007 23:43:02 -0400 Subject: [Mongrel] 503 Errors While Cluster Is Still Active In-Reply-To: <981f96b60707062023h528abef6w7d3e9804a7966790@mail.gmail.com> References: <981f96b60707061015y445cf2f0i3ab877851167dc0a@mail.gmail.com> <466af3440707061539g27ae9194h6e2aa7a69baddc90@mail.gmail.com> <468ED439.9090205@hotgazpacho.com> <981f96b60707062023h528abef6w7d3e9804a7966790@mail.gmail.com> Message-ID: I am not an Apache expert, but I have had much success with the method preached on the mongrel site: http://mongrel.rubyforge.org/docs/apache.html for using mod proxy balancer. You can mess with the timeout settings very easily there, so apache will wait a bit longer before reporting back a 503. I looked at the instructions on mediatemple, and they seemed a bit inadequate. Do you have Apache 2.2.3 on your VPS? On 7/6/07, Justin Williams wrote > > I've got three Mongrels spawned, each hovering around 40MB each. I > also just checked memory usage, and that doesn't seem to be an issue > at all. > > When I try to pound the server, it's not killing off the processes, > which is what is weird to me. Usually when I get the 503 error it > is because mongrel isn't spawned, but in this case all the processes > are up and running fine, and the connection works about half the time. > It's just every few actions it will fail. > > Any other ideas? > > - j > > On 7/6/07, Will Green wrote: > > VPS you say? How much memory do you have allocated to you? Rails takes A > > LOT of memory. I've seen Mongrels running rails eating up 20 Mb EACH for > > *very* simple actions. I recall people on this list mentioning 50+ Mb > > when RMagick is involved. > > > > Make sure you're not hitting the memory limit on your VPS, which > > triggers killing off the process, or parts thereof. > > > > == > > Will Green > > > > Joey Geiger wrote: > > > I get that when I start up apache and there isn't a mongrel available > to answer. > > > > > > I think in your case it may be that all your mongrels are busy, and > > > it's letting you know that. You might need to add more mongrel > > > processes to see if it helps, but that may be an issue if you're only > > > running on a VPS with 64MB.... Mongrel w/rails starts at 32mb and > > > grows for me, so it seems you could have 2 running before you get into > > > performance issues... > > > > > > On 7/6/07, Justin Williams wrote: > > >> I've setup a new mongrel cluster on my VPS, and am noticing a lot if > > >> 503 errors if I try to hit the server too many times in succession in > > >> a few seconds. I've read that this is usually caused by the cluster > > >> crashing, but I haven't been seen the cluster crash when I do this. > > >> > > >> Does anyone have any other ideas what might cause this? I have my > > >> server configured how MediaTemple suggested > > >> (http://kb.mediatemple.net/article.php?id=279). It just seems like > > >> Apache isn't able to always see the cluster. > > >> > > >> Thanks for your help. > > >> > > >> - > > >> Justin Williams > > >> Owner, Second Gear > > >> http://www.secondgearllc.com/ > > >> _______________________________________________ > > >> Mongrel-users mailing list > > >> Mongrel-users at rubyforge.org > > >> http://rubyforge.org/mailman/listinfo/mongrel-users > > >> > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > -- > - > Justin Williams > justin at carpeaqua.com > work: http://www.secondgearllc.com/ > play: http://www.carpeaqua.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- -Matt McKnight- www.lmnsolutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070706/86b5e8ca/attachment.html From carpeaqua at gmail.com Sat Jul 7 03:34:02 2007 From: carpeaqua at gmail.com (Justin Williams) Date: Sat, 7 Jul 2007 02:34:02 -0500 Subject: [Mongrel] 503 Errors While Cluster Is Still Active In-Reply-To: References: <981f96b60707061015y445cf2f0i3ab877851167dc0a@mail.gmail.com> <466af3440707061539g27ae9194h6e2aa7a69baddc90@mail.gmail.com> <468ED439.9090205@hotgazpacho.com> <981f96b60707062023h528abef6w7d3e9804a7966790@mail.gmail.com> Message-ID: <981f96b60707070034w45f317e5y6c94c6b6415a9b37@mail.gmail.com> Switching over to mod_proxy_balancer seems to help things out. Thanks for the help! - j On 7/6/07, Matthew McKnight wrote: > I am not an Apache expert, but I have had much success with the method > preached on the mongrel site: > http://mongrel.rubyforge.org/docs/apache.html for using mod > proxy balancer. You can mess with the timeout settings very easily there, > so apache will wait a bit longer before reporting back a 503. I looked at > the instructions on mediatemple, and they seemed a bit inadequate. Do you > have Apache 2.2.3 on your VPS? > > > > On 7/6/07, Justin Williams wrote > > I've got three Mongrels spawned, each hovering around 40MB each. I > > also just checked memory usage, and that doesn't seem to be an issue > > at all. > > > > When I try to pound the server, it's not killing off the processes, > > which is what is weird to me. Usually when I get the 503 error it > > is because mongrel isn't spawned, but in this case all the processes > > are up and running fine, and the connection works about half the time. > > It's just every few actions it will fail. > > > > Any other ideas? > > > > - j > > > > On 7/6/07, Will Green < will at hotgazpacho.com> wrote: > > > VPS you say? How much memory do you have allocated to you? Rails takes A > > > LOT of memory. I've seen Mongrels running rails eating up 20 Mb EACH for > > > *very* simple actions. I recall people on this list mentioning 50+ Mb > > > when RMagick is involved. > > > > > > Make sure you're not hitting the memory limit on your VPS, which > > > triggers killing off the process, or parts thereof. > > > > > > == > > > Will Green > > > > > > Joey Geiger wrote: > > > > I get that when I start up apache and there isn't a mongrel available > to answer. > > > > > > > > I think in your case it may be that all your mongrels are busy, and > > > > it's letting you know that. You might need to add more mongrel > > > > processes to see if it helps, but that may be an issue if you're only > > > > running on a VPS with 64MB.... Mongrel w/rails starts at 32mb and > > > > grows for me, so it seems you could have 2 running before you get into > > > > performance issues... > > > > > > > > On 7/6/07, Justin Williams wrote: > > > >> I've setup a new mongrel cluster on my VPS, and am noticing a lot if > > > >> 503 errors if I try to hit the server too many times in succession in > > > >> a few seconds. I've read that this is usually caused by the cluster > > > >> crashing, but I haven't been seen the cluster crash when I do this. > > > >> > > > >> Does anyone have any other ideas what might cause this? I have my > > > >> server configured how MediaTemple suggested > > > >> (http://kb.mediatemple.net/article.php?id=279). It > just seems like > > > >> Apache isn't able to always see the cluster. > > > >> > > > >> Thanks for your help. > > > >> > > > >> - > > > >> Justin Williams > > > >> Owner, Second Gear > > > >> http://www.secondgearllc.com/ > > > >> _______________________________________________ > > > >> Mongrel-users mailing list > > > >> Mongrel-users at rubyforge.org > > > >> http://rubyforge.org/mailman/listinfo/mongrel-users > > > >> > > > > _______________________________________________ > > > > Mongrel-users mailing list > > > > Mongrel-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > -- > > - > > Justin Williams > > justin at carpeaqua.com > > work: http://www.secondgearllc.com/ > > play: http://www.carpeaqua.com > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > -- > -Matt McKnight- > www.lmnsolutions.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- - Justin Williams justin at carpeaqua.com work: http://www.secondgearllc.com/ play: http://www.carpeaqua.com From ry at tinyclouds.org Sat Jul 7 20:58:45 2007 From: ry at tinyclouds.org (ry dahl) Date: Sun, 8 Jul 2007 02:58:45 +0200 Subject: [Mongrel] streaming upload progress plug-in Message-ID: <21ee31950707071758v5fc59e59i2768cc0aa891634e@mail.gmail.com> I'm working on new methods of doing Ajax calls through streaming responses. I've created a little javascript library (which depends on prototype.js) that can interpret a stream of JSON objects separated by semicolons. As an application of this, this Mongrel plug-in streams upload status when given a qualified upload_id. It looks like this: {"received":5939792,"status":200,"state":"uploading","size":36872784}; {"received":6398544,"status":200,"state":"uploading","size":36872784}; [...] {"received":36479568,"status":200,"state":"uploading","size":36872784}; {"received":36856400,"status":200,"state":"uploading","size":36872784}; {"received":36872784,"status":200,"state":"done","size":36872784}; (The format of these JSON objects is the same that is being used in the upload progress plug-in for Lighttpd 1.5 as described at http://trac.lighttpd.net/trac/wiki/Docs:ModUploadProgress ) Included with this package is the javascript library Ajax.Pull, and an example Rails application. http://s3.amazonaws.com/four.livejournal/20070708/mongrel_streaming_upload_progress-0.2.gem http://s3.amazonaws.com/four.livejournal/20070708/mongrel_streaming_upload_progress-0.2.tgz This should work with Safari 3 and Firefox. I haven't tested IE. (When I get around to it will add a hack to Ajax.Pull which falls back on polling a URL for the JSON updates if the browser does not support Ajax streaming. This plug-in already supports this sort of polling with the ?single=true URL parameter.) ry From nstlaurent at wantedtech.com Mon Jul 9 12:06:13 2007 From: nstlaurent at wantedtech.com (Nicolas St-Laurent) Date: Mon, 9 Jul 2007 12:06:13 -0400 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin Message-ID: Hello, I'm trying to deploy my application with Capistrano using Mongrel recipes. Since I've installed Ruby from source code, mongrel scripts are found in /usr/local/bin. But the recipes can't find mongrel_rails : "bash: mongrel_rails: command not found". The path of the user account used to deploy is OK. For sure, I can redefine start_mongrel_cluster/restart_mongrel_cluster/stop_mongrel_cluster tasks in the recipes to add path before calling mongrel_rails. Any idea of a better solution ? Thanks, Nicolas St-Laurent Analyst-Programmer Wanted Technologies 350, Blvd. Charest East, 4th Floor Quebec City, Quebec Canada G1K 3H5 Tel: (418)523-6663 Fax: (418)523-4205 http://www.wantedtech.com/ From wayneeseguin at gmail.com Mon Jul 9 13:42:03 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Mon, 9 Jul 2007 13:42:03 -0400 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: References: Message-ID: <06258910-F0C2-493F-BF37-9A046334B9A5@gmail.com> On Jul 09, 2007, at 12:06 , Nicolas St-Laurent wrote: > Hello, > > I'm trying to deploy my application with Capistrano using Mongrel > recipes. Since I've installed Ruby from source code, mongrel scripts > are found in /usr/local/bin. But the recipes can't find > mongrel_rails : "bash: mongrel_rails: command not found". The path of > the user account used to deploy is OK. For sure, I can redefine > start_mongrel_cluster/restart_mongrel_cluster/stop_mongrel_cluster > tasks in the recipes to add path before calling mongrel_rails. > > Any idea of a better solution ? I install Ruby from source on all my machines so I'm not sure where that comes in. mongrel_rails command is installed with the mongrel gem (gem install mongrel). Then just make sure that mongrel_rails is in the path of the user account you're deploying to, you could also add /usr/local/bin to the users path. ( PATH=/usr/local/bin:... ) -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070709/667eb5e6/attachment-0001.html From nstlaurent at wantedtech.com Mon Jul 9 15:18:16 2007 From: nstlaurent at wantedtech.com (Nicolas St-Laurent) Date: Mon, 9 Jul 2007 15:18:16 -0400 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: <06258910-F0C2-493F-BF37-9A046334B9A5@gmail.com> References: <06258910-F0C2-493F-BF37-9A046334B9A5@gmail.com> Message-ID: <969ECEAD-27D6-4330-8847-7264F0A76223@wantedtech.com> Le 07-07-09 ? 13:42, Wayne E. Seguin a ?crit : > On Jul 09, 2007, at 12:06 , Nicolas St-Laurent wrote: >> Hello, >> >> I'm trying to deploy my application with Capistrano using Mongrel >> recipes. Since I've installed Ruby from source code, mongrel scripts >> are found in /usr/local/bin. But the recipes can't find >> mongrel_rails : "bash: mongrel_rails: command not found". The path of >> the user account used to deploy is OK. For sure, I can redefine >> start_mongrel_cluster/restart_mongrel_cluster/stop_mongrel_cluster >> tasks in the recipes to add path before calling mongrel_rails. >> >> Any idea of a better solution ? > > I install Ruby from source on all my machines so I'm not sure where > that comes in. > > mongrel_rails command is installed with the mongrel gem (gem > install mongrel). > > Then just make sure that mongrel_rails is in the path of the user > account you're deploying to, you could also add /usr/local/bin to > the users path. ( PATH=/usr/local/bin:... ) > -- > Wayne E. Seguin > Sr. Systems Architect & Systems Admin > wayneseguin at gmail.com > Thanks for your feedback. Well, /usr/local/bin is already in user's path. But since PATH is define in /etc/profile, it ain't define when a subshell is started, hence a run "echo $PATH" gives the default path : /usr/bin:/bin:/usr/sbin:/sbin I certainly miss something, but I doesn't know what. I'm on SuSE Entreprise 64bits, but I've got the same issue on Mac OS X, Ubuntu or Debian. From wayneeseguin at gmail.com Mon Jul 9 15:34:28 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Mon, 9 Jul 2007 15:34:28 -0400 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: <969ECEAD-27D6-4330-8847-7264F0A76223@wantedtech.com> References: <06258910-F0C2-493F-BF37-9A046334B9A5@gmail.com> <969ECEAD-27D6-4330-8847-7264F0A76223@wantedtech.com> Message-ID: On Jul 09, 2007, at 15:18 , Nicolas St-Laurent wrote: > Thanks for your feedback. > > Well, /usr/local/bin is already in user's path. But since PATH is > define in /etc/profile, it ain't define when a subshell is started, > hence a run "echo $PATH" gives the default path : > > /usr/bin:/bin:/usr/sbin:/sbin > > I certainly miss something, but I doesn't know what. I'm on SuSE > Entreprise 64bits, but I've got the same issue on Mac OS X, Ubuntu or > Debian. You are most welcome. Usually you'd put your path extensions inside .bash_profile or .bash_rc like so: PATH=/usr/local/bin:$PATH Then, when you login next it should be sourced (or you can do manually via "source ~/.bash_profile" for the current session) you should see this: > echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ( assuming that "echo $PATH" originally produces: /usr/bin:/bin:/usr/ sbin:/sbin ) In this example /usr/local/bin will be searched first, of course you can set it last also by appending instead of prepending. Let me know if this helps. -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070709/4accff8f/attachment.html From nstlaurent at wantedtech.com Mon Jul 9 16:11:40 2007 From: nstlaurent at wantedtech.com (Nicolas St-Laurent) Date: Mon, 9 Jul 2007 16:11:40 -0400 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: References: <06258910-F0C2-493F-BF37-9A046334B9A5@gmail.com> <969ECEAD-27D6-4330-8847-7264F0A76223@wantedtech.com> Message-ID: Le 07-07-09 ? 15:34, Wayne E. Seguin a ?crit : > On Jul 09, 2007, at 15:18 , Nicolas St-Laurent wrote: >> Thanks for your feedback. >> >> Well, /usr/local/bin is already in user's path. But since PATH is >> define in /etc/profile, it ain't define when a subshell is started, >> hence a run "echo $PATH" gives the default path : >> >> /usr/bin:/bin:/usr/sbin:/sbin >> >> I certainly miss something, but I doesn't know what. I'm on SuSE >> Entreprise 64bits, but I've got the same issue on Mac OS X, Ubuntu or >> Debian. > > You are most welcome. > > Usually you'd put your path extensions inside .bash_profile > or .bash_rc like so: > PATH=/usr/local/bin:$PATH > > Then, when you login next it should be sourced (or you can do > manually via "source ~/.bash_profile" for the current session) you > should see this: > > > echo $PATH > /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin > > ( assuming that "echo $PATH" originally produces: /usr/bin:/bin:/ > usr/sbin:/sbin ) > > In this example /usr/local/bin will be searched first, of course > you can set it last also by appending instead of prepending. > > Let me know if this helps. > Well, not really. I already set my path correctly. When I'm ssh logged with the user I use for my capistrano deployment, my path is : /usr/local/bin:/usr/local/sbin:/home/myuser/bin:/usr/local/bin:/usr/ bin:/usr/X11R6/bin:/bin:/opt/gnome/bin:/usr/lib/mit/bin:/usr/lib/mit/ sbin:/usr/local/java/bin. But, it goes to : >> /usr/bin:/bin:/usr/sbin:/sbin in Capistrano's run method. bash_rc and bash_profile doesn't do the same job in Bash. bash_rc is sourced everytime a shell is started while profile is sourced only on login. My path is define in /etc/profile instead of locally in user account so that every users got almost the same path. It's the default setting on a Suse distro. Since Mongrel's recipes use a send(run_method, "cmd") and other Mongrel users should have the same issue, I was asking on this mailing list. I will ask on Capistrano mailing list. Thanks for your time, Nicolas From graham.ashton at gmail.com Mon Jul 9 18:07:42 2007 From: graham.ashton at gmail.com (Graham Ashton) Date: Mon, 9 Jul 2007 23:07:42 +0100 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: References: <06258910-F0C2-493F-BF37-9A046334B9A5@gmail.com> <969ECEAD-27D6-4330-8847-7264F0A76223@wantedtech.com> Message-ID: <7438eebe0707091507u3acdce5frca0ef9f37ed6bc3d@mail.gmail.com> On 09/07/07, Nicolas St-Laurent wrote: > > bash_rc and bash_profile doesn't do the same job in Bash. bash_rc is > sourced everytime a shell is started while profile is sourced only on > login. Yes, that's right. I might be getting a little confused while trying to follow this thread, but have you overridden your path in .bashrc ? If not, I'm not surprised that it's not getting set for a non-interactive command, which need not run in a login shell (and therefore might not source /etc/profile). From wayneeseguin at gmail.com Mon Jul 9 20:09:34 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Mon, 9 Jul 2007 20:09:34 -0400 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: References: <06258910-F0C2-493F-BF37-9A046334B9A5@gmail.com> <969ECEAD-27D6-4330-8847-7264F0A76223@wantedtech.com> Message-ID: <929998FF-A1D8-4396-99BF-DDC90D34B825@gmail.com> On Jul 09, 2007, at 16:11 , Nicolas St-Laurent wrote: > Well, not really. I already set my path correctly. When I'm ssh > logged with the user I use for my capistrano deployment, my path is : > > /usr/local/bin:/usr/local/sbin:/home/myuser/bin:/usr/local/bin:/usr/ > bin:/usr/X11R6/bin:/bin:/opt/gnome/bin:/usr/lib/mit/bin:/usr/lib/mit/ > sbin:/usr/local/java/bin. > > But, it goes to : > >>> /usr/bin:/bin:/usr/sbin:/sbin > > in Capistrano's run method. > > bash_rc and bash_profile doesn't do the same job in Bash. bash_rc is > sourced everytime a shell is started while profile is sourced only on > login. > > My path is define in /etc/profile instead of locally in user account > so that every users got almost the same path. It's the default > setting on a Suse distro. > > Since Mongrel's recipes use a send(run_method, "cmd") and other > Mongrel users should have the same issue, I was asking on this > mailing list. I will ask on Capistrano mailing list. > > Thanks for your time, > > Nicolas > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users Nicolas, There is one more thing you can try, although I haven't experienced your issue you can try this inside capistrano: default_environment["PATH"] = "/usr/local/bin:/usr/bin:/bin:/usr/ sbin:/sbin" I'm assuming you're using Cap2, and if you're not then: why not!? :) Let me know if this helps, and yes this should have been in the Capistrano list :) -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070709/591d1078/attachment-0001.html From bradley at railsmachine.com Tue Jul 10 21:46:58 2007 From: bradley at railsmachine.com (Bradley Taylor) Date: Tue, 10 Jul 2007 21:46:58 -0400 Subject: [Mongrel] [ANN] mongrel_cluster 1.0.2 Message-ID: <46943692.20507@railsmachine.com> Hi all... After a few months of slumber, I've booted mongrel_cluster out the door. Nothing is really new from the prereleases except some bug fixes. I imagine there will still be some issues with 'ps' on non-Linux platforms. I'll gladly take patches. Most of the new stuff is described here: http://rubyforge.org/frs/shownotes.php?release_id=12907 Let me know if there are any issues. Unless there are major objections, I'm considering giving the Capistrano support its own gem. This should occur around the release of Cap2. Bradley Taylor http://railsmachine.com From 2828628 at gmail.com Wed Jul 11 02:54:15 2007 From: 2828628 at gmail.com (Ken) Date: Wed, 11 Jul 2007 14:54:15 +0800 Subject: [Mongrel] [ANN] mongrel_cluster 1.0.2 In-Reply-To: <46943692.20507@railsmachine.com> References: <46943692.20507@railsmachine.com> Message-ID: <2a0834610707102354q5e958c7cxebd74ba95eac0024@mail.gmail.com> awesome! thanks On 7/11/07, Bradley Taylor wrote: > > Hi all... > > After a few months of slumber, I've booted mongrel_cluster out the door. > Nothing is really new from the prereleases except some bug fixes. I > imagine there will still be some issues with 'ps' on non-Linux > platforms. I'll gladly take patches. > > Most of the new stuff is described here: > http://rubyforge.org/frs/shownotes.php?release_id=12907 > > Let me know if there are any issues. Unless there are major objections, > I'm considering giving the Capistrano support its own gem. This should > occur around the release of Cap2. > > Bradley Taylor > http://railsmachine.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- ???????????????????????????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070711/d8e42fda/attachment.html From jonathan.tron.mailings at gmail.com Tue Jul 10 14:52:57 2007 From: jonathan.tron.mailings at gmail.com (Jonathan Tron) Date: Tue, 10 Jul 2007 20:52:57 +0200 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: References: Message-ID: <75E858B5-1F72-454B-BA47-0532632EDA40@gmail.com> Le 9 juil. 07 ? 18:06, Nicolas St-Laurent a ?crit : > Hello, > > I'm trying to deploy my application with Capistrano using Mongrel > recipes. Since I've installed Ruby from source code, mongrel scripts > are found in /usr/local/bin. But the recipes can't find > mongrel_rails : "bash: mongrel_rails: command not found". The path of > the user account used to deploy is OK. For sure, I can redefine > start_mongrel_cluster/restart_mongrel_cluster/stop_mongrel_cluster > tasks in the recipes to add path before calling mongrel_rails. > > Any idea of a better solution ? I experienced the same problem, it comes from two things : sshd and capistrano. SSHd (at least on Suse Linux Entreprise Servers 10.1) is compiled and configured to have a really basic path defined and PermitUserEnvironment set to "no", if you combined that with capistrano not using any environment variables, you get your problem. One solution is to set PermitUserEnvironment to "yes" in sshd_config and use ~/.ssh/environment file to set a path containing your mongrel_rails command (in your deployment user home). But be aware there are some security risks setting this variable to "yes". Hopes this help. Tron Jonathan http://jonathan.tron.name From nstlaurent at wantedtech.com Fri Jul 13 14:19:39 2007 From: nstlaurent at wantedtech.com (Nicolas St-Laurent) Date: Fri, 13 Jul 2007 14:19:39 -0400 Subject: [Mongrel] Capistrano mongrel recipes and /usr/local/bin In-Reply-To: <75E858B5-1F72-454B-BA47-0532632EDA40@gmail.com> References: <75E858B5-1F72-454B-BA47-0532632EDA40@gmail.com> Message-ID: <6065F20A-FB55-4C1C-B881-66E1656E366A@wantedtech.com> Le 07-07-10 ? 14:52, Jonathan Tron a ?crit : > One solution is to set PermitUserEnvironment to "yes" in sshd_config > and use ~/.ssh/environment file to set a path containing your > mongrel_rails command (in your deployment user home). But be aware > there are some security risks setting this variable to "yes". > > Hopes this help. Thanks a lot. It solve my problem. I can live with the security issue. And Capistrano 2.0 allow environment variables. But for now, I kept version 1.4x. From rawn027 at gmail.com Fri Jul 13 19:32:01 2007 From: rawn027 at gmail.com (Ronald Valente) Date: Fri, 13 Jul 2007 19:32:01 -0400 Subject: [Mongrel] Mongrel + Insert Web Server Here Message-ID: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> Which web server does mongrel fair best with? -Ron From ezmobius at gmail.com Fri Jul 13 19:35:09 2007 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Fri, 13 Jul 2007 16:35:09 -0700 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> Message-ID: <817F2112-906A-49A5-9F2A-2E3BDEB2AB86@gmail.com> On Jul 13, 2007, at 4:32 PM, Ronald Valente wrote: > Which web server does mongrel fair best with? > -Ron Nginx: http://wiki.codemongers.com/Nginx Cheers- -- Ezra Zygmuntowicz -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From kylekochis at gmail.com Fri Jul 13 20:09:07 2007 From: kylekochis at gmail.com (Kyle Kochis) Date: Fri, 13 Jul 2007 18:09:07 -0600 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <817F2112-906A-49A5-9F2A-2E3BDEB2AB86@gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <817F2112-906A-49A5-9F2A-2E3BDEB2AB86@gmail.com> Message-ID: <6a7034b0707131709w7fbb8000m2865a111e3ba37c5@mail.gmail.com> Some people may say Apache and some may Nginx (or something else) but I think most people that say Apache is only because they've never given Nginx a serious try. Nginx wins in my book and in my experiences has had much better performance (better speed, less ram and cpu use). On 7/13/07, Ezra Zygmuntowicz wrote: > > > On Jul 13, 2007, at 4:32 PM, Ronald Valente wrote: > > > Which web server does mongrel fair best with? > > -Ron > > > Nginx: http://wiki.codemongers.com/Nginx > > > Cheers- > -- Ezra Zygmuntowicz > -- 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 > -- Kyle Kochis 303.501.2335 kylekochis at gmail.com http://kylekochis.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070713/df073988/attachment.html From wayneeseguin at gmail.com Sat Jul 14 00:05:30 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Sat, 14 Jul 2007 00:05:30 -0400 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> Message-ID: <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> On Jul 13, 2007, at 19:32 , Ronald Valente wrote: > Which web server does mongrel fair best with? > -Ron In my experience Nginx by a long shot. -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070714/86ba942e/attachment.html From pawan1gupta at yahoo.com Sat Jul 14 12:17:55 2007 From: pawan1gupta at yahoo.com (Pawan Gupta) Date: Sat, 14 Jul 2007 09:17:55 -0700 (PDT) Subject: [Mongrel] Very basic question about REXML Message-ID: <649796.36811.qm@web60418.mail.yahoo.com> Hello Everybody, I have pretty basic question abut REXML. I want to put the String "John doe" in titles array, if attribute name is equal to "93". Please see the code below. I could not find how to do it.. any help would be very appriciated. Here is the XML i am trying to parse John doe 0 0 Code in controll doc.elements.each('viewentries/viewentry/entrydata') do |ele| if ele.attributes["name"] = "93" titles << // here I like to put value in titles array. end end Thanks, Pawan Gupta ------------------------------------------------------------------------------------- Blog : http://www.xanga.com/pawan79 ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070714/d9e12a4a/attachment-0001.html From wayneeseguin at gmail.com Sat Jul 14 21:27:13 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Sat, 14 Jul 2007 21:27:13 -0400 Subject: [Mongrel] Very basic question about REXML In-Reply-To: <649796.36811.qm@web60418.mail.yahoo.com> References: <649796.36811.qm@web60418.mail.yahoo.com> Message-ID: <144E1E0F-3406-4644-826D-153134453BB6@gmail.com> On Jul 14, 2007, at 12:17 , Pawan Gupta wrote: > Hello Everybody, > I have pretty basic question abut REXML. I want to put the > String "John doe" in titles array, if attribute name is equal to > "93". Please see the code below. I could not find how to do it.. > any help would be very appriciated. > > Here is the XML i am trying to parse > > John doe > > > > 0 > 0 > > > > > Code in controll > doc.elements.each('viewentries/viewentry/entrydata') do |ele| > if ele.attributes["name"] = "93" > titles << // here I like to put value in titles array. > end > end > > Thanks, > Pawan Gupta Pawan this mailing list is for items regarding Mongrel (http:// mongrel.rubyforge.org/). Ask your question on the ruby mailing list (http://groups.google.com/ group/ruby-talk-google ). -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070714/419a904c/attachment.html From matt.mcknight at gmail.com Sun Jul 15 09:48:12 2007 From: matt.mcknight at gmail.com (Matthew McKnight) Date: Sun, 15 Jul 2007 09:48:12 -0400 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> Message-ID: No issues with Apache 2.2.3. I find Apache to be well documented and supported, widely approved, security tested. Vastly better than IIS.... Matt On 7/14/07, Wayne E. Seguin wrote: > > On Jul 13, 2007, at 19:32 , Ronald Valente wrote: > > Which web server does mongrel fair best with? > -Ron > > > > In my experience Nginx by a long shot. > -- > Wayne E. Seguin > Sr. Systems Architect & Systems Admin > wayneseguin at gmail.com > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- -Matt McKnight- www.lmnsolutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070715/f390369a/attachment.html From gbenedict at gmail.com Sun Jul 15 10:05:16 2007 From: gbenedict at gmail.com (Greg Benedict) Date: Sun, 15 Jul 2007 10:05:16 -0400 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> Message-ID: <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> I was using Apache 2.x to Mongrel, but perceptually it just seemed to slow. I spent some time to learn nginx and have been very happy with it. It's much more responsive and has a higher throughput to serve more pages. Greg On 7/15/07, Matthew McKnight wrote: > No issues with Apache 2.2.3. I find Apache to be well documented and > supported, widely approved, security tested. Vastly better than IIS.... > > Matt > > > On 7/14/07, Wayne E. Seguin wrote: > > > > > > > > On Jul 13, 2007, at 19:32 , Ronald Valente wrote: > > > > Which web server does mongrel fair best with? > > -Ron > > > > > > In my experience Nginx by a long shot. > > > > > > > > -- > > Wayne E. Seguin > > Sr. Systems Architect & Systems Admin > > wayneseguin at gmail.com > > > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > -- > -Matt McKnight- > www.lmnsolutions.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Thanks, Greg Benedict From rawn027 at gmail.com Sun Jul 15 16:19:18 2007 From: rawn027 at gmail.com (Ron Valente) Date: Sun, 15 Jul 2007 16:19:18 -0400 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> Message-ID: <469A8146.9060505@gmail.com> Greg Benedict wrote: > I was using Apache 2.x to Mongrel, but perceptually it just seemed to > slow. I spent some time to learn nginx and have been very happy with > it. It's much more responsive and has a higher throughput to serve > more pages. > > Greg > > On 7/15/07, Matthew McKnight wrote: > >> No issues with Apache 2.2.3. I find Apache to be well documented and >> supported, widely approved, security tested. Vastly better than IIS.... >> >> Matt >> >> >> On 7/14/07, Wayne E. Seguin wrote: >> >>> >>> On Jul 13, 2007, at 19:32 , Ronald Valente wrote: >>> >>> Which web server does mongrel fair best with? >>> -Ron >>> >>> >>> In my experience Nginx by a long shot. >>> >>> >>> >>> -- >>> Wayne E. Seguin >>> Sr. Systems Architect & Systems Admin >>> wayneseguin at gmail.com >>> >>> >>> >>> >>> _______________________________________________ >>> Mongrel-users mailing list >>> Mongrel-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/mongrel-users >>> >>> >> >> -- >> -Matt McKnight- >> www.lmnsolutions.com >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> >> > > > Has anyone had the experience with mongrel on solaris? -Ron From kylekochis at gmail.com Sun Jul 15 17:39:21 2007 From: kylekochis at gmail.com (Kyle Kochis) Date: Sun, 15 Jul 2007 15:39:21 -0600 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <469A8146.9060505@gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> <469A8146.9060505@gmail.com> Message-ID: <6a7034b0707151439x3624440bq171c92a02b6a9f58@mail.gmail.com> check the archives...I remember that being mentioned not too long ago. On 7/15/07, Ron Valente wrote: > > Greg Benedict wrote: > > I was using Apache 2.x to Mongrel, but perceptually it just seemed to > > slow. I spent some time to learn nginx and have been very happy with > > it. It's much more responsive and has a higher throughput to serve > > more pages. > > > > Greg > > > > On 7/15/07, Matthew McKnight wrote: > > > >> No issues with Apache 2.2.3. I find Apache to be well documented and > >> supported, widely approved, security tested. Vastly better than IIS.... > >> > >> Matt > >> > >> > >> On 7/14/07, Wayne E. Seguin wrote: > >> > >>> > >>> On Jul 13, 2007, at 19:32 , Ronald Valente wrote: > >>> > >>> Which web server does mongrel fair best with? > >>> -Ron > >>> > >>> > >>> In my experience Nginx by a long shot. > >>> > >>> > >>> > >>> -- > >>> Wayne E. Seguin > >>> Sr. Systems Architect & Systems Admin > >>> wayneseguin at gmail.com > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> Mongrel-users mailing list > >>> Mongrel-users at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/mongrel-users > >>> > >>> > >> > >> -- > >> -Matt McKnight- > >> www.lmnsolutions.com > >> _______________________________________________ > >> Mongrel-users mailing list > >> Mongrel-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/mongrel-users > >> > >> > > > > > > > > Has anyone had the experience with mongrel on solaris? > > -Ron > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Kyle Kochis 303.501.2335 kylekochis at gmail.com http://kylekochis.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070715/4bd67d3c/attachment.html From swmrrossi at yahoo.com Sun Jul 15 20:49:40 2007 From: swmrrossi at yahoo.com (Marco Rossi) Date: Sun, 15 Jul 2007 17:49:40 -0700 (PDT) Subject: [Mongrel] problem after mongrel_cluster 1.0.2 upgrade Message-ID: <350290.63397.qm@web38711.mail.mud.yahoo.com> Dear all, In the past, I've been successfully using mongrel_cluster following codahale setup [1]. Now I updated mongrel_cluster through gem to 1.0.2, and my previosly worked config is not working anymore. I report below a snip of one of logfile, it seems to me it is a missing gem problems, but this sounds strange to me, because my config was ok before the upgrade. Does mongrel_cluster 1.0.2 require some additional gem ? ** Daemonized, any open files are closed. Look at /tmp/mongrel.8101.pid and /tmp/mongrel.8101.log for info. ** Starting Mongrel listening at 127.0.0.1:8101 ** Changing group to mongrel. ** Changing user to mongrel. ** Starting Rails with production environment... /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- /var/rails/test/config/environment (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:155:in `rails' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:112:in `cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in `call' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in `listener' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:98:in `cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `call' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `initialize' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `new' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 from /usr/bin/mongrel_rails:16:in `load' from /usr/bin/mongrel_rails:16 [1] http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ ____________________________________________________________________________________ Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather From mehdi.adda at gmail.com Mon Jul 16 00:31:41 2007 From: mehdi.adda at gmail.com (Mehdi Adda) Date: Mon, 16 Jul 2007 00:31:41 -0400 Subject: [Mongrel] mongrel_rails start working mongrel_rails cluster::start not working Message-ID: Hi everybody, I have installed mongrel and mongrel cluster in a new linux box .... at the end of the day I was able to lunch mongrel (mongrel_rails start -e production) and all is working fine with. However, when I tried to set a mongrel cluster the command mongrel_rails cluster::start get the following output : starting port 8000 starting port 8001 starting port 8002 But when I lunched the browser to the application url and port 8000 for example, the mongrels seems not working. I looked at the log file and get for the first mongrel instance : ** Daemonized, any open files are closed. Look at tmp/mongrel.8000.pid and log/mongrel.8000.log for info. ** Starting Mongrel listening at 0.0.0.0:8000 ** Changing group to mongrel. ** Changing user to mongrel. ** Starting Rails with production environment... ** Mounting Rails at /home/rails/projects/myapps... /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in `gem_original_require': no such file to load -- /home/rails/projects/myapps/config/environment (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in `require' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:157:in `rails' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:116:in `cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in `call' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in `listener' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:98:in `cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `call' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `initialize' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `new' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:248 from /usr/bin/mongrel_rails:16:in `load' from /usr/bin/mongrel_rails:16 It's the same thing for the two other instances. My mongrel cluster configuration is as follows : user: mongrel group: mongrel cwd: /home/rails/projects/myapps log_file: log/mongrel.log port: "8000" environment: production address: 127.0.0.1 pid_file: tmp/mongrel.pid servers: 3 My server configuration is as follows : Linux Centos 5 ruby 1.8.6 rubygems 0.9.4 Rails 1.2.3 Mongrel Web Server 1.0.1 mongrel_cluster 1.0.2 nginx version: nginx/0.5.27 Can anyone give help me to get this out ? Thanks a lot in advance Addame -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/4b622447/attachment.html From bsiggelkow at mac.com Mon Jul 16 08:11:15 2007 From: bsiggelkow at mac.com (Bill Siggelkow) Date: Mon, 16 Jul 2007 08:11:15 -0400 Subject: [Mongrel] mongrel_rails start working mongrel_rails cluster::start not working In-Reply-To: References: Message-ID: Two things I would check: 1) Make sure you that you are not missing any gems that your application uses; 2) Check to see if your application will run under webrick Bill Siggelkow bsiggelkow at mac.com AIM: siggelkowb Home: 770-457-8854 Mobile: 770-354-2584 On Jul 16, 2007, at 12:31 AM, Mehdi Adda wrote: > Hi everybody, > > I have installed mongrel and mongrel cluster in a new linux > box .... at the end of the day I was able to lunch mongrel > (mongrel_rails start -e production) and all is working fine with. > > However, when I tried to set a mongrel cluster the command > mongrel_rails cluster::start get the following output : > > starting port 8000 > starting port 8001 > starting port 8002 > > But when I lunched the browser to the application url and port 8000 > for example, the mongrels seems not working. > > I looked at the log file and get for the first mongrel instance : > > ** Daemonized, any open files are closed. Look at tmp/mongrel. > 8000.pid and log/mongrel.8000.log for info. > ** Starting Mongrel listening at 0.0.0.0:8000 > ** Changing group to mongrel. > ** Changing user to mongrel. > ** Starting Rails with production environment... > ** Mounting Rails at /home/rails/projects/myapps... > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > `gem_original_require': no such file to load -- /home/rails/ > projects/myapps/config/environment (LoadError) > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 30:in `require' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > rails.rb:157:in `rails' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:116:in `cloaker_' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > configurator.rb:138:in `call' > from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/ > configurator.rb:138:in `listener' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:98:in `cloaker_' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > configurator.rb:51:in `call' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > configurator.rb:51:in `initialize' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:83:in `new' > from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/bin/ > mongrel_rails:83:in `run' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > command.rb:211:in `run' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:248 > from /usr/bin/mongrel_rails:16:in `load' > from /usr/bin/mongrel_rails:16 > > It's the same thing for the two other instances. > > My mongrel cluster configuration is as follows : > > user: mongrel > group: mongrel > cwd: /home/rails/projects/myapps > log_file: log/mongrel.log > port: "8000" > environment: production > address: 127.0.0.1 > pid_file: tmp/mongrel.pid > servers: 3 > > > My server configuration is as follows : > > Linux Centos 5 > ruby 1.8.6 > rubygems 0.9.4 > Rails 1.2.3 > Mongrel Web Server 1.0.1 > mongrel_cluster 1.0.2 > nginx version: nginx/0.5.27 > > > Can anyone give help me to get this out ? > > Thanks a lot in advance > > > Addame > _______________________________________________ > 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/20070716/374cc092/attachment.html From mehdi.adda at gmail.com Mon Jul 16 09:10:02 2007 From: mehdi.adda at gmail.com (Mehdi Adda) Date: Mon, 16 Jul 2007 09:10:02 -0400 Subject: [Mongrel] mongrel_rails start working mongrel_rails Message-ID: Thanks Bill for the answer ! In fact, my application is working well with webrick and also with a single mongrel instance lunched via the command : mongrel_rails start When I check what is the difference in the gem loaded in both cases (mongrel_rails start and mongrel_rails cluster::start) it seems that mongrel_rails cluster::start does not load all the gems that the first command is loading. So I think it's related to the rails load environment, but I don't know how this environment is not loaded in the case of mongrel_rails cluster::start but loaded with mongrel_rails start. Do you have any idea on why mongrel_rails cluster::start is not loading the environment ? I checked the path for the rails application ans it's ok Is there any other alternative to force mongrel_rails cluster::start to load the rails environment ? Cheers, Addame Two things I would check: 1) Make sure you that you are not missing any gems that your application uses; 2) Check to see if your application will run under webrick Bill Siggelkow bsiggelkow at mac.com AIM: siggelkowb Home: 770-457-8854 Mobile: 770-354-2584 On Jul 16, 2007, at 12:31 AM, Mehdi Adda wrote: >* Hi everybody, *>* *>* I have installed mongrel and mongrel cluster in a new linux *>* box .... at the end of the day I was able to lunch mongrel *>* (mongrel_rails start -e production) and all is working fine with. *>* *>* However, when I tried to set a mongrel cluster the command *>* mongrel_rails cluster::start get the following output : *>* *>* starting port 8000 *>* starting port 8001 *>* starting port 8002 *>* *>* But when I lunched the browser to the application url and port 8000 *>* for example, the mongrels seems not working. *>* *>* I looked at the log file and get for the first mongrel instance : *>* *>* ** Daemonized, any open files are closed. Look at tmp/mongrel. *>* 8000.pid and log/mongrel.8000.log for info. *>* ** Starting Mongrel listening at 0.0.0.0:8000 *>* ** Changing group to mongrel. *>* ** Changing user to mongrel. *>* ** Starting Rails with production environment... *>* ** Mounting Rails at /home/rails/projects/myapps... *>* /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in *>* `gem_original_require': no such file to load -- /home/rails/ *>* projects/myapps/config/environment (LoadError) *>* from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: *>* 30:in `require' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ *>* rails.rb:157:in `rails' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ *>* mongrel_rails:116:in `cloaker_' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ *>* configurator.rb:138:in `call' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/ *>* configurator.rb:138:in `listener' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ *>* mongrel_rails:98:in `cloaker_' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ *>* configurator.rb:51:in `call' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ *>* configurator.rb:51:in `initialize' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ *>* mongrel_rails:83:in `new' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/bin/ *>* mongrel_rails:83:in `run' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ *>* command.rb:211:in `run' *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ *>* mongrel_rails:248 *>* from /usr/bin/mongrel_rails:16:in `load' *>* from /usr/bin/mongrel_rails:16 *>* *>* It's the same thing for the two other instances. *>* *>* My mongrel cluster configuration is as follows : *>* *>* user: mongrel *>* group: mongrel *>* cwd: /home/rails/projects/myapps *>* log_file: log/mongrel.log *>* port: "8000" *>* environment: production *>* address: 127.0.0.1 *>* pid_file: tmp/mongrel.pid *>* servers: 3 *>* *>* *>* My server configuration is as follows : *>* *>* Linux Centos 5 *>* ruby 1.8.6 *>* rubygems 0.9.4 *>* Rails 1.2.3 *>* Mongrel Web Server 1.0.1 *>* mongrel_cluster 1.0.2 *>* nginx version: nginx/0.5.27 *>* *>* *>* Can anyone give help me to get this out ? *>* *>* Thanks a lot in advance *>* *>* *>* Addame *>* _______________________________________________ *>* Mongrel-users mailing list *>* Mongrel-users at rubyforge.org * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/6b8fe3d4/attachment-0001.html From nikolaus.rumm at gmail.com Mon Jul 16 12:04:29 2007 From: nikolaus.rumm at gmail.com (Nikolaus Rumm) Date: Mon, 16 Jul 2007 18:04:29 +0200 Subject: [Mongrel] Can't start Mongrel under win32 Message-ID: <53e20f100707160904v202b6346h4b374ad3a2334f1d@mail.gmail.com> I have a fresh installation of Ruby, Rails and Mongrel. Unfortunately the server doesn't start. Any ideas ? => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... Exiting c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:15: warning: already initialized constant OPTIONS c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:18: undefined method `options' for []:Array (NoMethodError) from c:/Programme/Ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require' from c:/Programme/Ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' from c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' from c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' from c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' from c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 from c:/Programme/Ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from c:/Programme/Ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from script/server:3 From mehdi.adda at gmail.com Mon Jul 16 12:39:20 2007 From: mehdi.adda at gmail.com (mehdi adda) Date: Mon, 16 Jul 2007 12:39:20 -0400 Subject: [Mongrel] mongrel_rails start working mongrel_rails cluster::start not working In-Reply-To: References: Message-ID: <469B9F38.8030100@gmail.com> YAY ...... I finally find the problem !!!! Here's how I proceeded ..... there are some mongrel_cluster behavior I don't yet understand but at least it's now working fine on my server. I checked if mongrel_rails start will work without specifying a mongrel_cluster.yml ... and yes it works !! However, in the default setting only two instances are lunched from ports 3000 and 3001. As I checked the code source of mongrel_rails, it seems that it's merging the parameters passed to it with default ones (right ?). So I tried to overwrite only the important parameters .... like the port numbers the number of servers and the environment variable. So I modified my mongrel_cluster.yml from : user: mongrel group: mongrel cwd: /home/rails/projects/myapps log_file: log/mongrel.log port: "8000" environment: production address: 127.0.0.1 pid_file: tmp/pids/mongrel.pid servers: 3 debug: true to port: "8000" environment: production servers: 3 And now the command : mongrel_rails cluster::start -C /home/rails/projects/myapps/config/mongrel_cluster.yml et voil? tout marche bien !!! I hope that this will help some of you. Addame mongrel-users-request at rubyforge.org wrote: > Send Mongrel-users mailing list submissions to > mongrel-users at rubyforge.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://rubyforge.org/mailman/listinfo/mongrel-users > or, via email, send a message with subject or body 'help' to > mongrel-users-request at rubyforge.org > > You can reach the person managing the list at > mongrel-users-owner at rubyforge.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Mongrel-users digest..." > > > Today's Topics: > > 1. mongrel_rails start working mongrel_rails cluster::start not > working (Mehdi Adda) > 2. Re: mongrel_rails start working mongrel_rails cluster::start > not working (Bill Siggelkow) > 3. mongrel_rails start working mongrel_rails (Mehdi Adda) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 16 Jul 2007 00:31:41 -0400 > From: "Mehdi Adda" > Subject: [Mongrel] mongrel_rails start working mongrel_rails > cluster::start not working > To: mongrel-users at rubyforge.org > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi everybody, > > I have installed mongrel and mongrel cluster in a new linux box .... at the > end of the day I was able to lunch mongrel (mongrel_rails start -e > production) and all is working fine with. > > However, when I tried to set a mongrel cluster the command mongrel_rails > cluster::start get the following output : > > starting port 8000 > starting port 8001 > starting port 8002 > > But when I lunched the browser to the application url and port 8000 for > example, the mongrels seems not working. > > I looked at the log file and get for the first mongrel instance : > > ** Daemonized, any open files are closed. Look at tmp/mongrel.8000.pid and > log/mongrel.8000.log for info. > ** Starting Mongrel listening at 0.0.0.0:8000 > ** Changing group to mongrel. > ** Changing user to mongrel. > ** Starting Rails with production environment... > ** Mounting Rails at /home/rails/projects/myapps... > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > `gem_original_require': no such file to load -- > /home/rails/projects/myapps/config/environment (LoadError) > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > `require' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:157:in > `rails' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:116:in > `cloaker_' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in > `call' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in > `listener' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:98:in > `cloaker_' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in > `call' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in > `initialize' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in > `new' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in > `run' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in > `run' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:248 > from /usr/bin/mongrel_rails:16:in `load' > from /usr/bin/mongrel_rails:16 > > It's the same thing for the two other instances. > > My mongrel cluster configuration is as follows : > > user: mongrel > group: mongrel > cwd: /home/rails/projects/myapps > log_file: log/mongrel.log > port: "8000" > environment: production > address: 127.0.0.1 > pid_file: tmp/mongrel.pid > servers: 3 > > > My server configuration is as follows : > > Linux Centos 5 > ruby 1.8.6 > rubygems 0.9.4 > Rails 1.2.3 > Mongrel Web Server 1.0.1 > mongrel_cluster 1.0.2 > nginx version: nginx/0.5.27 > > > Can anyone give help me to get this out ? > > Thanks a lot in advance > > > Addame > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/4b622447/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Mon, 16 Jul 2007 08:11:15 -0400 > From: Bill Siggelkow > Subject: Re: [Mongrel] mongrel_rails start working mongrel_rails > cluster::start not working > To: mongrel-users at rubyforge.org > Message-ID: > Content-Type: text/plain; charset="us-ascii" > > Two things I would check: > > 1) Make sure you that you are not missing any gems that your > application uses; > 2) Check to see if your application will run under webrick > > Bill Siggelkow > bsiggelkow at mac.com > AIM: siggelkowb > Home: 770-457-8854 > Mobile: 770-354-2584 > > > On Jul 16, 2007, at 12:31 AM, Mehdi Adda wrote: > > >> Hi everybody, >> >> I have installed mongrel and mongrel cluster in a new linux >> box .... at the end of the day I was able to lunch mongrel >> (mongrel_rails start -e production) and all is working fine with. >> >> However, when I tried to set a mongrel cluster the command >> mongrel_rails cluster::start get the following output : >> >> starting port 8000 >> starting port 8001 >> starting port 8002 >> >> But when I lunched the browser to the application url and port 8000 >> for example, the mongrels seems not working. >> >> I looked at the log file and get for the first mongrel instance : >> >> ** Daemonized, any open files are closed. Look at tmp/mongrel. >> 8000.pid and log/mongrel.8000.log for info. >> ** Starting Mongrel listening at 0.0.0.0:8000 >> ** Changing group to mongrel. >> ** Changing user to mongrel. >> ** Starting Rails with production environment... >> ** Mounting Rails at /home/rails/projects/myapps... >> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in >> `gem_original_require': no such file to load -- /home/rails/ >> projects/myapps/config/environment (LoadError) >> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: >> 30:in `require' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> rails.rb:157:in `rails' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:116:in `cloaker_' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> configurator.rb:138:in `call' >> from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/ >> configurator.rb:138:in `listener' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:98:in `cloaker_' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> configurator.rb:51:in `call' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> configurator.rb:51:in `initialize' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:83:in `new' >> from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/bin/ >> mongrel_rails:83:in `run' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> command.rb:211:in `run' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:248 >> from /usr/bin/mongrel_rails:16:in `load' >> from /usr/bin/mongrel_rails:16 >> >> It's the same thing for the two other instances. >> >> My mongrel cluster configuration is as follows : >> >> user: mongrel >> group: mongrel >> cwd: /home/rails/projects/myapps >> log_file: log/mongrel.log >> port: "8000" >> environment: production >> address: 127.0.0.1 >> pid_file: tmp/mongrel.pid >> servers: 3 >> >> >> My server configuration is as follows : >> >> Linux Centos 5 >> ruby 1.8.6 >> rubygems 0.9.4 >> Rails 1.2.3 >> Mongrel Web Server 1.0.1 >> mongrel_cluster 1.0.2 >> nginx version: nginx/0.5.27 >> >> >> Can anyone give help me to get this out ? >> >> Thanks a lot in advance >> >> >> Addame >> _______________________________________________ >> 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/20070716/374cc092/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Mon, 16 Jul 2007 09:10:02 -0400 > From: "Mehdi Adda" > Subject: [Mongrel] mongrel_rails start working mongrel_rails > To: mongrel-users at rubyforge.org > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Thanks Bill for the answer ! > > In fact, my application is working well with webrick and also with a > single mongrel instance lunched via > the command : mongrel_rails start > > When I check what is the difference in the gem loaded in both cases > (mongrel_rails start and > mongrel_rails cluster::start) it seems that mongrel_rails > cluster::start does not load all the gems that the first command is > loading. > So I think it's related to the rails load environment, but I don't > know how this environment is not loaded in the case of mongrel_rails > cluster::start > but loaded with mongrel_rails start. > > Do you have any idea on why mongrel_rails cluster::start is not > loading the environment ? I checked the path for the rails application > ans it's ok > Is there any other alternative to force mongrel_rails cluster::start > to load the rails environment ? > > > Cheers, > > Addame > > > > Two things I would check: > > 1) Make sure you that you are not missing any gems that your > application uses; > 2) Check to see if your application will run under webrick > > Bill Siggelkow > bsiggelkow at mac.com > AIM: siggelkowb > Home: 770-457-8854 > Mobile: 770-354-2584 > > > On Jul 16, 2007, at 12:31 AM, Mehdi Adda wrote: > > >> * Hi everybody, >> > *>* > *>* I have installed mongrel and mongrel cluster in a new linux > *>* box .... at the end of the day I was able to lunch mongrel > *>* (mongrel_rails start -e production) and all is working fine with. > *>* > *>* However, when I tried to set a mongrel cluster the command > *>* mongrel_rails cluster::start get the following output : > *>* > *>* starting port 8000 > *>* starting port 8001 > *>* starting port 8002 > *>* > *>* But when I lunched the browser to the application url and port 8000 > *>* for example, the mongrels seems not working. > *>* > *>* I looked at the log file and get for the first mongrel instance : > *>* > *>* ** Daemonized, any open files are closed. Look at tmp/mongrel. > *>* 8000.pid and log/mongrel.8000.log for info. > *>* ** Starting Mongrel listening at 0.0.0.0:8000 > *>* ** Changing group to mongrel. > *>* ** Changing user to mongrel. > *>* ** Starting Rails with production environment... > *>* ** Mounting Rails at /home/rails/projects/myapps... > *>* /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > *>* `gem_original_require': no such file to load -- /home/rails/ > *>* projects/myapps/config/environment (LoadError) > *>* from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > *>* 30:in `require' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* rails.rb:157:in `rails' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:116:in `cloaker_' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* configurator.rb:138:in `call' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/ > *>* configurator.rb:138:in `listener' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:98:in `cloaker_' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* configurator.rb:51:in `call' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* configurator.rb:51:in `initialize' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:83:in `new' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/bin/ > *>* mongrel_rails:83:in `run' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* command.rb:211:in `run' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:248 > *>* from /usr/bin/mongrel_rails:16:in `load' > *>* from /usr/bin/mongrel_rails:16 > *>* > *>* It's the same thing for the two other instances. > *>* > *>* My mongrel cluster configuration is as follows : > *>* > *>* user: mongrel > *>* group: mongrel > *>* cwd: /home/rails/projects/myapps > *>* log_file: log/mongrel.log > *>* port: "8000" > *>* environment: production > *>* address: 127.0.0.1 > *>* pid_file: tmp/mongrel.pid > *>* servers: 3 > *>* > *>* > *>* My server configuration is as follows : > *>* > *>* Linux Centos 5 > *>* ruby 1.8.6 > *>* rubygems 0.9.4 > *>* Rails 1.2.3 > *>* Mongrel Web Server 1.0.1 > *>* mongrel_cluster 1.0.2 > *>* nginx version: nginx/0.5.27 > *>* > *>* > *>* Can anyone give help me to get this out ? > *>* > *>* Thanks a lot in advance > *>* > *>* > *>* Addame > *>* _______________________________________________ > *>* Mongrel-users mailing list > *>* Mongrel-users at rubyforge.org > * > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/6b8fe3d4/attachment.html > > ------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > End of Mongrel-users Digest, Vol 18, Issue 6 > ******************************************** > > > From swmrrossi at yahoo.com Mon Jul 16 16:37:27 2007 From: swmrrossi at yahoo.com (Marco Rossi) Date: Mon, 16 Jul 2007 13:37:27 -0700 (PDT) Subject: [Mongrel] mongrel_rails start working mongrel_rails Message-ID: <387092.80768.qm@web38708.mail.mud.yahoo.com> What version of mongrel_cluster are you using ? I got a similar problem with mongrel_cluster 1.0.2, updated through gem, on a previously working debian etch machine. I noted mongrel_rails is working fine on the command line, [root at mulerna1] => mongrel_rails start -d -p 8001 -e production -P /tmp/mongrel-8001.pid -l /tmp/mongrel.log -B [root at mulerna1] => mongrel_rails start -d -p 8002 -e production -P /tmp/mongrel-8002.pid -l /tmp/mongrel.log -B so I grab a point to your mongrel_cluster environment theory . ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ From luislavena at gmail.com Mon Jul 16 18:44:22 2007 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 16 Jul 2007 19:44:22 -0300 Subject: [Mongrel] Can't start Mongrel under win32 In-Reply-To: <53e20f100707160904v202b6346h4b374ad3a2334f1d@mail.gmail.com> References: <53e20f100707160904v202b6346h4b374ad3a2334f1d@mail.gmail.com> Message-ID: <71166b3b0707161544v7b9ed379tc1471b913b45b078@mail.gmail.com> On 7/16/07, Nikolaus Rumm wrote: > I have a fresh installation of Ruby, Rails and Mongrel. Unfortunately > the server doesn't start. > > Any ideas ? > Instead of using script/server could you try: 'mongrel_rails start' instead? Also, will be very helpful if you provide version of every part of your system: OS, Ruby, RubyGems and Mongrel. > => Booting Mongrel (use 'script/server webrick' to force WEBrick) > => Rails application starting on http://0.0.0.0:3000 > => Call with -d to detach > => Ctrl-C to shutdown server > ** Starting Mongrel listening at 0.0.0.0:3000 > ** Starting Rails with development environment... > Exiting > c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:15: > warning: already initialized constant OPTIONS > c:/Programme/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:18: > undefined method `options' for []:Array (NoMethodError) > from c:/Programme/Ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in > `gem_original_require' [...] -- 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 evan at cloudbur.st Mon Jul 16 22:01:14 2007 From: evan at cloudbur.st (Evan Weaver) Date: Mon, 16 Jul 2007 19:01:14 -0700 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <6a7034b0707151439x3624440bq171c92a02b6a9f58@mail.gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> <469A8146.9060505@gmail.com> <6a7034b0707151439x3624440bq171c92a02b6a9f58@mail.gmail.com> Message-ID: Joyent uses Mongrel on Solaris, as far as I know. Maybe you could find a Joyent customer and ask them about it. Evan On 7/15/07, Kyle Kochis wrote: > check the archives...I remember that being mentioned not too long ago. > > > On 7/15/07, Ron Valente wrote: > > Greg Benedict wrote: > > > I was using Apache 2.x to Mongrel, but perceptually it just seemed to > > > slow. I spent some time to learn nginx and have been very happy with > > > it. It's much more responsive and has a higher throughput to serve > > > more pages. > > > > > > Greg > > > > > > On 7/15/07, Matthew McKnight < matt.mcknight at gmail.com> wrote: > > > > > >> No issues with Apache 2.2.3. I find Apache to be well documented and > > >> supported, widely approved, security tested. Vastly better than IIS.... > > >> > > >> Matt > > >> > > >> > > >> On 7/14/07, Wayne E. Seguin wrote: > > >> > > >>> > > >>> On Jul 13, 2007, at 19:32 , Ronald Valente wrote: > > >>> > > >>> Which web server does mongrel fair best with? > > >>> -Ron > > >>> > > >>> > > >>> In my experience Nginx by a long shot. > > >>> > > >>> > > >>> > > >>> -- > > >>> Wayne E. Seguin > > >>> Sr. Systems Architect & Systems Admin > > >>> wayneseguin at gmail.com > > >>> > > >>> > > >>> > > >>> > > >>> _______________________________________________ > > >>> Mongrel-users mailing list > > >>> Mongrel-users at rubyforge.org > > >>> http://rubyforge.org/mailman/listinfo/mongrel-users > > >>> > > >>> > > >> > > >> -- > > >> -Matt McKnight- > > >> www.lmnsolutions.com > > >> _______________________________________________ > > >> Mongrel-users mailing list > > >> Mongrel-users at rubyforge.org > > >> http://rubyforge.org/mailman/listinfo/mongrel-users > > >> > > >> > > > > > > > > > > > > > Has anyone had the experience with mongrel on solaris? > > > > -Ron > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > -- > Kyle Kochis > 303.501.2335 > kylekochis at gmail.com > http://kylekochis.com > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From mark.james.lists at gmail.com Tue Jul 17 03:06:17 2007 From: mark.james.lists at gmail.com (Mark James Adams) Date: Tue, 17 Jul 2007 16:06:17 +0900 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: <469A8146.9060505@gmail.com> References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> <469A8146.9060505@gmail.com> Message-ID: > Has anyone had the experience with mongrel on solaris? Mongrel works great on OpenSolaris these days (it used to be a real bitch to build, but now 'gem install mongrel' works just like on any other platform.) I've run it on both Joyent's Accelerators on my own Solaris servers with no problems. -- Mark James Adams Kyoto Institute of Technology From nikolaus.rumm at gmail.com Tue Jul 17 03:14:21 2007 From: nikolaus.rumm at gmail.com (Nikolaus Rumm) Date: Tue, 17 Jul 2007 09:14:21 +0200 Subject: [Mongrel] Can't start Mongrel under win32 In-Reply-To: <71166b3b0707161544v7b9ed379tc1471b913b45b078@mail.gmail.com> References: <53e20f100707160904v202b6346h4b374ad3a2334f1d@mail.gmail.com> <71166b3b0707161544v7b9ed379tc1471b913b45b078@mail.gmail.com> Message-ID: <53e20f100707170014h46a5093fi6f38cb303b9937a@mail.gmail.com> Solved it. The problem was a missing gem and all this had nothing to do with Mongrel. Instead the whole Rails environment couldn't start. When launching the Rails environment via script/console a helpful error message was shown (in my case the ferret-gem was missing). Unfortunately the Mongrel error message was both wrong and misleading. On 7/17/07, Luis Lavena wrote: > Also, will be very helpful if you provide version of every part of your system: > OS, Ruby, RubyGems and Mongrel. From jason at joyent.com Tue Jul 17 03:38:30 2007 From: jason at joyent.com (Jason A. Hoffman) Date: Tue, 17 Jul 2007 00:38:30 -0700 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> <469A8146.9060505@gmail.com> Message-ID: On Jul 17, 2007, at 12:06 AM, Mark James Adams wrote: >> Has anyone had the experience with mongrel on solaris? > > Mongrel works great on OpenSolaris these days (it used to be a real > bitch to build, but now 'gem install mongrel' works just like on any > other platform.) I've run it on both Joyent's Accelerators on my own > Solaris servers with no problems. > > -- > Mark James Adams > Kyoto Institute of Technology Yes we've been using mongrel on Solaris since mongrel has been out (thank you again Zed). Older build directions are at http://joyeur.com/2006/07/21/a-mongrel- endorsement-and-a-manual-fix-for-installing-mongrel-on-solaris-1011, it's just that install isn't "normal" on solaris so you have to use the UCBerkeley or gnu ones. - J From luislavena at gmail.com Tue Jul 17 06:03:37 2007 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 17 Jul 2007 07:03:37 -0300 Subject: [Mongrel] Can't start Mongrel under win32 In-Reply-To: <53e20f100707170014h46a5093fi6f38cb303b9937a@mail.gmail.com> References: <53e20f100707160904v202b6346h4b374ad3a2334f1d@mail.gmail.com> <71166b3b0707161544v7b9ed379tc1471b913b45b078@mail.gmail.com> <53e20f100707170014h46a5093fi6f38cb303b9937a@mail.gmail.com> Message-ID: <71166b3b0707170303g34fe09e8yd3e57e19ba00c109@mail.gmail.com> On 7/17/07, Nikolaus Rumm wrote: > Solved it. The problem was a missing gem and all this had nothing to > do with Mongrel. Instead the whole Rails environment couldn't start. > I know your pain :-) > When launching the Rails environment via script/console a helpful > error message was shown (in my case the ferret-gem was missing). > > Unfortunately the Mongrel error message was both wrong and misleading. > Even mongrel_rails message? I know script/server is a bit hacky how it pre-initializes the environment and then hook mongrel to finish up loading rails, but plain mongrel do the opposite... Anyway, I'm glad you solved it ;-) -- 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 mark.james.lists at gmail.com Tue Jul 17 08:33:31 2007 From: mark.james.lists at gmail.com (Mark James Adams) Date: Tue, 17 Jul 2007 21:33:31 +0900 Subject: [Mongrel] Mongrel + Insert Web Server Here In-Reply-To: References: <1BEBDF85-3CFB-4451-9CF3-E30B99AF2CE2@gmail.com> <1721BDF9-BBAC-4830-A98C-1B9EF56D2DF2@gmail.com> <6b93ca880707150705m2e7aafbao445ab4cd5d041704@mail.gmail.com> <469A8146.9060505@gmail.com> Message-ID: On 7/17/07, Jason A. Hoffman wrote: > Yes we've been using mongrel on Solaris since mongrel has been out Apropos of that, Jason has just written up "Just what web server should be sitting in front of my rails application?" http://joyeur.com/2007/07/16/just-what-web-server-should-be-sitting-in-front-of-my-rails-application -- Mark James Adams Kyoto Institute of Technology From lei.wang at yale.edu Wed Jul 18 12:17:38 2007 From: lei.wang at yale.edu (Lei Wang) Date: Wed, 18 Jul 2007 12:17:38 -0400 Subject: [Mongrel] Yet another "mongrel dying daily" case Message-ID: <469E3D22.6060105@yale.edu> I was hoping that someone can help me with this, which have been driving me nuts -- I have had my mongrel cluster dying daily. And yes, I have gone through the check list of possible causes: I don't do log rotating I use active_record for session storage I don't use SQLite and Berkeley DB The MySQL timeout is set to 3600 I am using only 10% of the memory. I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby 1.8.6, and Mongrel 1.0.1. My DB is MySQL (which, per our institutional policy, must be on a central MySQL server). Maybe I need to install the MySQL gem and not use the MySQL driver that came with rails? Can I install the MySQL gem if my MySQL db is on a different server? By the way, here is what the log says when the cluster died: Mongrel timed out this thread: shutdown /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:675:in `write' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:532:in `write' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:506:in `command' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:238:in `close' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:236:in `disconnect!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:231:in `reconnect!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:93:in `verify!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:109:in `verify_active_connections!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in `each_value' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in `verify_active_connections!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:111:in `prepare_application' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load' /usr/local/bin/mongrel_rails:16 Thanks a lot! From northband at gmail.com Wed Jul 18 12:45:36 2007 From: northband at gmail.com (Northband) Date: Wed, 18 Jul 2007 12:45:36 -0400 Subject: [Mongrel] Yet another "mongrel dying daily" case In-Reply-To: <469E3D22.6060105@yale.edu> References: <469E3D22.6060105@yale.edu> Message-ID: <469E43B0.6010004@gmail.com> Hey Lei - we had a dying Mongrel too. We fixed it by doing the list you posted, plus our Senior Dev swapped out the MySQL libraries (drivers?) with the MySQL C library(drivers). Since then we have been all good. -adam O Lei Wang wrote: > I was hoping that someone can help me with this, which have been driving > me nuts -- I have had my mongrel cluster dying daily. And yes, I have > gone through the check list of possible causes: > I don't do log rotating > I use active_record for session storage > I don't use SQLite and Berkeley DB > The MySQL timeout is set to 3600 > I am using only 10% of the memory. > > I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby > 1.8.6, and Mongrel 1.0.1. > My DB is MySQL (which, per our institutional policy, must be on a > central MySQL server). Maybe I need to install the MySQL gem and not use > the MySQL driver that came with rails? Can I install the MySQL gem if my > MySQL db is on a different server? > > By the way, here is what the log says when the cluster died: > > Mongrel timed out this thread: shutdown > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:675:in > `write' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:532:in > `write' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:506:in > `command' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:238:in > `close' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:236:in > `disconnect!' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:231:in > `reconnect!' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:93:in > `verify!' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:109:in > `verify_active_connections!' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in > `each_value' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in > `verify_active_connections!' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:111:in > `prepare_application' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in > `dispatch' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in > `process' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in > `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in > `process' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in > `process_client' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in > `process_client' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in > `initialize' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in > `initialize' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in > `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in > `each' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in > `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in > `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in > `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 > /usr/local/bin/mongrel_rails:16:in `load' > /usr/local/bin/mongrel_rails:16 > > Thanks a lot! > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From luislavena at gmail.com Wed Jul 18 12:48:21 2007 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 18 Jul 2007 13:48:21 -0300 Subject: [Mongrel] Yet another "mongrel dying daily" case In-Reply-To: <469E3D22.6060105@yale.edu> References: <469E3D22.6060105@yale.edu> Message-ID: <71166b3b0707180948y3072ae89ne056dcd21c1170e6@mail.gmail.com> On 7/18/07, Lei Wang wrote: > I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby > 1.8.6, and Mongrel 1.0.1. > My DB is MySQL (which, per our institutional policy, must be on a > central MySQL server). Maybe I need to install the MySQL gem and not use > the MySQL driver that came with rails? Can I install the MySQL gem if my > MySQL db is on a different server? > Ohh, you SHOULD. The driver shipped with rails is a Pure Ruby adapter, that sometimes "choke". The native mysql adapter (mysql gem) is the way to go. Also 10-15% performance boost ;-) Hope that's help 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 wayneeseguin at gmail.com Wed Jul 18 13:11:40 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Wed, 18 Jul 2007 13:11:40 -0400 Subject: [Mongrel] Yet another "mongrel dying daily" case In-Reply-To: <469E3D22.6060105@yale.edu> References: <469E3D22.6060105@yale.edu> Message-ID: On Jul 18, 2007, at 12:17 , Lei Wang wrote: > I was hoping that someone can help me with this, which have been > driving > me nuts -- I have had my mongrel cluster dying daily. And yes, I have > gone through the check list of possible causes: > I don't do log rotating > I use active_record for session storage > I don't use SQLite and Berkeley DB > The MySQL timeout is set to 3600 > I am using only 10% of the memory. > > I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby > 1.8.6, and Mongrel 1.0.1. > My DB is MySQL (which, per our institutional policy, must be on a > central MySQL server). Maybe I need to install the MySQL gem and > not use > the MySQL driver that came with rails? Can I install the MySQL gem > if my > MySQL db is on a different server? > Most definitely install the mysql gem. -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070718/1d361ea3/attachment-0001.html From lei.wang at yale.edu Wed Jul 18 13:53:00 2007 From: lei.wang at yale.edu (Lei Wang) Date: Wed, 18 Jul 2007 13:53:00 -0400 Subject: [Mongrel] Yet another "mongrel dying daily" case In-Reply-To: References: <469E3D22.6060105@yale.edu> Message-ID: <469E537C.90206@yale.edu> Thank you all! Now let me figure out how to install the gem... I have tried many times but could not successfully install it. Does this have to do with the fact that my MySQL DB is running on a different server? Hmm. Anyway I will try again and see if this fixes the problem. From luislavena at gmail.com Wed Jul 18 13:56:28 2007 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 18 Jul 2007 14:56:28 -0300 Subject: [Mongrel] Yet another "mongrel dying daily" case In-Reply-To: <469E537C.90206@yale.edu> References: <469E3D22.6060105@yale.edu> <469E537C.90206@yale.edu> Message-ID: <71166b3b0707181056t1f565d6s428ba817ae71d1b3@mail.gmail.com> On 7/18/07, Lei Wang wrote: > Thank you all! Now let me figure out how to install the gem... I have > tried many times but could not successfully install it. Does this have > to do with the fact that my MySQL DB is running on a different server? > Hmm. Anyway I will try again and see if this fixes the problem. You may need the mysql-dev packages or anything that contains header information so mysql extension could be successfully be compiled :P I'll suggest you do a google search for "insert your distro version here" and 'mysql gem rails compile' :-D 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 yossarian1 at gmail.com Wed Jul 18 22:22:14 2007 From: yossarian1 at gmail.com (yossarian1 at gmail.com) Date: Wed, 18 Jul 2007 19:22:14 -0700 Subject: [Mongrel] one mongrel with hundreds of CLOSE_WAIT tcp connections Message-ID: <678738a20707181922i3c69cf91q93580ceec670f38f@mail.gmail.com> Hi, I'm running into a strange issue where one mongrel will sometimes develop hundreds of CLOSE_WAIT TCP connections, mostly to apache (I think -- see sample lsof output below). I haven't had a chance to get the mongrel with this behavior into USR1 debug mode yet. I didn't catch it in time. This happens a couple times a day on average at seemingly random times. The problem goes away within a minute or two, probably after a restart of the mongrel. I'm probably doing something crazy to cause this behavior, but I'm having trouble figuring out exactly what the problem is. It probably has to do with the fact that my mongrels get files off of amazon s3 for some requests. We do HTTPClient.get(url) for some s3 urls. I'm setting up dnsmasq now, by the way, but it's not up yet. My next steps are to get the mongrel into USR1 debugging mode and to see what actions are causing the problem, and to install dnsmasq and cacti. I think I've got a good guess which action is responsible -- it's probably the one that gets the files from s3, but I'll make sure. If you have any thoughts or other ideas, please let me know. Thanks a ton for your help! Some sample output from lsof: lsof -i -P | grep CLOSE_ | grep mongrel CLOSE_WAIT --mysite mongrel_r 831 root 6u IPv4 95162945 TCP localhost.localdomain :8011->localhost.localdomain:59311 (CLOSE_WAIT) mongrel_r 831 root 9u IPv4 95161753 TCP mysite.com:49269->xxx-xxx-xxx-xxx.amazon.com:80(CLOSE_WAIT) mongrel_r 831 root 11u IPv4 95162093 TCP mysite.com:49339-> xxx-xxx-xxx-xxx.amazon.com:80 (CLOSE_WAIT) mongrel_r 831 root 14u IPv4 95162202 TCP mysite.com:49373-> xxx-xxx-xxx-xxx.amazon.com:80 (CLOSE_WAIT) mongrel_r 831 root 15u IPv4 95162229 TCP mysite.com:49380-> xxx-xxx-xxx-xxx.amazon.com:80 (CLOSE_WAIT) mongrel_r 831 root 16u IPv4 95162319 TCP mysite.com:49399->xxx-xxx-xxx-xxx.amazon.com:80(CLOSE_WAIT) mongrel_r 831 root 17u IPv4 95162477 TCP mysite.com:49436-> xxx-xxx-xxx-xxx.amazon.com:80 (CLOSE_WAIT) mongrel_r 831 root 19u IPv4 95163082 TCP localhost.localdomain :8011->localhost.localdomain:59348 (CLOSE_WAIT) mongrel_r 831 root 20u IPv4 95163221 TCP localhost.localdomain :8011->localhost.localdomain :59387 (CLOSE_WAIT) mongrel_r 831 root 21u IPv4 95163360 TCP localhost.localdomain :8011->localhost.localdomain:59426 (CLOSE_WAIT) mongrel_r 831 root 22u IPv4 95161592 TCP mysite.com:49227 -> xxx-xxx-xxx-xxx.amazon.com:80 (CLOSE_WAIT) mongrel_r 831 root 23u IPv4 95163507 TCP localhost.localdomain :8011->localhost.localdomain :59463 (CLOSE_WAIT) mongrel_r 831 root 24u IPv4 95163675 TCP localhost.localdomain :8011->localhost.localdomain:59495 (CLOSE_WAIT) mongrel_r 831 root 25u IPv4 95164041 TCP localhost.localdomain:8011-> localhost.localdomain:59586 (CLOSE_WAIT) mongrel_r 831 root 26u IPv4 95164181 TCP localhost.localdomain :8011->localhost.localdomain:59618 (CLOSE_WAIT) mongrel_r 831 root 27u IPv4 95164293 TCP localhost.localdomain :8011->localhost.localdomain:59641 (CLOSE_WAIT) mongrel_r 831 root 28u IPv4 95164441 TCP localhost.localdomain :8011->localhost.localdomain:59670 (CLOSE_WAIT) mongrel_r 831 root 29u IPv4 95164607 TCP localhost.localdomain :8011->localhost.localdomain:59705 (CLOSE_WAIT) mongrel_r 831 root 30u IPv4 95164748 TCP localhost.localdomain :8011->localhost.localdomain:59746 (CLOSE_WAIT) mongrel_r 831 root 31u IPv4 95164895 TCP localhost.localdomain :8011->localhost.localdomain:59786 (CLOSE_WAIT) mongrel_r 831 root 32u IPv4 95165064 TCP localhost.localdomain :8011->localhost.localdomain:59830 (CLOSE_WAIT) etc. this goes on for 700 lines, where the mongrel on port 8011 has roughly 700 CLOSE_WAIT TCP connections to the 30-60k port range (to apache, I believe). All of these close_waits are for the mongrel on port 8011, in this case. Also, any ideas what's going on with the close_wait connections to amazon s3? lsof -i -P | grep CLOSE_ | grep mongrel | wc -l 703 netstat | grep 56586 # an example port tcp 1 0 localhost.localdomain:8011 localhost.localdomain:56586 CLOSE_WAIT tcp 0 0 localhost.localdomain :56586 localhost.localdomain:8011 FIN_WAIT2 getnameinfo failed getnameinfo failed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070718/1aef129a/attachment.html From piyush.pr at gmail.com Thu Jul 19 04:43:19 2007 From: piyush.pr at gmail.com (Piyush Ranjan) Date: Thu, 19 Jul 2007 14:13:19 +0530 Subject: [Mongrel] Yet another "mongrel dying daily" case In-Reply-To: <71166b3b0707181056t1f565d6s428ba817ae71d1b3@mail.gmail.com> References: <469E3D22.6060105@yale.edu> <469E537C.90206@yale.edu> <71166b3b0707181056t1f565d6s428ba817ae71d1b3@mail.gmail.com> Message-ID: <325148f70707190143u2cd3d8d5xae685ed1885b48d8@mail.gmail.com> Hi all I have encountered this problem on oracle too. Mongrels die overnight. I have temp. fixed it by putting a small script to keep pinging it every 15 mins Piyush On 7/18/07, Luis Lavena wrote: > > On 7/18/07, Lei Wang wrote: > > Thank you all! Now let me figure out how to install the gem... I have > > tried many times but could not successfully install it. Does this have > > to do with the fact that my MySQL DB is running on a different server? > > Hmm. Anyway I will try again and see if this fixes the problem. > > You may need the mysql-dev packages or anything that contains header > information so mysql extension could be successfully be compiled :P > > I'll suggest you do a google search for "insert your distro version > here" and 'mysql gem rails compile' :-D > > Regards, > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070719/60516510/attachment.html From jeff_jones_101 at yahoo.com Thu Jul 19 10:13:05 2007 From: jeff_jones_101 at yahoo.com (Jeff Jones) Date: Thu, 19 Jul 2007 07:13:05 -0700 (PDT) Subject: [Mongrel] [mongrel_cluster] hosting multiple web sites via apache mod_proxy_balancer Message-ID: <624254.71391.qm@web55103.mail.re4.yahoo.com> I'm newbie to mongrel, I'm not able to config mongrel_cluster in order to host multiple web sites added/remove as apache VirtualHost. I followed codahale http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ mixed with Wiki Radiant (I use Radiant as a rails apps to be deployed, 1 domain 1 radiant sites with its own document tree (public,log,config etc.) http://wiki.radiantcms.org/How_To_Host_Multiple_Websites_by_using_mod_proxy On my machine, I noted only one radiant site is going to be served, the one that corresponds to cwd parameter of the mongrel_cluster.yml config file user: mongrel group: mongrel cwd: /var/radiant/domainA.com log_file: /tmp/mongrel.log port: 8000" environment: production address: 127.0.0.1 pid_file: /tmp/mongrel.pid servers: 3 num_procs: 4 I report one of my VirtulHost added in the dir sites-available of the apache config tree, I omit only codahale's rewrite rules. ServerName domainA.com ServerAlias www.domainA.com DocumentRoot /var/radiant/domainA.com/public Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all ErrorLog /var/radiant/domainA.com/log/error.log ErrorDocument 404 /404.html ProxyPass / balancer://mongrel_cluster/domainA.com ProxyPassReverse / balancer://mongrel_cluster/domainA.com # OMITTED: CODAHALE REWRITE RULES I tried to comment cwd parameter, but restarting mongrel_cluster throws me the following error !!! Path to docroot not valid: public Can anyone point me out where I'm wrong ? Thanks, Jeff Jones --------------------------------- Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070719/a6391cab/attachment-0001.html From nathanclark80 at gmail.com Thu Jul 19 12:12:51 2007 From: nathanclark80 at gmail.com (Nathan Clark) Date: Thu, 19 Jul 2007 11:12:51 -0500 Subject: [Mongrel] [mongrel_cluster] hosting multiple web sites via Message-ID: Jeff try adding to your mongrel_cluster.yml :docroot: /var/radiant/domainA.com/public -- Together we can solve any issue. From jeff_jones_101 at yahoo.com Thu Jul 19 19:32:09 2007 From: jeff_jones_101 at yahoo.com (Jeff Jones) Date: Thu, 19 Jul 2007 16:32:09 -0700 (PDT) Subject: [Mongrel] [mongrel_cluster] hosting multiple web sites via In-Reply-To: Message-ID: <896570.48276.qm@web55108.mail.re4.yahoo.com> I tried but it seems not to work, I can still can see only one VirtualHost, the others shows exactly the same site of the one pointed by cwd. Changing cwd to the /public subdir of one of them, allows the new VirtualHost to be shown on all the other domains too. In general I don't understand one thing: I setup cluster of mongrel on some ports for ex: BalancerMember http://127.0.0.1:8000 BalancerMember http://127.0.0.1:8001 BalancerMember http://127.0.0.1:8002 Are all the apps (in my case the radiant subtrees) to be server from this cluster or have I to declare another one to serve one more app ? BalancerMember http://127.0.0.1:9000 BalancerMember http://127.0.0.1:9001 BalancerMember http://127.0.0.1:9002 Nathan Clark wrote: Jeff try adding to your mongrel_cluster.yml :docroot: /var/radiant/domainA.com/public -- Together we can solve any issue. --------------------------------- Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070719/7a34eb76/attachment.html From ezmobius at gmail.com Thu Jul 19 19:53:27 2007 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 19 Jul 2007 16:53:27 -0700 Subject: [Mongrel] [mongrel_cluster] hosting multiple web sites via In-Reply-To: <896570.48276.qm@web55108.mail.re4.yahoo.com> References: <896570.48276.qm@web55108.mail.re4.yahoo.com> Message-ID: <41868088-BF58-4CB8-9FDE-FA8401E4E698@brainspl.at> On Jul 19, 2007, at 4:32 PM, Jeff Jones wrote: > Are all the apps (in my case the radiant subtrees) to be server > from this cluster or have I to declare another one to serve one > more app ? You have to have a separate mongrel_cluster and vhost for each rails app. You cannot serve more then one rails app from the same mongrel cluster. Cheers- -- Ezra Zygmuntowicz -- Founder & Ruby Hacker -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From jeff_jones_101 at yahoo.com Thu Jul 19 20:43:05 2007 From: jeff_jones_101 at yahoo.com (Jeff Jones) Date: Thu, 19 Jul 2007 17:43:05 -0700 (PDT) Subject: [Mongrel] [mongrel_cluster] hosting multiple web sites via In-Reply-To: <41868088-BF58-4CB8-9FDE-FA8401E4E698@brainspl.at> Message-ID: <848874.93404.qm@web55107.mail.re4.yahoo.com> Thanks Ezra, Nor prefix option can solve my problem ? The explanation at http://mongrel.rubyforge.org/docs/apache.html "Running Multiple Rails Apps with Mongrel" is not clear for me ... Ezra Zygmuntowicz wrote: On Jul 19, 2007, at 4:32 PM, Jeff Jones wrote: > Are all the apps (in my case the radiant subtrees) to be server > from this cluster or have I to declare another one to serve one > more app ? You have to have a separate mongrel_cluster and vhost for each rails app. You cannot serve more then one rails app from the same mongrel cluster. Cheers- -- Ezra Zygmuntowicz -- Founder & Ruby Hacker -- 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 --------------------------------- Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070719/1be5ae5e/attachment.html From ezmobius at gmail.com Thu Jul 19 20:52:19 2007 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 19 Jul 2007 17:52:19 -0700 Subject: [Mongrel] [mongrel_cluster] hosting multiple web sites via In-Reply-To: <848874.93404.qm@web55107.mail.re4.yahoo.com> References: <848874.93404.qm@web55107.mail.re4.yahoo.com> Message-ID: On Jul 19, 2007, at 5:43 PM, Jeff Jones wrote: > Thanks Ezra, > > Nor prefix option can solve my problem ? > The explanation at http://mongrel.rubyforge.org/docs/apache.html > "Running Multiple Rails Apps with Mongrel" is not clear for me ... What exactly are you trying to accomplish? If it is to run two separate rails applications then you need two separate mongrel clusters. A single mongrel can only load one rails app at a time ,and a cluster of mongrels that get load balanced to will all have the same application running. Now, if you want to run two rails apps on the same domain like example.com/foo and example.com/bar then you can do it with one apache vhost but each app will still need it's own set of mongrels to proxy to. Cheers- -- Ezra Zygmuntowicz -- Founder & Ruby Hacker -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From barjunk at attglobal.net Thu Jul 19 22:04:54 2007 From: barjunk at attglobal.net (barsalou) Date: Thu, 19 Jul 2007 18:04:54 -0800 Subject: [Mongrel] hosting Perl CGI and rails together Message-ID: <20070719180454.zwgderb86cks08k8@lcgalaska.com> I read this article (http://rubyforge.org/pipermail/mongrel-users/2006-April/000084.html) and it encouraged me to ask if it was possible to host a rails app that had parts of it that were perl cgi. Is there any possibility of getting something like this working using mongrel? The goal would be to have the rails app control the authentication and authorization, then execute some of the cgi from within. The ultimate goal is to have this all be in ruby, but in the mean time, I'd like to implement what is already working in perl. Is this a cooky idea? Mike B. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From gbenedict at gmail.com Thu Jul 19 23:02:34 2007 From: gbenedict at gmail.com (Greg Benedict) Date: Thu, 19 Jul 2007 23:02:34 -0400 Subject: [Mongrel] hosting Perl CGI and rails together In-Reply-To: <20070719180454.zwgderb86cks08k8@lcgalaska.com> References: <20070719180454.zwgderb86cks08k8@lcgalaska.com> Message-ID: <6b93ca880707192002k3b5e1846ufc3e90ce6a29f187@mail.gmail.com> Apache can handle it with fastcgi, and Nginx has an experimental perl interpreter built into the latest versions. You just need to setup the rules to know which pages should go to mongrel, and which to the perl interpreter. I've been doing some similar things with Rails and some fringe pieces in PHP. This works nicely with nginx. http://wiki.codemongers.com/NginxEmbeddedPerlModule http://www.fastcgi.com/ Greg On 7/19/07, barsalou wrote: > I read this article > (http://rubyforge.org/pipermail/mongrel-users/2006-April/000084.html) > and it encouraged me to ask if it was possible to host a rails app that > had parts of it that were perl cgi. > > Is there any possibility of getting something like this working using mongrel? > > The goal would be to have the rails app control the authentication and > authorization, then execute some of the cgi from within. > > The ultimate goal is to have this all be in ruby, but in the mean time, > I'd like to implement what is already working in perl. > > Is this a cooky idea? > > Mike B. > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Thanks, Greg Benedict From tom at ipublish.no Fri Jul 20 10:38:47 2007 From: tom at ipublish.no (tom at ipublish.no) Date: Fri, 20 Jul 2007 16:38:47 +0200 Subject: [Mongrel] Strange 500 error Message-ID: <20070720144529.33E145240D16@rubyforge.org> For some strange reason I all of a sudden just get the Status: 500 Internal Server Error Content-Type: text/html on some of the pages of my application. I can't seem to find anything in the production log for rails, the mongrel log nor the apache log. The only thing that seems to show up everytime this happens is this: /usr/local/bin/mongrel_rails:18ms/mongrel-1.0.1/bin/mongrel_rails:251b:211: in `run'`run'ment.rb:117:in `process'sion_management_support' which makes me wonder where do I start to look to figure out what causes it. Has anyonw seen or heard anything similar to this?? My system runs: Rails 1.1.6 MySql 4.0.24 Mongrel 1.0.1 Fastthread 1.0 Apache 2.2 Ruby 1.8.4 on a debian server. Best regards, Tom From yossarian1 at gmail.com Sat Jul 21 03:15:13 2007 From: yossarian1 at gmail.com (yossarian1 at gmail.com) Date: Sat, 21 Jul 2007 00:15:13 -0700 Subject: [Mongrel] one mongrel with hundreds of CLOSE_WAIT tcp connections In-Reply-To: <678738a20707181922i3c69cf91q93580ceec670f38f@mail.gmail.com> References: <678738a20707181922i3c69cf91q93580ceec670f38f@mail.gmail.com> Message-ID: <678738a20707210015o14841f54h3615e258848bb49a@mail.gmail.com> In case anyone else runs into this problem, one brute-force solution is here: http://poocs.net/2006/3/27/the-adventures-of-scaling-stage-3 The poocs solution is for fcgi, but it works for mongrels too. I actually wrote a similar loop myself that just uses lsof to look for a certain number of mongrel close_waits and then restarts the bad mongrel(s). I wrote this before I ran into the poocs.net solution. Ping me if you're interested in seeing it. From hello at timperrett.com Tue Jul 24 09:53:52 2007 From: hello at timperrett.com (Tim Perrett) Date: Tue, 24 Jul 2007 14:53:52 +0100 Subject: [Mongrel] GemPlugin or Mongrel::HttpHandler subclass Message-ID: <28E1EB45-3594-47F1-8394-F7F7C869287B@timperrett.com> Hey all I am working with a technology standard (specific to the commercial print industry) by which each element within the workflow has bi- directional HTTP messaging. As each side needs a http server, I thought I could either: a) use a gem plugin to modify the behavior of mongrel b) subclass Mongrel::HttpHandler In short, its xml messaging between two points; each with a HTTP client and HTTP server, a sort of xml conversation. I was thinking that I could leverage mongrel to do this...? I have no idea which method would work best (I am thinking the subclass route?) but I was thinking I could set up some kind of system to parse/handle (most likely with libxml-ruby) the incoming xml requests then serve back the correct response? Any suggestions / comments are welcomed as I am quite in the dark with this one Cheers Tim From jameson.watts at gmail.com Tue Jul 24 11:26:51 2007 From: jameson.watts at gmail.com (Jameson Watts) Date: Tue, 24 Jul 2007 09:26:51 -0600 Subject: [Mongrel] GemPlugin or Mongrel::HttpHandler subclass In-Reply-To: <28E1EB45-3594-47F1-8394-F7F7C869287B@timperrett.com> References: <28E1EB45-3594-47F1-8394-F7F7C869287B@timperrett.com> Message-ID: I think the Mongrel gem you'd end up writing would likely subclass its HttpHandler anyway, so I think the options might be one and the same. I might first just try some built in rails stuff unless you're worried about the speed. On 7/24/07, Tim Perrett wrote: > Hey all > > I am working with a technology standard (specific to the commercial > print industry) by which each element within the workflow has bi- > directional HTTP messaging. As each side needs a http server, I > thought I could either: > > a) use a gem plugin to modify the behavior of mongrel > b) subclass Mongrel::HttpHandler > > In short, its xml messaging between two points; each with a HTTP > client and HTTP server, a sort of xml conversation. I was thinking > that I could leverage mongrel to do this...? I have no idea which > method would work best (I am thinking the subclass route?) but I was > thinking I could set up some kind of system to parse/handle (most > likely with libxml-ruby) the incoming xml requests then serve back > the correct response? > > Any suggestions / comments are welcomed as I am quite in the dark > with this one > > Cheers > > Tim > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From mzukowski at urbacon.net Tue Jul 24 11:39:11 2007 From: mzukowski at urbacon.net (Matt Zukowski) Date: Tue, 24 Jul 2007 11:39:11 -0400 Subject: [Mongrel] GemPlugin or Mongrel::HttpHandler subclass In-Reply-To: References: <28E1EB45-3594-47F1-8394-F7F7C869287B@timperrett.com> Message-ID: <46A61D1F.4020302@urbacon.net> I'd strongly recommend using Camping over Rails. We wrote a similar application (RubyCAS-Server -- the CAS protocol uses conversational HTTP), and Camping was definitely the way to go. The main problem with Rails is that it's not asynchronous. Rails can't talk and listen at the same time, at least not within the same transaction. You might be able to get around this, but you'll probably find yourself doing all kinds of gymnastics. Camping doesn't have this problem. It's much better suited for these kinds of faceless apps anyway, since it's not weighed down by all the UI niceties you get with Rails. Jameson Watts wrote: > I think the Mongrel gem you'd end up writing would likely subclass its > HttpHandler anyway, so I think the options might be one and the same. > I might first just try some built in rails stuff unless you're worried > about the speed. > > On 7/24/07, Tim Perrett wrote: > >> Hey all >> >> I am working with a technology standard (specific to the commercial >> print industry) by which each element within the workflow has bi- >> directional HTTP messaging. As each side needs a http server, I >> thought I could either: >> >> a) use a gem plugin to modify the behavior of mongrel >> b) subclass Mongrel::HttpHandler >> >> In short, its xml messaging between two points; each with a HTTP >> client and HTTP server, a sort of xml conversation. I was thinking >> that I could leverage mongrel to do this...? I have no idea which >> method would work best (I am thinking the subclass route?) but I was >> thinking I could set up some kind of system to parse/handle (most >> likely with libxml-ruby) the incoming xml requests then serve back >> the correct response? >> >> Any suggestions / comments are welcomed as I am quite in the dark >> with this one >> >> Cheers >> >> Tim >> _______________________________________________ >> 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 > This e-mail message is privileged, confidential and subject to copyright. Any unauthorized use or disclosure is prohibited. Le contenu du pr'esent courriel est privil'egi'e, confidentiel et soumis `a des droits d'auteur. Il est interdit de l'utiliser ou de le divulguer sans autorisation. From hello at timperrett.com Tue Jul 24 18:02:56 2007 From: hello at timperrett.com (Tim Perrett) Date: Tue, 24 Jul 2007 23:02:56 +0100 Subject: [Mongrel] GemPlugin or Mongrel::HttpHandler subclass In-Reply-To: <46A61D1F.4020302@urbacon.net> References: <28E1EB45-3594-47F1-8394-F7F7C869287B@timperrett.com> <46A61D1F.4020302@urbacon.net> Message-ID: <4284D473-4F36-4BE7-B703-7C8E0FF69D4E@timperrett.com> Ahh good stuff - cheers for the tip about camping! I took a brief look at the cas server, and you guys have implemented with mongrel (and others) by subclassing from what I can see? What is it that camping does for you by the way (in the context of cas- server)? (apologies for the stupid question but ive never used camping or heard of it lol) Cheers all Tim On 24 Jul 2007, at 16:39, Matt Zukowski wrote: > I'd strongly recommend using Camping over Rails. We wrote a similar > application (RubyCAS-Server -- the CAS protocol uses conversational > HTTP), and Camping was definitely the way to go. The main problem with > Rails is that it's not asynchronous. Rails can't talk and listen at > the > same time, at least not within the same transaction. You might be able > to get around this, but you'll probably find yourself doing all > kinds of > gymnastics. Camping doesn't have this problem. It's much better suited > for these kinds of faceless apps anyway, since it's not weighed > down by > all the UI niceties you get with Rails. From mzukowski at urbacon.net Wed Jul 25 17:19:07 2007 From: mzukowski at urbacon.net (Matt Zukowski) Date: Wed, 25 Jul 2007 17:19:07 -0400 Subject: [Mongrel] GemPlugin or Mongrel::HttpHandler subclass In-Reply-To: <4284D473-4F36-4BE7-B703-7C8E0FF69D4E@timperrett.com> References: <28E1EB45-3594-47F1-8394-F7F7C869287B@timperrett.com> <46A61D1F.4020302@urbacon.net> <4284D473-4F36-4BE7-B703-7C8E0FF69D4E@timperrett.com> Message-ID: <46A7BE4B.7000407@urbacon.net> Camping basically gives you a clean and simple MVC (Model-View-Controller) platform. Same as Rails, but a lot more light-weight and, in my opinion, better suited for faceless daemons like the one you're writing. In terms of the niceties you get with Camping -- for one, you can easily map your URLs to specific methods. So an HTTP POST to URL "/foo?id=9" can be mapped to method "post(id)" in module "Foo". There's also a nice view component that lets you render templates using Markaby -- ruby markup that generates XML..... but this is all probably beyond the scope of this newsgroup. Have a look at http://camping.rubyforge.org/files/README.html Tim Perrett wrote: > Ahh good stuff - cheers for the tip about camping! > I took a brief look at the cas server, and you guys have implemented > with mongrel (and others) by subclassing from what I can see? What is > it that camping does for you by the way (in the context of cas- > server)? (apologies for the stupid question but ive never used > camping or heard of it lol) > > Cheers all > > Tim > > > On 24 Jul 2007, at 16:39, Matt Zukowski wrote: > > >> I'd strongly recommend using Camping over Rails. We wrote a similar >> application (RubyCAS-Server -- the CAS protocol uses conversational >> HTTP), and Camping was definitely the way to go. The main problem with >> Rails is that it's not asynchronous. Rails can't talk and listen at >> the >> same time, at least not within the same transaction. You might be able >> to get around this, but you'll probably find yourself doing all >> kinds of >> gymnastics. Camping doesn't have this problem. It's much better suited >> for these kinds of faceless apps anyway, since it's not weighed >> down by >> all the UI niceties you get with Rails. >> > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > This e-mail message is privileged, confidential and subject to copyright. Any unauthorized use or disclosure is prohibited. Le contenu du pr'esent courriel est privil'egi'e, confidentiel et soumis `a des droits d'auteur. Il est interdit de l'utiliser ou de le divulguer sans autorisation. From list at lylo.co.uk Sun Jul 29 17:57:29 2007 From: list at lylo.co.uk (Olly Lylo) Date: Sun, 29 Jul 2007 22:57:29 +0100 Subject: [Mongrel] Mongrel stops responding after period of inactivity Message-ID: Hi I posted this to the Ruby on Rails Talk group but I thought I'd post it here too as it's probably a more appropriate group. Hope this is ok. I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with Rails 1.2.3. If no requests are received by the application for several hours (this usually happens overnight) then Mongrel stops responding and no requests are detected by Rails (at least nothing is in the Rails log). Nothing untoward is in the Mongrel log. If you try and visit the application, the request times out with a 502 Proxy Error. Apache is still up and running and serving static files without a problem, but the following is present in the Apache error log (from trying to hit the SessionController, identified by / sessions) which may provide a clue: [Sun Jul 29 08:37:36 2007] [error] proxy: error reading status line from remote server 127.0.0.1 [Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from remote server returned by /sessions Restarting the Mongrel cluster resolves the problem until the next time it happens. I have done a lot of reading about this issue online and a number of sources -- including the Mongrel FAQ -- point to being able to fix a 'hanging mongrel' situation by setting this value in environment.rb: ActiveRecord::Base.verification_timeout = 14400 This make the ActiveRecord timeout value less than the MySQL default of 28800. I have made this change and it doesn't appear to make a difference. Can anyone advise me on what to try next to diagnose this issue? I'm quickly running out of ideas and I'd appreciate a bit of help! Here are the vitals from our Ubuntu 6.0.6 server: MySQL Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using readline 5.1 connect_timeout 5 interactive_timeout 28800 max_connect_errors 10 max_connections 100 max_user_connections 0 wait_timeout 28800 ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] cgi_multipart_eof_fix (2.2) fastthread (1.0) mongrel (1.0.1) mongrel_cluster (1.0.2) Apache/2.2.4 (Unix) Mongrel Cluster Config: port: "8000" environment: production address: 127.0.0.1 pid_file: log/mongrel.pid servers: 2 user: [the user] group: [the group] Apache Load Balancer setup: BalancerMember http://127.0.0.1:8000 BalancerMember http://127.0.0.1:8001 Apache Loaded Modules: core_module (static) authn_file_module (static) authn_default_module (static) authz_host_module (static) authz_groupfile_module (static) authz_user_module (static) authz_default_module (static) auth_basic_module (static) cache_module (static) include_module (static) filter_module (static) deflate_module (static) log_config_module (static) env_module (static) headers_module (static) setenvif_module (static) proxy_module (static) proxy_connect_module (static) proxy_ftp_module (static) proxy_http_module (static) proxy_ajp_module (static) proxy_balancer_module (static) ssl_module (static) mpm_prefork_module (static) http_module (static) mime_module (static) status_module (static) autoindex_module (static) asis_module (static) cgi_module (static) negotiation_module (static) dir_module (static) actions_module (static) userdir_module (static) alias_module (static) rewrite_module (static) so_module (static) php5_module (shared) info_module (shared) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070729/44d69379/attachment.html From evan at cloudbur.st Sun Jul 29 19:47:04 2007 From: evan at cloudbur.st (Evan Weaver) Date: Sun, 29 Jul 2007 19:47:04 -0400 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: References: Message-ID: Looks like you hit the venerable Apache bug 39499 (and/or 37770), maybe. Try adding SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 to your VirtualHost block for the Rails app. Evan On 7/29/07, Olly Lylo wrote: > Hi > > > I posted this to the Ruby on Rails Talk group but I thought I'd post it here > too as it's probably a more appropriate group. Hope this is ok. > > > I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with Rails > 1.2.3. If no requests are received by the application for several hours > (this usually happens overnight) then Mongrel stops > responding and no requests are detected by Rails (at least nothing is in the > Rails log). Nothing untoward is in the Mongrel log. > > > If you try and visit the application, the request times out with a 502 Proxy > Error. Apache is still up and running and serving static files without a > problem, but the following is present in the Apache error log (from trying > to hit the SessionController, identified by / sessions) which may provide a > clue: > > > [Sun Jul 29 08:37:36 2007] [error] proxy: error reading status line from > remote server 127.0.0.1 > [Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from remote > server returned by /sessions > > > Restarting the Mongrel cluster resolves the problem until the next time it > happens. I have done a lot of reading about this issue online and a number > of sources -- including the Mongrel FAQ -- point to being able to fix a > 'hanging mongrel' situation by setting this value in environment.rb: > > > ActiveRecord::Base.verification_timeout = 14400 > > > This make the ActiveRecord timeout value less than the MySQL default of > 28800. I have made this change and it doesn't appear to make a difference. > > > Can anyone advise me on what to try next to diagnose this issue? I'm > quickly running out of ideas and I'd appreciate a bit of help! > > > Here are the vitals from our Ubuntu 6.0.6 server: > > > MySQL > Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using readline > 5.1 > connect_timeout 5 > interactive_timeout 28800 > max_connect_errors 10 > max_connections 100 > max_user_connections 0 > wait_timeout 28800 > > > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] > cgi_multipart_eof_fix ( 2.2) > fastthread (1.0) > mongrel (1.0.1) > mongrel_cluster (1.0.2) > > > Apache/2.2.4 (Unix) > > > Mongrel Cluster Config: > port: "8000" > environment: production > address: 127.0.0.1 > pid_file: log/mongrel.pid > servers: 2 > user: [the user] > group: [the group] > > > Apache Load Balancer setup: > > BalancerMember http://127.0.0.1:8000 > BalancerMember http://127.0.0.1:8001 > > > > Apache Loaded Modules: > core_module (static) > authn_file_module (static) > authn_default_module (static) > authz_host_module (static) > authz_groupfile_module (static) > authz_user_module (static) > authz_default_module (static) > auth_basic_module (static) > cache_module (static) > include_module (static) > filter_module (static) > deflate_module (static) > log_config_module (static) > env_module (static) > headers_module (static) > setenvif_module (static) > proxy_module (static) > proxy_connect_module (static) > proxy_ftp_module (static) > proxy_http_module (static) > proxy_ajp_module (static) > proxy_balancer_module (static) > ssl_module (static) > mpm_prefork_module (static) > http_module (static) > mime_module (static) > status_module (static) > autoindex_module (static) > asis_module (static) > cgi_module (static) > negotiation_module (static) > dir_module (static) > actions_module (static) > userdir_module (static) > alias_module (static) > rewrite_module (static) > so_module (static) > php5_module (shared) > info_module (shared) > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From pete at nextengine.com Sun Jul 29 22:23:06 2007 From: pete at nextengine.com (Pete DeLaurentis) Date: Sun, 29 Jul 2007 19:23:06 -0700 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: References: Message-ID: I get the same issue behind Lighttpd, and so I don't believe this is an Apache bug. Facts: - Mongrel stops working after a period of inactivity - ActiveRecord timeout is not the issue (recommended fix changes nothing) - Happens behind lighttpd and apache - Nothing in the logs to give any clues Workaround: I haven't found a solution yet, but if I setup monit to contact the mongrels every few minutes, I'm able to prevent this issue, since it's related to inactivity. Hope this helps, Pete PS. Does anyone know if Zed has any future bug-fix releases or updates planned? I believe the last release was January, right? On Jul 29, 2007, at 4:47 PM, Evan Weaver wrote: > Looks like you hit the venerable Apache bug 39499 (and/or 37770), > maybe. > > Try adding > > SetEnv force-proxy-request-1.0 1 > SetEnv proxy-nokeepalive 1 > > to your VirtualHost block for the Rails app. > > Evan > > On 7/29/07, Olly Lylo wrote: >> Hi >> >> >> I posted this to the Ruby on Rails Talk group but I thought I'd >> post it here >> too as it's probably a more appropriate group. Hope this is ok. >> >> >> I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with >> Rails >> 1.2.3. If no requests are received by the application for several >> hours >> (this usually happens overnight) then Mongrel stops >> responding and no requests are detected by Rails (at least nothing >> is in the >> Rails log). Nothing untoward is in the Mongrel log. >> >> >> If you try and visit the application, the request times out with a >> 502 Proxy >> Error. Apache is still up and running and serving static files >> without a >> problem, but the following is present in the Apache error log >> (from trying >> to hit the SessionController, identified by / sessions) which may >> provide a >> clue: >> >> >> [Sun Jul 29 08:37:36 2007] [error] proxy: error reading status >> line from >> remote server 127.0.0.1 >> [Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from >> remote >> server returned by /sessions >> >> >> Restarting the Mongrel cluster resolves the problem until the next >> time it >> happens. I have done a lot of reading about this issue online and >> a number >> of sources -- including the Mongrel FAQ -- point to being able to >> fix a >> 'hanging mongrel' situation by setting this value in environment.rb: >> >> >> ActiveRecord::Base.verification_timeout = 14400 >> >> >> This make the ActiveRecord timeout value less than the MySQL >> default of >> 28800. I have made this change and it doesn't appear to make a >> difference. >> >> >> Can anyone advise me on what to try next to diagnose this issue? I'm >> quickly running out of ideas and I'd appreciate a bit of help! >> >> >> Here are the vitals from our Ubuntu 6.0.6 server: >> >> >> MySQL >> Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using >> readline >> 5.1 >> connect_timeout 5 >> interactive_timeout 28800 >> max_connect_errors 10 >> max_connections 100 >> max_user_connections 0 >> wait_timeout 28800 >> >> >> ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] >> cgi_multipart_eof_fix ( 2.2) >> fastthread (1.0) >> mongrel (1.0.1) >> mongrel_cluster (1.0.2) >> >> >> Apache/2.2.4 (Unix) >> >> >> Mongrel Cluster Config: >> port: "8000" >> environment: production >> address: 127.0.0.1 >> pid_file: log/mongrel.pid >> servers: 2 >> user: [the user] >> group: [the group] >> >> >> Apache Load Balancer setup: >> >> BalancerMember http://127.0.0.1:8000 >> BalancerMember http://127.0.0.1:8001 >> >> >> >> Apache Loaded Modules: >> core_module (static) >> authn_file_module (static) >> authn_default_module (static) >> authz_host_module (static) >> authz_groupfile_module (static) >> authz_user_module (static) >> authz_default_module (static) >> auth_basic_module (static) >> cache_module (static) >> include_module (static) >> filter_module (static) >> deflate_module (static) >> log_config_module (static) >> env_module (static) >> headers_module (static) >> setenvif_module (static) >> proxy_module (static) >> proxy_connect_module (static) >> proxy_ftp_module (static) >> proxy_http_module (static) >> proxy_ajp_module (static) >> proxy_balancer_module (static) >> ssl_module (static) >> mpm_prefork_module (static) >> http_module (static) >> mime_module (static) >> status_module (static) >> autoindex_module (static) >> asis_module (static) >> cgi_module (static) >> negotiation_module (static) >> dir_module (static) >> actions_module (static) >> userdir_module (static) >> alias_module (static) >> rewrite_module (static) >> so_module (static) >> php5_module (shared) >> info_module (shared) >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > > > -- > Evan Weaver > Cloudburst, LLC > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070729/fe997a29/attachment-0001.html From zedshaw at zedshaw.com Sun Jul 29 23:06:58 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Sun, 29 Jul 2007 23:06:58 -0400 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: References: Message-ID: <20070729230658.c6f0a5f2.zedshaw@zedshaw.com> On Sun, 29 Jul 2007 19:23:06 -0700 Pete DeLaurentis wrote: > PS. Does anyone know if Zed has any future bug-fix releases or > updates planned? I believe the last release was January, right? Nope, Zed doesn't. You should run strace on your "dead" processes and gdb. If I can find the time I'll do a write-up, but what you're looking for is Ruby cycling over one or many open files. These will usually be something like memcache, database, or some other external service. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From jgeiger at gmail.com Sun Jul 29 23:07:49 2007 From: jgeiger at gmail.com (Joey Geiger) Date: Sun, 29 Jul 2007 22:07:49 -0500 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <20070729230658.c6f0a5f2.zedshaw@zedshaw.com> References: <20070729230658.c6f0a5f2.zedshaw@zedshaw.com> Message-ID: <466af3440707292007l699fce2dr4208465a8a850980@mail.gmail.com> It could also be a log rotation issue. Check to see if it's happening at the same time every night. If so, search the archives, as it's come up over and over. On 7/29/07, Zed A. Shaw wrote: > On Sun, 29 Jul 2007 19:23:06 -0700 > Pete DeLaurentis wrote: > > > PS. Does anyone know if Zed has any future bug-fix releases or > > updates planned? I believe the last release was January, right? > > Nope, Zed doesn't. > > You should run strace on your "dead" processes and gdb. If I can find the time I'll do a write-up, but what you're looking for is Ruby cycling over one or many open files. These will usually be something like memcache, database, or some other external service. > > -- > Zed A. Shaw > - Hate: http://savingtheinternetwithhate.com/ > - Good: http://www.zedshaw.com/ > - Evil: http://yearofevil.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From bwillenator at gmail.com Sun Jul 29 23:29:08 2007 From: bwillenator at gmail.com (Brian Williams) Date: Sun, 29 Jul 2007 20:29:08 -0700 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <466af3440707292007l699fce2dr4208465a8a850980@mail.gmail.com> References: <20070729230658.c6f0a5f2.zedshaw@zedshaw.com> <466af3440707292007l699fce2dr4208465a8a850980@mail.gmail.com> Message-ID: <6f314be40707292029l2e71b4ddh867a75b1ef0a546f@mail.gmail.com> make sure you install the ruby-mysql gem. We had the same problem, and that fixed it. --Brian On 7/29/07, Joey Geiger wrote: > > It could also be a log rotation issue. Check to see if it's happening > at the same time every night. > > If so, search the archives, as it's come up over and over. > > On 7/29/07, Zed A. Shaw wrote: > > On Sun, 29 Jul 2007 19:23:06 -0700 > > Pete DeLaurentis wrote: > > > > > PS. Does anyone know if Zed has any future bug-fix releases or > > > updates planned? I believe the last release was January, right? > > > > Nope, Zed doesn't. > > > > You should run strace on your "dead" processes and gdb. If I can find > the time I'll do a write-up, but what you're looking for is Ruby cycling > over one or many open files. These will usually be something like memcache, > database, or some other external service. > > > > -- > > Zed A. Shaw > > - Hate: http://savingtheinternetwithhate.com/ > > - Good: http://www.zedshaw.com/ > > - Evil: http://yearofevil.com/ > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > _______________________________________________ > 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/20070729/5aa0a002/attachment.html From piyush.pr at gmail.com Mon Jul 30 04:01:17 2007 From: piyush.pr at gmail.com (Piyush Ranjan) Date: Mon, 30 Jul 2007 13:31:17 +0530 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <6f314be40707292029l2e71b4ddh867a75b1ef0a546f@mail.gmail.com> References: <20070729230658.c6f0a5f2.zedshaw@zedshaw.com> <466af3440707292007l699fce2dr4208465a8a850980@mail.gmail.com> <6f314be40707292029l2e71b4ddh867a75b1ef0a546f@mail.gmail.com> Message-ID: <325148f70707300101j1c38be09vc85ff995e01dd1af@mail.gmail.com> I have same problem with Oracle DB. I am using nagios to ping all mongrel processes every 15 minutes as a temp. solution. On 7/30/07, Brian Williams wrote: > > make sure you install the ruby-mysql gem. We had the same problem, and > that fixed it. > > --Brian > > On 7/29/07, Joey Geiger < jgeiger at gmail.com> wrote: > > > > It could also be a log rotation issue. Check to see if it's happening > > at the same time every night. > > > > If so, search the archives, as it's come up over and over. > > > > On 7/29/07, Zed A. Shaw wrote: > > > On Sun, 29 Jul 2007 19:23:06 -0700 > > > Pete DeLaurentis wrote: > > > > > > > PS. Does anyone know if Zed has any future bug-fix releases or > > > > updates planned? I believe the last release was January, right? > > > > > > Nope, Zed doesn't. > > > > > > You should run strace on your "dead" processes and gdb. If I can find > > the time I'll do a write-up, but what you're looking for is Ruby cycling > > over one or many open files. These will usually be something like memcache, > > database, or some other external service. > > > > > > -- > > > Zed A. Shaw > > > - Hate: http://savingtheinternetwithhate.com/ > > > - Good: http://www.zedshaw.com/ > > > - Evil: http://yearofevil.com/ > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > _______________________________________________ > > 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/20070730/e02e99b4/attachment.html From neongrau at gmail.com Mon Jul 30 07:16:08 2007 From: neongrau at gmail.com (Ralf Vitasek) Date: Mon, 30 Jul 2007 13:16:08 +0200 Subject: [Mongrel] mongrel on windows, cpu affinity Message-ID: <7adba8e60707300416j703a9a81r6cae599c2b3a5aa6@mail.gmail.com> hello list! on the websites win32 howto it says > > CPU Affinity > > Mongrel's win32 support actually is able to set the CPU affinity of a running Mongrel service. This is pretty neat since it means if you're running a fancy SMP machine or a dual core that pretends to be SMP, then you can force Mongrel onto one of them and get a nice little boost. > > It's pretty easy to use, just pass the -u or?cpu option to the install command and give a CPU of 1-X. That means if you have 4 CPUs and you want Mongrel on #4 then do:$ mongrel_rails service::install -N myapp \ > -c c:\my\path\to\myapp -p 4000 -e production -u 4 > > > Pretty much the same command, just one more option and you're done. but when i try to use the - or --cpu switch i get invalid option: -u for command 'service::install' Try service::install -h to get help. and "mongrel_rails service::install -h" doesnt even list that option?!? From mzukowski at urbacon.net Mon Jul 30 13:01:11 2007 From: mzukowski at urbacon.net (Matt Zukowski) Date: Mon, 30 Jul 2007 13:01:11 -0400 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: References: Message-ID: <46AE1957.6010706@urbacon.net> Check two things: - Database connection might be getting closed by the DB server (we've had this exact problem with MySQL) - Logs might be getting rotated (although you'd probably get a different error if this were the case) Olly Lylo wrote: > Hi > I posted this to the Ruby on Rails Talk group but I thought I'd post it here > too as it's probably a more appropriate group. Hope this is ok. > > I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with Rails > 1.2.3. If no requests are received by the application for several hours > (this usually happens overnight) then Mongrel stops > responding and no requests are detected by Rails (at least nothing is in the > Rails log). Nothing untoward is in the Mongrel log. > > If you try and visit the application, the request times out with a 502 Proxy > Error. Apache is still up and running and serving static files without a > problem, but the following is present in the Apache error log (from trying > to hit the SessionController, identified by / sessions) which may provide a > clue: > > [Sun Jul 29 08:37:36 2007] [error] proxy: error reading status line from > remote server 127.0.0.1 > [Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from remote > server returned by /sessions > > Restarting the Mongrel cluster resolves the problem until the next time it > happens. I have done a lot of reading about this issue online and a number > of sources -- including the Mongrel FAQ -- point to being able to fix a > 'hanging mongrel' situation by setting this value in environment.rb: > > ActiveRecord::Base.verification_timeout = 14400 > > This make the ActiveRecord timeout value less than the MySQL default of > 28800. I have made this change and it doesn't appear to make a difference. > > Can anyone advise me on what to try next to diagnose this issue? > I'm quickly running out of ideas and I'd appreciate a bit of help! > > Here are the vitals from our Ubuntu 6.0.6 server: > > MySQL > Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using readline > 5.1 > connect_timeout 5 > interactive_timeout 28800 > max_connect_errors 10 > max_connections 100 > max_user_connections 0 > wait_timeout 28800 > > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] > cgi_multipart_eof_fix (2.2) > fastthread (1.0) > mongrel (1.0.1) > mongrel_cluster (1.0.2) > > Apache/2.2.4 (Unix) > > Mongrel Cluster Config: > port: "8000" > environment: production > address: 127.0.0.1 > pid_file: log/mongrel.pid > servers: 2 > user: [the user] > group: [the group] > > Apache Load Balancer setup: > > BalancerMember http://127.0.0.1:8000 > BalancerMember http://127.0.0.1:8001 > > > Apache Loaded Modules: > core_module (static) > authn_file_module (static) > authn_default_module (static) > authz_host_module (static) > authz_groupfile_module (static) > authz_user_module (static) > authz_default_module (static) > auth_basic_module (static) > cache_module (static) > include_module (static) > filter_module (static) > deflate_module (static) > log_config_module (static) > env_module (static) > headers_module (static) > setenvif_module (static) > proxy_module (static) > proxy_connect_module (static) > proxy_ftp_module (static) > proxy_http_module (static) > proxy_ajp_module (static) > proxy_balancer_module (static) > ssl_module (static) > mpm_prefork_module (static) > http_module (static) > mime_module (static) > status_module (static) > autoindex_module (static) > asis_module (static) > cgi_module (static) > negotiation_module (static) > dir_module (static) > actions_module (static) > userdir_module (static) > alias_module (static) > rewrite_module (static) > so_module (static) > php5_module (shared) > info_module (shared) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users This e-mail message is privileged, confidential and subject to copyright. Any unauthorized use or disclosure is prohibited. Le contenu du pr'esent courriel est privil'egi'e, confidentiel et soumis `a des droits d'auteur. Il est interdit de l'utiliser ou de le divulguer sans autorisation. From jeremy.burks at gmail.com Mon Jul 30 16:10:26 2007 From: jeremy.burks at gmail.com (Jeremy Burks) Date: Mon, 30 Jul 2007 15:10:26 -0500 Subject: [Mongrel] Bug in Configurator.change_privilege? In-Reply-To: <4b06455b0706040601n324e3e75y4a73fc393086d9de@mail.gmail.com> References: <4b06455b0706040601n324e3e75y4a73fc393086d9de@mail.gmail.com> Message-ID: I have run across this same problem. Is there any chance this patch will get committed? Thanks. - jeremy On 6/4/07, Scott McNab wrote: > Hello. > > I have discovered that mongrel does not correctly take on all the > groups of the requested user/group combination. It seems that while > the specified user and group is correctly activated, all the other > groups that are associated with this user are not enabled and the > group permissions remain the same as the caller (i.e. root). > > This problem (and solution) is discussed in the Ruby Forum: > > http://www.ruby-forum.com/topic/110492 > > It seems that Process.initgroups needs to be called in order for the > user's group permissions to be properly activated. > > I have a fix that involves making a slight addition to > mongrel-1.0.1/lib/mongrel/configurator.rb as follows: > > --- configurator.rb.orig 2007-05-28 04:22:11.000000000 -0400 > +++ configurator.rb 2007-05-28 04:11:02.000000000 -0400 > @@ -55,6 +55,11 @@ > # Change privilege of the process to specified user and group. > def change_privilege(user, group) > begin > + if group && user > + log "Initialising groups for {#user}:{#group}." > + Process.initgroups(user,Etc.getgrnam(group).gid) > + end > + > if group > log "Changing group to #{group}." > Process::GID.change_privilege(Etc.getgrnam(group).gid) > > To confirm this is an appropriate fix, I took a look at the source for > the linux coreutils 'su' command, which is very similar: > > /* Become the user and group(s) specified by PW. */ > > static void > change_identity (const struct passwd *pw) > { > #ifdef HAVE_INITGROUPS > errno = 0; > if (initgroups (pw->pw_name, pw->pw_gid) == -1) > error (EXIT_FAIL, errno, _("cannot set groups")); > endgrent (); > #endif > if (setgid (pw->pw_gid)) > error (EXIT_FAIL, errno, _("cannot set group id")); > if (setuid (pw->pw_uid)) > error (EXIT_FAIL, errno, _("cannot set user id")); > } > > This patch seems to solve the problem for me - Can someone please > review this for possible inclusion in the main mongrel source tree? > > Thanks, > Scott > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From wyhaines at gmail.com Mon Jul 30 16:50:20 2007 From: wyhaines at gmail.com (Kirk Haines) Date: Mon, 30 Jul 2007 13:50:20 -0700 Subject: [Mongrel] Bug in Configurator.change_privilege? In-Reply-To: References: <4b06455b0706040601n324e3e75y4a73fc393086d9de@mail.gmail.com> Message-ID: On 7/30/07, Jeremy Burks wrote: > I have run across this same problem. Is there any chance this patch > will get committed? For what it is worth, this is fixed in the swiftiplied_mongrel and evented_mongrel patches in Swiftiply 0.6.0 (which, sadly, I didn't get released this weekend as planned because I found a couple bugs that I need to address first). Kirk Haines From luislavena at gmail.com Mon Jul 30 23:01:43 2007 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 31 Jul 2007 00:01:43 -0300 Subject: [Mongrel] mongrel on windows, cpu affinity In-Reply-To: <7adba8e60707300416j703a9a81r6cae599c2b3a5aa6@mail.gmail.com> References: <7adba8e60707300416j703a9a81r6cae599c2b3a5aa6@mail.gmail.com> Message-ID: <71166b3b0707302001y7d494e1egdb5bad9fa0845d5@mail.gmail.com> On 7/30/07, Ralf Vitasek wrote: > hello list! > > on the websites win32 howto it says > > > > CPU Affinity > > > > Mongrel's win32 support actually is able to set the CPU affinity of a running Mongrel service. This is pretty neat since it means if you're running a fancy SMP machine or a dual core that pretends to be SMP, then you can force Mongrel onto one of them and get a nice little boost. > > > > It's pretty easy to use, just pass the -u or?cpu option to the install command and give a CPU of 1-X. That means if you have 4 CPUs and you want Mongrel on #4 then do:$ mongrel_rails service::install -N myapp \ > > -c c:\my\path\to\myapp -p 4000 -e production -u 4 > > > > > > Pretty much the same command, just one more option and you're done. > > but when i try to use the - or --cpu switch i get > > invalid option: -u for command 'service::install' > Try service::install -h to get help. > > > and "mongrel_rails service::install -h" doesnt even list that option?!? When I released version 0.3.0 (and a few weeks back 0.3.2) affinity support was removed, since it no longer use win32-service to bootstrap the service, but instead a pre-compiled, native executable. Re-add that to new mongrel_service is in my TODO, maybe next week could drop it again, but cannot guarantee it right now (since I'm out of office for the following days). -- 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 piyush.pr at gmail.com Tue Jul 31 02:57:57 2007 From: piyush.pr at gmail.com (Piyush Ranjan) Date: Tue, 31 Jul 2007 12:27:57 +0530 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <46AE1957.6010706@urbacon.net> References: <46AE1957.6010706@urbacon.net> Message-ID: <325148f70707302357v1da82e83k5a8142c033b40293@mail.gmail.com> had there been a error, things would have been very easier then :P On 7/30/07, Matt Zukowski wrote: > > Check two things: > > - Database connection might be getting closed by the DB server (we've > had this exact problem with MySQL) > - Logs might be getting rotated (although you'd probably get a different > error if this were the case) > > > Olly Lylo wrote: > > Hi > > I posted this to the Ruby on Rails Talk group but I thought I'd post it > here > > too as it's probably a more appropriate group. Hope this is ok. > > > > I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with Rails > > 1.2.3. If no requests are received by the application for several hours > > (this usually happens overnight) then Mongrel stops > > responding and no requests are detected by Rails (at least nothing is in > the > > Rails log). Nothing untoward is in the Mongrel log. > > > > If you try and visit the application, the request times out with a 502 > Proxy > > Error. Apache is still up and running and serving static files without > a > > problem, but the following is present in the Apache error log (from > trying > > to hit the SessionController, identified by / sessions) which may > provide a > > clue: > > > > [Sun Jul 29 08:37:36 2007] [error] proxy: error reading status line > from > > remote server 127.0.0.1 > > [Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from remote > > server returned by /sessions > > > > Restarting the Mongrel cluster resolves the problem until the next time > it > > happens. I have done a lot of reading about this issue online and a > number > > of sources -- including the Mongrel FAQ -- point to being able to fix a > > 'hanging mongrel' situation by setting this value in environment.rb: > > > > ActiveRecord::Base.verification_timeout = 14400 > > > > This make the ActiveRecord timeout value less than the MySQL default of > > 28800. I have made this change and it doesn't appear to make a > difference. > > > > Can anyone advise me on what to try next to diagnose this issue? > > I'm quickly running out of ideas and I'd appreciate a bit of help! > > > > Here are the vitals from our Ubuntu 6.0.6 server: > > > > MySQL > > Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using > readline > > 5.1 > > connect_timeout 5 > > interactive_timeout 28800 > > max_connect_errors 10 > > max_connections 100 > > max_user_connections 0 > > wait_timeout 28800 > > > > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] > > cgi_multipart_eof_fix (2.2) > > fastthread (1.0) > > mongrel (1.0.1) > > mongrel_cluster (1.0.2) > > > > Apache/2.2.4 (Unix) > > > > Mongrel Cluster Config: > > port: "8000" > > environment: production > > address: 127.0.0.1 > > pid_file: log/mongrel.pid > > servers: 2 > > user: [the user] > > group: [the group] > > > > Apache Load Balancer setup: > > > > BalancerMember http://127.0.0.1:8000 > > BalancerMember http://127.0.0.1:8001 > > > > > > Apache Loaded Modules: > > core_module (static) > > authn_file_module (static) > > authn_default_module (static) > > authz_host_module (static) > > authz_groupfile_module (static) > > authz_user_module (static) > > authz_default_module (static) > > auth_basic_module (static) > > cache_module (static) > > include_module (static) > > filter_module (static) > > deflate_module (static) > > log_config_module (static) > > env_module (static) > > headers_module (static) > > setenvif_module (static) > > proxy_module (static) > > proxy_connect_module (static) > > proxy_ftp_module (static) > > proxy_http_module (static) > > proxy_ajp_module (static) > > proxy_balancer_module (static) > > ssl_module (static) > > mpm_prefork_module (static) > > http_module (static) > > mime_module (static) > > status_module (static) > > autoindex_module (static) > > asis_module (static) > > cgi_module (static) > > negotiation_module (static) > > dir_module (static) > > actions_module (static) > > userdir_module (static) > > alias_module (static) > > rewrite_module (static) > > so_module (static) > > php5_module (shared) > > info_module (shared) > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > This e-mail message is privileged, confidential and subject to copyright. > Any unauthorized use or disclosure is prohibited. > Le contenu du pr'esent courriel est privil'egi'e, confidentiel et soumis > `a des droits d'auteur. Il est interdit de l'utiliser ou de le divulguer > sans autorisation. > > > _______________________________________________ > 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/20070731/d557e7e4/attachment.html From ged at FaerieMUD.org Tue Jul 31 12:22:49 2007 From: ged at FaerieMUD.org (Michael Granger) Date: Tue, 31 Jul 2007 09:22:49 -0700 Subject: [Mongrel] Patch: Allow overriding of handler dispatch in Mongrel::HttpServer Message-ID: Hi Zed (and list), I first of all wanted to thank you for all the hard work you've done to make writing HTTP services in Ruby easier and more reliable. A friend of mine and I are developing a network filestore service (similar to S3) based on Mongrel, and we got a fairly useful set of functionality done and working in a matter of a few weeks thanks largely to your work. Mongrel has been reliable, easy to use, and has freed us from having to do any of the nasty bits of HTTP. Thanks! We're adding a content-negotiation and filtering layer to the service now, and have run into a bit of a snag in the way Mongrel::HttpServer#process_client does its dispatching to the handlers registered for a given path: namely that we want to be able to wrap up Mongrel's request and response objects in our own objects and send those to each handler's #process method. We could of course override #process_client in our own subclass of Mongrel::HttpServer, but that's a fairly large chunk of functionality to duplicate, so I was wondering if we could ask that the actual dispatch to the handlers be moved out into a method that can be specifically overridden. A proposed patch: Index: lib/mongrel.rb =================================================================== --- lib/mongrel.rb (revision 540) +++ lib/mongrel.rb (working copy) @@ -613,11 +613,7 @@ # request is good so far, continue processing the response response = HttpResponse.new(client) - # Process each handler in registered order until we run out or one finalizes the response. - handlers.each do |handler| - handler.process(request, response) - break if response.done or client.closed? - end + dispatch_to_handlers(client, handlers, request, response) # And finally, if nobody closed the response off, we finalize it. unless response.done or client.closed? @@ -658,6 +654,17 @@ end end + + # Process each handler in registered order until we run out or one finalizes the + # response. + def dispatch_to_handlers(client, handlers, request, response) + handlers.each do |handler| + handler.process(request, response) + return if response.done or client.closed? + end + end + + # Used internally to kill off any worker threads that have taken too long # to complete processing. Only called if there are too many processors # currently servicing. It returns the count of workers still active All the unit tests continue to pass with this change, and I couldn't think of anything else within the purvue of Mongrel::HttpServer that needed additional testing, but if you'd like me to try to come up with tests for this change I can do that. We're currently re-opening Mongrel::HttpServer and applying this patch ourselves, which of course works just fine, but I thought that perhaps someone else might want to do something similar and could benefit from this. It would also make our keeping up with future changes to Mongrel easier with (I hope) a minimum of code-fistage. Thanks for your time, -- Michael Granger Rubymage, Believer, Architect The FaerieMUD Consortium ruby -e "p 12383406064495388618631689469409153107.to_s(36).tr('z',' ')" From jnylund at yahoo.com Tue Jul 31 14:08:30 2007 From: jnylund at yahoo.com (Joel Nylund) Date: Tue, 31 Jul 2007 14:08:30 -0400 Subject: [Mongrel] anyway to exclude logging for a given IP address? Message-ID: <3F49EA0A-F17A-401B-BEBE-B14B66A6641F@yahoo.com> Hi, im not sure if this is a mongrel or rails question, so im sorry if I got the wrong list. Is there anyway to turn off logging (in production.log) if a request comes from a given IP address. I use monit to watch everything, and I get tons of this in my log file: Processing AccountController#login (for 127.0.0.1 at 2007-07-31 14:06:28) [GET] Session ID: XXXXXXXXXXXXXXXXXX Parameters: {"action"=>"login", "controller"=>"account"} Rendering layoutfalse within layouts/login Rendering account/login Completed in 0.00390 (256 reqs/sec) | Rendering: 0.00286 (73%) | DB: 0.00078 (19%) | 200 OK [http:// /] thanks Joel From pete at nextengine.com Tue Jul 31 14:37:17 2007 From: pete at nextengine.com (Pete DeLaurentis) Date: Tue, 31 Jul 2007 11:37:17 -0700 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <325148f70707302357v1da82e83k5a8142c033b40293@mail.gmail.com> References: <46AE1957.6010706@urbacon.net> <325148f70707302357v1da82e83k5a8142c033b40293@mail.gmail.com> Message-ID: <2C92EBF6-E466-4A62-A66C-0C3E28752099@nextengine.com> Thanks for the tip. We're not using log rotation and have already tried adjusting the activerecord timeout. One thing not tried yet: the mysql gem -Pete On Jul 30, 2007, at 11:57 PM, Piyush Ranjan wrote: > had there been a error, things would have been very easier then :P > > On 7/30/07, Matt Zukowski wrote: > Check two things: > > - Database connection might be getting closed by the DB server (we've > had this exact problem with MySQL) > - Logs might be getting rotated (although you'd probably get a > different > error if this were the case) > > > Olly Lylo wrote: > > Hi > > I posted this to the Ruby on Rails Talk group but I thought I'd > post it here > > too as it's probably a more appropriate group. Hope this is ok. > > > > I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with > Rails > > 1.2.3. If no requests are received by the application for > several hours > > (this usually happens overnight) then Mongrel stops > > responding and no requests are detected by Rails (at least > nothing is in the > > Rails log). Nothing untoward is in the Mongrel log. > > > > If you try and visit the application, the request times out with > a 502 Proxy > > Error. Apache is still up and running and serving static files > without a > > problem, but the following is present in the Apache error log > (from trying > > to hit the SessionController, identified by / sessions) which may > provide a > > clue: > > > > [Sun Jul 29 08:37:36 2007] [error] proxy: error reading > status line from > > remote server 127.0.0.1 > > [Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from > remote > > server returned by /sessions > > > > Restarting the Mongrel cluster resolves the problem until the > next time it > > happens. I have done a lot of reading about this issue online > and a number > > of sources -- including the Mongrel FAQ -- point to being able to > fix a > > 'hanging mongrel' situation by setting this value in environment.rb: > > > > ActiveRecord::Base.verification_timeout = 14400 > > > > This make the ActiveRecord timeout value less than the MySQL > default of > > 28800. I have made this change and it doesn't appear to make a > difference. > > > > Can anyone advise me on what to try next to diagnose this issue? > > I'm quickly running out of ideas and I'd appreciate a bit of help! > > > > Here are the vitals from our Ubuntu 6.0.6 server: > > > > MySQL > > Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using > readline > > 5.1 > > connect_timeout 5 > > interactive_timeout 28800 > > max_connect_errors 10 > > max_connections 100 > > max_user_connections 0 > > wait_timeout 28800 > > > > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] > > cgi_multipart_eof_fix (2.2) > > fastthread (1.0) > > mongrel (1.0.1) > > mongrel_cluster (1.0.2) > > > > Apache/2.2.4 (Unix) > > > > Mongrel Cluster Config: > > port: "8000" > > environment: production > > address: 127.0.0.1 > > pid_file: log/mongrel.pid > > servers: 2 > > user: [the user] > > group: [the group] > > > > Apache Load Balancer setup: > > > > BalancerMember http://127.0.0.1:8000 > > BalancerMember http://127.0.0.1:8001 > > > > > > Apache Loaded Modules: > > core_module (static) > > authn_file_module (static) > > authn_default_module (static) > > authz_host_module (static) > > authz_groupfile_module (static) > > authz_user_module (static) > > authz_default_module (static) > > auth_basic_module (static) > > cache_module (static) > > include_module (static) > > filter_module (static) > > deflate_module (static) > > log_config_module (static) > > env_module (static) > > headers_module (static) > > setenvif_module (static) > > proxy_module (static) > > proxy_connect_module (static) > > proxy_ftp_module (static) > > proxy_http_module (static) > > proxy_ajp_module (static) > > proxy_balancer_module (static) > > ssl_module (static) > > mpm_prefork_module (static) > > http_module (static) > > mime_module (static) > > status_module (static) > > autoindex_module (static) > > asis_module (static) > > cgi_module (static) > > negotiation_module (static) > > dir_module (static) > > actions_module (static) > > userdir_module (static) > > alias_module (static) > > rewrite_module (static) > > so_module (static) > > php5_module (shared) > > info_module (shared) > > > > > > > ---------------------------------------------------------------------- > -- > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > This e-mail message is privileged, confidential and subject to > copyright. Any unauthorized use or disclosure is prohibited. > Le contenu du pr'esent courriel est privil'egi'e, confidentiel et > soumis `a des droits d'auteur. Il est interdit de l'utiliser ou de > le divulguer sans autorisation. > > > _______________________________________________ > 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/20070731/773437db/attachment.html From mzukowski at urbacon.net Tue Jul 31 15:10:15 2007 From: mzukowski at urbacon.net (Matt Zukowski) Date: Tue, 31 Jul 2007 15:10:15 -0400 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <2C92EBF6-E466-4A62-A66C-0C3E28752099@nextengine.com> References: <46AE1957.6010706@urbacon.net> <325148f70707302357v1da82e83k5a8142c033b40293@mail.gmail.com> <2C92EBF6-E466-4A62-A66C-0C3E28752099@nextengine.com> Message-ID: <46AF8917.2040908@urbacon.net> Some have reported that changing the ActiveRecord verification_timeout value doesn't help with this problem. Try increasing the interactive_timeout and/or wait_timeout in your MySQL server and see if that helps. Pete DeLaurentis wrote: > Thanks for the tip. We're not using log rotation and have already > tried adjusting the activerecord timeout. > > One thing not tried yet: the mysql gem > > -Pete > > > > On Jul 30, 2007, at 11:57 PM, Piyush Ranjan wrote: > >> had there been a error, things would have been very easier then :P >> >> On 7/30/07, Matt Zukowski wrote: >> Check two things: >> >> - Database connection might be getting closed by the DB server (we've >> had this exact problem with MySQL) >> - Logs might be getting rotated (although you'd probably get a different >> error if this were the case) >> >> >> Olly Lylo wrote: >> > Hi >> > I posted this to the Ruby on Rails Talk group but I thought I'd >> post it here >> > too as it's probably a more appropriate group. Hope this is ok. >> > >> > I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with >> Rails >> > 1.2.3. If no requests are received by the application for several >> hours >> > (this usually happens overnight) then Mongrel stops >> > responding and no requests are detected by Rails (at least nothing >> is in the >> > Rails log). Nothing untoward is in the Mongrel log. >> > >> > If you try and visit the application, the request times out with a >> 502 Proxy >> > Error. Apache is still up and running and serving static files >> without a >> > problem, but the following is present in the Apache error log (from >> trying >> > to hit the SessionController, identified by / sessions) which may >> provide a >> > clue: >> > >> > [Sun Jul 29 08:37:36 2007] [error] proxy: error reading status >> line from >> > remote server 127.0.0.1 >> > [Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from >> remote >> > server returned by /sessions >> > >> > Restarting the Mongrel cluster resolves the problem until the next >> time it >> > happens. I have done a lot of reading about this issue online and >> a number >> > of sources -- including the Mongrel FAQ -- point to being able to >> fix a >> > 'hanging mongrel' situation by setting this value in environment.rb: >> > >> > ActiveRecord::Base.verification_timeout = 14400 >> > >> > This make the ActiveRecord timeout value less than the MySQL >> default of >> > 28800. I have made this change and it doesn't appear to make a >> difference. >> > >> > Can anyone advise me on what to try next to diagnose this issue? >> > I'm quickly running out of ideas and I'd appreciate a bit of help! >> > >> > Here are the vitals from our Ubuntu 6.0.6 server: >> > >> > MySQL >> > Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using >> readline >> > 5.1 >> > connect_timeout 5 >> > interactive_timeout 28800 >> > max_connect_errors 10 >> > max_connections 100 >> > max_user_connections 0 >> > wait_timeout 28800 >> > >> > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] >> > cgi_multipart_eof_fix (2.2) >> > fastthread (1.0) >> > mongrel (1.0.1) >> > mongrel_cluster (1.0.2) >> > >> > Apache/2.2.4 (Unix) >> > >> > Mongrel Cluster Config: >> > port: "8000" >> > environment: production >> > address: 127.0.0.1 >> > pid_file: log/mongrel.pid >> > servers: 2 >> > user: [the user] >> > group: [the group] >> > >> > Apache Load Balancer setup: >> > >> > BalancerMember http://127.0.0.1:8000 >> > BalancerMember http://127.0.0.1:8001 >> > >> > >> > Apache Loaded Modules: >> > core_module (static) >> > authn_file_module (static) >> > authn_default_module (static) >> > authz_host_module (static) >> > authz_groupfile_module (static) >> > authz_user_module (static) >> > authz_default_module (static) >> > auth_basic_module (static) >> > cache_module (static) >> > include_module (static) >> > filter_module (static) >> > deflate_module (static) >> > log_config_module (static) >> > env_module (static) >> > headers_module (static) >> > setenvif_module (static) >> > proxy_module (static) >> > proxy_connect_module (static) >> > proxy_ftp_module (static) >> > proxy_http_module (static) >> > proxy_ajp_module (static) >> > proxy_balancer_module (static) >> > ssl_module (static) >> > mpm_prefork_module (static) >> > http_module (static) >> > mime_module (static) >> > status_module (static) >> > autoindex_module (static) >> > asis_module (static) >> > cgi_module (static) >> > negotiation_module (static) >> > dir_module (static) >> > actions_module (static) >> > userdir_module (static) >> > alias_module (static) >> > rewrite_module (static) >> > so_module (static) >> > php5_module (shared) >> > info_module (shared) >> > >> > >> > >> ------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > Mongrel-users mailing list >> > Mongrel-users at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/mongrel-users >> >> >> >> This e-mail message is privileged, confidential and subject to >> copyright. Any unauthorized use or disclosure is prohibited. >> Le contenu du pr'esent courriel est privil'egi'e, confidentiel et >> soumis `a des droits d'auteur. Il est interdit de l'utiliser ou de le >> divulguer sans autorisation. >> >> >> _______________________________________________ >> 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 wayneeseguin at gmail.com Tue Jul 31 15:17:00 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Tue, 31 Jul 2007 15:17:00 -0400 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <2C92EBF6-E466-4A62-A66C-0C3E28752099@nextengine.com> References: <46AE1957.6010706@urbacon.net> <325148f70707302357v1da82e83k5a8142c033b40293@mail.gmail.com> <2C92EBF6-E466-4A62-A66C-0C3E28752099@nextengine.com> Message-ID: <646A450A-32AD-4D2B-A6AD-F6436B34990D@gmail.com> On Jul 31, 2007, at 14:37 , Pete DeLaurentis wrote: > Thanks for the tip. We're not using log rotation and have already > tried adjusting the activerecord timeout. > > One thing not tried yet: the mysql gem > > -Pete Pete, We found that we saw this issue would arise when the MySQL gem was either uninstalled or not installed properly (eg make failed). -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070731/007cf897/attachment-0001.html From jgeiger at gmail.com Tue Jul 31 15:43:01 2007 From: jgeiger at gmail.com (Joey Geiger) Date: Tue, 31 Jul 2007 14:43:01 -0500 Subject: [Mongrel] anyway to exclude logging for a given IP address? In-Reply-To: <3F49EA0A-F17A-401B-BEBE-B14B66A6641F@yahoo.com> References: <3F49EA0A-F17A-401B-BEBE-B14B66A6641F@yahoo.com> Message-ID: <466af3440707311243g6a6d21adme76856fdcfec7ed2@mail.gmail.com> This is a rails question. The way I did it was to create a specific monit controller, that has a single action and define logger to be empty so it just does nothing, which keeps it from writing to the log file. Index just calls index.rhtml which just has the word "success" in it. Not sure if that or :render :text => "success" is faster, but either works. class MonitController < ActionController::Base session :off ## this is used by the monitoring scripts to see if the mongrel is up and running def index end def logger end end On 7/31/07, Joel Nylund wrote: > Hi, im not sure if this is a mongrel or rails question, so im sorry > if I got the wrong list. > > Is there anyway to turn off logging (in production.log) if a request > comes from a given IP address. I use monit to watch everything, and I > get tons of this in my log file: > > Processing AccountController#login (for 127.0.0.1 at 2007-07-31 > 14:06:28) [GET] > Session ID: XXXXXXXXXXXXXXXXXX > Parameters: {"action"=>"login", "controller"=>"account"} > Rendering layoutfalse within layouts/login > Rendering account/login > Completed in 0.00390 (256 reqs/sec) | Rendering: 0.00286 (73%) | DB: > 0.00078 (19%) | 200 OK [http:// /] > > thanks > Joel > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From jgeiger at gmail.com Tue Jul 31 15:43:49 2007 From: jgeiger at gmail.com (Joey Geiger) Date: Tue, 31 Jul 2007 14:43:49 -0500 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <646A450A-32AD-4D2B-A6AD-F6436B34990D@gmail.com> References: <46AE1957.6010706@urbacon.net> <325148f70707302357v1da82e83k5a8142c033b40293@mail.gmail.com> <2C92EBF6-E466-4A62-A66C-0C3E28752099@nextengine.com> <646A450A-32AD-4D2B-A6AD-F6436B34990D@gmail.com> Message-ID: <466af3440707311243x71cca9fhbdb5107f921f66ae@mail.gmail.com> Just a suggestion. I'd get some kind of log rotation going sooner than later. On 7/31/07, Wayne E. Seguin wrote: > > > On Jul 31, 2007, at 14:37 , Pete DeLaurentis wrote: > > Thanks for the tip. We're not using log rotation and have already tried > adjusting the activerecord timeout. > > One thing not tried yet: the mysql gem > > -Pete > > Pete, > > We found that we saw this issue would arise when the MySQL gem was either > uninstalled or not installed properly (eg make failed). > > -- > Wayne E. Seguin > Sr. Systems Architect & Systems Admin > wayneseguin at gmail.com > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Tue Jul 31 20:15:46 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 31 Jul 2007 20:15:46 -0400 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: References: Message-ID: <20070731201546.ed57cda7.zedshaw@zedshaw.com> On Sun, 29 Jul 2007 22:57:29 +0100 "Olly Lylo" wrote: > Hi > I posted this to the Ruby on Rails Talk group but I thought I'd post it here > too as it's probably a more appropriate group. Hope this is ok. Alright, I've got a few minutes to write this down since it seems to be biting a few people. Here's the rules for resolving a "RAILS in Mongrel dies" problem (notice the RAILS part?): 1) 1000's of sites run mongrel without this problem so look to what you have installed first. 2) Make sure that every single bit of software you are running is the most recent version and everything is installed and used correctly. Common culprits are: a) MySQL -- install the gem manually and make sure that the most recent is the only one. DO NOT USE THE RAILS DEFAULT. b) Memcached -- Use the very latest from Eric Hodel's project and do NOT put any keys in that have spaces or null (\0) chars. Yes, your keys cannot have spaces. YES YOUR KEYS CANNOT HAVE SPACES. c) net::http to some web site. This can cycle forever. 3) Next, once you've made sure all the above is isolated then you can proceed to stage 2. STAGE 2 1) You must let your application run in the best configuration and be ready to pounce on it the second a mongrel dies. 2) Log in to your server and find out the PID file of the mongrel that isn't responding. You do this by hitting the process on it's actual port (like 8000, 8001, 8002, NOT apache/nginx's port of 80). 3) Once you know what port it is, then use: sudo lsof -i -P | grep PORT to find what process PID is on that port. 4) Next, attach to this process with: sudo strace -p PID. What you'll see in a healthy mongrel is lots of variation. What you'll see in a dead mongrel is probably either a bunch of calls to select/poll for the exact same filedescriptors, or nothing. 5) If you see it doing a select on the file descriptors, then you need to find out what is on that FD that is causing it to wait. Again, use: lsof | grep FILEDESCR a) This will potentially tell you where it's connected, etc. Once you do this you know what is being read/written and can go find out what in your rails app is using it, and apply even more debugging tools. b) You can also just force it closed externally. There's a few mentions of this but I don't remember the exact procedure. c) The reason this typically happens is that you have a socket that ruby has written to and not read from yet, but that socket is closed. Another cause is that you are simply waiting for data (which is what happens with memcached and putting a space in your keys). 6) If your mongrel is completely dead then move on to stage 3 and also you're kind of fucked. STAGE 3 1) Get your good shoes on because you're now in GDB land and C. 2) http://eigenclass.org/hiki.rb?ruby+live+process+introspection Explains attaching to your mongrel process (you've identified above) using GDB, loading some GDB scripts, and then stopping it, inspecting it, and forcing an exception. 3) Do those thigns. Attach. Pause it. Inspect variables. Get stack traces. Force an exception. See where it's stopped. Look for where OUTSIDE of mongrel it's coming from. 4) That's all I can say right now. Let's hope other people can expand on this. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From zedshaw at zedshaw.com Tue Jul 31 20:20:23 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Tue, 31 Jul 2007 20:20:23 -0400 Subject: [Mongrel] [HELP] Mongrel Needs a Patch Maven Message-ID: <20070731202023.50d6b7cd.zedshaw@zedshaw.com> Hey folks, I'm falling behind in my Mongrel duties and seriously need to recruit an enterprising individual to take on the patch queue and help push out a new release with some minor fixes. The goal would be to just get patches that are currently languishing, pull them together, put them in the source, write some tests to try them, and then one slight design change. If this works out then I'd also look to hand over the reigns to this person. I'd hope to make this a younger coder looking to get some street cred and learn how to maintain and own a project. Any takers? -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From ezmobius at gmail.com Tue Jul 31 20:59:50 2007 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Tue, 31 Jul 2007 17:59:50 -0700 Subject: [Mongrel] [HELP] Mongrel Needs a Patch Maven In-Reply-To: <20070731202023.50d6b7cd.zedshaw@zedshaw.com> References: <20070731202023.50d6b7cd.zedshaw@zedshaw.com> Message-ID: <88226401-CBFA-4C88-B104-393F004C6B1E@brainspl.at> On Jul 31, 2007, at 5:20 PM, Zed A. Shaw wrote: > Hey folks, > > I'm falling behind in my Mongrel duties and seriously need to > recruit an enterprising individual to take on the patch queue and > help push out a new release with some minor fixes. The goal would > be to just get patches that are currently languishing, pull them > together, put them in the source, write some tests to try them, and > then one slight design change. > > If this works out then I'd also look to hand over the reigns to > this person. I'd hope to make this a younger coder looking to get > some street cred and learn how to maintain and own a project. > > Any takers? > > -- > Zed A. Shaw I'd be happy to help Zed. Might be a good idea to bring on an additional person as well that I could work together with if anyone else is interested. I'm pretty familiar with all the nooks and crannies in the mongrel source and with it's behavior in the wild ;) Cheers -- Ezra Zygmuntowicz -- Founder & Ruby Hacker -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From wyhaines at gmail.com Tue Jul 31 21:18:43 2007 From: wyhaines at gmail.com (Kirk Haines) Date: Tue, 31 Jul 2007 18:18:43 -0700 Subject: [Mongrel] [HELP] Mongrel Needs a Patch Maven In-Reply-To: <88226401-CBFA-4C88-B104-393F004C6B1E@brainspl.at> References: <20070731202023.50d6b7cd.zedshaw@zedshaw.com> <88226401-CBFA-4C88-B104-393F004C6B1E@brainspl.at> Message-ID: On 7/31/07, Ezra Zygmuntowicz wrote: > I'd be happy to help Zed. Might be a good idea to bring on an > additional person as well that I could work together with if anyone > else is interested. I'm pretty familiar with all the nooks and > crannies in the mongrel source and with it's behavior in the wild ;) I'm also willing to help. I have quite a bit of familiarity with the guts of Mongrel, as well. Kirk Haines