Re: AW: serious problem with Tomcat JVM running out of memory

2001-11-03 Thread Pier Fumagalli

manju at [EMAIL PROTECTED] wrote:

> Hi,
> 
> We are facing serious problems with the above problem when running jsp on
> tomcat/linux. Could anyone please update me on the current status of handling
> this problem.
> 
> It is extremely critical for us. Please reply ASAP.

As far as I know there are no memory leaks in the latest releases of Tomcat
in Tomcat. Please verify your application because 99% sure there is your
problem.

Pier


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




AW: serious problem with Tomcat JVM running out of memory

2001-11-03 Thread manju

Hi,

We are facing serious problems with the above problem when running jsp on 
tomcat/linux. Could anyone please update me on the current status of handling this 
problem.

It is extremely critical for us. Please reply ASAP.

Manjunath



Re: AW: Serious problem with Tomcat JVM running out of memory

2001-06-19 Thread Tom Amiro

Thomas Bezdicek wrote:

> Hi,
>
> hmm, i just quickly looked at the code, and my first (and possible
> not true, but first and only) idea was, what about the class
> DocumentCache ??? is it freeing the memory, do you use explicit
> System.gc() there from time to time (maybe use a timer-task)?

I've set the size of the cache to (1) because there is only one
1.5MB XML file being transformed by the servlet. The file  is updated
infrequently and the cache is updated accordingly. I haven't done
explicit System.gc(); I was assuming the DocumentCache object
was getting replaced in place.


> We are using it quite the same technics (except translets,
> just because it will need a lot of testing before implementing)
> and we had also a memory problem which was caused by a quite
> unclean behavior of a cache-class.

Here's more data on the pattern of memory usuage.
I got the heap size from the servlet by doing
rt.totalMemory()-rt.freeMemory(). Here's
some data ending with the servlet being accessed
for the 388th time. The change in memory is
enourmous.

in search servlet Heap size: 127433632
in search servlet Heap size: 130209136
in search servlet Heap size: 101303624
in search servlet Heap size: 107158080
in search servlet Heap size: 112277496
in search servlet Heap size: 117602496
in search servlet Heap size: 123471064
in search servlet Heap size: 115313744
in search servlet Heap size: 123947424
in search servlet Heap size: 115989448
in search servlet Heap size: 123113392
in search servlet Heap size: 128074312
in search servlet Heap size: 127979096
in search servlet Heap size: 132658448
in search servlet Heap size: 108687936
in search servlet Heap size: 132478184
in search servlet Heap size: 110560664
in search servlet Heap size: 121183272
in search servlet Heap size: 126615216

The changes in the heap sizes each time the servlet is
run are enormous. What could be causing this?

Tom

