File Upload Times Out in Liferay 5.2.3 + Tomcat 6 + Redhat Linux


I have experienced an odd situation that Vaadin 6.2.7 file upload times out for ~30kb and larger files in Liferay 5.2.3 + Tomcat 6 + Redhat Linux and JDK 1.6. It works without problems when executed in local windows workstation with the same stack.

The stack trace:

com.vaadin.ui.Upload$UploadException: Upload failed
at com.vaadin.ui.Upload.receiveUpload(
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleFileUpload(
at com.vaadin.terminal.gwt.server.CommunicationManager.handleFileUpload(
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Caused by: Read timed out
at Method)
at org.apache.coyote.http11.InternalInputBuffer.fill(
at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(
at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(
at org.apache.coyote.http11.InternalInputBuffer.doRead(
at org.apache.coyote.Request.doRead(
at org.apache.catalina.connector.InputBuffer.realReadBytes(
at org.apache.tomcat.util.buf.ByteChunk.substract(
at$ItemInputStream.makeAvailable(Unknown Source)
at$ Source)
at com.vaadin.ui.Upload.receiveUpload(
… 16 more

Best regards,
Tommi Laukkanen

Sounds like a operating system level problem. Try to upload the same file to the Liferay’s CMS outside your own (Vaadin based) application to ensure that the problem is related to Vaadin + Liferay combination on this environment.

Hi Joonas

You are correct the problem repeats identically with Liferay Image Gallery. Liferay discussion forums contain message thread with similar problems. Even more strange is that this problem is only present when accessing the environment from our internal network. When the same is done from Internet the upload works. This has been tested from a couple of computers and at least one of them did not have proxies configured. I am not certain whether this issue is caused by problem in network, a bug in Liferay + Tomcat bundle or a combination of these. The problem repeats each time when file upload is tried so we need to further investigate the cause.