Meandering Out Loud

Don Thorp’s Musing, Muttering, and Mischief Along a Random Path

Slow Tomcat Mystery Solved!

Before you say…”you really should pay more attention”, I just want you to know
I’ve been REALLY swamped at work. We have a really important deadline
looming so I had to let some things slide. On to the mystery!

For the last couple of weeks I’ve been wondering why this website has been
taking 5 to 6 seconds to return a page. This website and
John’s are
webapps under Tomcat 3.2.2 and have been running that way for quite a while.
When we first set up our sites, I remember being impressed with the
responsiveness of Tomcat. But lately, it has been depressingly slow and I
just couldn’t imagine why. The normal Apache sites were responding very
nicely, but the JSP based sites were sluggish.

Having a hard time waking up this morning, I decided to do a little
sleuthing. I spent a good deal of time with
my friends google and the Tomcat mailing list archives and found absolutely
nothing that was related to my problem. Finally waking up at the office and
getting busy, I forgot my search … for a while.

Having a few extra minutes before bedtime, I decided to explore the server. Acting on a
whim, I decided to check disk utilization. At this point in my story most of you
probably just slapped you head and said “DUH! What do you expect!” and you’d
be right /var was out of space.

Knowing how expensive exceptions can be in general, and especially since
Tomcat was logging to /var I decided to do some spring cleaning. After
moving the logs to another filesystem for archiving, I
restarted the server and then slapped my own head.

My website returned in < 3 seconds on the first pull and < 2 seconds on the second.
John’s site being lighter weight than mine
now has a sub-second response time! All this time I had been worrying about
Tomcat as a deployment platform, and it was simple sloth (on my part) that
caused the whole thing.

Post Metadata

April 17th, 2002

Don Thorp



Leave a Reply