Here are the ones I tried. Hope the comments aren’t too confusing
- Simple Rails Log Query Analyzer
- Ran
ruby bin/query_log_analyzer.rb ../log/production.log
production.log.1 (small log file ~25MB) Just printed the “Totals” heading with no results
production.log (large log file ~400MB) Ran for a long time and nothing happened
Read the rest of this entry »
Tags: log analyzers, logger, logs, production.log, query, rails, railscast.com, rawk.rb, ruby on rails
No Comments »
Posted by: alex in Errors
I noticed this error during a deployment of numerous servers that were configured with litespeed, postgreSQL, and ruby. The installation process was to install ruby, install ruby gems, install postgreSQL, install litespeed, and then sync up the web directory using SVN. After doing so connect via a browser to the server to test things out. On one server I was getting a “503 Service Unavailable” error. The lshttpd(litespeed) logs looked like the below example.
lshttpd errors
2008-09-30 03:31:09.201 [INFO] Pid: 9242 associated with [Rails:example-site:/]
2008-09-30 03:31:09.201 [INFO] [Rails:example-site:/] pid list size: 0, pid stop list size: 0
2008-09-30 03:31:09.201 [NOTICE] [Rails:example-site:/] stop worker processes
2008-09-30 03:31:09.201 [INFO] [Rails:example-site:/] 1 request being processed, kill external app later.
2008-09-30 03:31:09.201 [INFO] [10.0.0.10:3664-0#example-site] connection to [uds://tmp/lshttpd/example-site:_.sock] on request #0, error: Connection reset by peer!
2008-09-30 03:31:09.203 [INFO] [Rails:example-site:/] add child process pid: 9268
2008-09-30 03:31:09.203 [INFO] [Rails:example-site:/] pid list size: 1
2008-09-30 03:31:19.024 [INFO] [10.0.0.10:3664-0#example-site] No request delivery notification has been received from LSAPI process:-2, possible run away process.
2008-09-30 03:31:19.024 [INFO] [10.0.0.10:3664-0#example-site] connection to [uds://tmp/lshttpd/example-site:_.sock] on request #0, error: Connection timed out!
2008-09-30 03:31:19.025 [NOTICE] [10.0.0.10:3664-0#example-site] oops! 503 Service Unavailable
2008-09-30 03:31:19.025 [NOTICE] [10.0.0.10:3664-0#example-site] Content len: 0, Request line:
After a bit of searching I pinned the issue down to having missed installing one of the ruby gems. If you are in this situation use the “gem list” command to list all of the gems on the server and make sire that you are not trying to load gems that are not installed. Once the missing gem was installed there were no more 503 errors and things were rocking.
Tags:
503,
gem,
lighttpd,
Litespeed,
PostgreSQL,
rails,
Ruby,
Service Unavailable,
svn
No Comments »
Posted by: alex in Discussions
I created this site as a way for people to post errors, get responses, and learn in general. I have been a sysadmin in some sort of capacity for going on 10 years now and am just getting around to tackling being a programmer. Currently I have some shell scripting experience but overall I am just not a programmer. I doubt this will get many responses right away since the site is so new but I wanted feedback on what peoples opinion on the path someone should take to become a programmer. I am mad at myself for not jumping into this earlier but better late than never. I have decided to learn using Ruby and technically Ruby on Rails.
Read the rest of this entry »
Tags:
learning,
programming,
rails,
Ruby,
ruby on rails
2 Comments »
Posted by: Justin in Insights
Ruby on Rails 1.2 and above automatically set a Content-type header including charset=UTF-8, which is well and good if you’re designing an application from scratch - JoelOnSoftware has a good introduction to character sets, for those who need a refresher - but breaks things in subtle ways if you are upgrading a legacy Rails 1.1 application. The (poorly documented at best) solution to this problem is to add a line to the config block of environment.rb to set config.action_controller.default_charset:
Rails::Initializer.run do |config|
config.action_controller.default_charset = "iso-8859-1"
end
Tags:
ActionController,
charset,
rails,
Ruby,
unicode
No Comments »
I just installed FiveRuns TuneUp it’s great! A small header shows up on all your apps (see attachment). I run it locally only
It’s drop dead easy to install:
- To add TuneUp to your Rails application, install the gem:
sudo gem install fiveruns_tuneup
- Then, for a Rails 2.0.x app, run:
fiveruns_tuneup /path/to/rails/app
- For a Rails 2.1 app, update your environment.rb to include this line:
config.gem ‘fiveruns_tuneup’
- Launch your Rails app and you’ll see the header to sign up for for a free account view the stats.

Tags:
application,
fiveruns,
rails,
ruby on rails,
tuneup
No Comments »