3 Replies Latest reply on Jan 3, 2019 12:09 PM by Paul Ferraro

    Error :Exception handling request |Session was rejected as the maximum number of sessions

    Vandana Thota Novice

      We have the errors  and server is going down  :

      1)wildfly 11.0.0 final versions and  have only 1 instance on it

      2)We have active sessions max value  as 1000 .

      What can be done  in order  not to face  below type of error ?

       

      ERROR [io.undertow.request] (default task-12) UT005023: Exception handling request to /app/: javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.IllegalStateException: UT000121: Session was rejected as the maximum number of sessions (1000) has been hit

        • 1. Re: Error :Exception handling request |Session was rejected as the maximum number of sessions
          Vandana Thota Novice

          The exact error logs are below :

          ERROR [io.undertow.request] (default task-12) UT005023: Exception handling request to /app/: javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.IllegalStateException: UT000121: Session was rejected as the maximum number of sessions (1000) has been hit

          at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:381)

                  at innowake.maxenso.runtime.client.vaadin.Servlet.service(Servlet.java:154)

                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

                  at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)

                  at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)

                  at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:130)

                  at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

                  at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

                  at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)

                  at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

                  at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

                  at org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.lambda$handleRequest$1(ElytronRunAsHandler.java:68)

                  at org.wildfly.security.auth.server.FlexibleIdentityAssociation.runAsFunctionEx(FlexibleIdentityAssociation.java:101)

                  at org.wildfly.security.auth.server.Scoped.runAsFunctionEx(Scoped.java:150)

                  at org.wildfly.security.auth.server.Scoped.runAs(Scoped.java:62)

                  at org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.handleRequest(ElytronRunAsHandler.java:67)

                  at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)

                  at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

                  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

                  at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

                  at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

                  at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

                  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

                  at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)

                  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

                  at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)

                  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

                  at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)

                  at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)

                  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)

                  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)

                  at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

                  at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

          at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)

                  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

                  at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)

                  at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)

                  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)

                  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)

                  at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

                  at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

                  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeployme

          ntInfoService.java:1508)

                  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

                  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

                  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

                  at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)

                  at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

                  at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)

                  at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)

                  at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

                  at java.lang.Thread.run(Thread.java:748)

          Caused by: com.vaadin.server.ServiceException: java.lang.IllegalStateException: UT000121: Session was rejected as the maximum number of sessions (1000) has been hit

                  at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1474)

                  at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1434)

                  at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:379)

                  ... 44 more

          Caused by: java.lang.IllegalStateException: UT000121: Session was rejected as the maximum number of sessions (1000) has been hit

                  at io.undertow.server.session.InMemorySessionManager.createSession(InMemorySessionManager.java:156)

                  at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:805)

                  at io.undertow.servlet.spec.HttpServletRequestImpl.getSession(HttpServletRequestImpl.java:370)

                  at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:270)

                  at com.vaadin.server.VaadinServletRequest.getWrappedSession(VaadinServletRequest.java:58)

                  at com.vaadin.server.VaadinService.getWrappedSession(VaadinService.java:870)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeployme

          ntInfoService.java:1508)

                  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeployme

          ntInfoService.java:1508)

                  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeployme

          ntInfoService.java:1508)

                  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeployme

          ntInfoService.java:1508)

                  at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)

                  at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

                  at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)

                  at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)

                  at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

                  at java.lang.Thread.run(Thread.java:748)

          Caused by: com.vaadin.server.ServiceException: java.lang.IllegalStateException: UT000121: Session was rejected as the maximum number of sessions (1000) has been hit

                  at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1474)

                  at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1434)

                  at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:379)

                  ... 44 more

          Caused by: java.lang.IllegalStateException: UT000121: Session was rejected as the maximum number of sessions (1000) has been hit

                  at io.undertow.server.session.InMemorySessionManager.createSession(InMemorySessionManager.java:156)

                  at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:805)

                  at io.undertow.servlet.spec.HttpServletRequestImpl.getSession(HttpServletRequestImpl.java:370)

                  at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:270)

                  at com.vaadin.server.VaadinServletRequest.getWrappedSession(VaadinServletRequest.java:58)

                  at com.vaadin.server.VaadinService.getWrappedSession(VaadinService.java:870)

                  at com.vaadin.server.VaadinService.findOrCreateVaadinSession(VaadinService.java:662)

                  at com.vaadin.server.VaadinService.findVaadinSession(VaadinService.java:530)

                  at innowake.maxenso.runtime.client.vaadin.VaadinServletService.findVaadinSession(VaadinServletService.java:109)

                  at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1416)

                  ... 45 more

           

           

           

           

           

           

          :

          • 2. Re: Error :Exception handling request |Session was rejected as the maximum number of sessions
            Claudio Miranda Expert

            The system hit the max number of sessions you set, if you don't want that exception, you should unset or increase the max number of sessions.

            • 3. Re: Error :Exception handling request |Session was rejected as the maximum number of sessions
              Paul Ferraro Master

              Alternatively, you can make your web application <distributable/> (via web.xml).

              In a distributable web application, if the number of sessions exceeds the value defined by <max-active-sessions/>, the oldest sessions are passivated to disk to make room for newly created sessions.  The only limitation is that any attributes placed in the session must be serializable.