Potential memory leak with Push

I am using Vaadin 7 with Servlet 3.0 for various projects and have noticed that all of my Vaadin apps were causing memory leaks on Tomcat 7 when redeploying.

To find the culprit I decided to start from the ground up using the default project setup from Eclipse, adding pieces of my usual setup for the other projects. It seems that when my UI is annotated with @Push it causes the memory leak. I removed the annotations from the UI class and instead used web.xml to configure push control. The results were the same with each attempt. In each scenario, removing @Push or removing the web.xml push configuration seemed to resolve the leak.

Can anyone else confirm if they have encountered similar results?

Hi,

At what point do you see a leak? Do you have any more information where it comes from, e.g. jvisualvm should be able to help pinpoint the problem.

Are you using websockets? If you use Tomcat 8, do you see the same problem? Tomcat 7 has some special session handling when using websockets as it is not capable of sharing the HTTP session properly between HTTP requests and websocket requests.

This might be related to
https://dev.vaadin.com/ticket/17581

Artur - The leak is only seen when the app is undeployed after being initialized. If the app is deployed and never receives any requests it is undeployed with no issues. I have not done any profiling yet to find out specifically what is left. In general I am using websockets. However, for this specific test I did not use websockets.

Leif - It does seem that it could be related to the mentioned ticket. I will try to spend some time investigating my own environment scenario to see if the results are the same.