Hi mike,

        Well, i tried changing the jvm through catalina.bat (tc 4.0.4) by
adding the Catalina_opts = -Xms512m -Xmx512m but it seems it didn't change
anything in the total memory cause I still see it being at 66m
(www.motovan.com/MemoryTest.jsp)
Anyways, I am reverting back to html for now and will try to incorporate
servlet by servlet until i found where the error comes from.

Thanks, Pat

-----Original Message-----
From: Mike Jackson [mailto:[EMAIL PROTECTED]]
Sent: August 26, 2002 6:31 PM
To: Tomcat Users List
Subject: RE: OUT OF MEMORY ERROR


If you don't close the connection you'll eventually run the database out
of connections.  Also an open connection will use memory within the JVM
and build up the memory in use.  Another thing to do is to avoid using
strings, use stringbuffers instead.  Try to avoid doing things like this:

        String str = "This " + number + " that " + anotherString;

If you do this you're creating a number of string objects, and the garbage
collector may not reclaim the memory quickly.  You can try adjusting the
memory that the JVM grabs at startup as well, the arguement is something
like -Xmx512M (that would grab 512 megs of ram).

One thing to consider, and it works great for me, is to use your servlets
and jsp's for access control through the application, but to use some
XML/XSLT
engine to actually retrieve and format the data coming from the database.
I use Oracle's XSQL Servlet, seems to work great and also seems to be less
filling (memory filling that is).

--mikej
-=-----
mike jackson
[EMAIL PROTECTED]

> -----Original Message-----
> From: Patrick Codere [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 26, 2002 3:15 PM
> To: 'Tomcat Users List'
> Subject: OUT OF MEMORY ERROR
>
>
> Hi everyone,
>
>       I have been getting this error for the past few weeks without
> solving the issue.  But I just found out that I had forgotten to close a
> database connection.  Could that have been the problem?  Time
> will tell, but
> what exactly happens when you don't close a db connection?
>
> Thanks for your help.
>
> Pat
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Reply via email to