I love Ruby on Rails, but the underlying platform leaves something to be desired. I''m running Apache 2 + Rails 0.13.1 + Mysql + mod_fastcgi (dynamic) on a Redhat Enterprise 3 dedicated under a moderately low load. The site is intermittently slow, and the server has to be restarted at least weekly. Memory usage is quite high (700mb of 1gb). I''ve seen solutions/workarounds to specific issues, but it would be nice to have a checklist of potential issues and their solutions to look at. It would also be great to have a script to cronjob that would check up on my server, and make sure things are in order. I know these things exist out there, but I can''t find exactly what I need. Can anyone give me a pointer or two? Thanks! Kyle Maxwell
On Fri, 2005-09-23 at 15:53 -0700, Kyle Maxwell wrote:> I love Ruby on Rails, but the underlying platform leaves something to > be desired. I''m running Apache 2 + Rails 0.13.1 + Mysql + mod_fastcgi > (dynamic) on a Redhat Enterprise 3 dedicated under a moderately low > load. The site is intermittently slow, and the server has to be > restarted at least weekly. Memory usage is quite high (700mb of 1gb). > > I''ve seen solutions/workarounds to specific issues, but it would be > nice to have a checklist of potential issues and their solutions to > look at. It would also be great to have a script to cronjob that > would check up on my server, and make sure things are in order. I > know these things exist out there, but I can''t find exactly what I > need. > > Can anyone give me a pointer or two? Thanks! > Kyle MaxwellYour app is sucking up 700 MB? I think the Rails wiki was sucking up like 500+ without a database... so something else must be happening. What version of the fcgi gem do you have installed? (there was a bad leak version several months ago) Are you running in Production or Development mode (environment.rb)? -Robby -- /****************************************************** * Robby Russell, Owner.Developer.Geek * PLANET ARGON, Open Source Solutions & Web Hosting * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 * www.planetargon.com | www.robbyonrails.com *******************************************************/
I switched from lighttpd/fast_cgi to lighttpd/scgi_rails last night... Check this out: http://www.zedshaw.com/projects/scgi_rails/ So far (24+ hours), my server hasn''t gone crazy like it usually does with fast_cgi. Also using RHEL 3. I have other sites relying on Apache 1.3, so I use mod_proxy for virtual hosts running rails. Adam On 9/23/05, Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> wrote:> > I love Ruby on Rails, but the underlying platform leaves something to > be desired. I''m running Apache 2 + Rails 0.13.1 + Mysql + mod_fastcgi > (dynamic) on a Redhat Enterprise 3 dedicated under a moderately low > load. The site is intermittently slow, and the server has to be > restarted at least weekly. Memory usage is quite high (700mb of 1gb). > > I''ve seen solutions/workarounds to specific issues, but it would be > nice to have a checklist of potential issues and their solutions to > look at. It would also be great to have a script to cronjob that > would check up on my server, and make sure things are in order. I > know these things exist out there, but I can''t find exactly what I > need. > > Can anyone give me a pointer or two? Thanks! > Kyle Maxwell > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Not sure how committed you are to using RHEL, but I''ve had a phenomenal experience with FreeBSD + lighttpd + PostgreSQL + Rails. So good, in fact, that I started flpr.org to show people how to install it. You can definitely keep using MySQL, but rails + lighttpd + FreeBSD is a truly great combination. On 9/23/05, Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> wrote:> I love Ruby on Rails, but the underlying platform leaves something to > be desired. I''m running Apache 2 + Rails 0.13.1 + Mysql + mod_fastcgi > (dynamic) on a Redhat Enterprise 3 dedicated under a moderately low > load. The site is intermittently slow, and the server has to be > restarted at least weekly. Memory usage is quite high (700mb of 1gb). > > I''ve seen solutions/workarounds to specific issues, but it would be > nice to have a checklist of potential issues and their solutions to > look at. It would also be great to have a script to cronjob that > would check up on my server, and make sure things are in order. I > know these things exist out there, but I can''t find exactly what I > need. > > Can anyone give me a pointer or two? Thanks! > Kyle Maxwell > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I''m running RHEL 3, 1Gbyte RAM, and everything you list, except I''m using Apache 1.3. We''ve rebooted the servers once since last November to apply a kernel patch. Nary a problem. System is always fast. RHEL 3 seems bomb-proof. I''d consider switching to Apache 1.3, and make sure you''ve got the fastcgi version that patches the memory leak--search the list for details, I can''t remember right now. Also, make sure fastcgi is configured right on the apache side. Search for DHH''s posting on this issue. You might look at Nagios for monitoring your server--we''ve started running it, and it''s pretty slick. Dave On 9/23/05 4:53 PM, "Kyle Maxwell" <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> wrote:> I love Ruby on Rails, but the underlying platform leaves something to > be desired. I''m running Apache 2 + Rails 0.13.1 + Mysql + mod_fastcgi > (dynamic) on a Redhat Enterprise 3 dedicated under a moderately low > load. The site is intermittently slow, and the server has to be > restarted at least weekly. Memory usage is quite high (700mb of 1gb). > > I''ve seen solutions/workarounds to specific issues, but it would be > nice to have a checklist of potential issues and their solutions to > look at. It would also be great to have a script to cronjob that > would check up on my server, and make sure things are in order. I > know these things exist out there, but I can''t find exactly what I > need. > > Can anyone give me a pointer or two? Thanks! > Kyle Maxwell > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> Not sure how committed you are to using RHEL, but I''ve had a > phenomenal experience with FreeBSD + lighttpd + PostgreSQL + Rails. > So good, in fact, that I started flpr.org to show people how to > install it. You can definitely keep using MySQL, but rails + lighttpd > + FreeBSD is a truly great combination.Agreed. FreeBSD + lighttpd + Rails is amazing. Ive been trying to use sqlite3 for my projects when possible which boosts performance even higher by its nature of being file based. Joe
Why is FreeBSD + lighttpd + PostgreSQL + Rails "amazing"? what''s so good about this combination of technologies? Can "amazing" be quantified? Thanks Andrew Stuart Managing Director Flat Rate Recruitment Head Office: 170 Dorcas Street South Melbourne, Victoria 3205 Phone: 1300 55 91 92 Phone 03 9696 1616 Fax: +61 3 9686 6680 Mobile: 0417 034 241 Email: andrew.stuart-EHINDgXnq7QrV/aubVXsvDvXrrhHudLZEK66K81epY8@public.gmane.org Web: http://www.FlatRateRecruitment.com.au ----- Original Message ----- From: "Joe Noon" <joenoon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> Sent: Saturday, September 24, 2005 11:20 AM Subject: Re: [Rails] Solving fcgi, etc flakiness> Not sure how committed you are to using RHEL, but I''ve had a > phenomenal experience with FreeBSD + lighttpd + PostgreSQL + Rails. > So good, in fact, that I started flpr.org to show people how to > install it. You can definitely keep using MySQL, but rails + lighttpd > + FreeBSD is a truly great combination.Agreed. FreeBSD + lighttpd + Rails is amazing. Ive been trying to use sqlite3 for my projects when possible which boosts performance even higher by its nature of being file based. Joe _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Andrew, Anecdotally, you have the ''best of breed'' for each component there. It''s very much a ''geek factor'' quantification, and very likely to ignite flamewars over what is and isn''t the best technology. But basically speaking: * FreeBSD - very nice OS, considered by many to be ''cleaner'' than Linux. * lighttpd - A simple, lightweight yet robust webserver. Apache without all the cruft that you''d generally never use. * PostgreSQL - The most advanced and reliable open source database available today. Huge feature set, and its performance and reliability are on par with its commerical couterparts. * Rails - well, ''nuff said. Hope that helps! -David Felstead On 9/24/05, Andrew Stuart <andrew.stuart-TWq/lk6o2i4FZYWR8B6FNDvXrrhHudLZEK66K81epY8@public.gmane.org> wrote:> Why is FreeBSD + lighttpd + PostgreSQL + Rails "amazing"? > > what''s so good about this combination of technologies? > > Can "amazing" be quantified? > > Thanks > > Andrew Stuart > Managing Director > > Flat Rate Recruitment > Head Office: > 170 Dorcas Street > South Melbourne, Victoria 3205 > > Phone: 1300 55 91 92 > Phone 03 9696 1616 > Fax: +61 3 9686 6680 > Mobile: 0417 034 241 > Email: andrew.stuart-EHINDgXnq7QrV/aubVXsvDvXrrhHudLZEK66K81epY8@public.gmane.org > Web: http://www.FlatRateRecruitment.com.au > > > > ----- Original Message ----- > From: "Joe Noon" <joenoon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Sent: Saturday, September 24, 2005 11:20 AM > Subject: Re: [Rails] Solving fcgi, etc flakiness > > > > Not sure how committed you are to using RHEL, but I''ve had a > > phenomenal experience with FreeBSD + lighttpd + PostgreSQL + Rails. > > So good, in fact, that I started flpr.org to show people how to > > install it. You can definitely keep using MySQL, but rails + lighttpd > > + FreeBSD is a truly great combination. > > Agreed. FreeBSD + lighttpd + Rails is amazing. Ive been trying to > use sqlite3 for my projects when possible which boosts performance > even higher by its nature of being file based. > > Joe > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> Why is FreeBSD + lighttpd + PostgreSQL + Rails "amazing"?BSD: best ip stack of any OS hands down no question. (I''m a debian freak, I don''t run freebsd in production but I have, so this is coming from a linux-head). lighttpd: stable fcgi, insane performance, simple but powerful configuration. good for servers dedicated to a single (or a couple) apps. bad for mass hosting, no apache style vhosts. I currently use this in production and it rules. extremely useful modules for web app devs. (secdownload!) postgres: the real database (tm) ;). Seriously: many "robust" tools that mysql lacks. Much better stability with large datasets. I like mysql, I use it in production, but I think postgres is a better, more stavle DB. Rails: we all know this ;) _a> what''s so good about this combination of technologies? > > Can "amazing" be quantified? > > Thanks > > Andrew Stuart > Managing Director > > Flat Rate Recruitment > Head Office: > 170 Dorcas Street > South Melbourne, Victoria 3205 > > Phone: 1300 55 91 92 > Phone 03 9696 1616 > Fax: +61 3 9686 6680 > Mobile: 0417 034 241 > Email: andrew.stuart-EHINDgXnq7QrV/aubVXsvDvXrrhHudLZEK66K81epY8@public.gmane.org > Web: http://www.FlatRateRecruitment.com.au > > > > ----- Original Message ----- > From: "Joe Noon" <joenoon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Sent: Saturday, September 24, 2005 11:20 AM > Subject: Re: [Rails] Solving fcgi, etc flakiness > > >> Not sure how committed you are to using RHEL, but I''ve had a >> phenomenal experience with FreeBSD + lighttpd + PostgreSQL + Rails. >> So good, in fact, that I started flpr.org to show people how to >> install it. You can definitely keep using MySQL, but rails + lighttpd >> + FreeBSD is a truly great combination. > > Agreed. FreeBSD + lighttpd + Rails is amazing. Ive been trying to > use sqlite3 for my projects when possible which boosts performance > even higher by its nature of being file based. > > Joe > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 9/23/05, Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> wrote:> > I love Ruby on Rails, but the underlying platform leaves something to > be desired. I''m running Apache 2 + Rails 0.13.1 + Mysql + mod_fastcgi > (dynamic) on a Redhat Enterprise 3 dedicated under a moderately low > load. The site is intermittently slow, and the server has to be > restarted at least weekly. Memory usage is quite high (700mb of 1gb). > > I''ve seen solutions/workarounds to specific issues, but it would be > nice to have a checklist of potential issues and their solutions to > look at.You need to start from square one and just debug it a step at a time. What application is using the memory? When the site slows down have you run top or other tools to take a look and see what is going on? Find out who the culprit is first and then go from there. Assuming the problem stems from your apache/rails setup, it''s probably a memory in your code or in a library you are using. And are you rebooting the whole server or just restarting apache? Chris _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
>From the sound of the enthusiasm I had thought that this OS/web servercombination yielded quantifiable improvements in performance or stability or something. But it sounds like its a bit more like barracking for the Sydney Swans football team instead of the West Coast Eagles. Andrew ----- Original Message ----- From: "David Felstead" <david.felstead-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> Sent: Saturday, September 24, 2005 1:37 PM Subject: Re: [Rails] Solving fcgi, etc flakiness Hi Andrew, Anecdotally, you have the ''best of breed'' for each component there. It''s very much a ''geek factor'' quantification, and very likely to ignite flamewars over what is and isn''t the best technology. But basically speaking: * FreeBSD - very nice OS, considered by many to be ''cleaner'' than Linux. * lighttpd - A simple, lightweight yet robust webserver. Apache without all the cruft that you''d generally never use. * PostgreSQL - The most advanced and reliable open source database available today. Huge feature set, and its performance and reliability are on par with its commerical couterparts. * Rails - well, ''nuff said. Hope that helps! -David Felstead On 9/24/05, Andrew Stuart <andrew.stuart-TWq/lk6o2i4FZYWR8B6FNDvXrrhHudLZEK66K81epY8@public.gmane.org> wrote:> Why is FreeBSD + lighttpd + PostgreSQL + Rails "amazing"? > > what''s so good about this combination of technologies? > > Can "amazing" be quantified? > > Thanks > > Andrew Stuart > Managing Director > > Flat Rate Recruitment > Head Office: > 170 Dorcas Street > South Melbourne, Victoria 3205 > > Phone: 1300 55 91 92 > Phone 03 9696 1616 > Fax: +61 3 9686 6680 > Mobile: 0417 034 241 > Email: andrew.stuart-EHINDgXnq7QrV/aubVXsvDvXrrhHudLZEK66K81epY8@public.gmane.org > Web: http://www.FlatRateRecruitment.com.au > > > > ----- Original Message ----- > From: "Joe Noon" <joenoon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Sent: Saturday, September 24, 2005 11:20 AM > Subject: Re: [Rails] Solving fcgi, etc flakiness > > > > Not sure how committed you are to using RHEL, but I''ve had a > > phenomenal experience with FreeBSD + lighttpd + PostgreSQL + Rails. > > So good, in fact, that I started flpr.org to show people how to > > install it. You can definitely keep using MySQL, but rails + lighttpd > > + FreeBSD is a truly great combination. > > Agreed. FreeBSD + lighttpd + Rails is amazing. Ive been trying to > use sqlite3 for my projects when possible which boosts performance > even higher by its nature of being file based. > > Joe > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> Why is FreeBSD + lighttpd + PostgreSQL + Rails "amazing"? > what''s so good about this combination of technologies? > Can "amazing" be quantified? > Thanks > Andrew Stuart > Managing DirectorGlad to see a couple people step in there and assist with the answers to this. I didn''t mean much to be made of the word "amazing"; I obviously didn''t write enough to indicate I was attempting to create a solid argument. To better explain, if I were to qualify my statement: I would solely qualify the statement on experience. Experience with combinations of the aforementioned OS'', web servers and databases has brought me to those conclusions. There is no definitive way to qualify whats "best" - you either believe someone, or you find out on your own. The same goes for this statement: Those involved in the Rails community have led me to the "right" things to use countless times... more frequently than I have ever experienced anywhere else. A quick example: Rails led me to Ruby, The Pragmatic Programmers, 37signals, and to Textdrive; Textdrive led me to DNSMadeEasy and FreeBSD. Rails and Textdrive together led me to lighttpd. And how did this all start? I believed DHH that Rails was the way to go - I trusted his experience. 4 months down the road, I cant complain! Pick someone you think you can trust, trust them, draw your own conclusions, and be happy if your conclusions match theirs. Joe
> I think the Rails wiki was sucking up like 500+ without a database... so > something else must be happening.Madeleine, the in-memory persistence engine, was taking 500MB. Got nothing to do with Rails. Just wanted to make that clear. -- David Heinemeier Hansson http://www.loudthinking.com -- Broadcasting Brain http://www.basecamphq.com -- Online project management http://www.backpackit.com -- Personal information manager http://www.rubyonrails.com -- Web-application framework
RHEL 3? Where did you get your Ruby RPM? I haven''t been able to find a Ruby 1.8.2 RPM for my CentOS 4.1 (RHEL 4 clone) box, so I can''t run Rails on it. The Ruby that comes with it is 1.8.1. BTW, for those who can''t afford RHEL anything, there are a couple of clones out there that are rebuilt from the RHEL publicly available source. I mostly use CentOS, but Tao and White Box Linux are pretty close. I''m not at all sure how the folks at White Box (Beauregard Parish, LA) are doing ... they managed to escape the wrath of Katrina for the most part but it looks like they might have taken a hit from Rita. Dave Ringoen wrote:>I''m running RHEL 3, 1Gbyte RAM, and everything you list, except I''m using >Apache 1.3. > >We''ve rebooted the servers once since last November to apply a kernel patch. >Nary a problem. System is always fast. RHEL 3 seems bomb-proof. > >I''d consider switching to Apache 1.3, and make sure you''ve got the fastcgi >version that patches the memory leak--search the list for details, I can''t >remember right now. Also, make sure fastcgi is configured right on the >apache side. Search for DHH''s posting on this issue. > >You might look at Nagios for monitoring your server--we''ve started running >it, and it''s pretty slick. > >Dave > > >On 9/23/05 4:53 PM, "Kyle Maxwell" <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> wrote: > > > >>I love Ruby on Rails, but the underlying platform leaves something to >>be desired. I''m running Apache 2 + Rails 0.13.1 + Mysql + mod_fastcgi >>(dynamic) on a Redhat Enterprise 3 dedicated under a moderately low >>load. The site is intermittently slow, and the server has to be >>restarted at least weekly. Memory usage is quite high (700mb of 1gb). >> >>I''ve seen solutions/workarounds to specific issues, but it would be >>nice to have a checklist of potential issues and their solutions to >>look at. It would also be great to have a script to cronjob that >>would check up on my server, and make sure things are in order. I >>know these things exist out there, but I can''t find exactly what I >>need. >> >>Can anyone give me a pointer or two? Thanks! >>Kyle Maxwell >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> > > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- M. Edward (Ed) Borasky http://www.borasky-research.net/ http://borasky-research.blogspot.com/ http://pdxneurosemantics.com http://pdx-sales-coach.com http://algocompsynth.com