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
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.
- 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]