[TriLUG] ulimit violations

John Berninger johnw at berningeronline.net
Thu Jul 14 19:11:06 EDT 2005


On Thu, 14 Jul 2005, 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),
> so it could be any or none of them really:
> 
> $ ulimit -a
> core file size        (blocks, -c) 0
> data seg size         (kbytes, -d) unlimited
> file size             (blocks, -f) unlimited
> max locked memory     (kbytes, -l) 4
> max memory size       (kbytes, -m) unlimited
> open files                    (-n) 1024
> pipe size          (512 bytes, -p) 8
> stack size            (kbytes, -s) 10240
> cpu time             (seconds, -t) unlimited
> max user processes            (-u) 7168
> virtual memory        (kbytes, -v) unlimited

        ulimits can also be set in startup scripts - and quite often
are, especially for apache and tomcat.  Check the /etc/init.d scripts
for tomcat and apache for modified ulimit values.  Capturing sysrq
information every <foo> seconds might help as well, too, but make sure
you've got a decent amount of space to spool the sysrq's to.  It's text,
but it can add up.


-- 
John Berninger
                                                                                
GPG Key ID: A8C1D45C
        Fingerprint: B1BB 90CB 5314 3113 CF22  66AE 822D 42A8 A8C1 D45C

Ita erat quando hic adveni.
--



More information about the TriLUG mailing list