[TriLUG] ulimit violations

T. Bryan tbryan at python.net
Thu Jul 14 19:08:56 EDT 2005


On Thursday 14 July 2005 17:16, Timothy A. Chagnon wrote:
> I have a mis-behaving Tomcat webapp (that I didn't write) which likes to
> increase its memory size from ~80M on startup to ~125M after some amount
> of usage at which point it crashes with OutOfMemoryException.  Obviously
> the devs need to fix whatever memory they're leaking or filehandles
> they've left open so that the thing is actually scalable.
>
> What I'd like to know though, is if I can find a log file or other hook
> where I can see if it's hitting a ulimit and which one.  The 125M
> doesn't seem to correlate to any of the set ones (default RHEL3, iirc),

The JVM itself also normally limits how much memory an application can have.  
Use
java -X 
to see the non-standard options your JVM supports.  You can probably see 
whether you're hitting the JVM max heap size by setting something like 
java -Xmx95M however_else_you_start_your_app
Then you can just watch and see whether it dies at 95 M instead of 125 M.  

If you're just using Tomcat, then you may instead need to set some environment 
variables for the Tomcat scripts to pass to the JVM.

---Tom




More information about the TriLUG mailing list