tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raj Mettai" <rmet...@broward.edu>
Subject Re: broken pipe and outof memory error
Date Thu, 12 Sep 2002 21:27:17 GMT
Hi,

If your servlets or JSP pages have any problems and you see
"java.lang.OutOfMemoryError" in your log files or in a stack trace
generated by the Java Virtual Machine (JVM), then you probably need to
increase the JVM's maximum heap size.

Solaris 1.2 and 1.3 JVMs have a default maximum heap size of 64 MB (and
a default minimum heap size of 1 MB). This is a more reasonable figure,
but most enterprise level, server-side Java applications require a much
higher setting. What setting you choose should be determined by testing
and trial and error. It is highly application and load dependent. A good
starter article that gives some pointers on how to estimate optimal heap
settings is here, at IBM's Java site:
"http://www-106.ibm.com/developerworks/library/tip-heap-size.html". 

You should not try to catch OutOfMemoryErrors in your application. They
are not generally predictable. And when they do happen, there's nothing
to be done to recover, because by then the JVM is out of memory and the
garbage collector is unable to free any memory for further work. 

Increase the heap size to max value, also try to allocate same value
both for min and max parms(Xms512m -Xmx5128m) this should help 
decreasing heap problems.

Actually BrokenPipe errors indicate a networking problem. Data can be
sent across the network using pipes in Java. If the pipe suffers some
sort of problem an IO exception will be thrown. This are typically seen
when a networking problem exists that is serious. Also, could be the
result of a servlet timing out. If a servlet makes a connection to a
database and the query it requested exceeds the configured timeout
period, the thread will timeout and the socket will be closed. The
system will throw this exception when it tries to write out the results
of the query and discovers that the socket has been closed.


Hope this helps........

-Raj








>>> craig.franke@harlingen.tstc.edu 09/12/02 04:30PM >>>
I've had a similar problem with Novell Portal Services on a Win2k/Apache
2.0.40/Tomcat 4.1.10/JDK 1.4 box... memory usage kept climbing and
eventually had to reboot system twice after memory usage got to 181M and
tomcat spit back a outofmemory error.  Tried adding -Xms64m to
catalina.bat to see if this would help.  Apache is the one that starts
Tomcat...  Then basically logged into the program found a page and held
the refresh key.  7 minutes and 200 megs of ram in use later, apache
took over almost all the processor time.  Though it looks like it locked
all the threads up for apache on the server in my case.

>>> geeta@bhelhwr.co.in 09/12/02 12:24AM >>>

Hello,
Following error occurs when a JSP program accesed by number users, this 
program access information from database though JDBC. Sometime it works 
fine but when the no. of users accessing it increases , the tomcat
server crash 
with broken pipe or outofmemory error. We had increased the memory 
also using 
-Xms32m -Xmx256m
But still we are facing the same problem.

Error is as following:

2002-09-09 09:28:21 - /vtr: Broken pipe in R( /vtr + /jsp/checkin.jsp +
null)
- java.io.IOException: Broken pipe
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.socketWrite(Compiled Code)
    at java.net.SocketOutputStream.write(Compiled Code)
    at org.apache.tomcat.modules.server.Http10.sendHeaders(Compiled
Code)
    at org.apache.tomcat.modules.server.HttpResponse.endHeaders(Compiled
Code)
    at org.apache.tomcat.core.OutputBuffer.realWriteBytes(Compiled Code)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(Compiled Code)
    at org.apache.tomcat.core.OutputBuffer.flush(Compiled Code)
    at org.apache.tomcat.core.OutputBuffer.close(Compiled Code)
    at org.apache.tomcat.core.Response.finish(Compiled Code)
    at org.apache.tomcat.core.ContextManager.service(Compiled Code)
    at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Compiled
Code)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled
Code)
    at java.lang.Thread.run(Thread.java:485)

2002-09-09 09:30:06 - /vtr: Broken pipe in R( /vtr +
/appl/Qual/jsp/reports.jsp + null) - java.io.IOException: Broken pipe
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.socketWrite(Compiled Code)
    at java.net.SocketOutputStream.write(Compiled Code)
    at org.apache.tomcat.modules.server.Http10.sendHeaders(Compiled
Code)
    at org.apache.tomcat.modules.server.HttpResponse.endHeaders(Compiled
Code)
    at org.apache.tomcat.core.OutputBuffer.realWriteBytes(Compiled Code)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(Compiled Code)
    at org.apache.tomcat.core.OutputBuffer.flush(Compiled Code)
    at org.apache.tomcat.core.OutputBuffer.close(Compiled Code)
    at org.apache.tomcat.core.Response.finish(Compiled Code)
    at org.apache.tomcat.core.ContextManager.service(Compiled Code)
    at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Compiled
Code)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled
Code)
    at java.lang.Thread.run(Thread.java:485)

2002-09-09 10:33:44 - /vtr: Status code:404 request:R( /vtr +
/appl/Qual/qtop.html + null) msg:null
2002-09-09 10:33:44 - /vtr: Status code:404 request:R( /vtr +
/appl/Qual/qbot.html + null) msg:null
2002-09-09 10:33:59 - /vtr: Exception in R( /vtr +
/appl/TurnOver/edata.jsp + null)
- java.lang.OutOfMemoryError

Thanks in advance,

-Geeta Singh




--
To unsubscribe, e-mail:  
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:  
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message