1 2 Previous Next 20 Replies Latest reply on Jul 18, 2011 5:51 PM by mroett01

    ConcurrentRequestTimeoutException with only one conversation

    adamw

      Hello,


      from time to time (that's the worst about this bug ;) ) I'm getting an:


      org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
      



      exception during an AJAX call. However, I'm pretty sure there's only one AJAX call during that time.
      I tried increasing the concurrent.request.timeout parameter to very high values, but that same happens.


      In fact, when the timeout is high (several seconds), the application hangs on that request for that amount of time and then throws the above exception. I did a thread dump during that time, and the only thread that was doing something other than waiting for requests was this:


      at org.jboss.seam.core.ConversationEntry.lock(ConversationEntry.java:221)
       at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:616)
       at org.jboss.seam.core.Manager.restoreConversation(Manager.java:603)
       at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:390)
      



      so the thread is waiting for a conversation lock - which, after the concurrent request timeout, throws the exception. But why is the lock not released? Can this be a Seam bug? There are no other threads doing any calls ... I was looking through the code but didn't find anything yet.


      --
      Adam

        • 1. Re: ConcurrentRequestTimeoutException with only one conversation
          adamw

          One important info: I'm using Seam 2.1.1.GA (so the latest)


          Also, as I understand from the code, the conversation is locked after restoring the view. I looked in the server logs, and there's only one request starting:


          2009-01-05 14:37:57,659 DEBUG [org.jboss.seam.contexts.FacesLifecycle] >>> Begin JSF request for /library.seam
          2009-01-05 14:37:57,659 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase RESTORE_VIEW 1
          



          The last statement in the log is:


          2009-01-05 14:37:57,665 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase RESTORE_VIEW 1
          


          then the app hangs for the concurrent request timeout, and then an exception is thrown:


          2009-01-05 14:38:47,667 DEBUG [org.jboss.seam.core.Manager] Concurrent call to conversation
          



          --
          Adam

          • 2. Re: ConcurrentRequestTimeoutException with only one conversation
            bobos20

            You may take a look at this:
            https://jira.jboss.org/jira/browse/JBSEAM-3680


            I have the same problem cause I'm using frame in my application.

            • 3. Re: ConcurrentRequestTimeoutException with only one conversation

              I am also getting this exception at seemingly random times - often when there is no user interaction with the application occurring.


              This problem only appeared after upgrading to 2.1.0.SP1 from 2.0.1GA.


              -Mark



              15:22:36,672 WARN  [SeamPhaseListener] uncaught exception, passing to exception handler
              org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
                   at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:545)
                   at org.jboss.seam.core.Manager.restoreConversation(Manager.java:507)
                   at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:390)
                   at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:228)
                   at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:194)
                   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
                   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                   at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
                   at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
                   at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
                   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
                   at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                   at java.lang.Thread.run(Unknown Source)
              

              • 4. Re: ConcurrentRequestTimeoutException with only one conversation
                dwsmith75

                Same exact issue, just random ConcurrentRequestTimeoutException when only request is being processed for a user


                Whats even wierder is trying to handle the exceptions with pages.xml adding


                    <exception class="org.jboss.seam.ConcurrentRequestTimeoutException" logLevel="trace">
                        <end-conversation/>
                        <redirect view-id="/error.xhtml">
                            <message>The server is too busy to process your request, please try again later</message>
                        </redirect>
                    </exception>
                



                or just


                    <exception logLevel="error">
                        <end-conversation/>
                        <redirect view-id="/error.xhtml">
                            <message severity="error">Unexpected error, please try again</message>
                        </redirect>
                    </exception>
                



                Seam exception handling doesn't kick in.


                From SeamPhaseListener


                      catch (Exception e)
                      {
                         try
                         {
                            Exceptions.instance().handle(e);
                         }
                         catch (Exception ehe) 
                         {
                            log.error("swallowing exception", e);
                         }
                      }
                



                01/07 11:07:42.246 [ajp-8009-7] ERROR o.jboss.seam.jsf.SeamPhaseListener - <swallowing exception> 
                org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
                     at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:545) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.core.Manager.restoreConversation(Manager.java:507) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:390) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:228) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:194) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175) [jsf-impl-1.2_11.jar:1.2_11-b01-FCS]
                     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114) [jsf-impl-1.2_11.jar:1.2_11-b01-FCS]
                     at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:103) [jsf-impl-1.2_11.jar:1.2_11-b01-FCS]
                     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-1.2_11.jar:1.2_11-b01-FCS]
                     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) [jsf-api-1.2_11.jar:1.2_11-b01-FCS]
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) [catalina.jar:na]
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) [catalina.jar:na]
                     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) [richfaces-impl-3.2.2.SR1.jar:3.2.2.SR1]
                     at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) [richfaces-impl-3.2.2.SR1.jar:3.2.2.SR1]
                     at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) [richfaces-impl-3.2.2.SR1.jar:3.2.2.SR1]
                     at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) [richfaces-impl-3.2.2.SR1.jar:3.2.2.SR1]
                     at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [org.jboss.seam-jboss-seam-2.1.0.SP1.jar:2.1.0.SP1]
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) [catalina.jar:na]
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) [catalina.jar:na]
                     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) [catalina.jar:na]
                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) [catalina.jar:na]
                     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) [catalina.jar:na]
                     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:na]
                     at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) [Tomcat55AgentValve.class:na]
                     at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:347) [catalina-cluster.jar:na]
                     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) [catalina.jar:na]
                     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548) [catalina.jar:na]
                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) [catalina.jar:na]
                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) [catalina.jar:na]
                     at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:444) [tomcat-ajp.jar:na]
                     at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472) [tomcat-ajp.jar:na]
                     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) [tomcat-util.jar:5.1]
                     at java.lang.Thread.run(Unknown Source) [na:1.5.0_12]
                



                • 5. Re: ConcurrentRequestTimeoutException with only one conversation
                  dwsmith75

                  The exception handling stuff might be related to http://www.seamframework.org/Community/RedirectingConcurrentCallErrors

                  • 6. Re: ConcurrentRequestTimeoutException with only one conversation
                    dwsmith75

                    Adam, where you able to track down and/or fix this issue?

                    • 7. Re: ConcurrentRequestTimeoutException with only one conversation
                      adamw

                      Hello,


                      yes, after a long search ;)


                      The bug was of course on our side. We were ending a conversation programatically, by calling Conversation.endBeforeRedirect(). However, there was no redirect, so the conversation lock wasn't released.


                      I changed it to be Conversation.end() and then Conversation.leave(), which causes the conversation to end, release the lock and start a new one. And so far no exceptions :)


                      Adam

                      • 8. Re: ConcurrentRequestTimeoutException with only one conversation
                        yilmaz_

                        Hello,
                        I am having this issue.(Seam 2.1.1. GA JBOSS AS 5GA) Are there any workaround tip for this problem. Or when will this bug get fixed?

                        • 9. Re: ConcurrentRequestTimeoutException with only one conversation

                          Is this something that can be fixed on Seam side or is this more likely an indication that there is something wrong with the application's conversation handling?


                          I've been ignoring this problem for now - as it hasn't seemed to cause any visibly adverse behavior in the app, but something I need to get back to and resolve.


                          I don't believe Adam's cause/resolution matches my scenario.

                          • 10. Re: ConcurrentRequestTimeoutException with only one conversation
                            danielrowe
                            I was getting this exception with 2.1.1.  In my case, I had a long-running conversation going on, and I'd click on a link that takes time to process (still in the same conversation), and before it completed, I would click on another link that would end the conversation (propagation="end").  At this point I would get the exception 100% of the time.

                            Looking at Adam's response, I tried propagation="none" in my s:link that went to the new page (instead of propagation="end", or no propagation element at all) and the exception went away :-)

                            So, if there is a danger of a user moving to a new conversation before an old one finishes, it looks to me like the old conversation has to stay alive, which propagation="none" will do.


                            • 11. Re: ConcurrentRequestTimeoutException with only one conversation
                              joff
                              Specifying propogation="none" doesn't help those of us who are getting this because of AJAX calls.. (in my case, from rich:ajaxValidator).

                              In my mind, this is something that needs to be fixed server-side... once something is displayed to the user, then it's fair game for them to start clicking on things, triggering events etc...

                              • 12. Re: ConcurrentRequestTimeoutException with only one conversation
                                joff

                                Just found this section in the docs


                                Seems that using the requestDelay in the way described helps a lot

                                • 13. Re: ConcurrentRequestTimeoutException with only one conversation
                                  rossmills.ross_mills.intuit.com

                                  I encountered the same problem and still haven't found a solution.  In my case, the logs indicated that the JSF lifecycle did not complete which left the conversation locked.


                                  http://www.seamframework.org/Community/ConcurrentCallToConversationErrorWhenUnderLoad


                                  https://jira.jboss.org/jira/browse/JBSEAM-4480

                                  • 14. Re: ConcurrentRequestTimeoutException with only one conversation
                                    found this from http://riyazmsm.blogspot.com/2009/08/concurrent-calls-to-conversational.html
                                    it came from Seam documentation

                                    Accessing a Seam conversational component from a Ajax request need to be queued serially because as per the seam documentation ,conversational component dont allow concurrency. If the server component takes a long time to respond and if another request goes in, it throws out the "org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation" error. After adding the eventsQueue property to the a4j:support tag it stopped throwing out the Error.

                                    The documentation explanation about the eventsQueue.  "eventsQueue - provide a queue in which events are placed. All events are queued and requests are sent to the server serially. This is useful if the request can to the server can take some time to execute (e.g. heavy computation, retrieving information from a slow source) as the server isn't flooded.
                                    view plainprint?

                                       <a:support event="onchange"  eventsQueue="default" action="#{longRunningComo}" reRender="Decoration"
                                    bypassUpdates="true" ajaxSingle="true"/> 

                                    1 2 Previous Next