> hope it helps, tom
>
> > -Ursprungliche Nachricht-
> > Von: Tom Amiro [mailto:[EMAIL PROTECTED]]
> > Gesendet: Montag, 18. Juni 2001 23:06
> > An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Betreff: Serious problem with Tomcat JVM running out of memory
> >
> >
> > Hi,
> >
> > Yes I've tried that and it did not seem to help.
> >
> > I'm using the XSLTC processor from Sun that compiles
> > XSL stylesheets into translets (java byte code).
> >
> > Tom
> >
> > Hi, have you tried to set java memory parameters in tomcat.sh
> > at TOMCAT_OPTS (e.g. -Xmx256m -Xms128m).
> > We are running a quite large application without problems
> > after setting these parameters.
> >
> > regards, tom
> >
> > btw: what xslt-processor do you use, cause we are experiencing
> > an enormous performance leak using xalan compared to ms-xml
> > (40 sec to 3 msec) xalan on solaris 8 440Mhz, ms-xml on
> > w2k P3-850.
> >
> > > -Ursprungliche Nachricht-
> > > Von: Tom Amiro [mailto:[EMAIL PROTECTED]]
> > > Gesendet: Sonntag, 17. Juni 2001 22:33
> > > An: [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Betreff: serious problem with Tomcat JVM running out of memory
> > >
> > >
> > > Hello,
> > >
> > > I am at the end of my rope. A couple of weeks ago, I tried to
> > > deploy a Java servlet
> > > that gets about 300-400 hits a day using Tomcat in stand-alone mode
> > > and Tomcat keeps running out of memory and crashing.  The servlet
> > > does an XSLT transformation
> > > on an XML file about 1.5MB large. I was planning on integrating
> > > Tomcat into the main Apache
> > > server after finishing the development, but haven't been able to
> > > get that far.
> > >
> > > I've tried a lot of things and collected a lot of data, but have
> > > not been able to prevent
> > > the Tomcat heap from growing and growing, until TC crashes.
> > The terminal
> > > window shows lots of out-of-memory messages coming from the
> > servlet before
> > > the crash -- so I know it is servlet. Tomcat is only running the
> > > servlet (that gets
> > > 300-400 hits a day) and some JSP data entry tools used to
> > > maintain the XML file.
> > > I've found that even when we refrain from using the data entry
> > > tools, and just
> > > let the servlet run the problem still happens. The JSPs add to
> > > it, but even  with
> > > them out of the picture, the situation is untenable.
> > >
> > > I've spent more than 6 months developing this application -- an event
> > > calendar -- and was forced to put it into production before it
> > was tested.
> > > But Java servlets and JSPs are supposed to make it easier to create web
> > > applications, right?
> > >
> > > At first, I thought I must be something wrong. So I did every
> > > thing I could
> > > to plug memory leaks in my code. The thing that really perplexes
> > > me is that
> > > the heap -- (rt.totalMemory()-rt.freeMemory() --will hover
> > around 75M for
> > > quite a while and then seem to jump in leaps and bounds --
> > > sometimes 5-10MB at a time.
> > >

AW: serious problem with Tomcat JVM running out of memory

2001-06-17 Thread Thomas Bezdicek

Hi, have you tried to set java memory parameters in tomcat.sh
at TOMCAT_OPTS (e.g. -Xmx256m -Xms128m).
We are running a quite large application without problems
after setting these parameters.

regards, tom

btw: what xslt-processor do you use, cause we are experiencing
an enormous performance leak using xalan compared to ms-xml
(40 sec to 3 msec) xalan on solaris 8 440Mhz, ms-xml on
w2k P3-850.

> -Ursprungliche Nachricht-
> Von: Tom Amiro [mailto:[EMAIL PROTECTED]]
> Gesendet: Sonntag, 17. Juni 2001 22:33
> An: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Betreff: serious problem with Tomcat JVM running out of memory
>
>
> Hello,
>
> I am at the end of my rope. A couple of weeks ago, I tried to
> deploy a Java servlet
> that gets about 300-400 hits a day using Tomcat in stand-alone mode
> and Tomcat keeps running out of memory and crashing.  The servlet
> does an XSLT transformation
> on an XML file about 1.5MB large. I was planning on integrating
> Tomcat into the main Apache
> server after finishing the development, but haven't been able to
> get that far.
>
> I've tried a lot of things and collected a lot of data, but have
> not been able to prevent
> the Tomcat heap from growing and growing, until TC crashes.  The terminal
> window shows lots of out-of-memory messages coming from the servlet before
> the crash -- so I know it is servlet. Tomcat is only running the
> servlet (that gets
> 300-400 hits a day) and some JSP data entry tools used to
> maintain the XML file.
> I've found that even when we refrain from using the data entry
> tools, and just
> let the servlet run the problem still happens. The JSPs add to
> it, but even  with
> them out of the picture, the situation is untenable.
>
> I've spent more than 6 months developing this application -- an event
> calendar -- and was forced to put it into production before it was tested.
> But Java servlets and JSPs are supposed to make it easier to create web
> applications, right?
>
> At first, I thought I must be something wrong. So I did every
> thing I could
> to plug memory leaks in my code. The thing that really perplexes
> me is that
> the heap -- (rt.totalMemory()-rt.freeMemory() --will hover around 75M for
> quite a while and then seem to jump in leaps and bounds --
> sometimes 5-10MB at a time.
>
> In the very beginning, I sent mail to the users group and have implemented
> suggestions, like increasing the file descriptors to 1024,
> minimizing sessions
> (session.setMaxInactiveInterval(120), starting the Tomcat JVM with more
> memory (-Xmx160m).  That has helped somewhat. It takes longer to
> crash with a 90MB core file filling up my /usr/local partition,
> but it hasn't
> stayed up more than 24 hours.
>
> Here's the configuration:
>
>   - Solaris 2.7 on an Ultra-2 with all the patches.
>   - one processor with 512MB memory
>   - Java 1.3 is installed
>   - Tomcat 3.2.2 jars
>   - Session timeout 120 seconds
>   - Using the thread pool with
> max_threads 25
> max_spare_threads 10
> min_spare_threads 5
>
> I've started the TC JVM from the command line and done Ctrl-\,
> but my telnet application's buffer isn't big enough to capture the
> highest session, and I don't know what to look for.
>
> I've been using the 'top' command to monitor the Tomcat
> process. It shows the memory going up and up. Not sure
> how to read it. With the max heap set to 160M, I've seen top
> show the SIZE get up to 215M before the crash. Right now
> its at 156M SIZE 52M RES.
>
> >From time to time this error keeps popping up.
>
> 2001-06-17 04:10:36 - ContextManager: SocketException reading
> request, ignored -
>  java.net.SocketException: Connection reset by peer
> at java.net.PlainSocketImpl.socketAvailable(Native Method)
> at java.net.PlainSocketImpl.available(PlainSocketImpl.java:451)
> at
> java.net.SocketInputStream.available(SocketInputStream.java:137)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
> n(HttpConnectionHandler.java:217)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
> :501)
> at java.lang.Thread.run(Thread.java:484)
>
>
> I've attached files to show you the servlet (Transform.java) and the
> configuration files.
>
> What should I do next? There has got to be a way to get this to work.
>
> Please make sure to send email to me and not just to the dev alias,
> as I'm not on the dev alias.
> [EMAIL PROTECTED]
>
> Thanks,
>
> Tom
>
>
>
>
>
>
>
>