In the service that you wrote, do you have any loops? Rob Eamon had another thread that covers loops in total.
Here’s something that should work that I have used. WM support suggested bumping up the garbage collection in the server.cfg file.
There should be a setting as follows:
I suggest changing to read:
This sets garbage collection to every ten minutes. However, this service sends a prompt to the JVM to clean up, but doesn’t necessarily activate garbage collection. (we determined this using a rational purify monitoring OS level activity and JVM level activity.)
If that fails, then create a java service and add this line:
and then run it as a service. It totally cleans out all of the dead threads and unused objects. But, if you are processing something on a light machine (i.e., no power, no memory) it will hamper performance.
Also, I’m not sure which JVM you are running. They all act a little different. I’ve had the best luck with SUN since you run green threads natively.