Why does heap space constantly increase when monitoring Tomcat with Java VisualVM?
Asked Answered
H

0

3

I have a JRubyOnRails application running in Tomcat. After browsing to my application (localhost), logging in and then doing nothing, the Heap space seems to be growing continuously...

Is that normal? If I press on Perform GC, it does go down again. I'm wondering what will happen if I just leave it until it reaches the maximum of my Computer RAM?

And why is it increasing all the time while nothing happens? Is it due to the fact that I'm monitoring my application?

Heikeheil answered 26/6, 2013 at 13:37 Comment(3)
It doesn't, in my experience, it shows a sawtooth shape.Quemoy
Mmm, indeed, it increases to the maximum level and then Garbage collector executes. But why does it keep increasing while nothing is being done?Heikeheil
Well if you connected through JMX then there is work being done; to send stats over. And usually many apps have background threads to check on things, eg. refresh DB connection etc... Ideally you are master of your own app, so you should know what does it do in background. Thread view can give you some hints too.Grasmere

© 2022 - 2024 — McMap. All rights reserved.