Vaadin running on tomcat get swapped out of memory after 1 minute

I have a Vaadin app (flow 24.3.9) running under Tomcat 10 and I noticed that after approx. 1 minute of inactivity, when I click again on a page, the page does not show up immediate anymore (takes 20-30 seconds) and I see the progressbar building up. So it looks like the webapp is swapped out of memory (my guess) and it is rebuilding it up again in memory after the click. I also see for example the list in a combobox is not showing anymore, instaed a turning wheel indicating it is retrieving the list again, which after 20-30 seconds just shows up nicely (no popups are displayed saying a session has expired or so).

I tried a few things like:

  • setting session-timeout to 60 (minutes) in web.xml
  • scanned forum etc but could not find anything similar

But could not find a solution for this, anyone can help me?

Vaadin 24.3.9 is quite old. Furthermore, 24.3 series is not supported anymore.
As a first step, I would suggest upgrading to a recent version.
If you really cannot upgrade to Vaadin 24.6, at least try the latest patch version for 24.3 (should be 24.3.20

Everything that Marco said + you might have a security configuration that blocks some internal Vaadin calls which results in a broken UI stage and the server tries a forced client side refresh or your load balancer in front of your tomcat is weirdly configured

Thanks Christian,

I have a tomcat out of the box running, started via intellij for debugging/dev purposes. I didn’t do anything specific to security settings or so. I will first try to upgra de to the latest Vaadin and then try again, thanks for your quick response.

Thanks Marco,

I will do the upgrade and then see what happens. I started some time ago with the Vaadin demo-app started as standalone spring-boot and later on I modified it to be runing as a plain webapp under tomcat. I didn’t do anything special for tomcat, I installed it and start it via intellij (for the moment).

Any particular reason not to run is a Spring Boot app?

Yes, it is a matter of installation. The tomcat app is stable and you can drop in the app runtime which got picked up by tomcat.

I unless it is too much hassle I think I would try to run as Spring Boot (which defaults to Tomcat, btw, but might have a different config) and Jetty standalone, just to see if it matters. Quarkus too. Might give some clues.

It would also be nice to know more about your app, does it connect to a backend and retrieve data, for instance?