Another person getting WEB8004: Error flushing the output stream

I've seen a couple posts about this, but no solutions yet....

The problem is when we run our application under a certain amount of load, it fails at a particularly heavy processing page with the following error:

java.io.IOException: WEB8004: Error flushing the output stream

at com.iplanet.ias.web.connector.nsapi.NSAPIConnector.flush(NSAPIConnector.java:70 4)

at com.iplanet.ias.web.connector.nsapi.NSAPIResponseStream.flush(NSAPIResponseStre am.java:97)

at com.iplanet.ias.web.connector.nsapi.NSAPIResponse.flushBuffer(NSAPIResponse.jav a:131)

and then it won't accept any more requests. There arent' any other exceptions logged, and the webserver doesn't crash.

We think it has something to do with response time, as we changed database drivers and saw a big performance improvement, but under double the original load we still see this error.

If it's as simple as improving our response time, that's fixable.... But why is it that this error is happening and making the app unresponsive? Is there anything else we can do to fix this problem?

Thanks!

[1120 byte] By [powagoata] at [2007-11-27 1:03:32]
# 1

That exception isn't related to the hang you're seeing. The exception simply indicates that the client disconnected before the application finished sending the response, and the application didn't catch the IOException. It won't cause a hang.

As for the hang, you may wish to attach a Java debugger or send a SIGQUIT signal to the JVM to see what's going wrong in your application.

elvinga at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...
# 2

That certainly seems to be what the server thinks, but I have a suspicion that something much worse is going on. When this happens, it affects all of the web load clients simultaneously, and attempts to reach the server by browser fail as well. When researching it, I found one person who saw this problem with a static html page ?the server would stop serving it up and instead deliver this error.

This problem did not occur under iPlanet 6.0, and the code has only changed enough to work with 6.1.

My fear is that there抯 a defect in 6.1.

powagoata at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...
# 3
Update:We used a previous installation of the 6.1 server and now this problem has gone away. There seems to be some issue with the way it was installed that's causing this issue.
powagoata at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...
# 4
HiWe are seeing this too on our servers. Could you please elaborate on the way it was installed? Thanks.
coolbluea at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...
# 5

Hey,

I am getting this error in our live environment but I can't reproduce it, pretty similar to yours.

We're using Struts, Tiles and SiteMesh, it only happens the odd time and is strange. The page that the error is thrown from loads when I go to it but periodically fails in the error logs. Very strange error.

I think there is something to do with users client aborting the connects? Is there any way to stop the exception or atleast prevent it?

One last question, if an exception is being thrown is there a performace/memory hit on the server?

Using 6.1 SP6

[23/Apr/2007:14:15:25] failure ( 4882): for host 83.141.69.81 trying to GET /myv/index.jsp, service-j2ee reports: StandardWrapperVal

ve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception

java.io.IOException: WEB8004: Error flushing the output stream

at com.iplanet.ias.web.connector.nsapi.NSAPIConnector.flush(NSAPIConnector.java:743)

at com.iplanet.ias.web.connector.nsapi.NSAPIResponseStream.flush(NSAPIResponseStream.java:97)

at com.iplanet.ias.web.connector.nsapi.NSAPIResponse.flushBuffer(NSAPIResponse.java:131)

at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:219)

at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:189)

at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:189)

at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:485)

at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:123)

at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:138)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:374)

at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)

at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)

at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)

at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:787)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)

at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:772)

at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:471)

at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:123)

at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:138)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:374)

at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:443)

at _jsps._myv._index_jsp._jspService(_index_jsp.java:63)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)

at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:687)

at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:459)

at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)

at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)

at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)

at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ApplicationFilterChain.

[23/Apr/2007:14:15:25] failure ( 4882): for host 83.141.69.81 trying to GET /myv/index.jsp, service-j2ee reports: ErrorDispatcherVal

ve[https-www.vodafone.ie]: Exception Processing ErrorPage[errorCode=500, location=/myv/services/error/undecorated_error.jsp]

java.lang.IllegalStateException: WEB3025: Cannot reset after response has been committed

at org.apache.catalina.connector.ResponseBase.reset(ResponseBase.java:913)

at org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.java:796)

at com.iplanet.ias.web.connector.nsapi.NSAPIResponse.reset(NSAPIResponse.java:251)

at org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.java:372)

at org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java:433)

at org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.java:346)

at org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherValve.java:288)

at org.apache.catalina.valves.ErrorDispatcherValve.postInvoke(ErrorDispatcherValve.java:195)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:516)

at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)

at com.iplanet.ias.web.WebContainer.service(WebContainer.java:579)

eoin_aa at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...
# 6
One last question, if an exception is being thrown is there a performace/memory hit on the server?no, i wouldn't expect a performance hit because of this exception.
chilidevelopera at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...
# 7
Can any body post the solution of this problem? I am also facing the same problem and for the worst part the web server stops responding. Evertime this happens we have to restart the web server.
Rajarsia at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...
# 8
Please paste the contents of the magnus.conf. That will help us resolving the hang of the webserver, not the exception.
floyda at 2007-7-11 23:38:37 > top of Java-index,Web & Directory Servers,Web Servers...