Hi - we are using Vaadin 10 and trying to deploy to a Google App Engine Flex environment via a Docker container using a Tomcat runtime. Everything works fine when running the app via Spring’s bootRun, and also when I fire up the Docker container and connect to it. However, when we deploy to GAE the app seems to be constantly restarting or reloading when we click on links in the navigation sidebar. Any ideas on the following logs we are seeing?
Is this due to some session issue in Google App Engine Flex?
Sending xhr message to server: {“csrfToken”:“70dc1012-03f4-4942-be35-e4127053be35”,“rpc”:[{“type”:“mSync”,“node”:32,“feature”:1,“property”:“selected”,“value”:0},{“type”:“event”,“node”:32,“event”:“selected-changed”}]
,“syncId”:1,“clientId”:1}
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:189 Server visit took 85.8ms
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:189 JSON parsing took 0ms
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:189 Received xhr message: for(;;);[{“meta”:{“sessionExpired”:true}}]
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:958 Response didn’t contain a server id. Please verify that the server is up-to-date and that the response data has not been modified in transmission.
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:974 Handling message from server
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:921 Handling dependencies
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:189 handleUIDLMessage: 0 ms
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:189 Setting heartbeat interval to -1sec.
VM748 client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:189 Processing time was 5ms
We have not found a solution yet. However, we have pinned the max instances for App Engine Flex to 1 and that seems to be working for us at the moment, until we have more time to invest in fixing this. We just modified the app.yml for the project to include the following:
As far as I know, Google AppEngine “Flex” with the “Java 8 Runtime” doesn’t support sessions (at the moment?).
See https://github.com/GoogleCloudPlatform/jetty-runtime/issues/242 to track the issue. Using “a single instance” is a hacky workaround: all requests are handled by the same instance, so everything seems to be fine.
You can configure the build of a Spring-Boot based project to produce a war instead of a jar, so you can still use the power of Spring-Boot together with Vaadin, also when running in GAE (standard).