Is it possible to shut down JVM using command ? Actually I am using glassfish v3 and after a few re-deployments of my development project, the JVM complains of "java.lang.OutOfMemoryError: PermGen space". I have posted the the question in glassfish 3 forum Glassfish Out of Memmory problem. Till I resolve the out of memory error, I need to manually shut down the JVM to release memory. So I am looking for the shutdown command for the JVM.
Have you checked the documentation for the memory requirements?
I have given 1024MB for PermGen space. That should be more than enough. I had come across a few sites that said that there were some memory leaks for glassfish 2 related to class loaders. I am not sure whether that problem passed through to v3. I will have to take a look at the problem in more detail, but right now I am only concentrating on development.
You can shutdown (results in JVM shutdown) the glassfish.
This is what I was expecting. But to my surprise, the server status in my netbeans IDE already shows shut down. Eventually when I try to start the glassfish again, the "out of memory" corps out again. Its only after I shut down my PC and restart it again, that the "out of memory" fades off. I was looking for a quick fix so that I can continue development without having to restart my pc every now and then.
Its only after I shut down my PC and restart it again, that the "out of memory" fades off. I was looking for a quick fix so that I can continue development without having to restart my pc every now and then.
From my experience with Tomcat it's often too late for a regular shutdown, when the server JVM hangs because of an out-of-memory problem. But it shouldn't be necessary to restart your computer in order to force the JVM to shutdown. It should be enough to kill the corresponding Java process. Depending on your OS you'll have to use the Windows task manager, a Linux console or something like this to find and kill the Java process which belongs to the Glassfish server. But you should take care not to kill other Java process for example the one for your NetBeans IDE ;-) On Linux it's easy to find the right Java process because you can usually see the whole command line for the process in question and figure out if it's the JVM process used to startup Glassfish.
Hope this helps with your development although I don't know how to solve the root cause of the problem!