0

I'm working on an application for a while. Recently, At my workplace some redesigns were made on the application (Java Enterprise web application implemented using Jersey REST and Spring framework).

We are noticing that the application started throwing errors due to Out of Memory exceptions. We noticed that the application heap was consistent however the metaspace was increasing always and not decreasing at all.

As part of this, I've started analyzing performance stats, JCMD GC.class_stats. I've been seeing that some JAXB classes are increasing, But not decreasing. These JAXB classes are supposed to close after the web request is completed. Can you please help me fix this issue.

Thanks in Advance.

daemon54
  • 1,057
  • 3
  • 16
  • 36
  • How are you using JAXB? How are you ensuring that you close resources once the request is completed? Are you just generating new (un)marsharllers for every request? – Boris the Spider Jan 08 '18 at 08:07
  • Hi. For every web service request, I'm marshalling DTO (Generated by JAXB Api) to XML.Previously, This procedure was taken care from from the Service/Manager class. Currently, the code was moved to WebService layer. – daemon54 Jan 08 '18 at 08:40
  • Meta space is for storing code rather than resource which get closed off. Closing resources can indirectly result in code being freed up, however closing everything doesn't guarantee it will be freed. – Peter Lawrey Jan 08 '18 at 13:49

0 Answers0