Request thread is blocking by AbstractCommmunicatationManger class

In my application I am using vaadin 6.3.

I am facing thread (request) blocking at following point (in vaadin) when user request through web browser and close browser before reply come back.

com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest (line: 567)

What should I do to resolve this problem?


Could you be a little more specific on where the blocking occurs? Line 567 synchronizes on application to prevent multiple threads from modifying the application state at the same time but by itself does not block anything. If the user aborts the request it should still be processed normally and the servlet exits the synchronization block and allows the next request to the same application to the processed.

I have also seen code and confused that line 567 is used for preventing multiple threads for modify application state.
But I am using Lamda Probe as Apache Tomcat monitoring tool. Which tells me that few thread are blocked at this line.
It shows me following log.

com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest ( )
com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest ( )
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service ( )
com.eitl.automation.vaadin.spring.servlet.SpringApplicationServlet.service ( )
javax.servlet.http.HttpServlet.service ( )
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter ( )
org.apache.catalina.core.ApplicationFilterChain.doFilter ( )
org.apache.catalina.core.StandardWrapperValve.invoke ( )
org.apache.catalina.core.StandardContextValve.invoke ( )
org.apache.catalina.core.StandardHostValve.invoke ( )
org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke ( )
org.apache.catalina.valves.ErrorReportValve.invoke ( )
org.apache.catalina.authenticator.SingleSignOn.invoke ( )
org.apache.catalina.core.StandardEngineValve.invoke ( )
org.apache.catalina.connector.CoyoteAdapter.service ( )
org.apache.coyote.http11.Http11Processor.process ( )
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process ( )$ ( ) ( )

May be it will block after this line.

If one thread is inside the synchronized block then the others will block at that line and wait for the executing thread to finish the synchronized block. The question then becomes: what is the thread executing inside the synchronized block doing?

Note that the threads are all then UIDL requests for the same Application i.e. for the same user and session which sound a bit strange. It is completely possible that some threads are waiting for another thread (that’s the whole point of the synchronized block) but the threads should then continue after a short while (when the executing thread is done).

Let me check log & thread status once again.

But can I get vaadin’s internal log? It will help me trace out the problem.
Also I am trying latest version of vaadin with my existing application.

Also, my application is broadcasting data to all other clients after processing request. May this feature invite thread blocking problem?

Problem has resolved when I have changed my Tomcat from 6.20 to 6.29. :huh: