我正在一个在Weblogic 12c上运行ATG(Oracle Commerce)11.1并连接到Endeca实例的环境中工作 . 在Weblogic日志文件中,我经常 IOException ,我认为这会对网站的整体稳定性产生连锁反应 . 错误如下:

####<24 Nov 2015 2:47:39 PM> <Error> <HTTP> <SERVER-1> <instance-1> <[ACTIVE] ExecuteThread: '116' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1448369259872> <BEA-101019> <[ServletContext@1433232248[app:ATGProduction module:store path:null spec-version:3.0]] Servlet failed with an IOException.
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:487)
at weblogic.socket.NIOSocketMuxer$NIOOutputStream.writeInternal(NIOSocketMuxer.java:1064)
at weblogic.socket.NIOSocketMuxer$NIOOutputStream.write(NIOSocketMuxer.java:983)
at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:622)
at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:587)
at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:472)
at weblogic.servlet.internal.CharsetChunkOutput.flush(CharsetChunkOutput.java:301)
at weblogic.servlet.internal.ChunkOutput$3.checkForFlush(ChunkOutput.java:727)
at weblogic.servlet.internal.CharsetChunkOutput.write(CharsetChunkOutput.java:203)
at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:153)
at weblogic.servlet.jsp.JspWriterImpl.write(JspWriterImpl.java:275)
at jsp_servlet._tags._store.__contentitem_tag._jsp__tag2(__contentitem_tag.java:321)
at jsp_servlet._tags._store.__contentitem_tag._jsp__tag1(__contentitem_tag.java:272)
at jsp_servlet._tags._store.__contentitem_tag.doTag(__contentitem_tag.java:196)
at jsp_servlet._cartridges._pageslot.__pageslot._jsp__tag6(__pageslot.java:412)
at jsp_servlet._cartridges._pageslot.__pageslot._jsp__tag5(__pageslot.java:371)
at jsp_servlet._cartridges._pageslot.__pageslot._jsp__tag2(__pageslot.java:258)
at jsp_servlet._cartridges._pageslot.__pageslot._jspService(__pageslot.java:128)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:587)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:273)

错误在 contentitem.tag 文件中一致地发生,如下所示:

<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/include/taglibs.jspf" %>

<%@ attribute name="contentItem" required="true" rtexprvalue="true" type="java.util.Map"%>

<dsp:getvalueof var="include" value="${contentItem['@type']}" />
<c:choose>
    <c:when test="${empty contentItemKey && !empty include}">
        <dsp:include page="/cartridges/${include}/${include}.jsp">
            <dsp:param name="contentItem" value="${contentItem}"/>
        </dsp:include>
    </c:when>
    <c:when test="${!empty contentItemKey}">
        <c:out value="${contentItem[contentItemKey]}" escapeXml="false" />
    </c:when>   
</c:choose>

更改Weblogic中的ChunkSize参数会有什么好处吗?目前它仍处于默认的4k .

这个问题总是出现在 contentitem.tag 文件中,这是我们解包和渲染Endeca相关内容的方式,这是巧合吗?标签文件由其包含的盒式磁带递归调用 .

有关如何解决此问题的任何建议,表示赞赏 .


更新:

虽然没有明确回答这个问题,但是一旦我们意识到weblogic.xml中的 <page-check-seconds> 指令无意中被设置为0(即每次请求都编译页面),我们已经在减少(不消除) IOException 方面取得了重大进展 . 这导致多个线程尝试编译相同的页面片段 . 稳定性已大大改善,但尚未根除 .