0

I am a middleware person and I have a little experience in JSF. I have a jsf application that I need to examine its behaviour under load and stress. I am using gatling to examine its behaviour. Several days have passed I have run lots of tests. There is a common behaviour that I have examined.

After I boot up the application and run a couple of stress tests, the application goes into crazy garbage collection cycle however gc cycles does not end successfully. I examined the the sampler and one object instance came to my attention.

javax.faces.component.StateHolderSaver instances are continiously increasing during stress tests and not garbage collected. After some test runs the application goes into full gc cycles because heap passes the upper limit and cpu strike happens which makes the application unresponsive.

Have you had any experience with this object ? Why does this object instances not being destroyed ? The StateHolderSaverObject

cgon
  • 1,955
  • 2
  • 23
  • 37
  • It's a component that's involved with the state-saving mechanism of JSF components, meaning you can expect that each component on each page has one. If you have a component-heavy page, you'll rack up a large number of these objects. You should consider marking some components as transient, if you're looking to lighten the load – kolossus Jun 01 '15 at 14:53
  • After adding logging out to my stress scenario, the instance number started to fluctuate. Heap does not extend beyond full gc limit and the heavy gc cpu cycles has gone. All of our managed beans are view scoped and I guess when the session is invalidated, these objects are successfully marked for gc. Does it make sense? – cgon Jun 02 '15 at 06:33
  • Well yes, that's to be expected: viewscoped beans are linked to active sessions so in theory, whenever the session expires, the viewscoped beans should be eligible for gc. I say in theory because (depending on your implementation and version of JSF), the beans don't always behave as expected (see http://stackoverflow.com/questions/30410601/how-detect-and-remove-during-a-session-unused-viewscoped-beans-that-cant-be). But what you've experienced is expected behaviour – kolossus Jun 02 '15 at 13:06
  • Thanks that is useful information. Regards – cgon Jun 02 '15 at 14:09

0 Answers0