It is very strange, I set session-timeout to 3 minutes for testing, it will get the issue after 3 minutes.
Here is my configure:
nginx 1.18.0 as the reverse proxy at port 443.
Tomcat 9.0.54 at port 8443 with protocol="org.apache.coyote.http11.Http11NioProtocol" and SSLEnabled="true"
cas 6.3.7 with SAML OAUTH and OIDC
gradle.properties with appServer= since I use external tomcat.