Are you sure the JVM has enough memory ?

long totalMemory = Runtime.getRuntime().totalMemory();
long freeMemory = Runtime.getRuntime().freeMemory();
long maxMemory = Runtime.getRuntime().maxMemory();
log.info("totalMemory="+totalMemory);
log.info("freeMemory ="+freeMemory);
log.info("maxMemory  ="+maxMemory);


-----Message d'origine-----
De : s prasad [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 2 avril 2004 15:12
À : [EMAIL PROTECTED]
Objet : Re: Tomcat Site slow and stops responding after certain number
of threads


We have 4 gigs of memory on the box, although the entire machine peaks at 
around 2 Gigs we have other sites on the same server running same code that 
are perfectly alright. But, when the thread count on a site increases beyond 
the magic number of 107, its slow responding and then a little later it 
stops responding.

Prasad

>From: Peter Lin <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: Tomcat Users List <[EMAIL PROTECTED]>
>Subject: Re: Tomcat Site slow and stops responding after certain number of 
>threads
>Date: Thu, 1 Apr 2004 20:37:30 -0800 (PST)
>
>
>windows by default allocates 1mb of memory per thread.
>107 threads shouldn't cause any problems, unless your
>system only has 128mb of ram. From first hand
>experience, once the allocated memory reach half the
>physical ram, windows starts to disk cache. Once that
>happens, GC performance gets worse. In fact in .NET
>1.0, disk caching causes heap fragmentation and memory
>leaks. If disk cache is kicking in, the performance
>issues may be the result of heap fragmentation, which
>kills GC performance.
>
>peter lin
>
>
>--- sp k <[EMAIL PROTECTED]> wrote:
> > We have a Tomcat site which becomes terribly slow
> > and then stops responding
> > after the thread count in windows task manager
> > reaches 107 threads. We are
> > using Tomcat 4.1.27 on windows 2000 machine.  Our
> > load tests could never
> > emulate this behavior that occurs under real load.
> > When the site crashes the
> > memory consumption of the site is less than the
> > initial max heap size set
> > for it.
> >
> > Did any one ever face similar issues, we are baffled
> > as to why 107 threads?
> > Is related to the connector threads or JVM's garbage
> > collection?
> >
> > Does anyone have any idea why the site would crash
> > at the same thread level?
> >
> > Thanks,
> > Prasad
> >
> >
>_________________________________________________________________
> > Get rid of annoying pop-up ads with the new MSN
> > Toolbar - FREE!
> > http://toolbar.msn.com/go/onm00200414ave/direct/01/
> >
> >
> >
>---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Small Business $15K Web Design Giveaway
>http://promotions.yahoo.com/design_giveaway/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________
Get rid of annoying pop-up ads with the new MSN Toolbar - FREE! 
http://toolbar.msn.com/go/onm00200414ave/direct/01/


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


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

Reply via email to