2

we have a WebLogic application serving PDF files (among many other things).

We have problem such that sometimes some of the files seem to fail when loaded with Internet Explorer.

  • WebLogic version 10.3.3.0
  • IE 8.0 tested so far positive
  • Problems also with Firefox
    • It might be that there were some files that had problems with IE but didn't have problems with Firefox (not 100% sure)
  • Seems to happen for some files (at least for a couple of times) with different computers
  • Most of the files work fine
  • PDF files are generated beforehand and available at the file system.

At these errors, we get the following stack trace:

####<Aug 16, 2012 10:30:26 AM EEST> <Error> <HTTP> <host-name> <Front2S> <[ACTIVE] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1345102226691> <WL-101019> <[ServletContext@454961994[app:appname module:modulename path:/pathname spec-version:2.5]] Servlet failed with IOException
java.io.IOException: failed to read '2607' bytes from InputStream; clen: 162774 remaining: 2607 count: 1359
        at weblogic.servlet.internal.ChunkOutput.writeStream(ChunkOutput.java:417)
        at weblogic.servlet.internal.ChunkOutputWrapper.writeStream(ChunkOutputWrapper.java:178)
        at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:520)
        at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:508)
        at weblogic.servlet.FileServlet.sendFile(FileServlet.java:410)
        at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:234)
        at weblogic.servlet.FileServlet.service(FileServlet.java:173)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:344)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
    ...
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:151)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:238)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:168)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

With some googling, I've found that something like this could happen if the file is modified during the transfer.

  • At least we can't see how this could happen (the script generating the files runs at night and the errors are got at the daytime)
  • This also happens multiple times for partifular files

Long time ago, we had similar issue with WebLogic file metadata caching but disabling metadata caching fixed that.

<wls:container-descriptor>
    <wls:resource-reload-check-secs>0</wls:resource-reload-check-secs>
</wls:container-descriptor>

Some ideas?

Br, Touko

1 Answer 1

3

You are right regarding the error cause. The issue happens when the file is modified while it is being read.

Your configuration of the resource-reload-check-secs is correct. Keep it to 0 (zero) so that WLS will reload the latest file.

Check if you are using the page-check-seconds setting and whether the setting's value is 0. This setting overrides the resource-reload-check-secs so in case you have a value different than 0 (zero) then set it to 0.

In conclusion my proposal is to add the page-check-seconds setting with value 0 in weblogic.xml and increase the weblogic.Chunksize in case you have large request sizes. The property's value should be multiples of the network’s MTU after subtracting any Ethernet or TCP header sizes.

I hope the following configuration of weblogic.xml will help you:

<jsp-descriptor>
    <page-check-seconds>0</page-check-seconds>
</jsp-descriptor>
<container-descriptor>
    <resource-reload-check-secs>0</resource-reload-check-secs>
</container-descriptor>

Furthermore please note that there are patch fixes for this issue.

Sign up to request clarification or add additional context in comments.

2 Comments

We aren't using page-check-seconds setting ATM, got to consider setting it to 0 explicitly. Thanks!
I forgot to mention that except the page-check-seconds configuration maybe you could also consider increasing the -Dweblogic.Chunksize if the request sizes are large. The property's value should be multiples of the network’s MTU after subtracting any Ethernet or TCP header sizes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.