I'm using Vaadin 7.1.2 and rely heavily on its push notification support. Everything works well for some time after the application starts, but then after about 30-40 minutes suddenly it stops pushing updates from the server and instead logs com.vaadin.ui.UIDetachedException
on every update event. Restart helps but for very long.
All configuration parameters are default except I had to add the -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true
command options for push to work.
I deploy to Tomcat 7.0.36 and everything is set to default in its configuration as well.
To update UI I simply call
ui.access(new Runnable{...});
on the UI instance which I pass down to every component from the UI.init()
method.
Am I missing something?
Does it happen when the application is idle (e.g. you do nothing in the app) or no matter if user is active? It might be that the user session is invalidated by Tomcat after half an hour of inactivity from the client side, and that's why your UI is detached. If that's not the case please consider upgrading to latest Vaadin, which is 7.1.8 right now. Lots of issues with push have been resolved lately.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With