• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What happens when JVM is Restarted?

 
Chandramohan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

when our applications response time becomes slow or application itself gets hung, we restart the JVM's. In the top level i know that the memory is released,cleared and reinitialized once it is started. But in detail, what is happening beneath this? Is there any link that you guys can help me out with?

Thanks a lot.
 
Rob Spoor
Sheriff
Pie
Posts: 20493
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends on your operating system.

The JVM process is completely stopped, and a new JVM process is started. Most likely the threads from the first process are all stopped, its memory is marked as safe for reuse, and a new memory pool is reserved for the second process.

It's just like any other process.


If I were you however, I would try to investigate WHY the application is slowing down and hanging. Perhaps it is a memory problem; objects that cannot be garbage collected because there is still a live reference somewhere that you might not need. Perhaps something else. You'll need to do a lot of debugging and profiling to find out.
 
Chandramohan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic