You might want to try "jconsole" or something to figure out if you're 
running out of heap space.  Depending on what your application does 512 
MBytes may not be enough.  With 2GB of physical RAM on the machine you 
can probably afford to allow the JVM more memory.

When you get close to 1024 open files, try to figure out what those file 
handles represent, with a command like "lsof -p 32335 | awk '{ print $5 
}' | sort | uniq -c" where 32335 is the process id of the JVM.  Are they 
all files (REG) or sockets (IPv4/IPv6)?

A long shot: I assume the stack size you report is from "ulimit -s" 
which reports in kilobytes.  Resin's startup script by default sets the 
"-Xss" switch for the JVM to limit the stack size to 1 Megabyte.  Make 
sure that is the case for your installation as well, for example with 
"cat /proc/32335/cmdline | tr \\0 \\n | fgrep -- -Xss" where 32335 is 
the Resin JVM process id.  Otherwise you have up to 2048 threads * 
10MB/thread = 20GByte of address space.  If you're on a 32 bit CPU that 
won't work.  You're likely to have problems at 2GByte (the OS, JVM, etc 
want some address space too), which means about 200 simultaneous threads.


> hi All,
> Well I used resin for few months now ... but i'm really sorry to say its a
> bad experience. At the moment my settings are,
> Server - RHEL (with 2 pros.)
> RAM - 2 GB
> Resin-pro-3.0.21
> stack size 10240
> Heap - 256 MB - 512 MB
> Open files limit (ulimit -n) - 2048
> Threads - 2048
> If the number of files open by resin exceeds (used lsof) 1024, apache
> gives 503 server down for maintenance error.
> Please tell me what I'm doing wrong here..?
> Regards,
> Akila
> _______________________________________________
> resin-interest mailing list

resin-interest mailing list

Reply via email to