4

We have some users reporting an odd problem with our Vaadin 23 application in Chrome and Edge. The application randomly "hangs" such that the user can still interact with client-side components, but nothing seems to reach the server. The problem occurs more frequently when the users are connected to their corporate network from home via VPN.

  • The application is configured to use push with long polling, and is deployed as a WAR file on Tomcat 9 under Java 11.
  • There are no error messages in the Javascript console
  • A network trace (screen shot below) shows successful heartbeats, push renegotiations, and UI interactions
  • The server access logs mirror the requests from the network trace, so we are confident all requests are making it through to the server

What we are seeing is that the XHR POST requests are being generated when the client interacts with the UI (the ?v-r=uidl requests), but no server updates are ever applied to the UI. The application becomes unresponsive to user input. Interactions that are purely client-side (e.g. selecting a tab in a tabbed layout) still work, but no server-side updates ever get applied.

Any clues as to what is going wrong?

network trace screen shot

EDITED 10-aug-22: An interesting observation that indicates the problem may be server-side: The XHR POST requests in the network trace above are triggered by clicking on tabs within a Tabs component. I added logging in the tab event handling to log a message every time a tab is clicked. When the application freezes, I can see the XHR requests in the server's access log, but I do not see the event handler log messages.

  • The browser console does not show up anything unusual? And the webbrowser does not think it's offline (because of the vpn) perhaps...? – André Schild Aug 08 '22 at 15:56
  • "No" to both. Other browser tabs continue working nominally. – Kevin Klein Aug 08 '22 at 16:13
  • Just to have it asked: given, that you have not added Push just for fun, can you 100% rule out, that your server-side is not dead-locking? Or the other way around: what are you doing asynchronously for the push and can you rule out it does not block/dead-lock the regular request base UI locking? – cfrick Aug 08 '22 at 17:49
  • Excellent question. Assuming I would be able to see this on a thread dump? – Kevin Klein Aug 08 '22 at 18:06
  • Maybe, it would be around `VaadinSession.lock()` I assume - sadly there is no logging at first glance. Or log yourself at neuralgic points (e.g. in your `UI.access()` passed down code). – cfrick Aug 08 '22 at 19:01
  • I added some logging to periodically enumerate all of the active VaadinSessions and print their lock status. The sessions are not getting deadlocked. – Kevin Klein Aug 10 '22 at 15:00

0 Answers0