From list at lylo.co.uk Wed Aug 1 03:09:08 2007 From: list at lylo.co.uk (Olly Lylo) Date: Wed, 1 Aug 2007 08:09:08 +0100 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: References: Message-ID: I thought I'd follow up on my progress with this thread. I haven't seen the problem now for a couple of days so (fingers crossed) my problem appears to be fixed. Firstly, I DO have logrotate scheduled to run daily using cron but I didn't touch this, so I don't believe this is the problem in my case. I initiall tried setting the following in environment.rb ActiveRecord::Base.verification_timeout = 14400 This did NOT solve my problem, but is probably a change which should be made anyway. I then made two significant changes: 1. I didn't have the MySQL gem installed, so I have installed this (version 2.7). 2. I made the following change to my Apache Virtual Host setting to prevent Apache from losing the connection to the proxy (according to http://httpd.apache.org/docs/2.0/mod/mod_proxy.html) SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 After making these two changes and restarting MySQL, Apache and the Mongrel Cluster, the problem hasn't reoccurred. Hope this helps. Cheers, Olly -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070801/8dab6287/attachment.html From piyush.pr at gmail.com Wed Aug 1 03:22:37 2007 From: piyush.pr at gmail.com (Piyush Ranjan) Date: Wed, 1 Aug 2007 12:52:37 +0530 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <20070731201546.ed57cda7.zedshaw@zedshaw.com> References: <20070731201546.ed57cda7.zedshaw@zedshaw.com> Message-ID: <325148f70708010022s473a6935na0ff8bbfba50d89@mail.gmail.com> Hi Thank you for your suggestions. I have a few sites running on mongrel. Only one of them has this "sleep disorder". I later realized that due to constant load (throughout the day) on other sites they were working fine whereas this forum had load only during the day and hence did die overnight. I have inspected the PIDs and found that mongrel remain in the sleeping mode even after repeated connection request. For now I have a nagios looking after it(pinging it every 15 mins). I must point out here that the DB here is Oracle and mysql is not in the picture at all On 8/1/07, Zed A. Shaw wrote: > > 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/ > _______________________________________________ > 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/20070801/6b73793c/attachment-0001.html From wayneeseguin at gmail.com Wed Aug 1 09:25:46 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Wed, 1 Aug 2007 09:25:46 -0400 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: <42FE0F74-F72D-44E9-B07B-AB24385B8AFF@gmail.com> On Jul 31, 2007, at 20:59 , Ezra Zygmuntowicz wrote: > 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 Zed, I too would be more than happy to help. ~Wayne -- 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/20070801/553f0f25/attachment.html From nate at mediatemple.net Wed Aug 1 12:05:26 2007 From: nate at mediatemple.net (Nate Jones - (mt) Media Temple) Date: Wed, 1 Aug 2007 09:05:26 -0700 Subject: [Mongrel] [HELP] Mongrel Needs a Patch Maven In-Reply-To: <42FE0F74-F72D-44E9-B07B-AB24385B8AFF@gmail.com> References: <20070731202023.50d6b7cd.zedshaw@zedshaw.com><88226401-CBFA-4C88-B104-393F004C6B1E@brainspl.at> <42FE0F74-F72D-44E9-B07B-AB24385B8AFF@gmail.com> Message-ID: <52455D0823535744BDA0A91FBA4FCC9302C5E4@2k304.mediatemple.int> Zed, I'd like to help out too. We've benefited greatly from Mongrel and would love to give back in some way. -- nj ------------------------ Nate Jones Software Developer (mt) Media Temple, Inc PHONE: 310.841.5521 FAX: 818.301.2774 EMAIL: nate at mediatemple.net WEB: http://www.mediatemple.net/ ------------------------ "Set your sites on us." ________________________________ From: mongrel-users-bounces at rubyforge.org [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Wayne E. Seguin Sent: Wednesday, August 01, 2007 6:26 AM To: mongrel-users at rubyforge.org Subject: Re: [Mongrel] [HELP] Mongrel Needs a Patch Maven On Jul 31, 2007, at 20:59 , Ezra Zygmuntowicz wrote: 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 Zed, I too would be more than happy to help. ~Wayne -- 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/20070801/f5556f88/attachment.html From nathan.mealey at simmons.edu Wed Aug 1 15:35:10 2007 From: nathan.mealey at simmons.edu (Nathan Mealey) Date: Wed, 1 Aug 2007 15:35:10 -0400 Subject: [Mongrel] Problem with Windows & Apache Setup Message-ID: <1FEE8253-71F5-4B4C-BAF5-AA29DC74C02B@simmons.edu> I'm using Mongrel 1.0.1 and Apache 2.0 to serve up a handulf of Rails applications. Apache proxies requests to the instances of Mongrel and uses ProxyPass and ProxyPassReverse to deliver static files. The Rails application uses sessions, and this appears to be where the issue is occurring. If too many users login to the application, then at some point the application stops responding to the login process. People will still receive the application's login screen and be able to submit the form data, but instead of logging them in the application will just load up the login screen again. This happens indefinitely. In order to resolve the situation, I need to restart the Mongrel instance. After restarting the Mongrel instance, the application works fine for a while. This only happens with this one application that is using Rails sessions. What could be causing this problem? And how can I resolve it? Any suggestions/ideas are very welcome. Thanks, Nathan -- Nathan Mealey Systems Librarian Boston, MA 617.521.2755 nathan.mealey at simmons.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070801/dd789f88/attachment.html From filipe at icewall.org Wed Aug 1 16:22:22 2007 From: filipe at icewall.org (filipe) Date: Wed, 1 Aug 2007 17:22:22 -0300 Subject: [Mongrel] [HELP] Mongrel Needs a Patch Maven In-Reply-To: <52455D0823535744BDA0A91FBA4FCC9302C5E4@2k304.mediatemple.int> References: <52455D0823535744BDA0A91FBA4FCC9302C5E4@2k304.mediatemple.int> Message-ID: more one here! filipe On Wed, 1 Aug 2007 09:05:26 -0700, "Nate Jones - (mt) Media Temple" wrote: > Zed, > > I'd like to help out too. > > We've benefited greatly from Mongrel and would love to give back in some > way. > > -- nj > > > ------------------------ > Nate Jones > Software Developer > (mt) Media Temple, Inc > PHONE: 310.841.5521 > FAX: 818.301.2774 > EMAIL: nate at mediatemple.net > WEB: http://www.mediatemple.net/ > ------------------------ > "Set your sites on us." > > > ________________________________ > > From: mongrel-users-bounces at rubyforge.org > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Wayne E. > Seguin > Sent: Wednesday, August 01, 2007 6:26 AM > To: mongrel-users at rubyforge.org > Subject: Re: [Mongrel] [HELP] Mongrel Needs a Patch Maven > > > On Jul 31, 2007, at 20:59 , Ezra Zygmuntowicz wrote: > > 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 > > > > Zed, > > I too would be more than happy to help. > > ~Wayne > > -- > Wayne E. Seguin > Sr. Systems Architect & Systems Admin > wayneseguin at gmail.com From ml at syntheticplayground.com Wed Aug 1 21:38:59 2007 From: ml at syntheticplayground.com (Corey Jewett) Date: Wed, 1 Aug 2007 18:38:59 -0700 Subject: [Mongrel] Mongrel stops responding after period of inactivity In-Reply-To: <20070731201546.ed57cda7.zedshaw@zedshaw.com> References: <20070731201546.ed57cda7.zedshaw@zedshaw.com> Message-ID: <8906DF3D-B241-4440-B9B9-9363C2EF4C9E@syntheticplayground.com> I don't know if this contributes much to the conversation, but I wonder if some of these occasional deadlocks are related to this: http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/11756? 11593-11836 Corey On Jul 31, 2007, at 5:15 PM, Zed A. Shaw wrote: > 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/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users From luislavena at gmail.com Thu Aug 2 01:30:59 2007 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 2 Aug 2007 02:30:59 -0300 Subject: [Mongrel] Problem with Windows & Apache Setup In-Reply-To: <1FEE8253-71F5-4B4C-BAF5-AA29DC74C02B@simmons.edu> References: <1FEE8253-71F5-4B4C-BAF5-AA29DC74C02B@simmons.edu> Message-ID: <71166b3b0708012230s47c73ac9v9cd914cb40f3f863@mail.gmail.com> On 8/1/07, Nathan Mealey wrote: > > I'm using Mongrel 1.0.1 and Apache 2.0 to serve up a handulf of Rails > applications. > > Apache proxies requests to the instances of Mongrel and uses ProxyPass and > ProxyPassReverse to deliver static files. > > The Rails application uses sessions, and this appears to be where the issue > is occurring. > Will be very helpful to know: 1) Version of Rails. 2) What kind of session storage are you using? (PStore, ActiveRecord, Cookie) 3) What are you storing in the session? (the user_id or the full user object) -- the later is bad practice, but often seen used in many applications. -- 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 nathan.mealey at simmons.edu Thu Aug 2 10:17:16 2007 From: nathan.mealey at simmons.edu (Nathan Mealey) Date: Thu, 2 Aug 2007 10:17:16 -0400 Subject: [Mongrel] Problem with Windows & Apache Setup In-Reply-To: <71166b3b0708012230s47c73ac9v9cd914cb40f3f863@mail.gmail.com> References: <1FEE8253-71F5-4B4C-BAF5-AA29DC74C02B@simmons.edu> <71166b3b0708012230s47c73ac9v9cd914cb40f3f863@mail.gmail.com> Message-ID: <8DEB78A2-59A0-4C8D-96E7-10AA93639DA9@simmons.edu> Thanks for the response. Rails version: 1.8.6 Session storage: PStore Storing only the user_id in the session object. Thanks, Nathan -- Nathan Mealey Systems Librarian Boston, MA 617.521.2755 nathan.mealey at simmons.edu On Aug 2, 2007, at 1:30 AM, Luis Lavena wrote: > On 8/1/07, Nathan Mealey wrote: >> >> I'm using Mongrel 1.0.1 and Apache 2.0 to serve up a handulf of Rails >> applications. >> >> Apache proxies requests to the instances of Mongrel and uses >> ProxyPass and >> ProxyPassReverse to deliver static files. >> >> The Rails application uses sessions, and this appears to be where >> the issue >> is occurring. >> > > Will be very helpful to know: > > 1) Version of Rails. > > 2) What kind of session storage are you using? (PStore, > ActiveRecord, Cookie) > > 3) What are you storing in the session? (the user_id or the full user > object) -- the later is bad practice, but often seen used in many > applications. > > -- > 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/20070802/4c4dc218/attachment.html From luislavena at gmail.com Thu Aug 2 10:48:31 2007 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 2 Aug 2007 11:48:31 -0300 Subject: [Mongrel] Problem with Windows & Apache Setup In-Reply-To: <8DEB78A2-59A0-4C8D-96E7-10AA93639DA9@simmons.edu> References: <1FEE8253-71F5-4B4C-BAF5-AA29DC74C02B@simmons.edu> <71166b3b0708012230s47c73ac9v9cd914cb40f3f863@mail.gmail.com> <8DEB78A2-59A0-4C8D-96E7-10AA93639DA9@simmons.edu> Message-ID: <71166b3b0708020748s2de45d5fu389674d6a4f9a062@mail.gmail.com> On 8/2/07, Nathan Mealey wrote: > Thanks for the response. > > Rails version: 1.8.6 Guess thats Ruby, not Rails. > > Session storage: PStore > > Storing only the user_id in the session object. > PStore is good for development or testing locally, and not for a good traffic site, since each session will create a new file... and Windows don't behave great with thousands of files in the same folder (check tmp/sessions folder). I'll suggest you call about script inside your rails app to get some info like this: About your application's environment Ruby version 1.8.5 (i386-mswin32) RubyGems version 0.9.4 Rails version 1.2.3 Active Record version 1.15.3 Action Pack version 1.13.3 Action Web Service version 1.2.3 Action Mailer version 1.3.3 Active Support version 1.4.2 Edge Rails revision ... Application root ... Environment development Database adapter mysql Database schema version 148 -- 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 straightflush at gmail.com Fri Aug 3 23:15:05 2007 From: straightflush at gmail.com (straightflush at gmail.com) Date: Fri, 3 Aug 2007 23:15:05 -0400 Subject: [Mongrel] mongrel in production not using AR Sessions In-Reply-To: <3673F43F-E4FA-429C-B083-038EF990C065@wisc.edu> References: <3673F43F-E4FA-429C-B083-038EF990C065@wisc.edu> Message-ID: Nathan, It does not work with webrick Restoring dev db to prod does not work Not sure how this config entry would not be picked up by production environment, environment.rb is all environments Thanks for the help, any other ideas on how to best debug here ? On 4/23/07, Nathan Vack wrote: > > Are session entries being created in the table? Is your > config.action_controller.session_store = :active_record_store line > somehow restricted to development? Does setting the environment as an > env variable or forcing it in production in environment.rb change > things? > > What happens if you clone the dev database to the production > database? (of course, do this only on your dev box ;-) > > Does it work with Webrick? > > -Nate > > On Apr 23, 2007, at 9:49 AM, straightflush at gmail.com wrote: > > > Hello, > > > > For some reason when i change the "environments" line in > > mongrel_cluster.yml to use production, ActiveRecord Sessions stop > > working. > > Changing this line to development yield the correct result. > > Entries in > > database.yml are correct, and confirmed that the sessions table > > exists in > > both environments and that production is indeed working > > (production.logbeing filled up). > > > > Any idea why this would happen ? > > > > Thanks > > Adam > > _______________________________________________ > > 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/20070803/a0574412/attachment.html From straightflush at gmail.com Fri Aug 3 23:29:19 2007 From: straightflush at gmail.com (straightflush at gmail.com) Date: Fri, 3 Aug 2007 23:29:19 -0400 Subject: [Mongrel] mongrel in production not using AR Sessions In-Reply-To: References: <3673F43F-E4FA-429C-B083-038EF990C065@wisc.edu> Message-ID: figured it out. For some reason it was the acts_as_cached plugin in the vendor/plugins directory and this was completely screwing it up. Removing this from plugins fixed it. Not sure why this plugin would override the default behavior but looks like i was using memcached for sessions without asking for it.... Thanks for the help. On 8/3/07, straightflush at gmail.com wrote: > > Nathan, > > It does not work with webrick > Restoring dev db to prod does not work > Not sure how this config entry would not be picked up by production > environment, environment.rb is all environments > > Thanks for the help, any other ideas on how to best debug here ? > > > > On 4/23/07, Nathan Vack wrote: > > > > Are session entries being created in the table? Is your > > config.action_controller.session_store = :active_record_store line > > somehow restricted to development? Does setting the environment as an > > env variable or forcing it in production in environment.rb change > > things? > > > > What happens if you clone the dev database to the production > > database? (of course, do this only on your dev box ;-) > > > > Does it work with Webrick? > > > > -Nate > > > > On Apr 23, 2007, at 9:49 AM, straightflush at gmail.com wrote: > > > > > Hello, > > > > > > For some reason when i change the "environments" line in > > > mongrel_cluster.yml to use production, ActiveRecord Sessions stop > > > working. > > > Changing this line to development yield the correct result. > > > Entries in > > > database.yml are correct, and confirmed that the sessions table > > > exists in > > > both environments and that production is indeed working > > > (production.logbeing filled up). > > > > > > Any idea why this would happen ? > > > > > > Thanks > > > Adam > > > _______________________________________________ > > > 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/20070803/94aec430/attachment-0001.html From ml at syntheticplayground.com Sun Aug 5 20:02:12 2007 From: ml at syntheticplayground.com (Corey Jewett) Date: Sun, 5 Aug 2007 17:02:12 -0700 Subject: [Mongrel] [Patch] HttpServer.port reports the bound port Message-ID: <0610F297-B205-4A1A-AAC4-4E96366FD0B6@syntheticplayground.com> This is for when you pass mongrel 0 for the port and the OS assigns an open one. Corey --- mongrel-1.0.1/lib/mongrel.rb 2007-08-05 15:29:59.000000000 -0700 +++ mongrel-1.0.1/lib/mongrel.rb.zero_port_fix 2007-08-05 15:29:23.000000000 -0700 @@ -560,7 +560,7 @@ @socket = TCPServer.new(host, port) @classifier = URIClassifier.new @host = host - @port = port + @port = @socket.addr[1] @workers = ThreadGroup.new @timeout = timeout @num_processors = num_processors From zedshaw at zedshaw.com Mon Aug 6 01:32:32 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Mon, 6 Aug 2007 01:32:32 -0400 Subject: [Mongrel] [Patch] HttpServer.port reports the bound port In-Reply-To: <0610F297-B205-4A1A-AAC4-4E96366FD0B6@syntheticplayground.com> References: <0610F297-B205-4A1A-AAC4-4E96366FD0B6@syntheticplayground.com> Message-ID: <20070806013232.256f0e86.zedshaw@zedshaw.com> On Sun, 5 Aug 2007 17:02:12 -0700 Corey Jewett wrote: > This is for when you pass mongrel 0 for the port and the OS assigns > an open one. > > Corey Does that work on Windows? :-) (Gets them every time.) -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From ml at syntheticplayground.com Mon Aug 6 03:08:05 2007 From: ml at syntheticplayground.com (Corey Jewett) Date: Mon, 6 Aug 2007 00:08:05 -0700 Subject: [Mongrel] [Patch] HttpServer.port reports the bound port In-Reply-To: <20070806013232.256f0e86.zedshaw@zedshaw.com> References: <0610F297-B205-4A1A-AAC4-4E96366FD0B6@syntheticplayground.com> <20070806013232.256f0e86.zedshaw@zedshaw.com> Message-ID: <8A28DB21-1B71-4E0D-A4A4-D03D532686EA@syntheticplayground.com> On Aug 5, 2007, at 10:32 PM, Zed A. Shaw wrote: > On Sun, 5 Aug 2007 17:02:12 -0700 > Corey Jewett wrote: > >> This is for when you pass mongrel 0 for the port and the OS assigns >> an open one. >> >> Corey > > Does that work on Windows? :-) (Gets them every time.) What'sat? Does anything good work there? I just figured that if it's good enough for Webrick, it's certainly good enough for mongrel. ;) Corey From rick.macconnell at ove.com Mon Aug 6 09:03:35 2007 From: rick.macconnell at ove.com (Rick MacConnell) Date: Mon, 06 Aug 2007 09:03:35 -0400 Subject: [Mongrel] Mongrel-users Digest, Vol 19, Issue 3 In-Reply-To: Message-ID: I will be out of the office Thursday August 2 in the afternoon and Friday August 3. if you need assistance, contact Lance Rigdon. Thanks, Rick From steven at lumos.us Mon Aug 6 17:42:01 2007 From: steven at lumos.us (Steven Lumos) Date: Mon, 06 Aug 2007 14:42:01 -0700 Subject: [Mongrel] [Patch] HttpServer.port reports the bound port References: <0610F297-B205-4A1A-AAC4-4E96366FD0B6@syntheticplayground.com> <20070806013232.256f0e86.zedshaw@zedshaw.com> Message-ID: <86k5s8ibme.fsf@bitty.lumos.us> "Zed A. Shaw" writes: > On Sun, 5 Aug 2007 17:02:12 -0700 > Corey Jewett wrote: > >> This is for when you pass mongrel 0 for the port and the OS assigns >> an open one. >> >> Corey > > Does that work on Windows? :-) (Gets them every time.) Well, they just ripped off Berkeley sockets, right? This is v1.8.2 of the one-click installer. I'll bother to update it if anyone thinks it matters. irb(main):001:0> require 'socket' => true irb(main):002:0> s = TCPServer.new(0) => # irb(main):003:0> s.addr => ["AF_INET", 1110, "0.0.0.0", "0.0.0.0"] irb(main):004:0> Steve From luislavena at gmail.com Mon Aug 6 17:54:02 2007 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 6 Aug 2007 18:54:02 -0300 Subject: [Mongrel] [Patch] HttpServer.port reports the bound port In-Reply-To: <86k5s8ibme.fsf@bitty.lumos.us> References: <0610F297-B205-4A1A-AAC4-4E96366FD0B6@syntheticplayground.com> <20070806013232.256f0e86.zedshaw@zedshaw.com> <86k5s8ibme.fsf@bitty.lumos.us> Message-ID: <71166b3b0708061454h5e5bab0hdc7dd814e53d33a0@mail.gmail.com> On 8/6/07, Steven Lumos wrote: > "Zed A. Shaw" writes: > > > On Sun, 5 Aug 2007 17:02:12 -0700 > > Corey Jewett wrote: > > > >> This is for when you pass mongrel 0 for the port and the OS assigns > >> an open one. > >> > >> Corey > > > > Does that work on Windows? :-) (Gets them every time.) > > Well, they just ripped off Berkeley sockets, right? > yes and no, sockets are a bit tricky on windows, but in this case, isolation of Ruby VM play on our side. > This is v1.8.2 of the one-click installer. I'll bother to update it > if anyone thinks it matters. > > irb(main):001:0> require 'socket' > => true > irb(main):002:0> s = TCPServer.new(0) > => # > irb(main):003:0> s.addr > => ["AF_INET", 1110, "0.0.0.0", "0.0.0.0"] > irb(main):004:0> > Confirmed, 1.8.5 behaves the same way like 1.8.2, since addr is the Array with [Protocol, Port, ServerIP, ClientIP]. Anyway, what is the purpose of a random HTTPServer port? If you try to open a mongrel server in an already taken port, a error must be shown, instead of a false positive. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From zedshaw at zedshaw.com Wed Aug 8 19:11:24 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Wed, 8 Aug 2007 19:11:24 -0400 Subject: [Mongrel] [ANN] The (Potentially) New Maintainers Message-ID: <20070808191124.c9a773d4.zedshaw@zedshaw.com> Hello Everyone, Been head down with personal stuff, but I wanted to shoot out this email saying that I've collected the list of volunteers and decided that I'd just hand the keys over to them and see how they do. The list of people I have so far is: Ezra Zygmuntowicz "Kirk Haines" "Wayne E. Seguin" Nate Jones - (mt) Media Temple" filipe What I'm planning to do is add these people to the svn access list and project maintenance parts of rubyforge and then let them at the code base to produce the next release. They'll have full freedom to do what they think the community needs, with only guidance from me if they ask for it. I'll be mostly hands off. This means it'll be you folk's job to tell them what you want and what should happen. If nobody has an objection to this then I'll make it happen this week. Hopefully Mongrel won't become a gigantic ugly beast with six heads and pretending it's a Java Servlet container with tons of dubiously licensed code attached to it. But, I'm trusting these folks will figure it out and get things done. Have fun! -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From evan at cloudbur.st Wed Aug 8 20:03:00 2007 From: evan at cloudbur.st (Evan Weaver) Date: Wed, 8 Aug 2007 20:03:00 -0400 Subject: [Mongrel] [ANN] The (Potentially) New Maintainers In-Reply-To: <20070808191124.c9a773d4.zedshaw@zedshaw.com> References: <20070808191124.c9a773d4.zedshaw@zedshaw.com> Message-ID: Since we're doing maintenance shuffles, should ask Rubyforge to move the cgi_multipart_eof_fix gem into the mongrel project? I'm happy to do so and it would probably save some people some confusion. Evan On 8/8/07, Zed A. Shaw wrote: > Hello Everyone, > > Been head down with personal stuff, but I wanted to shoot out this email saying that I've collected the list of volunteers and decided that I'd just hand the keys over to them and see how they do. > > The list of people I have so far is: > > Ezra Zygmuntowicz > "Kirk Haines" > "Wayne E. Seguin" > Nate Jones - (mt) Media Temple" > filipe > > What I'm planning to do is add these people to the svn access list and project maintenance parts of rubyforge and then let them at the code base to produce the next release. > > They'll have full freedom to do what they think the community needs, with only guidance from me if they ask for it. I'll be mostly hands off. This means it'll be you folk's job to tell them what you want and what should happen. > > If nobody has an objection to this then I'll make it happen this week. > > Hopefully Mongrel won't become a gigantic ugly beast with six heads and pretending it's a Java Servlet container with tons of dubiously licensed code attached to it. > > But, I'm trusting these folks will figure it out and get things done. > > Have fun! > > -- > 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 > -- Evan Weaver Cloudburst, LLC From wayneeseguin at gmail.com Thu Aug 9 00:23:01 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Thu, 9 Aug 2007 00:23:01 -0400 Subject: [Mongrel] [ANN] The (Potentially) New Maintainers In-Reply-To: References: <20070808191124.c9a773d4.zedshaw@zedshaw.com> Message-ID: <97B8BF23-17B7-4E98-B10B-4E4EB32149F1@gmail.com> On Aug 08, 2007, at 20:03 , Evan Weaver wrote: > Since we're doing maintenance shuffles, should ask Rubyforge to move > the cgi_multipart_eof_fix gem into the mongrel project? I'm happy to > do so and it would probably save some people some confusion. > > Evan Evan, I believe that would be for the best, anyone else? ~Wayne From mikeisgreat at gmail.com Thu Aug 9 21:25:23 2007 From: mikeisgreat at gmail.com (Michael Steinfeld) Date: Thu, 9 Aug 2007 21:25:23 -0400 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster Message-ID: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> Hi -- I have been reading documentation and googling around to find the correct way to do this but I have found many ways that seem to not work, or the documentation makes no reference to. I am using mongrel cluster with 10 mongrels for each server. Recently I installed monit but which lead me to find the correct way to start/stop mongrel instances one pid at a time. I am assuming one pid at a time is the correct way... Currently, when I do a cap deploy we just kick mongrels with /etc/init.d/mongrel_rails.. I am assuming I should be using monit now when I deploy to do this. Correct? Can you give me an example of this? I know this is not the monit list, but I was thinking you guys know what I am talking about. So in my monit.conf/monitrc file here is what I have: check process mongrel_9001 with pidfile /var/run/mongrel/mongrel.9001.pid start program = "/usr/local/bin/mongrel_rails start -d -e production -p 9009 -a 127.0.0.1 -l log/mongrel.log -P /var/run/mongrel/mongrel.9009.pid -c /home/app/current" stop program = "/usr/local/bin/mongrel_rails stop -P /var/run/mongrel/mongrel.9009.pid" if failed host 127.0.0.1 port 9001 protocol http with timeout 10 seconds then restart if totalmem > 128 Mb then restart if cpu is greater than 60% for 2 cycles then alert if cpu > 90% for 5 cycles then restart if loadavg(5min) greater than 10 for 8 cycles then restart if 3 restarts within 5 cycles then timeout Part of my confusion is if I should use mongrel_rails cluster::start or mongrel_rails start, Is there a difference? Any suggestions is really appreciated. -- Michael Steinfeld Linux Admin/Developer AIM: mikesteinfeld From alexey.verkhovsky at gmail.com Thu Aug 9 22:13:27 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Thu, 9 Aug 2007 20:13:27 -0600 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> Message-ID: <3945c4270708091913r5f2097ccl3bd50bb55d696a34@mail.gmail.com> On 8/9/07, Michael Steinfeld wrote: > I installed monit but which lead me to find the correct way to > start/stop mongrel instances one pid at a time. Monit's handling of pid files and daemonizing in general is pretty weak. If you googled for "mogrel pid" (or had a long hard look at the code) you already know that. In RubyWorks Production Stack we solve this problem with runit. And it was 37 Signals guys who told me about it. runit doesn't require service processes to detach themselves, so Mongrel's shortcomings in this area become a non-issue. ... shameless self-promotion Actually, if you install RubyWorks stack, you get the whole runit/monit/mongrel combo configured and ready to go out of the box... :) -- Alex Verkhovsky From ezmobius at gmail.com Fri Aug 10 00:23:36 2007 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 9 Aug 2007 21:23:36 -0700 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> Message-ID: <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> On Aug 9, 2007, at 6:25 PM, Michael Steinfeld wrote: > Hi -- > > I have been reading documentation and googling around to find the > correct way to do this but I have found many ways that seem to not > work, or the documentation makes no reference to. > > I am using mongrel cluster with 10 mongrels for each server. Recently > I installed monit but which lead me to find the correct way to > start/stop mongrel instances one pid at a time. I am assuming one pid > at a time is the correct way... > > Currently, when I do a cap deploy we just kick mongrels with > /etc/init.d/mongrel_rails.. I am assuming I should be using monit now > when I deploy to do this. Correct? Can you give me an example of this? > I know this is not the monit list, but I was thinking you guys know > what I am talking about. So the better way to go about it is to use mongrel_cluster with the --clean and --only options. Here is a monit file that works very well: check process mongrel_warehouse_5000 with pidfile /data/warehouse/shared/log/mongrel.5000.pid start program = "/usr/bin/mongrel_rails cluster::start -C /data/ warehouse/current/config/mongrel_cluster.yml --clean --only 5000" stop program = "/usr/bin/mongrel_rails cluster::stop -C /data/ warehouse/current/config/mongrel_cluster.yml --clean --only 5000" if totalmem is greater than 110.0 MB for 3 cycles then restart # eating up memory? if loadavg(5min) greater than 10 for 8 cycles then restart # bad, bad, bad if 20 restarts within 20 cycles then timeout # something is wrong, call the sys-admin group mongrel You must have the latest version of mongrel_cluster installed for the --clean option. Then to restart in your deploy.rb set the :monit_group variable and use these tasks for restarting: set : monit_group, 'mongrel' desc <<-DESC Restart the Mongrel processes on the app server by calling restart_mongrel_cluster. DESC task :restart, :roles => :app do restart_mongrel_cluster end desc <<-DESC Start the Mongrel processes on the app server by calling start_mongrel_cluster. DESC task :spinner, :roles => :app do start_mongrel_cluster end desc <<-DESC Start Mongrel processes on the app server. This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is set to true. DESC task :start_mongrel_cluster , :roles => :app do sudo "/usr/bin/monit start all -g #{monit_group}" end desc <<-DESC Restart the Mongrel processes on the app server by starting and stopping the cluster. This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is set to true. DESC task :restart_mongrel_cluster , :roles => :app do sudo "/usr/bin/monit restart all -g #{monit_group}" end desc <<-DESC Stop the Mongrel processes on the app server. This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is set to true. DESC task :stop_mongrel_cluster , :roles => :app do sudo "/usr/bin/monit stop all -g #{monit_group}" end Cheers- -- Ezra Zygmuntowicz -- Founder & Ruby Hacker -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From evan at cloudbur.st Fri Aug 10 00:49:37 2007 From: evan at cloudbur.st (Evan Weaver) Date: Fri, 10 Aug 2007 00:49:37 -0400 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> Message-ID: Do what Ezra says; he's the master of mongrel pids. Helped me in the same way a while back and it's worked great. Evan On 8/10/07, Ezra Zygmuntowicz wrote: > > On Aug 9, 2007, at 6:25 PM, Michael Steinfeld wrote: > > > Hi -- > > > > I have been reading documentation and googling around to find the > > correct way to do this but I have found many ways that seem to not > > work, or the documentation makes no reference to. > > > > I am using mongrel cluster with 10 mongrels for each server. Recently > > I installed monit but which lead me to find the correct way to > > start/stop mongrel instances one pid at a time. I am assuming one pid > > at a time is the correct way... > > > > Currently, when I do a cap deploy we just kick mongrels with > > /etc/init.d/mongrel_rails.. I am assuming I should be using monit now > > when I deploy to do this. Correct? Can you give me an example of this? > > I know this is not the monit list, but I was thinking you guys know > > what I am talking about. > > > So the better way to go about it is to use mongrel_cluster with the > --clean and --only options. Here is a monit file that works very well: > > check process mongrel_warehouse_5000 > with pidfile /data/warehouse/shared/log/mongrel.5000.pid > start program = "/usr/bin/mongrel_rails cluster::start -C /data/ > warehouse/current/config/mongrel_cluster.yml --clean --only 5000" > stop program = "/usr/bin/mongrel_rails cluster::stop -C /data/ > warehouse/current/config/mongrel_cluster.yml --clean --only 5000" > if totalmem is greater than 110.0 MB for 3 cycles then > restart # eating up memory? > if loadavg(5min) greater than 10 for 8 cycles then > restart # bad, bad, bad > if 20 restarts within 20 cycles then > timeout # something is wrong, call the sys-admin > group mongrel > > You must have the latest version of mongrel_cluster installed for > the --clean option. Then to restart in your deploy.rb set > the :monit_group variable and use these tasks for restarting: > > > set : monit_group, 'mongrel' > > desc <<-DESC > Restart the Mongrel processes on the app server by calling > restart_mongrel_cluster. > DESC > task :restart, :roles => :app do > restart_mongrel_cluster > end > > desc <<-DESC > Start the Mongrel processes on the app server by calling > start_mongrel_cluster. > DESC > task :spinner, :roles => :app do > start_mongrel_cluster > end > desc <<-DESC > Start Mongrel processes on the app server. This uses the :use_sudo > variable to determine whether to use sudo or not. By > default, :use_sudo is > set to true. > DESC > task :start_mongrel_cluster , :roles => :app do > sudo "/usr/bin/monit start all -g #{monit_group}" > end > > desc <<-DESC > Restart the Mongrel processes on the app server by starting and > stopping the cluster. This uses the :use_sudo > variable to determine whether to use sudo or not. By > default, :use_sudo is set to true. > DESC > task :restart_mongrel_cluster , :roles => :app do > sudo "/usr/bin/monit restart all -g #{monit_group}" > end > > desc <<-DESC > Stop the Mongrel processes on the app server. This uses the :use_sudo > variable to determine whether to use sudo or not. By > default, :use_sudo is > set to true. > DESC > task :stop_mongrel_cluster , :roles => :app do > sudo "/usr/bin/monit stop all -g #{monit_group}" > end > > > > 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 > -- Evan Weaver Cloudburst, LLC From alexey.verkhovsky at gmail.com Fri Aug 10 01:37:47 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Thu, 9 Aug 2007 23:37:47 -0600 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> Message-ID: <3945c4270708092237x5c8e6afasaaebd137fa317d4f@mail.gmail.com> On 8/9/07, Ezra Zygmuntowicz wrote: > So the better way to go about it is to use mongrel_cluster with the > --clean and --only options. Better than runit or telinit, or some other way to run it in non-detached mode? Why? -- Alex From ezmobius at gmail.com Fri Aug 10 01:44:30 2007 From: ezmobius at gmail.com (Ezra Zygmuntowicz) Date: Thu, 9 Aug 2007 22:44:30 -0700 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <3945c4270708092237x5c8e6afasaaebd137fa317d4f@mail.gmail.com> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> <3945c4270708092237x5c8e6afasaaebd137fa317d4f@mail.gmail.com> Message-ID: On Aug 9, 2007, at 10:37 PM, Alexey Verkhovsky wrote: > On 8/9/07, Ezra Zygmuntowicz wrote: >> So the better way to go about it is to use mongrel_cluster >> with the >> --clean and --only options. > > Better than runit or telinit, or some other way to run it in > non-detached mode? Why? As far as I know runit does not support restarting when memory or cpu limits are hit and does not support making http health checks to the backends. I like runit myself for some things but monit works very well once you have a good config for it and offers more options for controlling your mongrels. Cheers- -- Ezra Zygmuntowicz -- Founder & Ruby Hacker -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From zedshaw at zedshaw.com Fri Aug 10 02:41:44 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 10 Aug 2007 02:41:44 -0400 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <3945c4270708091913r5f2097ccl3bd50bb55d696a34@mail.gmail.com> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> <3945c4270708091913r5f2097ccl3bd50bb55d696a34@mail.gmail.com> Message-ID: <20070810024144.6443042f.zedshaw@zedshaw.com> On Thu, 9 Aug 2007 20:13:27 -0600 "Alexey Verkhovsky" wrote: > On 8/9/07, Michael Steinfeld wrote: > > I installed monit but which lead me to find the correct way to > > start/stop mongrel instances one pid at a time. > In RubyWorks Production Stack we solve this problem with runit. And it > was 37 Signals guys who told me about it. runit doesn't require > service processes to detach themselves, so Mongrel's shortcomings in > this area become a non-issue. So let me see if I have this right. You are saying the PID handling in Mongrel isn't right, but every single patch you've submitted to me in an attempt to fix it has been an ugly shitfuck patch that isn't cross platform and myopically only solves your problem. Now, I could probably handle that, but then you try to say that the solution is to use runit. You seen the code in runit? Let me give you a taste of the if-forrest extravaganza: if (verbose) strerr_warn5(INFO, "processing: ", ld->name, "/", ld->fnsave, 0); if ((fd =open_read(ld->fnsave)) == -1) fatal2("unable to open input for processor", ld->name); if (fd_move(0, fd) == -1) fatal2("unable to move filedescriptor for processor", ld->name); ld->fnsave[26] ='t'; if ((fd =open_trunc(ld->fnsave)) == -1) fatal2("unable to open output for processor", ld->name); if (fd_move(1, fd) == -1) fatal2("unable to move filedescriptor for processor", ld->name); if ((fd =open_read("state")) == -1) { if (errno == error_noent) { if ((fd =open_trunc("state")) == -1) fatal2("unable to create empty state for processor", ld->name); close(fd); if ((fd =open_read("state")) == -1) fatal2("unable to open state for processor", ld->name); Oh yeah, that is sooooo fucking great. This kind of bullshit DJB style code is all over runit. I wouldn't touch it if it was wrapped in cellophane and I was behind a cement wall accessible only via a BL4 airlock. Runit is nasty and it amazes me that people use the damn thing at all. The fact of the matter is, *RUBY* has shitty PID management. That ultimately, *YOU* are supposed to use Mongrel as a goddamned *LIBRARY* if you want to embed it in your own app server and manage the processes better. The existing scripts are just to handle the 90% cases of developers running stuff locally or the majority of hosting situations. It's not like Apache, you are not only allowed to modify it and put it in your own stuff but you are violently encouraged to do it. Hell there's several books that teach you how and a ton of examples and SIX fucking entire web frameworks that all use Mongrel this way. Get off your ass and read some code for a change. Now normally, I wouldn't get bent out of shape, but you represent a company that's using my software to make money (or try to make money, since you guys probably couldn't sell sweet tea to a dying man in the Sahara). What pisses me off is if you don't like it, then why the hell do you have "Mongrel is stable, reasonably fast, very easy to configure, and can be used in both production and development environments." on your damn web site you leeches? Oh, because putting that there makes potential customers think you like Mongrel and since they all like mongrel (love even) that gives you some free street cred. Well Alex and Thoughtworks, I'm going to be giving full control of Mongrel to a group of people who just volunteered. You're free to use all your powers of Neural Linguistic Programming to convince them to include every dumbass thing you want, and they're free to include it if they want. There won't be anyone standing in your way and you're free to completely ruin my baby. And without any more excuses, I feel that it's time you start paying a bit of this free love and work back to the community in the form of some damn code. Oh, and quit calling it a damn "stack". It's not a application stack in any way because it doesn't have a complete administrative system that ties it all together. It's a bunch of RPMs that you either stole or repackaged and you provide nothing more than a basic hosting location for people. Add some value for once and maybe people might actually pay you for the damn product. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From erik.hetzner at ucop.edu Fri Aug 10 02:20:34 2007 From: erik.hetzner at ucop.edu (Erik Hetzner) Date: Thu, 09 Aug 2007 23:20:34 -0700 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> Message-ID: <87ps1v29n1.wl%erik.hetzner@ucop.edu> At Thu, 9 Aug 2007 21:25:23 -0400, "Michael Steinfeld" wrote: > > Hi -- > > I have been reading documentation and googling around to find the > correct way to do this but I have found many ways that seem to not > work, or the documentation makes no reference to. I gave up on using mongrel_cluster. It doesn?t offer much benefit as far as I can tell, and monit?s process oriented system didn?t play that well with it. Some simple capistrano recipes can start multiple mongrel easily, and, additionally, you can use the same settings (number of mongrels, ports, etc.) with capistrano to generate monit config files for monit with the help of ERB. best, Erik Hetzner ;; Erik Hetzner, California Digital Library ;; gnupg key id: 1024D/01DB07E3 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070809/7b11a468/attachment.bin From alexey.verkhovsky at gmail.com Fri Aug 10 10:55:52 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Fri, 10 Aug 2007 08:55:52 -0600 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> <3945c4270708092237x5c8e6afasaaebd137fa317d4f@mail.gmail.com> Message-ID: <3945c4270708100755t127b5a5o7c57b9f6f5cc8409@mail.gmail.com> On 8/9/07, Ezra Zygmuntowicz wrote: > As far as I know runit does not support restarting when memory or > cpu limits are hit and does not support making http health checks to > the backends. I like runit myself for some things but monit works > very well once you have a good config for it and offers more options > for controlling your mongrels. That's right. The only thing we use runit for is process control (i.e., starting and stopping things). And then monit to do the health checking. runit maintains pid files and current state for processes it controls, which makes it easy to monitor. -- Alex From alexey.verkhovsky at gmail.com Fri Aug 10 10:56:03 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Fri, 10 Aug 2007 08:56:03 -0600 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <20070810024144.6443042f.zedshaw@zedshaw.com> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> <3945c4270708091913r5f2097ccl3bd50bb55d696a34@mail.gmail.com> <20070810024144.6443042f.zedshaw@zedshaw.com> Message-ID: <3945c4270708100756h61859adeh6ab750274c30027f@mail.gmail.com> On 8/10/07, Zed A. Shaw wrote: > So let me see if I have this right. No. -- Alex From mikeisgreat at gmail.com Fri Aug 10 16:59:24 2007 From: mikeisgreat at gmail.com (Michael Steinfeld) Date: Fri, 10 Aug 2007 16:59:24 -0400 Subject: [Mongrel] what is the correct way to stop/start a mongrel instance using monit with mongrel cluster In-Reply-To: <3945c4270708100755t127b5a5o7c57b9f6f5cc8409@mail.gmail.com> References: <3d5db09e0708091825i32ba0038o587e47b796d6502d@mail.gmail.com> <42EC31A3-A2E6-4939-AAD8-7F33F1C3568D@brainspl.at> <3945c4270708092237x5c8e6afasaaebd137fa317d4f@mail.gmail.com> <3945c4270708100755t127b5a5o7c57b9f6f5cc8409@mail.gmail.com> Message-ID: <3d5db09e0708101359m7a2c4cffq5122b519330b86de@mail.gmail.com> Really good stuff. Thanks everyone for all the suggestions and info. It was very helpful. On 8/10/07, Alexey Verkhovsky wrote: > On 8/9/07, Ezra Zygmuntowicz wrote: > > As far as I know runit does not support restarting when memory or > > cpu limits are hit and does not support making http health checks to > > the backends. I like runit myself for some things but monit works > > very well once you have a good config for it and offers more options > > for controlling your mongrels. > > That's right. The only thing we use runit for is process control > (i.e., starting and stopping things). And then monit to do the health > checking. > > runit maintains pid files and current state for processes it controls, > which makes it easy to monitor. > > -- > Alex > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Michael Steinfeld Linux Admin/Developer AIM: mikesteinfeld GTALK: mikeisgreat at gmail.com From zedshaw at zedshaw.com Fri Aug 10 17:23:58 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 10 Aug 2007 17:23:58 -0400 Subject: [Mongrel] [OFF-TOPIC] SCGI now maintained by Jeremy Evans Message-ID: <20070810172358.b8a75d5e.zedshaw@zedshaw.com> Hi, As many of you know I also wrote the SCGI connector for Ruby on Rails before I worked on Mongrel. I eventually stopped working on it since it was kind of pointless, but Jeremy Evans has stepped up and offered to maintain it. He's now the official maintainer and will be managing the SCGI project: http://rubyforge.org/projects/scgi/ If anyone is interested in helping out then let me know and I'll get you in contact with Jeremy (off list of course). -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From chris at codeintensity.com Fri Aug 10 19:45:34 2007 From: chris at codeintensity.com (Christopher Bailey) Date: Fri, 10 Aug 2007 16:45:34 -0700 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP Message-ID: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> If this has already been covered, please point me to that (I didn't find anything in my searches)... We are using F5 BigIP LTM load balancers. They have many pools of Mongrels they load balance across, and I of course want the F5 to know when a Mongrel goes down or is unavailable, etc. To do that, I need to have an F5 health monitor for HTTP make a request to the Mongrel. We do this same thing with our Nginx servers, and that works fine, but with Mongrel it doesn't. I am wondering if anyone is successfully monitoring Mongrel instances from an F5? As further info... I've been working with F5 tech support on this, and we're both stumped at the moment. The same HTTP monitor works fine with Nginx. Both try to fetch the same HTML file. Also, if I am ssh'ed in to the F5, and do a telnet to one of the Mongrels and do "GET /heartbeat.html HTTP/1.1", followed by two returns, this works fine. I use that same string (and two \n's) in my F5's send string for it's HTTP monitor. According to F5 who looked at our tcpdump, the Mongrel just never responds (but in the same dump, they see the direct telnet version respond fine). The F5 makes a direct TCP request to do this. Any ideas? Suggestions? Known issue? Workarounds? Anyone successful with this type of setup? As an FYI, our system info: CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor Mongrel 1.0.1 Mongrel Cluster 1.0.2 Ruby 1.8.5 (2006-08-25) [x86_64-linux] F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070810/8525dbaa/attachment.html From brandorr at opensolaris.org Fri Aug 10 20:08:03 2007 From: brandorr at opensolaris.org (Brandorr) Date: Fri, 10 Aug 2007 20:08:03 -0400 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> Message-ID: <5b5090780708101708r55c316ccu583705aefab8bcc8@mail.gmail.com> I've never tried this but if you want to ping me offline, I have a good deal of bigip experience. I figure it will be useful for me to know how to do this. I'll need the relevant monitor in bigip.conf. On 8/10/07, Christopher Bailey wrote: > If this has already been covered, please point me to that (I didn't find > anything in my searches)... > > We are using F5 BigIP LTM load balancers. They have many pools of Mongrels > they load balance across, and I of course want the F5 to know when a Mongrel > goes down or is unavailable, etc. To do that, I need to have an F5 health > monitor for HTTP make a request to the Mongrel. We do this same thing with > our Nginx servers, and that works fine, but with Mongrel it doesn't. I am > wondering if anyone is successfully monitoring Mongrel instances from an > F5? > > As further info... I've been working with F5 tech support on this, and > we're both stumped at the moment. The same HTTP monitor works fine with > Nginx. Both try to fetch the same HTML file. Also, if I am ssh'ed in to > the F5, and do a telnet to one of the Mongrels and do "GET /heartbeat.html > HTTP/1.1", followed by two returns, this works fine. I use that same string > (and two \n's) in my F5's send string for it's HTTP monitor. According to > F5 who looked at our tcpdump, the Mongrel just never responds (but in the > same dump, they see the direct telnet version respond fine). The F5 makes a > direct TCP request to do this. > > Any ideas? Suggestions? Known issue? Workarounds? Anyone successful with > this type of setup? > > As an FYI, our system info: > > CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor > Mongrel 1.0.1 > Mongrel Cluster 1.0.2 > Ruby 1.8.5 (2006-08-25) [x86_64-linux] > > F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) > From wayneeseguin at gmail.com Fri Aug 10 20:15:56 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Fri, 10 Aug 2007 20:15:56 -0400 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> Message-ID: <41849054-4A36-4A17-BD1B-7359604D69B7@gmail.com> On Aug 10, 2007, at 19:45 , Christopher Bailey wrote: > As further info... I've been working with F5 tech support on this, > and we're both stumped at the moment. The same HTTP monitor works > fine with Nginx. Both try to fetch the same HTML file. Also, if I > am ssh'ed in to the F5, and do a telnet to one of the Mongrels and > do "GET /heartbeat.html HTTP/1.1", followed by two returns, this > works fine. I use that same string (and two \n's) in my F5's send > string for it's HTTP monitor. According to F5 who looked at our > tcpdump, the Mongrel just never responds (but in the same dump, > they see the direct telnet version respond fine). The F5 makes a > direct TCP request to do this. Christopher, First thing to do is start the mongrels in debug mode and see if anything gets logged when "Mongrel just never responds". ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070810/4b2ae965/attachment.html From brandorr at opensolaris.org Fri Aug 10 20:16:51 2007 From: brandorr at opensolaris.org (Brandorr) Date: Fri, 10 Aug 2007 20:16:51 -0400 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <5b5090780708101708r55c316ccu583705aefab8bcc8@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> <5b5090780708101708r55c316ccu583705aefab8bcc8@mail.gmail.com> Message-ID: <5b5090780708101716yd831e8o76e8994078baef74@mail.gmail.com> I also suspect you are going to have to explicitly close the connection in your monitor, if you aren't already doing so. On 8/10/07, Brandorr wrote: > I've never tried this but if you want to ping me offline, I have a > good deal of bigip experience. > > I figure it will be useful for me to know how to do this. > > I'll need the relevant monitor in bigip.conf. > > On 8/10/07, Christopher Bailey wrote: > > If this has already been covered, please point me to that (I didn't find > > anything in my searches)... > > > > We are using F5 BigIP LTM load balancers. They have many pools of > Mongrels > > they load balance across, and I of course want the F5 to know when a > Mongrel > > goes down or is unavailable, etc. To do that, I need to have an F5 health > > monitor for HTTP make a request to the Mongrel. We do this same thing > with > > our Nginx servers, and that works fine, but with Mongrel it doesn't. I am > > wondering if anyone is successfully monitoring Mongrel instances from an > > F5? > > > > As further info... I've been working with F5 tech support on this, and > > we're both stumped at the moment. The same HTTP monitor works fine with > > Nginx. Both try to fetch the same HTML file. Also, if I am ssh'ed in to > > the F5, and do a telnet to one of the Mongrels and do "GET /heartbeat.html > > HTTP/1.1", followed by two returns, this works fine. I use that same > string > > (and two \n's) in my F5's send string for it's HTTP monitor. According to > > F5 who looked at our tcpdump, the Mongrel just never responds (but in the > > same dump, they see the direct telnet version respond fine). The F5 makes > a > > direct TCP request to do this. > > > > Any ideas? Suggestions? Known issue? Workarounds? Anyone successful > with > > this type of setup? > > > > As an FYI, our system info: > > > > CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor > > Mongrel 1.0.1 > > Mongrel Cluster 1.0.2 > > Ruby 1.8.5 (2006-08-25) [x86_64-linux] > > > > F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) > > > From brandorr at opensolaris.org Fri Aug 10 21:17:40 2007 From: brandorr at opensolaris.org (Brandorr) Date: Fri, 10 Aug 2007 21:17:40 -0400 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> Message-ID: <5b5090780708101817l60d39248mdfbc3971cf68656d@mail.gmail.com> I think you need to close the connection after each health check. Otherwise mongrel/rails is going to block. (If my understanding is correct. Try the following health check and let me know how it works out: "GET / HTTP/1.1\nHost: \nConnection: Close\n On 8/10/07, Christopher Bailey wrote: > If this has already been covered, please point me to that (I didn't find > anything in my searches)... > > We are using F5 BigIP LTM load balancers. They have many pools of Mongrels > they load balance across, and I of course want the F5 to know when a Mongrel > goes down or is unavailable, etc. To do that, I need to have an F5 health > monitor for HTTP make a request to the Mongrel. We do this same thing with > our Nginx servers, and that works fine, but with Mongrel it doesn't. I am > wondering if anyone is successfully monitoring Mongrel instances from an F5? > > > As further info... I've been working with F5 tech support on this, and > we're both stumped at the moment. The same HTTP monitor works fine with > Nginx. Both try to fetch the same HTML file. Also, if I am ssh'ed in to > the F5, and do a telnet to one of the Mongrels and do "GET /heartbeat.html > HTTP/1.1", followed by two returns, this works fine. I use that same string > (and two \n's) in my F5's send string for it's HTTP monitor. According to > F5 who looked at our tcpdump, the Mongrel just never responds (but in the > same dump, they see the direct telnet version respond fine). The F5 makes a > direct TCP request to do this. > > Any ideas? Suggestions? Known issue? Workarounds? Anyone successful with > this type of setup? > > As an FYI, our system info: > > CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor > Mongrel 1.0.1 > Mongrel Cluster 1.0.2 > Ruby 1.8.5 (2006-08-25) [x86_64-linux] > > F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > From zedshaw at zedshaw.com Fri Aug 10 22:11:52 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Fri, 10 Aug 2007 22:11:52 -0400 Subject: [Mongrel] [ANN] The Team is In Place Message-ID: <20070810221152.6a477877.zedshaw@zedshaw.com> Hello Everyone, I'd like to just officially announce that the new volunteers are in charge and given control of the project. I won't be doing anything more than helping them get ramped up, but they'll be in charge of doing all the stuff you folks want and are basically the owners from now on. Everyone in the new volunteer list will probably do a little announce, but here's the list once again: Ezra Zygmuntowicz "Kirk Haines" "Wayne E. Seguin" Nate Jones - (mt) Media Temple" filipe All the users should now take this time to send in suggestions and anything that they think should be fixed. This is a new team so maybe you can get that kitchen sink in like you always wanted. :-) -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From chris at codeintensity.com Fri Aug 10 22:30:13 2007 From: chris at codeintensity.com (Christopher Bailey) Date: Fri, 10 Aug 2007 19:30:13 -0700 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <5b5090780708101817l60d39248mdfbc3971cf68656d@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> <5b5090780708101817l60d39248mdfbc3971cf68656d@mail.gmail.com> Message-ID: <8c8513100708101930h4e6c9507hee9961f93d4b5e81@mail.gmail.com> That didn't work. I don't think you need that though. If I just telnet in to the Mongrel, and do a pure "GET /heartbeat.html HTTP/1.1\n\n" it works. I am going to try running the Mongrel in debug and see, will do that later tonight... On 8/10/07, Brandorr wrote: > > I think you need to close the connection after each health check. > Otherwise mongrel/rails is going to block. (If my understanding is > correct. > > Try the following health check and let me know how it works out: > > "GET / HTTP/1.1\nHost: \nConnection: Close\n > > On 8/10/07, Christopher Bailey wrote: > > If this has already been covered, please point me to that (I didn't find > > anything in my searches)... > > > > We are using F5 BigIP LTM load balancers. They have many pools of > Mongrels > > they load balance across, and I of course want the F5 to know when a > Mongrel > > goes down or is unavailable, etc. To do that, I need to have an F5 > health > > monitor for HTTP make a request to the Mongrel. We do this same thing > with > > our Nginx servers, and that works fine, but with Mongrel it doesn't. I > am > > wondering if anyone is successfully monitoring Mongrel instances from an > F5? > > > > > > As further info... I've been working with F5 tech support on this, and > > we're both stumped at the moment. The same HTTP monitor works fine with > > Nginx. Both try to fetch the same HTML file. Also, if I am ssh'ed in > to > > the F5, and do a telnet to one of the Mongrels and do "GET > /heartbeat.html > > HTTP/1.1", followed by two returns, this works fine. I use that same > string > > (and two \n's) in my F5's send string for it's HTTP monitor. According > to > > F5 who looked at our tcpdump, the Mongrel just never responds (but in > the > > same dump, they see the direct telnet version respond fine). The F5 > makes a > > direct TCP request to do this. > > > > Any ideas? Suggestions? Known issue? Workarounds? Anyone successful > with > > this type of setup? > > > > As an FYI, our system info: > > > > CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor > > Mongrel 1.0.1 > > Mongrel Cluster 1.0.2 > > Ruby 1.8.5 (2006-08-25) [x86_64-linux] > > > > F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) > > > > > > _______________________________________________ > > 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/20070810/450e311d/attachment-0001.html From chris at codeintensity.com Sat Aug 11 00:37:55 2007 From: chris at codeintensity.com (Christopher Bailey) Date: Fri, 10 Aug 2007 21:37:55 -0700 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <5b5090780708102011j32e23022v836133e0477a9993@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> <5b5090780708101817l60d39248mdfbc3971cf68656d@mail.gmail.com> <8c8513100708101930h4e6c9507hee9961f93d4b5e81@mail.gmail.com> <5b5090780708101955y2742245ft3e7494077ff84ce2@mail.gmail.com> <8c8513100708102005y240abc9wb0f8ce8ff9379389@mail.gmail.com> <5b5090780708102011j32e23022v836133e0477a9993@mail.gmail.com> Message-ID: <8c8513100708102137g182ca43bp421bf232e6eac5d6@mail.gmail.com> Update... So, I've now run Mongrel in debug mode. I don't get any hits from the F5. I have ensured the Mongrel/debug mode is working by just doing a telnet and then GET request from the F5 machine to the Mongrel, and those requests show up in the Mongrel debug logs (and the regular Mongrel log). So, somehow the request just isn't even getting into Mongrel. What's odd about this, is that these exact same requests get to say the boxes that have Nginx on them. I also tried changing Mongrel to run on port 80 in case that was some oddity of it, but no difference. As Brandorr asked, the tcp and tcp half open F5 monitors are successful, just HTTP is not. So, I will bring it all back up with F5 and have them setup a Mongrel and test. It appears to be something with the way an F5 makes the request or something. I'll also ask Jason H over at Joyent if they do direct monitoring of Mongrels with their F5's, thanks for reminding me about that. On 8/10/07, Brandorr wrote: > > Where did you run TCPDUMP? Or the BigIP or the Linux box? Basically I > am wondering if the HTTP request is leaving the BigIP. > > Sorry to bother, I haven't had a chance to work with BigIP in aver 1 > 1/2 years, and I miss it... > > One other thing, Joyent and Twitter use BigIPs with Mongrel.. > > On 8/10/07, Christopher Bailey wrote: > > Yes, both of the standard tcp tests, and the icmp ping tests work. We > have > > a slew of these machines, all configured identically, and the only case > that > > doesn't work is when hitting Mongrel HTTP. Nginx works fine, as do a > few > > other things we have. I will run Mongrel debug after I put the kids to > bed > > and see :) > > > > > > On 8/10/07, Brandorr wrote: > > > Christopher Bailey > > > > > > Do TCP open and tcp halfopen checks work > > > > > > On 8/10/07, Christopher Bailey < chris at codeintensity.com> wrote: > > > > That didn't work. I don't think you need that though. If I just > telnet > > in > > > > to the Mongrel, and do a pure "GET /heartbeat.html HTTP/1.1\n\n" it > > works. > > > > I am going to try running the Mongrel in debug and see, will do that > > later > > > > tonight... > > > > > > > > > > > > On 8/10/07, Brandorr wrote: > > > > > I think you need to close the connection after each health check. > > > > > Otherwise mongrel/rails is going to block. (If my understanding is > > > > > correct. > > > > > > > > > > Try the following health check and let me know how it works out: > > > > > > > > > > "GET / HTTP/1.1\nHost: \nConnection: Close\n > > > > > > > > > > On 8/10/07, Christopher Bailey wrote: > > > > > > If this has already been covered, please point me to that (I > didn't > > find > > > > > > anything in my searches)... > > > > > > > > > > > > We are using F5 BigIP LTM load balancers. They have many pools > of > > > > Mongrels > > > > > > they load balance across, and I of course want the F5 to know > when a > > > > Mongrel > > > > > > goes down or is unavailable, etc. To do that, I need to have an > F5 > > > > health > > > > > > monitor for HTTP make a request to the Mongrel. We do this same > > thing > > > > with > > > > > > our Nginx servers, and that works fine, but with Mongrel it > doesn't. > > I > > > > am > > > > > > wondering if anyone is successfully monitoring Mongrel instances > > from an > > > > F5? > > > > > > > > > > > > > > > > > > As further info... I've been working with F5 tech support on > this, > > and > > > > > > we're both stumped at the moment. The same HTTP monitor works > fine > > with > > > > > > Nginx. Both try to fetch the same HTML file. Also, if I am > ssh'ed > > in > > > > to > > > > > > the F5, and do a telnet to one of the Mongrels and do "GET > > > > /heartbeat.html > > > > > > HTTP/1.1", followed by two returns, this works fine. I use that > > same > > > > string > > > > > > (and two \n's) in my F5's send string for it's HTTP monitor. > > According > > > > to > > > > > > F5 who looked at our tcpdump, the Mongrel just never responds > (but > > in > > > > the > > > > > > same dump, they see the direct telnet version respond > fine). The F5 > > > > makes a > > > > > > direct TCP request to do this. > > > > > > > > > > > > Any ideas? Suggestions? Known issue? Workarounds? Anyone > > successful > > > > with > > > > > > this type of setup? > > > > > > > > > > > > As an FYI, our system info: > > > > > > > > > > > > CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor > > > > > > Mongrel 1.0.1 > > > > > > Mongrel Cluster 1.0.2 > > > > > > Ruby 1.8.5 (2006-08-25) [x86_64-linux] > > > > > > > > > > > > F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > 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/20070810/38f66f55/attachment.html From jason at joyent.com Sat Aug 11 02:08:07 2007 From: jason at joyent.com (Jason A. Hoffman) Date: Fri, 10 Aug 2007 23:08:07 -0700 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <8c8513100708101930h4e6c9507hee9961f93d4b5e81@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> <5b5090780708101817l60d39248mdfbc3971cf68656d@mail.gmail.com> <8c8513100708101930h4e6c9507hee9961f93d4b5e81@mail.gmail.com> Message-ID: <2D2D7AA8-3BCC-4647-9D89-F1FC58767E88@joyent.com> Hi Chris, We run a bunch of 6400s in production. You have to terminate the lines with the /r too GET /heartbeat/index HTTP/1.1 \r\n \r\n Our's looks like http://jxh.bingodisk.com/public/mongrel-bigip.png Regards, Jason On Aug 10, 2007, at 7:30 PM, Christopher Bailey wrote: > That didn't work. I don't think you need that though. If I just > telnet in to the Mongrel, and do a pure "GET /heartbeat.html HTTP/ > 1.1\n\n" it works. I am going to try running the Mongrel in debug > and see, will do that later tonight... > > > On 8/10/07, Brandorr wrote: I think you > need to close the connection after each health check. > Otherwise mongrel/rails is going to block. (If my understanding is > correct. > > Try the following health check and let me know how it works out: > > "GET / HTTP/1.1\nHost: \nConnection: Close\n > > On 8/10/07, Christopher Bailey wrote: > > If this has already been covered, please point me to that (I > didn't find > > anything in my searches)... > > > > We are using F5 BigIP LTM load balancers. They have many pools > of Mongrels > > they load balance across, and I of course want the F5 to know > when a Mongrel > > goes down or is unavailable, etc. To do that, I need to have an > F5 health > > monitor for HTTP make a request to the Mongrel. We do this same > thing with > > our Nginx servers, and that works fine, but with Mongrel it > doesn't. I am > > wondering if anyone is successfully monitoring Mongrel instances > from an F5? > > > > > > As further info... I've been working with F5 tech support on > this, and > > we're both stumped at the moment. The same HTTP monitor works > fine with > > Nginx. Both try to fetch the same HTML file. Also, if I am > ssh'ed in to > > the F5, and do a telnet to one of the Mongrels and do "GET / > heartbeat.html > > HTTP/1.1", followed by two returns, this works fine. I use that > same string > > (and two \n's) in my F5's send string for it's HTTP monitor. > According to > > F5 who looked at our tcpdump, the Mongrel just never responds > (but in the > > same dump, they see the direct telnet version respond fine). The > F5 makes a > > direct TCP request to do this. > > > > Any ideas? Suggestions? Known issue? Workarounds? Anyone > successful with > > this type of setup? > > > > As an FYI, our system info: > > > > CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor > > Mongrel 1.0.1 > > Mongrel Cluster 1.0.2 > > Ruby 1.8.5 (2006-08-25) [x86_64-linux] > > > > F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) > > > > From pberry at gmail.com Sat Aug 11 11:54:46 2007 From: pberry at gmail.com (Patrick Berry) Date: Sat, 11 Aug 2007 08:54:46 -0700 Subject: [Mongrel] [ANN] The Team is In Place In-Reply-To: <20070810221152.6a477877.zedshaw@zedshaw.com> References: <20070810221152.6a477877.zedshaw@zedshaw.com> Message-ID: On 8/10/07, Zed A. Shaw wrote: > Hello Everyone, > > I'd like to just officially announce that the new volunteers are in charge and given control of the project. > > I won't be doing anything more than helping them get ramped up, but they'll be in charge of doing all the stuff you folks want and are basically the owners from now on. > Zed, thanks for taking the ride this far. Mongrel has helped us out in development and production. For us it always 'just worked.' Pat From chris at codeintensity.com Sat Aug 11 13:18:02 2007 From: chris at codeintensity.com (Christopher Bailey) Date: Sat, 11 Aug 2007 10:18:02 -0700 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <2D2D7AA8-3BCC-4647-9D89-F1FC58767E88@joyent.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> <5b5090780708101817l60d39248mdfbc3971cf68656d@mail.gmail.com> <8c8513100708101930h4e6c9507hee9961f93d4b5e81@mail.gmail.com> <2D2D7AA8-3BCC-4647-9D89-F1FC58767E88@joyent.com> Message-ID: <8c8513100708111018m6047fd14k336c095c706a1a7f@mail.gmail.com> Jason, thanks so very much, that solved it! On 8/10/07, Jason A. Hoffman wrote: > > Hi Chris, > > We run a bunch of 6400s in production. > > You have to terminate the lines with the /r too > > GET /heartbeat/index HTTP/1.1 > \r\n > \r\n > > Our's looks like > > http://jxh.bingodisk.com/public/mongrel-bigip.png > > Regards, Jason > > > > > On Aug 10, 2007, at 7:30 PM, Christopher Bailey wrote: > > > That didn't work. I don't think you need that though. If I just > > telnet in to the Mongrel, and do a pure "GET /heartbeat.html HTTP/ > > 1.1\n\n" it works. I am going to try running the Mongrel in debug > > and see, will do that later tonight... > > > > > > On 8/10/07, Brandorr wrote: I think you > > need to close the connection after each health check. > > Otherwise mongrel/rails is going to block. (If my understanding is > > correct. > > > > Try the following health check and let me know how it works out: > > > > "GET / HTTP/1.1\nHost: \nConnection: Close\n > > > > On 8/10/07, Christopher Bailey wrote: > > > If this has already been covered, please point me to that (I > > didn't find > > > anything in my searches)... > > > > > > We are using F5 BigIP LTM load balancers. They have many pools > > of Mongrels > > > they load balance across, and I of course want the F5 to know > > when a Mongrel > > > goes down or is unavailable, etc. To do that, I need to have an > > F5 health > > > monitor for HTTP make a request to the Mongrel. We do this same > > thing with > > > our Nginx servers, and that works fine, but with Mongrel it > > doesn't. I am > > > wondering if anyone is successfully monitoring Mongrel instances > > from an F5? > > > > > > > > > As further info... I've been working with F5 tech support on > > this, and > > > we're both stumped at the moment. The same HTTP monitor works > > fine with > > > Nginx. Both try to fetch the same HTML file. Also, if I am > > ssh'ed in to > > > the F5, and do a telnet to one of the Mongrels and do "GET / > > heartbeat.html > > > HTTP/1.1", followed by two returns, this works fine. I use that > > same string > > > (and two \n's) in my F5's send string for it's HTTP monitor. > > According to > > > F5 who looked at our tcpdump, the Mongrel just never responds > > (but in the > > > same dump, they see the direct telnet version respond fine). The > > F5 makes a > > > direct TCP request to do this. > > > > > > Any ideas? Suggestions? Known issue? Workarounds? Anyone > > successful with > > > this type of setup? > > > > > > As an FYI, our system info: > > > > > > CentOS 5, nearly all up to date, 64bit, Core 2 Duo processor > > > Mongrel 1.0.1 > > > Mongrel Cluster 1.0.2 > > > Ruby 1.8.5 (2006-08-25) [x86_64-linux] > > > > > > F5 BigIP LTM, currently running 9.1.2 (working on moving to 9.3) > > > > > > > _______________________________________________ > 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/20070811/129f8883/attachment-0001.html From jeremy at hinegardner.org Sun Aug 12 03:59:26 2007 From: jeremy at hinegardner.org (Jeremy Hinegardner) Date: Sun, 12 Aug 2007 01:59:26 -0600 Subject: [Mongrel] [ANN] heel 0.2.0 - simple directory webserving with mongrel Message-ID: <20070812075926.GE8685@hinegardner.org> http://copiousfreetime.rubyforge.org/heel/ Many times I have a directory of html documentation that I want to have served up and browse for a bit. Or any other time that you just need a little tiny web server to distribute a few things here and there easily. Heel is a mongrel based web server to quickly and easily serve up the contents of a directory as webpages. Beyond just serving up webpages heel uses an ERB template and famfamfam icons to create useful index pages. And to make things even easier it launches your browser for you so no cut and paste necessary (this feature may be buggy on some platforms). Quick example: $ cd /Users/jeremy/Projects/heel && heel ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** heel running at http://0.0.0.0:4331 with document root /Users/jeremy/Projects/heel ** Use Ctrl-C to stop. ** Launching your browser... I find it a useful little tool, have fun with it. gem install heel enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy at hinegardner.org From wayneeseguin at gmail.com Sun Aug 12 10:09:13 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Sun, 12 Aug 2007 10:09:13 -0400 Subject: [Mongrel] Problems monitoring Mongrel with F5 BigIP In-Reply-To: <8c8513100708111018m6047fd14k336c095c706a1a7f@mail.gmail.com> References: <8c8513100708101645o5aca3b3ag682f5c0e6be6508c@mail.gmail.com> <5b5090780708101817l60d39248mdfbc3971cf68656d@mail.gmail.com> <8c8513100708101930h4e6c9507hee9961f93d4b5e81@mail.gmail.com> <2D2D7AA8-3BCC-4647-9D89-F1FC58767E88@joyent.com> <8c8513100708111018m6047fd14k336c095c706a1a7f@mail.gmail.com> Message-ID: <172D2199-C4DF-421A-81BB-A0F80829182B@gmail.com> On Aug 11, 2007, at 13:18 , Christopher Bailey wrote: > Jason, thanks so very much, that solved it! > > On 8/10/07, Jason A. Hoffman wrote: > Hi Chris, > > We run a bunch of 6400s in production. > > You have to terminate the lines with the /r too > > GET /heartbeat/index HTTP/1.1 > \r\n > \r\n > > Our's looks like > > http://jxh.bingodisk.com/public/mongrel-bigip.png > > Regards, Jason Christopher, In order to help anyone else encountering your issue, can you write up the problem description and solution in detail and send it to me off-list so that we can add it to the Mongrel docs. Thanks! ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070812/f8a86d20/attachment.html From public at misuse.org Mon Aug 13 05:11:51 2007 From: public at misuse.org (Steve Midgley) Date: Mon, 13 Aug 2007 10:11:51 +0100 Subject: [Mongrel] [ANN] The Team is In Place In-Reply-To: References: Message-ID: <20070813103256.839B95240848@rubyforge.org> I, for one, welcome our new mongrel overlords. :) Seriously - It's great to see a competent team of contributors step up to the plate to help move this system and community forward. (I also welcome our old overlord, Zed). Three cheers for Zed and three cheers for the new mongrel core team! Steve At 03:30 AM 8/11/2007, you wrote: >Message: 6 >Date: Fri, 10 Aug 2007 22:11:52 -0400 >From: "Zed A. Shaw" >Subject: [Mongrel] [ANN] The Team is In Place >To: mongrel-users at rubyforge.org >Message-ID: <20070810221152.6a477877.zedshaw at zedshaw.com> >Content-Type: text/plain; charset=US-ASCII > >Hello Everyone, > >I'd like to just officially announce that the new volunteers are in >charge and given control of the project. > >I won't be doing anything more than helping them get ramped up, but >they'll be in charge of doing all the stuff you folks want and are >basically the owners from now on. > >Everyone in the new volunteer list will probably do a little announce, >but here's the list once again: > >Ezra Zygmuntowicz >"Kirk Haines" >"Wayne E. Seguin" >Nate Jones - (mt) Media Temple" >filipe > >All the users should now take this time to send in suggestions and >anything that they think should be fixed. This is a new team so maybe >you can get that kitchen sink in like you always wanted. From 2828628 at gmail.com Mon Aug 13 06:43:32 2007 From: 2828628 at gmail.com (Ken) Date: Mon, 13 Aug 2007 18:43:32 +0800 Subject: [Mongrel] [ANN] The Team is In Place In-Reply-To: <20070813103256.839B95240848@rubyforge.org> References: <20070813103256.839B95240848@rubyforge.org> Message-ID: <2a0834610708130343s91c3c0ev3094e06926d55b03@mail.gmail.com> welcome you guys! On 8/13/07, Steve Midgley wrote: > > I, for one, welcome our new mongrel overlords. :) > > Seriously - It's great to see a competent team of contributors step up > to the plate to help move this system and community forward. (I also > welcome our old overlord, Zed). > > Three cheers for Zed and three cheers for the new mongrel core team! > > Steve > > At 03:30 AM 8/11/2007, you wrote: > >Message: 6 > >Date: Fri, 10 Aug 2007 22:11:52 -0400 > >From: "Zed A. Shaw" > >Subject: [Mongrel] [ANN] The Team is In Place > >To: mongrel-users at rubyforge.org > >Message-ID: <20070810221152.6a477877.zedshaw at zedshaw.com> > >Content-Type: text/plain; charset=US-ASCII > > > >Hello Everyone, > > > >I'd like to just officially announce that the new volunteers are in > >charge and given control of the project. > > > >I won't be doing anything more than helping them get ramped up, but > >they'll be in charge of doing all the stuff you folks want and are > >basically the owners from now on. > > > >Everyone in the new volunteer list will probably do a little announce, > >but here's the list once again: > > > >Ezra Zygmuntowicz > >"Kirk Haines" > >"Wayne E. Seguin" > >Nate Jones - (mt) Media Temple" > >filipe > > > >All the users should now take this time to send in suggestions and > >anything that they think should be fixed. This is a new team so maybe > >you can get that kitchen sink in like you always wanted. > > _______________________________________________ > 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/20070813/ee4f6de4/attachment.html From ry at tinyclouds.org Mon Aug 13 14:06:51 2007 From: ry at tinyclouds.org (ry dahl) Date: Mon, 13 Aug 2007 20:06:51 +0200 Subject: [Mongrel] SqueezeBox, a new Mongrel handler Message-ID: <21ee31950708131106t4c966542v203170a69ea2d443@mail.gmail.com> SqueezeBox is a simple file system based routing framework for erubis templates. It aims for a couple of niceties as well: Instead of putting your logic inside your template, like you would with PHP, SqueezeBox recognizes a separate logic file to be called before it loads the template. This allows you room to load ActiveRecord models or do calculations. These logic files return to the webserver the last line of their execution. If render() is the last line, it will load the template associated with that logic file. If a string containing, say, JSON is returned, then the JSON will be the body of the response and the template ignored. In fact, any object that contains a read method can be returned and the SqueezeBox will stream the response. (This cute behavior is stolen from Merb.) A file called initialize.rb is loaded when the website starts, in there you can define classes or functions that will be used throughout the site. database.yml is looked for in the case you plan on using ActiveRecord. There are several predefined Ruby exceptions which correspond to common HTTP errors like NotFound and MethodNotAllowed, and Forbidden. For example one could do: raise MethodNotAllowed unless @request.post? Raising one of these exceptions will display a default error page - but these error pages can be overridden by placing a template, for example, at document_root/exceptions/not_found.erb or document_root/exceptions/method_not_allowed.erb The default error message can be overridden at document_root/exceptions/index.erb. (Another behavior stolen from Merb) Please try it out! Thanks! http://four.livejournal.com/789870.html http://s3.amazonaws.com/four.livejournal/20070813/SqueezeBox-0.0.0.tgz http://tinyclouds.org/svn/squeeze_box/trunk ry From mikeisgreat at gmail.com Mon Aug 13 15:42:14 2007 From: mikeisgreat at gmail.com (Michael Steinfeld) Date: Mon, 13 Aug 2007 15:42:14 -0400 Subject: [Mongrel] Getting it right - Mongrel Upgrade - Cap 2.0 Message-ID: <3d5db09e0708131242r28331c6ck4a1454fceaa9d6c0@mail.gmail.com> I just got the fire to clean up how our app is deployed and upgrading mongrel. Currently, our app is being deployed in a user's home directory. This has caused some problems regards to user/group permissions... We decided we were going to move everything to /var/www/app which led me to the whole general layout of our deployment and some questions. ENV Ruby 1.8.5p12 Rails 1.2.3 Mongrel 1.0.1 Mongrel_Cluster 1.0.2 Apache 2.x Cap 1.x monit-4.8.1 I've read that there are some issues with Cap2.0 and Mongrel Cluster, Is this true? I was thinking to upgrade Cap as well. What, if/any other gems should I be concerned about general compatibility? I am wondering if standard practice is to run mongrel as mongrel:mongrel? Who should typically have ownership of the files in my app directory if I do so? I am concerned about media uploads (images etc..). Does it matter if mongrel is running as mongrel and my app is owned by another user? Sorta newb questions I know, but I want to make sure that I have this upgrade clean and correct. I guess I am confused about how 'mongrel' handles permissions. Thanks! -- Michael From seanliugm at gmail.com Mon Aug 13 22:21:38 2007 From: seanliugm at gmail.com (sean liu) Date: Tue, 14 Aug 2007 10:21:38 +0800 Subject: [Mongrel] can not delete pid fils when stopping mongrel_cluster Message-ID: <339d66100708131921x78aaf7a8u58b60337a29d7158@mail.gmail.com> Hi all, i im using Capistrano2 to deploy my rails app and Apache/Mongrel as it's env. All is well except deploy:rollback task. the following is log messages when running cap deploy:rollback : [DEPRECATION] Capistrano.configuration is deprecated. Use Capistrano:: Configuration.instance instead * executing `deploy:rollback' * executing `deploy:rollback_code' * executing "ls -x /var/www/apps/person/releases" servers: ["localhost"] Password: [localhost] executing command command finished * executing "rm /var/www/apps/person/current; ln -s /var/www/apps/person/releases/20070813090159 /var/www/apps/person/current && rm -rf /var/www/apps/person/releases/20070814020542" servers: ["localhost"] [localhost] executing command command finished * executing `deploy:restart' * executing `restart_mongrel_cluster' * executing "sudo mongrel_rails cluster::restart -C /var/www/apps/person/current/config/mongrel_cluster.yml" servers: ["localhost"] [localhost] executing command ** [out :: localhost] ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** [out :: localhost] stopping port 3000 ** [out :: localhost] ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** [out :: localhost] stopping port 3001 ** [out :: localhost] ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** [out :: localhost] ** [out :: localhost] stopping port 3002 ** [out :: localhost] ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** [out :: localhost] starting port 3000 ** [out :: localhost] ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3000.pid already exists. Mongrel could be running already. Check your log/mongrel.3000.log for errors. ** [out :: localhost] ** !!! Exiting with error. You must stop mongrel and clear the .pid before I'll attempt a start. ** [out :: localhost] ** [out :: localhost] starting port 3001 ** [out :: localhost] ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3001.pid already exists. Mongrel could be running already. Check your log/mongrel.3001.log for errors. ** [out :: localhost] ** !!! Exiting with error. You must stop mongrel and clear the .pid before I'll attempt a start. ** [out :: localhost] ** [out :: localhost] ** [out :: localhost] starting port 3002 ** [out :: localhost] ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3002.pid already exists. Mongrel could be running already. Check your log/mongrel.3002.log for errors. ** [out :: localhost] ** ** [out :: localhost] !!! Exiting with error. You must stop mongrel and clear the .pid before I'll attempt a start. ** [out :: localhost] command finished what deploy:rollback task does : remove current symlink, link "current" back to previous release directory, delete the recent release directory, restart mongrel cluster. And all the pid files and log files in all the releases directories are syslinked to shared directory. when i issue cap restart_mongrel_cluster command alone, everything is ok. So i guess the problem is due to "rm /var/www/apps/person/current; ln -s /var/www/apps/person/releases/20070813090159 /var/www/apps/person/current && rm -rf /var/www/apps/person/releases/20070814020542". How did that happen? Any suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070814/48e553ad/attachment-0001.html From riley.ross at gmail.com Tue Aug 14 09:04:19 2007 From: riley.ross at gmail.com (Ross Riley) Date: Tue, 14 Aug 2007 14:04:19 +0100 Subject: [Mongrel] Sandbox Project Message-ID: <15365f130708140604i28622f5ah6b015f947acabe69@mail.gmail.com> Hi Guys, I seem to remember about a year ago that work was starting on a sandbox version of mongrel that would allow a single instance or cluster to serve multiple application. Just wondering if there's any news about what's happening or any progress thats been made. Cheers Ross From wayneeseguin at gmail.com Tue Aug 14 10:17:39 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Tue, 14 Aug 2007 10:17:39 -0400 Subject: [Mongrel] Getting it right - Mongrel Upgrade - Cap 2.0 In-Reply-To: <3d5db09e0708131242r28331c6ck4a1454fceaa9d6c0@mail.gmail.com> References: <3d5db09e0708131242r28331c6ck4a1454fceaa9d6c0@mail.gmail.com> Message-ID: On Aug 13, 2007, at 15:42 , Michael Steinfeld wrote: > I just got the fire to clean up how our app is deployed and > upgrading mongrel. > > Currently, our app is being deployed in a user's home directory. This > has caused some problems regards to user/group permissions... What issues were you running into? I deploy several production apps to dedicated user accounts and haven't run into permission issues. > I've read that there are some issues with Cap2.0 and Mongrel Cluster, > Is this true? I was thinking to upgrade Cap as well. What, if/any > other gems should I be concerned about general compatibility? I've been running "Cap 2.0" for a few months now and have not seen any issues with clustering. As long as you have your deployment scripts written correctly you shouldn't have any issues. > I am wondering if standard practice is to run mongrel as > mongrel:mongrel? Who should typically have ownership of the files in > my app directory if I do so? I am concerned about media uploads > (images etc..). Does it matter if mongrel is running as mongrel and my > app is owned by another user? Sorta newb questions I know, but I want > to make sure that I have this upgrade clean and correct. > I guess I am confused about how 'mongrel' handles permissions. If Mongrel is being run on a system wide level then do use mongrel:mongrel. If as in my case you are using a dedicated user for the application then use that user and group. Hope this helps. ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070814/cbfe0004/attachment.html From wayneeseguin at gmail.com Tue Aug 14 10:21:20 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Tue, 14 Aug 2007 10:21:20 -0400 Subject: [Mongrel] can not delete pid fils when stopping mongrel_cluster In-Reply-To: <339d66100708131921x78aaf7a8u58b60337a29d7158@mail.gmail.com> References: <339d66100708131921x78aaf7a8u58b60337a29d7158@mail.gmail.com> Message-ID: <9CAF2158-3605-4793-84EC-D3CC39D35188@gmail.com> On Aug 13, 2007, at 22:21 , sean liu wrote: > Hi all, > > i im using Capistrano2 to deploy my rails app and Apache/Mongrel as > it's env. All is well except deploy:rollback task. the following > is log messages when running cap deploy:rollback : > > [DEPRECATION] Capistrano.configuration is deprecated. Use > Capistrano::Configuration.instance instead > * executing `deploy:rollback' > * executing `deploy:rollback_code' > * executing "ls -x /var/www/apps/person/releases" > servers: ["localhost"] > Password: > [localhost] executing command > command finished > * executing "rm /var/www/apps/person/current; ln -s /var/www/apps/ > person/releases/20070813090159 /var/www/apps/person/current && rm - > rf /var/www/apps/person/releases/20070814020542" > servers: ["localhost"] > [localhost] executing command > command finished > * executing `deploy:restart' > * executing `restart_mongrel_cluster' > * executing "sudo mongrel_rails cluster::restart -C /var/www/apps/ > person/current/config/mongrel_cluster.yml" > servers: ["localhost"] > [localhost] executing command > ** [out :: localhost] ** Ruby version is not up-to-date; loading > cgi_multipart_eof_fix > ** [out :: localhost] stopping port 3000 > ** [out :: localhost] ** Ruby version is not up-to-date; loading > cgi_multipart_eof_fix > ** [out :: localhost] stopping port 3001 > ** [out :: localhost] ** Ruby version is not up-to-date; loading > cgi_multipart_eof_fix > ** [out :: localhost] > ** [out :: localhost] stopping port 3002 > ** [out :: localhost] ** Ruby version is not up-to-date; loading > cgi_multipart_eof_fix > ** [out :: localhost] starting port 3000 > ** [out :: localhost] ** Ruby version is not up-to-date; loading > cgi_multipart_eof_fix > ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3000.pid > already exists. Mongrel could be running already. Check your log/ > mongrel.3000.log for errors. > ** [out :: localhost] ** !!! Exiting with error. You must stop > mongrel and clear the .pid before I'll attempt a start. > ** [out :: localhost] > ** [out :: localhost] starting port 3001 > ** [out :: localhost] ** Ruby version is not up-to-date; loading > cgi_multipart_eof_fix > ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3001.pid > already exists. Mongrel could be running already. Check your log/ > mongrel.3001.log for errors. > ** [out :: localhost] ** !!! Exiting with error. You must stop > mongrel and clear the .pid before I'll attempt a start. > ** [out :: localhost] > ** [out :: localhost] > ** [out :: localhost] starting port 3002 > ** [out :: localhost] ** Ruby version is not up-to-date; loading > cgi_multipart_eof_fix > ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3002.pid > already exists. Mongrel could be running already. Check your log/ > mongrel.3002.log for errors. > ** [out :: localhost] ** > ** [out :: localhost] !!! Exiting with error. You must stop > mongrel and clear the .pid before I'll attempt a start. > ** [out :: localhost] > command finished > > what deploy:rollback task does : remove current symlink, link > "current" back to previous release directory, delete the recent > release directory, restart mongrel cluster. And all the pid files > and log files in all the releases directories are syslinked to > shared directory. > when i issue cap restart_mongrel_cluster command alone, everything > is ok. So i guess the problem is due to "rm /var/www/apps/person/ > current; ln -s /var/www/apps/person/releases/20070813090159 /var/ > www/apps/person/current && rm -rf /var/www/apps/person/releases/ > 20070814020542". How did that happen? > Any suggestions? Sean, Pay attention to that depreciation notice. Anyway, Check the location of your pid files, you apparantly have old files laying around so mongrel_cluster thinks that mongrels might already be running on the ports it's trying to startup on. If the mongrels are not running then delete the pid files (rm tmp/pids/ mongrel.*.pid) and try again. ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070814/0976ad3b/attachment.html From usenet at s4r.de Tue Aug 14 10:26:25 2007 From: usenet at s4r.de (Thomas Worm) Date: Tue, 14 Aug 2007 14:26:25 +0000 (UTC) Subject: [Mongrel] Temporary files / Uploads Message-ID: Hi, how can I influence, where mongrel stores temporary files like uploads. As far as I can see, int honours the TMP or TEMP environment. Can I also set it in the configuration file for mongrel? I have not found something about it in the docs. Another thing: When I upload a file, the file is stored 3-4 times: In the TMP by mongrel as mongrel.3400.0 and then as CGI.3400.0 I currently examine the rails application boxroom (I do not expect any answers in this group specific to boxroom), which then itself stores the file twice again for some reason. So at the end I have the same file 4 times on disk (before one of the boxroom files will be deleted by boxroom). I wonder who is responsible for cleaning this up and when? For the two boxroom files, it is clear, it is boxroom. The CGI-File also seems to be cleaned up (I guess by boxroom, I will find out later ;-)). But the mongrel-file persists in the TMP-directory (when something goes wrong, then both files are kept). While the fileupload takes place, the ruby process which runs mongrel uses up to 4 times as much memory as the uploaded file is big (plus what was ruby was using before the request). I now wonder a little bit, why? As far as I can see, boxroom copies the file in 4k-chunks, but I still have not yet fully understood the application. Does mongrel keep the entire file in mem, before it stores it into tmp? The reason, why I ask those questions is, I am planning to build a new platform for our clients to exchange files with our company and I am now examining, how to do this. From the past I know, we have a few clients, which upload files in the size of 1-3 GB (in the future maybe even bigger). But I cannot have 12GB of mem per process, and even on the harddrive an upload should succeed as long as the file fits onto disk. So are there any issues concerning mongrel, which I should take into account. Currently I am testing on WinXP with ruby-1.8.6 and mongrel-1.0.1-mswin32 and rails 1.2.3. The final application will run on linux. Regards Thomas BTW: mongrel is great! Without I would have stopped using rails just after the first project I did because deployment on windows is a mess without mongrel and as far as I could read not much better on linux. From wayneeseguin at gmail.com Tue Aug 14 11:36:19 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Tue, 14 Aug 2007 11:36:19 -0400 Subject: [Mongrel] Sandbox Project In-Reply-To: <15365f130708140604i28622f5ah6b015f947acabe69@mail.gmail.com> References: <15365f130708140604i28622f5ah6b015f947acabe69@mail.gmail.com> Message-ID: <7E1B2F71-9BD5-4765-A504-A34DAF5B9A9D@gmail.com> On Aug 14, 2007, at 09:04 , Ross Riley wrote: > Hi Guys, > I seem to remember about a year ago that work was starting on a > sandbox version of mongrel that would allow a single instance or > cluster to serve multiple application. > > Just wondering if there's any news about what's happening or any > progress thats been made. > > Cheers > Ross Hi Ross, Are you referring to this thread: http://rubyforge.org/pipermail/ mongrel-users/2006-September/001613.html If so, there are no plans for this on the Mongrel core team. ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070814/9a10fe0c/attachment-0001.html From mha at axugroup.com Wed Aug 15 07:58:57 2007 From: mha at axugroup.com (M. Hakan Aksu) Date: Wed, 15 Aug 2007 07:58:57 -0400 Subject: [Mongrel] Nginx/Mongrel proxy_read_timeout issue Message-ID: This may be a nginx issue more than a mongrel one but I though folks in this list might be interested. Anyway, I have a mongrel_cluster with 2 front nginx workers as proxy. I recently replaced apache/mod_proxy for nginx, and I wasn't aware of the 60 seconds default proxy_read_timeout so I went a head and tried to run a process via http GET. Normally because of the 60 seconds the GET I did from the browser should have stopped but it kept running. Checking the database i noticed that my process was running multiple times!. Looking at the nginx error logs below, I noticed that nginx restarted the same call couple of times on a different mongrel after each timeout. I had to kill the nginx processes to stop it all. 2007/08/14 22:18:40 [error] 1720#0: *129 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.102, server: factory, URL: "/opening_balance/post", upstream: " http://127.0.0.1:8013/opening_balance/post", host: "rs" 2007/08/14 22:19:40 [error] 1720#0: *129 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.102, server: factory, URL: "/opening_balance/post", upstream: " http://127.0.0.1:8014/opening_balance/post ", host: "rs" 2007/08/14 22:20:40 [error] 1720#0: *129 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.102 , server: factory, URL: "/opening_balance/post", upstream: " http://127.0.0.1:8015/opening_balance/post", host: "rs" 2007/08/14 22:21:40 [error] 1720#0: *129 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.102, server: factory, URL: "/opening_balance/post", upstream: " http://127.0.0.1:8016/opening_balance/post ", host: "rs" 2007/08/14 22:22:40 [info] 1720#0: *129 client closed prematurely connection, so upstream connection is closed too while sending request to upstream, client: 192.168.1.102, server: factory, URL: "/opening_balance/post", upstream: " http://127.0.0.1:8017/opening_balance/post", host: "rs" So here' my question: Is this normal? Shouldn't upstream connection be closed after the timeout instead of re spawning the same call? I think this may be a very dangerous behavior. I'll appreciate to see your comments. -Hakan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070815/faa8bb9e/attachment.html From firatcanbasarir at gmail.com Wed Aug 15 08:43:58 2007 From: firatcanbasarir at gmail.com (Firat Can Basarir) Date: Wed, 15 Aug 2007 15:43:58 +0300 Subject: [Mongrel] Nginx/Mongrel proxy_read_timeout issue In-Reply-To: References: Message-ID: <649AF27E-F821-43CF-ADDD-599B49CD3CD3@gmail.com> You can disable this behavior by adding, proxy_next_upstream error; to your nginx.conf. Default value for this setting is "error, timeout", so nginx tries to connect to the next mongrel when the current one returns an error or timeouts in your case. I noticed this when I saw multiple copies of same comments on our site. Check http://wiki.codemongers.com/ NginxHttpProxyModule#proxy_next_upstream for more information. - Firat Can Basarir On Aug 15, 2007, at 2:58 PM, M. Hakan Aksu wrote: > This may be a nginx issue more than a mongrel one but I though > folks in this list might be interested. > Anyway, I have a mongrel_cluster with 2 front nginx workers as proxy. > > I recently replaced apache/mod_proxy for nginx, and I wasn't aware > of the 60 seconds default proxy_read_timeout so I went a head and > tried to run a process via http GET. Normally because of the 60 > seconds the GET I did from the browser should have stopped but it > kept running. Checking the database i noticed that my process was > running multiple times!. Looking at the nginx error logs below, I > noticed that nginx restarted the same call couple of times on a > different mongrel after each timeout. I had to kill the nginx > processes to stop it all. > > > 2007/08/14 22:18:40 [error] 1720#0: *129 upstream timed out (110: > Connection timed out) while reading response header from upstream, > client: 192.168.1.102, server: factory, URL: "/opening_balance/ > post", upstream: " http://127.0.0.1:8013/opening_balance/post", > host: "rs" > 2007/08/14 22:19:40 [error] 1720#0: *129 upstream timed out (110: > Connection timed out) while reading response header from upstream, > client: 192.168.1.102, server: factory, URL: "/opening_balance/ > post", upstream: " http://127.0.0.1:8014/opening_balance/post ", > host: "rs" > 2007/08/14 22:20:40 [error] 1720#0: *129 upstream timed out (110: > Connection timed out) while reading response header from upstream, > client: 192.168.1.102 , server: factory, URL: "/opening_balance/ > post", upstream: "http://127.0.0.1:8015/opening_balance/post ", > host: "rs" > 2007/08/14 22:21:40 [error] 1720#0: *129 upstream timed out (110: > Connection timed out) while reading response header from upstream, > client: 192.168.1.102, server: factory, URL: "/opening_balance/ > post", upstream: " http://127.0.0.1:8016/opening_balance/post ", > host: "rs" > 2007/08/14 22:22:40 [info] 1720#0: *129 client closed prematurely > connection, so upstream connection is closed too while sending > request to upstream, client: 192.168.1.102, server: factory, URL: "/ > opening_balance/post", upstream: "http://127.0.0.1:8017/ > opening_balance/post ", host: "rs" > > > So here' my question: Is this normal? Shouldn't upstream connection > be closed after the timeout instead of re spawning the same call? I > think this may be a very dangerous behavior. > > I'll appreciate to see your comments. > > -Hakan > _______________________________________________ > 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/20070815/173234e6/attachment.html From _ at whats-your.name Thu Aug 16 05:18:59 2007 From: _ at whats-your.name (cr) Date: Thu, 16 Aug 2007 05:18:59 -0400 Subject: [Mongrel] [ANN] e c30ac536947f7330943f8de9c33f70ef2d5994e7 Message-ID: <20070816091859.GA4741@replic.net> e, elemental, is a stack for the data web there are 4 components: earth, air, fire, water earth is a pure-ruby RDF triple-store, with a fs backend. no dependencies on 3rd party databases, just add filesystem (tm). theres also a ram backend built with the Mongrel URI-classifier trie as the primitive datastructure. from these two it should be easy to extrapolate how to write a memcached/hadoop backend, or whatever is your cup of tea. ive found reiser4 works quite well.. the main inspiration behind the store design is git. the API for the store should be familiar to users of jQuery.. as with one class wrapping a DOM node, you get one class wrapping a RDF resource. the resource can be an actual file on the filesystem - eg throw a dir of jpgs off your cam into a web dir and start annotating them.. literals are any valid JSON data, and resource versioning is available. a JSON query engine is included, which queries like this: { type:Type, 'type=':'http://weblog.com/story', date:Modified, 'abs?':dc+'terms/abstract', 'title?':dc+'elements/1.1/title', 'content?':sioc+'content', limit:7, offset:0, order: {p:'date',d:'desc'}} as well as plain keyword search of literals. the underlying indices are visible in and implemented using the store itself. designed with optimizability / hackability in mind, to invent the partitioning/distribution to meet your needs, adjust the editing method to send all edits to an Utu chan or RDF-over-JSON-over-Jabber to viewers, mirror data to a beastly SPARQL engine, etc. http://whats-your.name/e/e.tar.gz water is the mongrel layer. it provides a default HTML view for crawlers, links, dillo, and pays attention to the headers to export RDF to tools that want it like tabulator, triplr, virtuoso. everything is cached for both server (serialized resource) and client (if-modified/etag). the base URI is mapped to the root of the server for your domain. embedded in the oldschool HTML is RDFa which is used to bootstrap a base javascript GUI aka 'fire'. you'll likely want to customize this for your app, although i do plan on providing a more complete set of base tools - graphical query editor and some sample scripts as a seperate package for things like blogs, wikis, bug tracs. facilitating GUIs is a small set of jQuery extensions, 'air' to get form fields auto-watched for changes and updating triples on the server, JS DOM creation + bindings (closures and js vars instead of jQuery selectors to avoid the fragility and traversal, if you want). ive tested the base gUI and proven it can at least load and make edits in firefox2/3, opera, ie(s4linux), and webkit(qt/gdk), but not this week. theres no global lock preventing concurrency, no class vars and only a couple instance vars (could make these go away, but this isnt haskell) . so far the only thing somewhat slow is ruby's sort_by. taking about 0.1 second for 30-50 mb of blog post data sorting on date. query results can be cached, but im going to investigate the performance and mem-hoggage of a RAM store for the index before rewriting everything in Lua. the roadmap is add a few missing features: recursive queries (eg, get the 10 newest blog posts, and the 10 most recent comments for each of these), and OpenID-based accounts (local-only is supported currently). is there a mongrel-openID gem? oh yeah, docs/tutorials will come some day, maybe.. From zedshaw at zedshaw.com Thu Aug 16 08:51:25 2007 From: zedshaw at zedshaw.com (Zed A. Shaw) Date: Thu, 16 Aug 2007 08:51:25 -0400 Subject: [Mongrel] [ANN] e c30ac536947f7330943f8de9c33f70ef2d5994e7 In-Reply-To: <20070816091859.GA4741@replic.net> References: <20070816091859.GA4741@replic.net> Message-ID: <20070816085125.d77b12fa.zedshaw@zedshaw.com> On Thu, 16 Aug 2007 05:18:59 -0400 cr <_ at whats-your.name> wrote: > e, elemental, is a stack for the data web > > there are 4 components: earth, air, fire, water Super duper cool. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ From ry at tinyclouds.org Fri Aug 17 11:54:43 2007 From: ry at tinyclouds.org (ry dahl) Date: Fri, 17 Aug 2007 17:54:43 +0200 Subject: [Mongrel] Cookies for Mongrels Message-ID: <21ee31950708170854q5f18d25dia096294c66e55ee8@mail.gmail.com> This class provides a CookieJar object for Mongrels. Just initialize with response and request objects and then treat like a hash. Does not depend on cgi.rb ry -------------- next part -------------- A non-text attachment was scrubbed... Name: cookies_for_mongrels.rb Type: text/x-ruby-script Size: 4776 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070817/c5bb61c4/attachment-0001.bin From evan at cloudbur.st Sat Aug 18 18:33:50 2007 From: evan at cloudbur.st (Evan Weaver) Date: Sat, 18 Aug 2007 18:33:50 -0400 Subject: [Mongrel] [ANN] e c30ac536947f7330943f8de9c33f70ef2d5994e7 In-Reply-To: <20070816091859.GA4741@replic.net> References: <20070816091859.GA4741@replic.net> Message-ID: Carmen, Could you cook up an introduction to RDF via e? I'm a bit behind the curve here. More the idea of RDF and its usage in e than the e code itself. Evan On 8/16/07, cr <_ at whats-your.name> wrote: > e, elemental, is a stack for the data web > > there are 4 components: earth, air, fire, water > > earth is a pure-ruby RDF triple-store, with a fs backend. no dependencies on 3rd party databases, just add filesystem (tm). theres also a ram backend built with the Mongrel URI-classifier trie as the primitive datastructure. from these two it should be easy to extrapolate how to write a memcached/hadoop backend, or whatever is your cup of tea. ive found reiser4 works quite well.. the main inspiration behind the store design is git. > > the API for the store should be familiar to users of jQuery.. as with one class wrapping a DOM node, you get one class wrapping a RDF resource. the resource can be an actual file on the filesystem - eg throw a dir of jpgs off your cam into a web dir and start annotating them.. literals are any valid JSON data, and resource versioning is available. > > a JSON query engine is included, which queries like this: > > { type:Type, > 'type=':'http://weblog.com/story', > date:Modified, > 'abs?':dc+'terms/abstract', > 'title?':dc+'elements/1.1/title', > 'content?':sioc+'content', > limit:7, > offset:0, > order: {p:'date',d:'desc'}} > > as well as plain keyword search of literals. the underlying indices are visible in and implemented using the store itself. > > designed with optimizability / hackability in mind, to invent the partitioning/distribution to meet your needs, adjust the editing method to send all edits to an Utu chan or RDF-over-JSON-over-Jabber to viewers, mirror data to a beastly SPARQL engine, etc. > > http://whats-your.name/e/e.tar.gz > > > water is the mongrel layer. it provides a default HTML view for crawlers, links, dillo, and pays attention to the headers to export RDF to tools that want it like tabulator, triplr, virtuoso. everything is cached for both server (serialized resource) and client (if-modified/etag). the base URI is mapped to the root of the server for your domain. > > embedded in the oldschool HTML is RDFa which is used to bootstrap a base javascript GUI aka 'fire'. you'll likely want to customize this for your app, although i do plan on providing a more complete set of base tools - graphical query editor and some sample scripts as a seperate package for things like blogs, wikis, bug tracs. facilitating GUIs is a small set of jQuery extensions, 'air' to get form fields auto-watched for changes and updating triples on the server, JS DOM creation + bindings (closures and js vars instead of jQuery selectors to avoid the fragility and traversal, if you want). ive tested the base gUI and proven it can at least load and make edits in firefox2/3, opera, ie(s4linux), and webkit(qt/gdk), but not this week. > > theres no global lock preventing concurrency, no class vars and only a couple instance vars (could make these go away, but this isnt haskell) . so far the only thing somewhat slow is ruby's sort_by. taking about 0.1 second for 30-50 mb of blog post data sorting on date. query results can be cached, but im going to investigate the performance and mem-hoggage of a RAM store for the index before rewriting everything in Lua. > > the roadmap is add a few missing features: recursive queries (eg, get the 10 newest blog posts, and the 10 most recent comments for each of these), and OpenID-based accounts (local-only is supported currently). is there a mongrel-openID gem? > > oh yeah, docs/tutorials will come some day, maybe.. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Evan Weaver Cloudburst, LLC From wayneeseguin at gmail.com Sat Aug 18 21:02:07 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Sat, 18 Aug 2007 21:02:07 -0400 Subject: [Mongrel] [ANN] e c30ac536947f7330943f8de9c33f70ef2d5994e7 In-Reply-To: References: <20070816091859.GA4741@replic.net> Message-ID: <62F04D2E-2EE1-46F8-A3FA-366AE428AD39@gmail.com> On Aug 18, 2007, at 18:33 , Evan Weaver wrote: > Carmen, > > Could you cook up an introduction to RDF via e? I'm a bit behind the > curve here. More the idea of RDF and its usage in e than the e code > itself. > > Evan > Carmen, That would be greatly appreciated. Thanks! ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070818/9334a23f/attachment.html From massimo at zero.it Sun Aug 19 02:53:40 2007 From: massimo at zero.it (Massimo Santoli) Date: Sun, 19 Aug 2007 08:53:40 +0200 Subject: [Mongrel] Possible memory leak problem... Message-ID: <61B5B973-C9E5-48AC-AD8F-E748FD22F4CA@zero.it> I'm trying to figure out a possible memory leak problem I have in my application. I've tested both with mongrel and webrick and the problem remains. So I think it's not a mongrel problem, but I'm posting here to see if anybody can help me. The RAILS application is quite simple, no special plugins ( no RMagick that has the memory problem ), it's a query and the data is outputted via rxml template, so there is the xml Builder in the template. Actually I'm doing quite a lot of Ruby in the template, and the output file can get VERY big ( depends on the input data ). The maximum is an output file of 35MB. When somebody does this very heavy search the Mongrel ( or webrick ) process reaches 400MB and the memory is never ever freed again... My application has 6 mongrels and if all the mongrel end up with very big queries I need to restart everything, having eaten up all the 2GB of RAM my box has. I tested for memory leaks with Scott Laird module, but I didn't find anything. Is it a problem of the RAILS/Ruby CG? or is there something I'm missing ? My only hint is the xml Builder RAILS functions, I plan to try to use a normal RHTML to see if something changes, I know it's not a very neat solution ( and BTW it is 2 to 3 times faster on very big XML files, from some benchmarks I've done )... but I'm desperate! Thanks Massimo From wayneeseguin at gmail.com Sun Aug 19 07:15:37 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Sun, 19 Aug 2007 07:15:37 -0400 Subject: [Mongrel] Possible memory leak problem... In-Reply-To: <61B5B973-C9E5-48AC-AD8F-E748FD22F4CA@zero.it> References: <61B5B973-C9E5-48AC-AD8F-E748FD22F4CA@zero.it> Message-ID: On Aug 19, 2007, at 02:53 , Massimo Santoli wrote: > I'm trying to figure out a possible memory leak problem I have in my > application. > > I've tested both with mongrel and webrick and the problem remains. So > I think it's not a mongrel problem, but I'm posting here to see if > anybody can help me. > > The RAILS application is quite simple, no special plugins ( no > RMagick that has the memory problem ), it's a query and the data is > outputted via rxml template, > so there is the xml Builder in the template. Actually I'm doing quite > a lot of Ruby in the template, and the output file can get VERY big > ( depends on the input data ). > The maximum is an output file of 35MB. When somebody does this very > heavy search the Mongrel ( or webrick ) process reaches 400MB and the > memory > is never ever freed again... > My application has 6 mongrels and if all the mongrel end up with very > big queries I need to restart everything, having eaten up all the 2GB > of RAM my box has. > > I tested for memory leaks with Scott Laird module, but I didn't find > anything. > > Is it a problem of the RAILS/Ruby CG? or is there something I'm > missing ? > > My only hint is the xml Builder RAILS functions, I plan to try to use > a normal RHTML to see if something changes, I know it's not a very > neat solution ( and BTW it is 2 to 3 times faster > on very big XML files, from some benchmarks I've done )... but I'm > desperate! > > > Thanks > Massimo Massimo, You should post this to ruby-talk mailing list. Make sure to include the version of ruby, the version rails, as well as any plugins and/ or gems your app uses. If at all possible try to include some code for analysis as many people on that list will jump right on that to tell you what might be causing it and a better way to go about it (if one exists). Best, ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070819/35d12bed/attachment.html From cdcarter at gmail.com Sun Aug 19 23:50:38 2007 From: cdcarter at gmail.com (Chris Carter) Date: Sun, 19 Aug 2007 22:50:38 -0500 Subject: [Mongrel] Possible memory leak problem... In-Reply-To: References: <61B5B973-C9E5-48AC-AD8F-E748FD22F4CA@zero.it> Message-ID: <86987bdf0708192050r282351bu7256e44cbba28b7@mail.gmail.com> On 8/19/07, Wayne E. Seguin wrote: > > Massimo, > > You should post this to ruby-talk mailing list. Make sure to include the > version of ruby, the version rails, as well as any plugins and/or gems your > app uses. If at all possible try to include some code for analysis as many > people on that list will jump right on that to tell you what might be > causing it and a better way to go about it (if one exists). > > Best, > > ~Wayne I think rails-talk would be even more appropriate. -- Chris Carter concentrationstudios.com brynmawrcs.com From altano at gmail.com Mon Aug 20 00:30:34 2007 From: altano at gmail.com (Norbauer Alan) Date: Mon, 20 Aug 2007 00:30:34 -0400 Subject: [Mongrel] byte-range requests Message-ID: Hello everyone, I did some initial tests and it seems that mongrel does not support byte-range requests. Is this correct? The reason I ask is that the iPhone requires byte-range requests to work in order to stream audio or video from a web server. Thanks in advance, alan From wayneeseguin at gmail.com Mon Aug 20 14:21:50 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Mon, 20 Aug 2007 14:21:50 -0400 Subject: [Mongrel] byte-range requests In-Reply-To: References: Message-ID: <2AB9F73B-5C8D-4393-B1FF-215F1C5062D0@gmail.com> On Aug 20, 2007, at 00:30 , Norbauer Alan wrote: > Hello everyone, > > I did some initial tests and it seems that mongrel does not support > byte-range requests. Is this correct? > > The reason I ask is that the iPhone requires byte-range requests to > work in order to stream audio or video from a web server. > > Thanks in advance, > alan Alan, It is correct that Mongrel does not support byte-range requests at this time. Are you dealing with all static content for the requests? ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070820/1bdd1438/attachment.html From terry.reese at oregonstate.edu Mon Aug 20 20:05:04 2007 From: terry.reese at oregonstate.edu (Reese, Terry) Date: Mon, 20 Aug 2007 17:05:04 -0700 Subject: [Mongrel] memcache and mongrel_cluster configuration question In-Reply-To: <2AB9F73B-5C8D-4393-B1FF-215F1C5062D0@gmail.com> References: <2AB9F73B-5C8D-4393-B1FF-215F1C5062D0@gmail.com> Message-ID: <1454CCD2A8D4B74F9EEE8CB68C891CC901809876@NWS-EXCH3.nws.oregonstate.edu> I'm assuming that what I'm trying to do is a fairly common on this list, so I'm hoping someone can help me out. We are deploying a rails app. using multiple mongrels, managed by mongrel_cluster and apache's mod_balancer. All config information is below. As part of our setup, we use memcache for sessioning -- which is my current problem. Sessions are being set, however, it seems that each mongrel instance is maintaining its own copy of the session data (does that make sense?). What I'm seeing is that as data is being placed into session variables, occasionally, an older instance of a session variable will be resurrected. So if I'd placed "water" in a session variable to be used for some action and then placed "fish" in the session variable to use for some actions -- when I do those actions, sometimes I'm getting "water" back when I query the session variable. It's almost like each mongrel instance is using it's own "memcache" -- which doesn't make sense because we only have a single memcache server running. Any suggestions are welcome. Thanks, --TR Any, here's our setup: 10 mongrels running on 1 server, managed by mongrel_cluster 1 memcache server, running on localhost httpd-vhost config info: SetEnv RAILS_ENV development ServerName server.oregonstate.edu ServerAdmin xx at c.com DocumentRoot /usr/local/apache-lf/rails/public/ ErrorLog /usr/local/apache-lf/rails/log/error.log CustomLog /usr/local/apache-lf/rails/log/access.log common SetHandler balancer-manager Order Deny,Allow Deny From all Allow from 127.0.0.1 RewriteEngine On RewriteRule ^(.*/)?.svn/ - [F,L] ProxyPass /balancer-manager ! ProxyPass /balancer-manager/ ! ProxyPass /images/ ! ProxyPass /stylesheets/ ! ProxyPass /javascripts/ ! ProxyPass /error/ ! ProxyPass /icons/ ! ProxyPass / balancer://libraryfind/ stickysession=STICKY_ROUTE ProxyPassReverse / balancer://libraryfind/ ProxyPreserveHost On BalancerMember http://127.0.0.1:4010 route=lf-4010 BalancerMember http://127.0.0.1:4011 route=lf-4011 BalancerMember http://127.0.0.1:4012 route=lf-4012 BalancerMember http://127.0.0.1:4013 route=lf-4013 BalancerMember http://127.0.0.1:4014 route=lf-4014 BalancerMember http://127.0.0.1:4015 route=lf-4015 BalancerMember http://127.0.0.1:4016 route=lf-4016 BalancerMember http://127.0.0.1:4017 route=lf-4017 BalancerMember http://127.0.0.1:4018 route=lf-4018 BalancerMember http://127.0.0.1:4019 route=lf-4019 Options +FollowSymlinks +ExecCGI AllowOverride All Order allow,deny Allow from all environment.rb memcache config info: # Within the Rails::Initializer do block config.action_controller.session_store = :mem_cache_store #Outside the block memcache_options = { :compression => true, :debug => false, :namespace => "mem-#{RAILS_ENV}", :readonly => false, :urlencode => false } CACHE = MemCache.new 'localhost:11211', :namespace => "mem-#{RAILS_ENV}" ActionController::Base.session_options[:cache] = CACHE ******************************************* Terry Reese Cataloger for Networked Resources Digital Production Unit Head Oregon State University Libraries Corvallis, OR 97331 tel: 541-737-6384 email: terry.reese at oregonstate.edu http: http://oregonstate.edu/~reeset ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070820/160e6071/attachment.html From erik.hetzner at ucop.edu Mon Aug 20 20:47:35 2007 From: erik.hetzner at ucop.edu (Erik Hetzner) Date: Mon, 20 Aug 2007 17:47:35 -0700 Subject: [Mongrel] memcache and mongrel_cluster configuration question In-Reply-To: <1454CCD2A8D4B74F9EEE8CB68C891CC901809876@NWS-EXCH3.nws.oregonstate.edu> References: <2AB9F73B-5C8D-4393-B1FF-215F1C5062D0@gmail.com> <1454CCD2A8D4B74F9EEE8CB68C891CC901809876@NWS-EXCH3.nws.oregonstate.edu> Message-ID: <87veb9iuhk.wl%erik.hetzner@ucop.edu> At Mon, 20 Aug 2007 17:05:04 -0700, "Reese, Terry" wrote: > > I'm assuming that what I'm trying to do is a fairly common on this list, > so I'm hoping someone can help me out. We are deploying a rails app. > using multiple mongrels, managed by mongrel_cluster and apache's > mod_balancer. All config information is below. As part of our setup, > we use memcache for sessioning -- which is my current problem. Sessions > are being set, however, it seems that each mongrel instance is > maintaining its own copy of the session data (does that make sense?). > What I'm seeing is that as data is being placed into session variables, > occasionally, an older instance of a session variable will be > resurrected. So if I'd placed "water" in a session variable to be used > for some action and then placed "fish" in the session variable to use > for some actions -- when I do those actions, sometimes I'm getting > "water" back when I query the session variable. It's almost like each > mongrel instance is using it's own "memcache" -- which doesn't make > sense because we only have a single memcache server running. > [?] Your key to debugging this is going to be using the -vv option to memcached to monitor the getting & setting of key/value pairs. I suspect it has to do with the memcache namespace. Additionally, you?d do best to serialize only the most basic of variables to sessions; I?d stick with Fixnums & Strings. Anything else is trouble, and trouble that doesn?t always give you a nice error message. best, Erik Hetzner ;; Erik Hetzner, California Digital Library ;; gnupg key id: 1024D/01DB07E3 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070820/bf1ddb61/attachment-0001.bin From altano at gmail.com Tue Aug 21 02:02:00 2007 From: altano at gmail.com (Norbauer Alan) Date: Tue, 21 Aug 2007 02:02:00 -0400 Subject: [Mongrel] byte-range requests In-Reply-To: <2AB9F73B-5C8D-4393-B1FF-215F1C5062D0@gmail.com> References: <2AB9F73B-5C8D-4393-B1FF-215F1C5062D0@gmail.com> Message-ID: <88C3B4D4-8D02-4B56-85E7-74B83124FA69@gmail.com> >> On Aug 20, 2007, at 00:30 , Norbauer Alan wrote: >> Hello everyone, >> >> I did some initial tests and it seems that mongrel does not support >> byte-range requests. Is this correct? >> >> The reason I ask is that the iPhone requires byte-range requests to >> work in order to stream audio or video from a web server. >> >> Thanks in advance, >> alan >> > > On Aug 20, 2007, at 2:21 PM, Wayne E. Seguin wrote: > Alan, > > It is correct that Mongrel does not support byte-range requests at > this time. > > Are you dealing with all static content for the requests? > > ~Wayne > > s///g > Wayne E. Seguin > Sr. Systems Architect & Systems Administrator > Yes, yes I am. I'm creating an app that will stream audio off a desktop. Since this will be an installable client app, I don't want to rely on anything like Apache. But on the other hand, both webrick and mongrel do not support byte-range requests. Thanks for the quick response! -alan From terry.reese at oregonstate.edu Tue Aug 21 02:48:03 2007 From: terry.reese at oregonstate.edu (Reese, Terry) Date: Mon, 20 Aug 2007 23:48:03 -0700 Subject: [Mongrel] memcache and mongrel_cluster configuration question References: <2AB9F73B-5C8D-4393-B1FF-215F1C5062D0@gmail.com><1454CCD2A8D4B74F9EEE8CB68C891CC901809876@NWS-EXCH3.nws.oregonstate.edu> <87veb9iuhk.wl%erik.hetzner@ucop.edu> Message-ID: <1454CCD2A8D4B74F9EEE8CB68C891CC9015D5570@NWS-EXCH3.nws.oregonstate.edu> >>Your key to debugging this is going to be using the -vv option to >>memcached to monitor the getting & setting of key/value pairs. I >>suspect it has to do with the memcache namespace. I hadn't thought of that -- I'll do that. >>Additionally, you'd do best to serialize only the most basic of >>variables to sessions; I'd stick with Fixnums & Strings. Anything else >>is trouble, and trouble that doesn't always give you a nice error >>message. Well, our intention is to eventually remove all to most of the sessioning components. Unfortunately, it can't happen tomorrow, so I'm stuck trying to figure this out. And to be fair, we are only storing one string and two Fixnums as session variables. We just need those variables to always be set correctly. :) Hopefully, I'll be able to get a better idea of what's happening by watching the memcache though. Thanks, --TR ******************************************* Terry Reese Cataloger for Networked Resources Digital Production Unit Head Oregon State University Libraries Corvallis, OR 97331 tel: 541-737-6384 email: terry.reese at oregonstate.edu http: http://oregonstate.edu/~reeset ******************************************* ________________________________ From: mongrel-users-bounces at rubyforge.org on behalf of Erik Hetzner Sent: Mon 8/20/2007 5:47 PM To: mongrel-users at rubyforge.org Subject: Re: [Mongrel] memcache and mongrel_cluster configuration question At Mon, 20 Aug 2007 17:05:04 -0700, "Reese, Terry" wrote: > > I'm assuming that what I'm trying to do is a fairly common on this list, > so I'm hoping someone can help me out. We are deploying a rails app. > using multiple mongrels, managed by mongrel_cluster and apache's > mod_balancer. All config information is below. As part of our setup, > we use memcache for sessioning -- which is my current problem. Sessions > are being set, however, it seems that each mongrel instance is > maintaining its own copy of the session data (does that make sense?). > What I'm seeing is that as data is being placed into session variables, > occasionally, an older instance of a session variable will be > resurrected. So if I'd placed "water" in a session variable to be used > for some action and then placed "fish" in the session variable to use > for some actions -- when I do those actions, sometimes I'm getting > "water" back when I query the session variable. It's almost like each > mongrel instance is using it's own "memcache" -- which doesn't make > sense because we only have a single memcache server running. > [...] Your key to debugging this is going to be using the -vv option to memcached to monitor the getting & setting of key/value pairs. I suspect it has to do with the memcache namespace. Additionally, you'd do best to serialize only the most basic of variables to sessions; I'd stick with Fixnums & Strings. Anything else is trouble, and trouble that doesn't always give you a nice error message. best, Erik Hetzner ;; Erik Hetzner, California Digital Library ;; gnupg key id: 1024D/01DB07E3 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070820/db813e54/attachment.html From rroasio at plexia.com Thu Aug 23 12:04:14 2007 From: rroasio at plexia.com (Riccardo Roasio) Date: Thu, 23 Aug 2007 18:04:14 +0200 Subject: [Mongrel] mongrel + pound + ziya problems Message-ID: <46CDAFFE.7000708@plexia.com> Hi, i'm using to ziya to display some graph. If i use it running mongrel as single instance all work good (very slow but work). If i try to use it with pound as htto proxy ziya charts wait forever for data...that never arrive. If i check the mongrel log it seemes to make queries on the database and retrieve data,but nothin appera. Anyone have an idea on how i can solve this problem? Thanks, Riccardo From wayneeseguin at gmail.com Thu Aug 23 12:22:46 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Thu, 23 Aug 2007 12:22:46 -0400 Subject: [Mongrel] mongrel + pound + ziya problems In-Reply-To: <46CDAFFE.7000708@plexia.com> References: <46CDAFFE.7000708@plexia.com> Message-ID: <8A285DD9-AF12-48E3-A54E-A5D80782E25D@gmail.com> On Aug 23, 2007, at 12:04 , Riccardo Roasio wrote: > Anyone have an idea on how i can solve this problem? Try it in ie, FireFox. Does it not work in both? One thing that can cause this is that ie improperly handles gzip compression for such graphs, so you have to turn it off for the graph urls. Let me know if this helps. ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070823/9962e018/attachment.html From rroasio at plexia.com Thu Aug 23 15:39:30 2007 From: rroasio at plexia.com (Riccardo Roasio) Date: Thu, 23 Aug 2007 21:39:30 +0200 Subject: [Mongrel] mongrel + pound + ziya problems In-Reply-To: <8A285DD9-AF12-48E3-A54E-A5D80782E25D@gmail.com> References: <46CDAFFE.7000708@plexia.com> <8A285DD9-AF12-48E3-A54E-A5D80782E25D@gmail.com> Message-ID: <46CDE272.1070203@plexia.com> I'm using Firefox by default. Yust to check i tryied also with InternetExplorer but is the same. Riccardo Wayne E. Seguin wrote: > On Aug 23, 2007, at 12:04 , Riccardo Roasio wrote: >> >> Anyone have an idea on how i can solve this problem? >> > > Try it in ie, FireFox. Does it not work in both? > > One thing that can cause this is that ie improperly handles gzip > compression for such graphs, so you have to turn it off for the graph > urls. > > Let me know if this helps. > > ~Wayne > > s///g > Wayne E. Seguin > Sr. Systems Architect & Systems Administrator > > ------------------------------------------------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users -- Riccardo Roasio Area Tecnica - Supporto Tecnico PLEXIA S.p.A.- Via de Marini, 1 - 16149 Genova - Italy Ufficio di Torino - Via Livorno 60 10100 Torino(TO) Tel. + 39-011-195665.1 Fax +39-011-195665.55 From wayneeseguin at gmail.com Thu Aug 23 17:23:35 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Thu, 23 Aug 2007 17:23:35 -0400 Subject: [Mongrel] mongrel + pound + ziya problems In-Reply-To: <46CDE272.1070203@plexia.com> References: <46CDAFFE.7000708@plexia.com> <8A285DD9-AF12-48E3-A54E-A5D80782E25D@gmail.com> <46CDE272.1070203@plexia.com> Message-ID: On Aug 23, 2007, at 15:39 , Riccardo Roasio wrote: > I'm using Firefox by default. > Yust to check i tryied also with InternetExplorer but is the same. Did you try turning gzip compression off for the graph urls? ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070823/9fec7318/attachment-0001.html From rroasio at plexia.com Fri Aug 24 03:01:03 2007 From: rroasio at plexia.com (Riccardo Roasio) Date: Fri, 24 Aug 2007 09:01:03 +0200 Subject: [Mongrel] mongrel + pound + ziya problems In-Reply-To: References: <46CDAFFE.7000708@plexia.com> <8A285DD9-AF12-48E3-A54E-A5D80782E25D@gmail.com> <46CDE272.1070203@plexia.com> Message-ID: <46CE822F.7020702@plexia.com> Sorry, but i don't understand what you mean... Where i can turn ogg gzip compressions for graphs url? Thanks,Riccardo Wayne E. Seguin wrote: > On Aug 23, 2007, at 15:39 , Riccardo Roasio wrote: >> I'm using Firefox by default. >> Yust to check i tryied also with InternetExplorer but is the same. > > Did you try turning gzip compression off for the graph urls? > > ~Wayne > > s///g > Wayne E. Seguin > Sr. Systems Architect & Systems Administrator > > ------------------------------------------------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users -- Riccardo Roasio Area Tecnica - Supporto Tecnico PLEXIA S.p.A.- Via de Marini, 1 - 16149 Genova - Italy Ufficio di Torino - Via Livorno 60 10100 Torino(TO) Tel. + 39-011-195665.1 Fax +39-011-195665.55 From wayneeseguin at gmail.com Fri Aug 24 07:24:02 2007 From: wayneeseguin at gmail.com (Wayne E. Seguin) Date: Fri, 24 Aug 2007 07:24:02 -0400 Subject: [Mongrel] mongrel + pound + ziya problems In-Reply-To: <46CE822F.7020702@plexia.com> References: <46CDAFFE.7000708@plexia.com> <8A285DD9-AF12-48E3-A54E-A5D80782E25D@gmail.com> <46CDE272.1070203@plexia.com> <46CE822F.7020702@plexia.com> Message-ID: <65595AD2-714C-4A16-9F41-1ACA04F11225@gmail.com> On Aug 24, 2007, at 03:01 , Riccardo Roasio wrote: > Sorry, but i don't understand what you mean... Where i can turn ogg > gzip > compressions for graphs url? Does pound use compression or is it simply a load balancer? Compression was what caused this exact issue for us but we used Nginx & Apache, so this is just a suggestion if pound uses compression. ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070824/4577bd3e/attachment.html From rroasio at plexia.com Fri Aug 24 08:39:30 2007 From: rroasio at plexia.com (Riccardo Roasio) Date: Fri, 24 Aug 2007 14:39:30 +0200 Subject: [Mongrel] mongrel + pound + ziya problems In-Reply-To: <65595AD2-714C-4A16-9F41-1ACA04F11225@gmail.com> References: <46CDAFFE.7000708@plexia.com> <8A285DD9-AF12-48E3-A54E-A5D80782E25D@gmail.com> <46CDE272.1070203@plexia.com> <46CE822F.7020702@plexia.com> <65595AD2-714C-4A16-9F41-1ACA04F11225@gmail.com> Message-ID: <46CED182.1020607@plexia.com> At the end i start using Gruff to create graphs.It work, so for now i think i will use it. I tryied also with Apache as http proxy but was the same. I will check for compression setting. Thanks a lot! Riccardo Wayne E. Seguin wrote: > On Aug 24, 2007, at 03:01 , Riccardo Roasio wrote: >> Sorry, but i don't understand what you mean... Where i can turn ogg gzip >> compressions for graphs url? > > Does pound use compression or is it simply a load balancer? > Compression was what caused this exact issue for us but we used Nginx > & Apache, so this is just a suggestion if pound uses compression. > > ~Wayne > > s///g > Wayne E. Seguin > Sr. Systems Architect & Systems Administrator > > ------------------------------------------------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users -- Riccardo Roasio Area Tecnica - Supporto Tecnico PLEXIA S.p.A.- Via de Marini, 1 - 16149 Genova - Italy Ufficio di Torino - Via Livorno 60 10100 Torino(TO) Tel. + 39-011-195665.1 Fax +39-011-195665.55 From mikeisgreat at gmail.com Sun Aug 26 16:09:27 2007 From: mikeisgreat at gmail.com (Michael Steinfeld) Date: Sun, 26 Aug 2007 16:09:27 -0400 Subject: [Mongrel] monit not executing start/stop/restart mongrels Message-ID: <3d5db09e0708261309u7e929b21sdcaed3c6a97f3785@mail.gmail.com> Alright, I have googles and read through the docs on monit I get this error when adding -v starting monit monit: Cannot connect to the monit daemon. Did you start it with http support? monit: Cannot connect to the monit daemon. Did you start it with http support? Am I missing something here? set daemon 120 set logfile syslog facility log_daemon set mailserver localhost set httpd port 28212 and #use address # only accept connection from localhost allow me # allow localhost to connect to the server and allow admin:password # require user 'admin' with password 'monit' check process mongrel_9000 with pidfile /var/run/mongrel_cluster/mongrel.9000.pid start program = "/usr/local/bin/mongrel_rails cluster::start -C /etc/mongrel_cluster/mongrel_cluster.yml --clean --only 9000" stop program = "/usr/local/bin/mongrel_rails cluster::stop -C /etc/mongrel_cluster/mongrel_cluster.yml --clean --only 9000" if totalmem is greater than 110.0 MB for 3 cycles then restart # eating up memory? if loadavg(5min) greater than 10 for 8 cycles then restart # bad, bad, bad if 20 restarts within 20 cycles then timeout # something is wrong, call the sys-admin group wwwapp ------- mongrel.yml ------- cwd: /home/wwwapp/current port: "9000" address: 127.0.0.1 log_file: log/mongrel.log pid_file: /var/run/mongrel_cluster/mongrel.pid environment: production servers: 10 group: wwwapp user: wwwapp I was using the monit script to start - "/etc/init.d/monit start" I have also tried "/usr/bin/monit -g www start all" My mongrel run as the user/group "wwwapp" any advice would really be appreciated. -- Michael Steinfeld Linux Admin/Developer AIM: mikesteinfeld GTALK: mikeisgreat at gmail.com From alexey.verkhovsky at gmail.com Sun Aug 26 16:32:48 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Sun, 26 Aug 2007 14:32:48 -0600 Subject: [Mongrel] monit not executing start/stop/restart mongrels In-Reply-To: <3d5db09e0708261309u7e929b21sdcaed3c6a97f3785@mail.gmail.com> References: <3d5db09e0708261309u7e929b21sdcaed3c6a97f3785@mail.gmail.com> Message-ID: <3945c4270708261332x58bf4523ie029ebaa45c26cd3@mail.gmail.com> > I get this error when adding -v starting monit > monit: Cannot connect to the monit daemon. Did you start it with http support? Monit command line contacts the main monit process via the http interface, and in your case it cannot reach it. So, either the main monit process is not running, or it is unreachable through the network. I suspect that you need to add "allow localhost" directive to the "set httpd" section. By the way, this is a wrong maillist (your problem has nothing to do with mongrel), here is a better place to ask questions about monit: http://lists.nongnu.org/mailman/listinfo/monit-general -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] From John.OGara at rococosoft.com Mon Aug 27 12:32:35 2007 From: John.OGara at rococosoft.com (John O'Gara) Date: Mon, 27 Aug 2007 17:32:35 +0100 Subject: [Mongrel] Mongrel Logging Message-ID: Hi, I want all my mongrel processes to log to a single file, I've set up a few clusters before and this seemed to be the default behaviour however the most recent cluster I've deployed each mongrel logs to its own file with its port number as an identifier. Rails 1.2.3 Mongrel 1.0.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070827/ae00a7a2/attachment.html From terry.reese at oregonstate.edu Mon Aug 27 15:43:53 2007 From: terry.reese at oregonstate.edu (Reese, Terry) Date: Mon, 27 Aug 2007 12:43:53 -0700 Subject: [Mongrel] Old sessions being restored Message-ID: <1454CCD2A8D4B74F9EEE8CB68C891CC9019CFE1A@NWS-EXCH3.nws.oregonstate.edu> So, this is an update to an early query. We have a single server running 5 mongrel instances. We use apache's mod_proxy_balancer to distribute requests between the mongrel instances. For the time being, I've setup SQLSession as my session manager so I can see data being written into an sql database. My question. If rails has difficulty restoring a requested session, will it simply restore and old session? I ask because what I'm seeing is odd. I can see the session created in the database -- the session id being passed correctly -- however, on next access, the application will restore a set of older session values and replace the current data with the re-written values in the database. I'm not seeing any errors in any of the log files. The problem is identical whether I'm using the STICKYSESSION cookie with the balancer or not. At this point, I'm looking for ideas because this sessioning behavior doesn't make any sense to me. Something, somewhere, is maintaing old session data and is re-writing it back to the application. At this point, I'm trying to figure out where it might be coming from. Thanks, --TR -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070827/e19dcc35/attachment.html From neongrau at gmail.com Fri Aug 31 07:35:45 2007 From: neongrau at gmail.com (Ralf Vitasek) Date: Fri, 31 Aug 2007 13:35:45 +0200 Subject: [Mongrel] Semi-OT: any tips on how to track down memory leaks? Message-ID: <7adba8e60708310435v6f38555cq7beb35550f58ded7@mail.gmail.com> hello list! i seem to have a serious memory leak in my rails app that i run with a bunch of mongrels on windows (as services). i tried the MemoryProfiler i found at http://scottstuff.net/blog/articles/2006/08/17/memory-leak-profiling-with-rails but honestly i have no idea on how to read those string dumps. i tried diffing them but nothing there made any sense to me. any tips or hints would be greatly appreciated! best regards Ralf