1.The Resin web server starts listening to HTTP requests on port 8080 and listens on port 6800 for load balancer and cluster messages.
2.Garbage collection
There are essentially two GC threads running. One is a very lightweight thread which does "little" collections primarily on the Eden (a.k.a. Young) generation of the heap. The other is the Full GC thread which traverses the entire heap when there is not enough memory left to allocate space for objects which get promoted from the Eden to the older generation(s).
If there is a memory leak or inadequate heap allocated, eventually the older generation will start to run out of room causing the Full GC thread to run (nearly) continuously. Since this process "stops the world", Resin won't be able to respond to requests and they'll start to back up.
The amount allocated for the Eden generation is the value specified with -Xmn. The amount allocated for the older generation is the value of -Xmx minus the -Xmn. Generally, you don't want the Eden to be too big or it will take too long for the GC to look through it for space that can be reclaimed.
3.Stack size
Each thread in the VM gets a stack. The stack size will limit the number of threads that you can have, too big of a stack size and you will run out of memory as each thread is allocated more memory than it needs. 2048k is an appropriate value for most situations.
-Xssthe stack size for each thread
-Xss determines the size of the stack: -Xss1024k. If the stack space is too small, eventually you will see a java.lang.StackOverflowError.
Some people have reported that it is necessary to change stack size settings at the OS level for Linux. A call to ulimit may be necessary, and is usually done with a command in /etc/profile:
Limit thread stack size on Linux
unix> ulimit -s 2048
4.Monitoring the JVM
The most useful tool is jconsole.
jps and jstack are also useful
5.resin watchdog
For reliability and security, Resin servers are started and monitored by a separate Resin watchdog process. The watchdog continually checks the health of the Resin server and restarts the Resin instance if is becomes unresponsive.
The standard configuration launches one watchdog per machine which monitors all the Resin JVMs on that matchine, so most sites will not need to change any watchdog configuration.
The watchdog automatically restarts Resin if the Resin JVM ever crashes or exits. So if you want to stop Resin, you need to tell the watchdog to stop the instance, or you can stop the watchdog entirely. The watchdog is typically controlled by the resin.jar main program (ResinBoot), which has commands to start, stop, and restart Resin instances as well as reporting the watchdog status.