2

I am on a Vaadin Web-application, using a Wildfly server. So far, it works very well but there is one problem: The application fills the ram of the server at about 4 AM every morning.

enter image description here

Parameters of my web.xml:

<context-param> <!-- or initialize-param -->
    <param-name>closeIdleSessions</param-name>
    <param-value>true</param-value>
</context-param>

<session-config>
    <session-timeout>180</session-timeout>
</session-config>

<context-param>
    <param-name>heartbeatInterval</param-name>
    <param-value>120</param-value>
</context-param>

I am playing around with the hearthbeat and timeout but results are nearly the same.

Seems like the vaadin app goes in a sort of "sleep" mode after a few hours of inactivity and eats all the RAM. Can anyone guide me with this?

trincot
  • 317,000
  • 35
  • 244
  • 286
ImND
  • 31
  • 4
  • looks like a memory leak or non-weak references which are not able to get cleaned up by the garbage collector. Do you use the Google Guice EventBus? – agassner Aug 31 '16 at 07:53
  • 1
    or just some quartz job... that could be pretty much anything. i'd dig into that deeper with e.g. jvisualvm. that's more likely a problem with the application itself rather than due to vaadin. – cfrick Aug 31 '16 at 09:11
  • 1
    Make a heap dump and analyze it. In the heap dump you can see where the memory is allocated. – Steffen Harbich Aug 31 '16 at 09:49
  • Yeah already did a heapdump, a lot of hashmaps, seems like hibernate tries to fetch something or so.. The funny part is.. At 18.00 the last person stops working and logs out, 3 houras later ( session=180 min) the UI is detached ( the last gc runs at 21.00 as u see). So the application is kind of in "standby" and eats all the ram.. but why just after 5 hours..? Why this jump at 4 AM? – ImND Aug 31 '16 at 12:14
  • You could try to define harder logging rules to Hibernate and see if it really is doing something at that time. But in case there's no running processes at that time from your application then problem might be somewhere outside of it - one possibility to get hold to it is to try to schedule recording using Flight Recorder which comes with jdk 8 starting u 25 and JDK 7 u 40 (If I remember it right). Define delay to start recording at later point. https://docs.oracle.com/javacomponents/jmc-5-4/jfr-runtime-guide/run.htm#JFRUH178 – Jukka Nikki Aug 31 '16 at 21:43
  • Possible duplicate of [Understanding JVM Memory Allocation and Java Out of Memory: Heap Space](http://stackoverflow.com/questions/21272877/understanding-jvm-memory-allocation-and-java-out-of-memory-heap-space) – Paul Sweatte Mar 07 '17 at 21:11

0 Answers0