On 2/12/2013 10:50 AM, Cool Techi wrote:
Sorry if what I wrote was confusing, actually I have installed YourKit profiler 
and am profiling my tomcat. On checking or blocking threads I get to see the 
following,
Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,

--org.apache.log4j.Category.callAppenders
--com.mysql.jdbc.SingleByteCharsetConverter.getInstance
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
--ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


As I am new to this I am not sure what might be causing this, is it log4j
or something else like dbcp pool.

Help appreciated.

Ayush.


It's most likely your application.

Post a complete thread dump of at least one of the blocked threads. See the following on how to do this:

http://wiki.apache.org/tomcat/HowTo#If_you_are_running_on_Microsoft_Windows

I'm guessing the following:

1. Quartz scheduler writes to a database
2. Some exception happens
3. The exception is logged
4. The connection isn't cleaned up with a finally block
5. Bad things happen . . . .

Or

1. Quartz scheduler writes to a database
2. A log4j entry is written
3. The connection isn't cleaned up
4. Bad things happen . . .

Or

Make up your scenario here . . .

See my previous post on setting up logAbandoned, etc. in a test environment.

Also, first things first, post a complete thread dump of the blocked thread.

. . . . just my two cents.
/mde/


Date: Tue, 12 Feb 2013 18:45:03 +0000
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

On 12/02/2013 18:42, Cool Techi wrote:
I am not logging to database, these are my appenders,

You posted the below in a previous message. It was in a single
unintelligible line.  Perhaps you could clarify what you intended to
post and try again?

  org.apache.log4j.Category.callAppenders
  com.mysql.jdbc.SingleByteCharsetConverter.getInstance
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
  ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


p


<appender name="errorfile" class="org.apache.log4j.DailyRollingFileAppender">
         <param name="File" value="D:/Logs/errorVer.log" />
         <param name="threshold" value="error" />
         <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern" value="%d{yyyy-MMM-dd HH:mm:ss,SSS} %5p 
%c{1}:%L - %m%n" />
         </layout>
     </appender>

     <appender name="debugfile" 
class="org.apache.log4j.DailyRollingFileAppender">
         <param name="File" value="D:/Logs/debugVer.log" />
         <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern" value="%d{yyyy-MMM-dd HH:mm:ss,SSS} %5p 
%c{1}:%L - %m%n" />
         </layout>
         <filter class="org.apache.log4j.varia.LevelRangeFilter">
             <param name="LevelMin" value="debug" />
             <param name="LevelMax" value="debug" />
         </filter>
</appender>

regards,
Ayush

Date: Tue, 12 Feb 2013 18:38:24 +0000
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

On 12/02/2013 17:53, Cool Techi wrote:



I am new to this, I have just installed YourKit and see a lot of threads 
blocked,but currently my response are fine, the blocked thread are showing the 
following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,


       
org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
Does any of these sound like  reason. It would be great to get pointed in the 
right direction.
Regards,Ayush


Oh dear.

Are you doing your app logging to a database?

Is it the same database that your app uses?

Is it the same connection pool that your app uses?


p


Date: Tue, 12 Feb 2013 15:35:40 -0200
From: edsonrich...@hotmail.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

There is a similar thread published a week ago.
It can be caused by almost anything, and my last suspect would be Tomcat
it self.
Most of time, the cause is some programming error, like:
- missing step out of recursive loop
- loading too many objects is memory (for example, when using JPA where
graph of objects are all connected - so, when you load one object, all
database is read into memory)
- some deadlock in multi-threaded application...

How to discover:

1) Try to get a memory dump and check how your memory is being used
2) Get a heap dump (stack trace, as well) or currently running
application when it is hang, and check for deadlocks
3) Use VisualVM to get a big picture of what the virtual machine is doing
4) Put the application running under profiler (like JRockit Mission
Control, or NetBeans profiler)

These are some ideas...

Regards,

Edson


Em 12/02/2013 15:27, Cool Techi escreveu:
Hi,

We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
installed on the server.

The
   server seems to be running smoothly most of the time, but suddenly the
memory used goes very high and tomcat stops responding, the logs don't
show any out of memory or thread exceptions.

What could be causing this?

Regards,
Ayush

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to