Hi,

My website is using the following versions of software:

Struts 1.0.2 
Apache 1.3.22
Tomcat 4.0.2 
Java Runtime Env 1.4
MySQL 3.23.41
RedHat Linux 7.2 using Linux 2.4 kernel

Over a period of time, while running "top" I see memory being eaten up on my box (box 
has 1GB of RAM). Free memory goes down to about 5-15MB which is way too low.

Occasionally (i.e. once a week or once every two weeks), the site goes down/can't send 
responses. I see the following error in my /var/tomcat4/logs/catalina.out file:


java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start(Native Method)
        at 
org.apache.catalina.connector.warp.WarpConnection.start(WarpConnection.java:159)
        at org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.java:601)
        at java.lang.Thread.run(Thread.java:536)
java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start(Native Method)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
        at java.io.OutputStream.write(OutputStream.java:58)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
        at 
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:556)
        at 
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1144)
        at 
sun.net.www.protocol.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1158)
        at 
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(DashoA6275)
        at com.mandalaybay.actions.ResNetStatus.run(ResNetStatus.java:52)

Once I restart Tomcat, memory is freed up and the site goes along until this error 
occurs again a week or two later.
Looks like a memory leak, but not sure the real cause. I saw a similar problem which 
occurred much more frequently  with Tomcat 4.0.2 with JVM 1.3 so I've upgraded to JVM 
1.4 and now receive an out of memory problem only sporadically.

Has anyone else encountered this problem?
If not, does anyone have some really good tools/commands which can help determine the 
cause of the problem?

My JVM settings have default heap size 128MB and max size 256MB by using the following 
command:
JAVACMD="$JAVA_HOME/bin/java -Xms128m -Xmx256m"


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to