ColdFusion/Railo on Tomcat: Request Timeouts
Posted on July 19, 2011 at 6:49 PM in ColdFusion, Railo
This is totally basic stuff for those who are use to a Tomcat setup, but for those who are new (or relatively new, like myself) to Tomcat, it's critical information. Hopefully by posting it I will do two things:
- Help someone else
- Remember it myself
Head injuries can lead to memory issues. Trust me, I know this first hand. And there are lots of symptoms of memory issues. One such symptom would be a ColdFusion or Railo process that takes a lot longer than it should.
Today I was working with a process that I anticipated taking ~90 seconds to complete. Lots of objects and database activity involved. However, even with a <cfsetting requesttimeout="1200" /> in place - yes, 20 minutes - the process was still timing out. I could not for the life of me figure out why.
Huge props to Jamie Krug for pointing me in the right direction. You see, Tomcat installs with a pretty low default configuration for memory. In my case, it was set at 128M. Ouch.
First stop Tomcat. Now open up /path/to/tomcat/bin/setenv.sh and look for the -Xmx and/or -Xms settings. I had only one (-Xmx, as I recall), so I added the other, and set both to 1024M.
- -Xms1024M -Xmx1024M
Save the setenv.sh file, Start up Tomcat again.
After doing this I re-ran the process that was timing out at 20 minutes, and it completed successfully in...................... 72 seconds.
Now if only I can figure out a way to fix my memory. :D
HTH
UPDATE [7-18-2011]
I should have noted that this was a standard apt-get install of Tomcat 6 on a development machine that had not yet seen any tweaks.
I should also note that I am by no means any sort of authority on JVM tuning. For that kind of authoritative information I would steer you toward Mike Brunt or Railo Consulting. :D
Latest Articles
- No recent entries.
Categories
- ColdBox (21) [RSS]
- ColdFusion (92) [RSS]
- Fusebox (3) [RSS]
- General (22) [RSS]
- jQuery (15) [RSS]
- Kalendar (1) [RSS]
- Linux (1) [RSS]
- Mura CMS (1) [RSS]
- Railo (1) [RSS]
- Rants (5) [RSS]
- Transfer (8) [RSS]
- Uni-Form Tag Library (36) [RSS]
Quick Links
Blogs I Read
Calendar
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
« Sep | ||||||
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Subscribe
Enter a valid email address.
There are no comments for this entry.
[Add Comment]