AnsweredAssumed Answered

Preview of huge pptx and docx documents is failing

Question asked by kriton on May 21, 2012
Latest reply on Sep 27, 2012 by pmverma
According to this wiki page there is a limit on the size of documents that can be previewed. I followed the guidelines in it to increase the limits but still not anything is working alright.

The thing is that the webscript that was calling the transformer was timing out I guess, because the transformation is taking too long. If I refresh the document details page after the preview was generated, the preview is now displayed with almost no delay as the preview already exists this time. I have to note that the machine running alfresco is quite slow and generating the preview according to the logs takes about 5minutes.
This is the exception that I was getting after I tried to preview a document of 20MBs that I just uploaded:

11:36:48,533 INFO  [org.springframework.extensions.webscripts.connector.RemoteClient] Error status 499 Read timed out Read timed out
        at Method)
        at org.apache.commons.httpclient.HttpParser.readRawLine(
        at org.apache.commons.httpclient.HttpParser.readLine(
        at org.apache.commons.httpclient.HttpConnection.readLine(
        at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(
        at org.apache.commons.httpclient.HttpMethodBase.readResponse(
        at org.apache.commons.httpclient.HttpMethodBase.execute(
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(
        at org.apache.commons.httpclient.HttpClient.executeMethod(
        at org.apache.commons.httpclient.HttpClient.executeMethod(
        at org.springframework.extensions.webscripts.connector.RemoteClient.service(
        at org.springframework.extensions.webscripts.servlet.mvc.EndPointProxyController.handleRequestInternal(
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(
        at org.springframework.web.servlet.DispatcherServlet.doService(
        at org.springframework.web.servlet.FrameworkServlet.processRequest(
        at org.springframework.web.servlet.FrameworkServlet.doGet(
        at javax.servlet.http.HttpServlet.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.ApplicationDispatcher.invoke(
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(
        at org.apache.catalina.core.ApplicationDispatcher.doForward(
        at org.apache.catalina.core.ApplicationDispatcher.forward(
        at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        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.authenticator.AuthenticatorBase.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(

Now, according to this jira ticket this can be configured as of 4.0. I have to note that the code listed under this ticket does not exist in 4.0.d and the bean configuration was pointing to a different class than the one listed under that ticket. Actually that ticket seems to have been created after the 4.0.d release so I guess the fix might come in 4.1.a? Anyway I added the code listed in that ticket in slingshot-application-context.xml and set the timeout to 10mins up from 2. This worked fine….

But now I faced another problem. Apparently the swf that displays the preview has a separate timeout field…. So even though the webscript does not timeout…. the swf still displays a timeout message and does not display the preview. The logs print this error:
2012-05-21 13:07:46,935 WARN [webscripts.connector.RemoteClient] [http-8080-32] Exception during close() of HTTP API connection
ClientAbortException: Broken pipe

… which I guess makes perfect sense and can verify that this is what is indeed happening?

Now the problem is that I cannot find how to increase the timeout of the swf. Is that even possible ? I am also open to other suggestions if you have any for solving my problem.