Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5112

Responses served from cache can throw a RuntimeException that should be ignored (Occasional broken pipe for DINWebPro.woff)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.5.10, 5.0
    • None
    • None
    • None
    • Yes
    • RC 1, RC 2

      Cause and proposed fix

      When a request is interrupted (by the browser), containers typically throw a subclass of IOException (Tomcat throws a org.apache.catalina.connector.ClientAbortException, Jetty throws an org.mortbay.jetty.EofException, ...). We already treat this in a few places: (look for catch (IOException) snippet)

      • info.magnolia.rendering.engine.RenderingFilter#doFilter
      • info.magnolia.rendering.engine.RenderingFilter#handleResourceRequest
      • info.magnolia.cms.servlets.ClasspathSpool#streamSingleFile

      We could do the exact same thing in CacheFilter. We already catch all exceptions; checking if it's an IO and swallowing it there isn't perfect or ideal, but at least it'll be consistent with the rest. (In this specific case we need to make we still unlock the cache if needed).
      After discussions, we decided to do this in UseCache instead, thus avoiding accidentally swallowing IOExceptions coming from further down the chain.

      Proposed improvements

      Centralize and avoid code duplication; would allow for smarter/more complete handling of this. See MAGNOLIA-5113.

      Symptoms

      bundle (integration tests) occasionally fail because of the following error:

      [INFO] [talledLocalContainer] 2013-06-13 06:31:55,647 ERROR info.magnolia.module.cache.filter.CacheFilter     : A request started to cache but failed with an exception (IOException: Broken pipe). [url=http://localhost:8088/magnoliaTestPublic/.resources/defaultLoginForm/css/fonts/DINWebPro.woff], [key=DefaultCacheKey{uri='/.resources/defaultLoginForm/css/fonts/DINWebPro.woff', serverName='localhost', locale='en', channel='desktop', params={}', secure='false'}]
      [WARNING] [talledLocalContainer] 2013-06-13 06:31:55.676:WARN::/magnoliaTestPublic/.resources/defaultLoginForm/css/fonts/DINWebPro.woff
      [WARNING] [talledLocalContainer] java.lang.RuntimeException: org.mortbay.jetty.EofException
      

      This sometimes also happens locally now...

        Acceptance criteria

              gjoseph Magnolia International
              dlipp Daniel Lipp
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: