Posts Tagged ‘apache’

Length Errors in Apache Bench

May 4th, 2009

Are you seeing errors for content length in your Apache Bench tests of your webserver?

I had a hell of a time wondering what was going wrong with my webserver under load and finally found the answer here.

Turns out that Apache Bench takes the first pulled request and compares the length to all subsequent requests. Makes sense for a purely static page, but when you have a random image cropping up, you’re sure to see at least a couple bits difference in length.

So if you’re serving straight, hand coded HTML, enjoy the feeling of knowing that you’re getting the same length content each and every time… but if you’re like the rest of us (and anyone who would actually be using Apache Bench) feel free to rage that there’s no command line switch to turn off that silly notification.

mod_rails && apache || mongrel && nginx

April 3rd, 2009

Switch…

That’s all I have to say. Passenger/mod_rails is so much faster and more competent at serving my crappy RoR code than my hacked together mongrel/nginx scheme that I had before.

My ram usage spikes much more when visitors hit the site, but never starts swapping. The increased ram usage is more than worth it for the HUGELY increased speed that I’m seeing by the dynamic mongrel management.

Even better, when the visitors leave (as often happens), the ram usage settles down to the same place it did with my nginx and mongrel combo.

Enjoy the increased speed and stability AMDavidson.com visitors.

Gem issues with Passenger

March 31st, 2009

I was ignorantly happily letting my gems be pulled in automatically on my previous server using Nginx + Mongrel_Cluster and this seemed to pose no problems.

BUT! when I switched to a new host, I went with an Apache + Passenger (mod_rails) setup and my servers would start but would just offer “Error 500″.

I checked the logs and it seemed that it wasn’t loading RedCloth so I added the following to my environment.rb file and it all worked fine!

1
2
3
# config/environment.rb
require 'rubygems'
require 'redcloth'