tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rony <r...@sslindia.com>
Subject Re: java.lang.OutOfMemoryError
Date Sat, 27 Apr 2002 06:56:33 GMT
Hi,
    Why don't you guys use a Profiler tool like the 'OptimizeIT' which can give you a very
clear picture on where the actuall memory toll is!!. We had similar problems when our application
was run on
'Apache 1.3.22+Tomcat3.2.2', but finally after a thorough analysis we found that the problem
really was on the 'Connection objects'.

Please make sure that the connection objects used in the application is properly returned
to the pool after use and is killed when the load on the server goes less. This will give
an optimum
performance and reduce the memory being eaten up by the server.

Hope this will fix your problems..

Regards
H.Rajesh
(Webteam - SSPL)
webteam@sslindia.com
India.

tomcat@downtownhost.com wrote:

> Hello
>
> Did you found an answer to this? its happening in my server too.
> I have the same configuration than you but with Tomcat 4.0.3.
>
> --
> Best regards,
>
> NG> Hi,
>
> NG> My website is using the following versions of software:
>
> NG> Struts 1.0.2
> NG> Apache 1.3.22
> NG> Tomcat 4.0.2
> NG> Java Runtime Env 1.4
> NG> MySQL 3.23.41
> NG> RedHat Linux 7.2 using Linux 2.4 kernel
>
> NG> 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.
>
> NG> 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:
>
> NG> java.lang.OutOfMemoryError: unable to create new native thread
> NG>         at java.lang.Thread.start(Native Method)
> NG>         at org.apache.catalina.connector.warp.WarpConnection.start(WarpConnection.java:159)
> NG>         at org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.java:601)
> NG>         at java.lang.Thread.run(Thread.java:536)
> NG> java.lang.OutOfMemoryError: unable to create new native thread
> NG>         at java.lang.Thread.start(Native Method)
> NG>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
> NG>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
> NG>         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
> NG>         at java.io.OutputStream.write(OutputStream.java:58)
> NG>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
> NG>         at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
> NG>         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
> NG>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:556)
> NG>         at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1144)
> NG>         at sun.net.www.protocol.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1158)
> NG>         at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(DashoA6275)
> NG>         at com.mandalaybay.actions.ResNetStatus.run(ResNetStatus.java:52)
>
> NG> Once I restart Tomcat, memory is freed up and the site goes along until this error
occurs again a week or two later.
> NG> 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
> NG> out of memory problem only sporadically.
>
> NG> Has anyone else encountered this problem?
> NG> If not, does anyone have some really good tools/commands which can help determine
the cause of the problem?
>
> NG> My JVM settings have default heap size 128MB and max size 256MB by using the following
command:
> NG> JAVACMD="$JAVA_HOME/bin/java -Xms128m -Xmx256m"
>
> NG> --
> NG> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> NG> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> NG> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message