Here are a couple of issues and/or fixes if you are running a Rails/Mysql application on a 256MB server - specifically I am (was) running a web site built using Radiant (a Rails/Mysql based CMS) on a 256MB slice at Slicehost.
The site is effectively static but this weekend Slicehost sent me an automated email telling me the slice was swapping heavily. Turns out that the default settings for Mysqld use the InnoDB engine and that chews up a lot of memory - well over 150MB.
Two solutions - turn off InnoDB or upgrade to a slice with more memory (for just under twice the cost).
To turn off InnoDB go into /etc/mysql/my.cnf, uncomment the line 'skip-innodb' and restart. That should drop your memory use by around 100MB.
But the settings for my existing Radiant app (running with Rails 2.3.2) appear to require InnoDB and Phusion Passenger fails to start the app with that setting.
Rather than mess with an app that has been fine, I decided to upgrade to a large slice. I dumped the database contents as a precaution but then just followed the resize steps from the Slicehost slice management page. Worked like a charm - everything came back up and works fine. Running 'free -m' or 'top' shows I've got memory to spare for now. It's costing me $38/month instead of $20, but I can stay with a default configuration for my database, etc. and that is worth quite a bit in itself.
A collection of computer systems and programming tips that you may find useful.
Brought to you by Craic Computing LLC, a bioinformatics consulting company.
Wednesday, May 27, 2009
Subscribe to:
Post Comments (Atom)
Contributors
Archive of Tips
-
►
2011
(44)
-
►
November
(11)
- strsplit in R
- Running R scripts on the Command Line
- Deleting a File that starts with '-' on UNIX
- Plotting a simple bar plot in R
- Captain Beefheart Song Titles
- When jQuery $.ajax() keeps returning the same valu...
- Updating a DIV with jQuery and Sinatra
- Latest version of jQuery on Google APIs
- Sorting on multiple String keys in Ruby
- Manipulating Model/Table/Controller Names in Rails...
- Parsing 96 / 384 well Plate Maps
-
►
February
(14)
- Rails, UTF-8 and Heroku
- Tables named with reserved words in MySQL
- Setting up PostgreSQL on Mac OS X 10.6
- Problem with sqlite when installing the taps ruby ...
- Rails, Devise and custom User models
- Basic image rollover effect in jQuery
- Authentication in Mongo and Mongoid
- Always index columns that you want to sort on in M...
- Using Mongoid in Ruby applications outside of Rail...
- Using Twitter for System Notifications
- PATSY - a web service that makes patents easier to...
- JavaScript Bookmarklet that can create a New Windo...
- Running a Ruby 1.9 Sinatra app on Heroku
- Ruby 1.9 and incompatible character encodings
-
►
November
(11)
1 comments:
I recently came across your blog and have been reading along. I think I will leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
By : http://www.factspenisenlargement.com
Post a Comment