Thanks Everyone for the help, I will enable thread dump for my Tomcat, just 
reading up on how to get that done. My database connection string is given 
below.

<Resource name="jdbc/bm" type="javax.sql.DataSource"  
maxActive="250"   maxIdle="5"  username="root" testWhileIdle="true"  
removeAbandonedTimeout="60"  maxWait="-1" removeAbandoned="true"

        validationQuery="select 1" driverClassName="com.mysql.jdbc.Driver" 
password="xxxxxxx" minEvictableIdleTimeMillis="30000" 
timeBetweenEvictionRunsMillis="300000" 
url="jdbc:mysql://localhost:3306/brandmanagement?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf-8"/>


    <Resource name="jdbc/s360" type="javax.sql.DataSource"  
maxActive="250"   maxIdle="5"  username="root" testWhileIdle="true"  
removeAbandonedTimeout="60"  maxWait="-1" removeAbandoned="true"

        validationQuery="select 1" driverClassName="com.mysql.jdbc.Driver" 
password="xxxxxxx" minEvictableIdleTimeMillis="30000" 
timeBetweenEvictionRunsMillis="300000" 
url="jdbc:mysql://localhost:3306/brandmanagement?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf-8"/>

I use quartz schedular(spring based) to perform some tasks on reqular 
intervals, Log4j is used in those methods, so will cross check those methods 
again.

Really appreciate your time and help.

Regards,
Ayush

> Date: Tue, 12 Feb 2013 11:36:52 -0800
> From: its_toas...@yahoo.com
> To: users@tomcat.apache.org
> Subject: Re: Tomcat hanging unexpectedly [URGENT]
> 
> On 2/12/2013 10:38 AM, Pid wrote:
> > 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.callAppenders
> >> com.mysql.jdbc.SingleByteCharsetConverter.getInstance
> >> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
> >> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
> >> org.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
> >
> >
> 
> This sounds like a lot of things. However, without borrowing your
> crystal ball, I can't tell anything about the Quartz scheduler.
> 
> A couple of things:
> 
> 1. Upgrade your Java to at least the latest 1.6.0_xx version
> 
> The one you are using has known server (and client) security issues.
> 
> 2. Upgrade your Tomcat to at least the latest 6.xx version
> 
> There are many improvements and bug fixes.
> 
> 3. [URGENT]
> 
> I understand that this problem is urgent for you. However, the people
> here contribute time on a volunteer basis (I'm taking a break from
> writing documentation for a new system). We'll try to help as time
> allows, but if you need an SLA then you should purchase commercial support.
> 
> 4. Possible root cause
> 
> I'm guessing (based on your partial listing of classes in a thread dump) 
> is that you either have a logging problem, a database connectivity 
> problem, or a Quartz scheduler problem.
> 
> Or all of the above.
> 
> If there was one problem, then I (guessing) would look to see if you're 
> logging via a Quartz scheduler job through log4j to a MySQL database.
> 
> Now that I've got my guess out of the way, here are some pointers.
> 
> a. Thread dumps
> 
> You said you've taken them, but have only posted snippets. Post a 
> complete thread dump inline (mailing list strips attachments). For your 
> own use, take several 3-10 seconds apart to see what's changing.
> 
> b. Check your database
> 
> It sounds like you have a connection leak. When this happens, how many 
> active connections do you have to your MySQL database?
> 
> c. Connection leak
> 
> As noted above, you may have a connections leak. Post your Resource 
> definition (hopefully it's in context.xml) with passwords and usernames 
> changed.
> 
> While you're at it, read:
> 
> http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC_Data_Sources
> 
> In particular, note removeAbandoned and logAbandoned. These will impact 
> performance, so do it on a test system.
> 
> >>> 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
> 
> + 1 here
> 
> Run this on a test environment, load up the system, and do heap dumps 
> and thread dumps.
> 
> >>> 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
> 
> Oh, and please do not top post. I had to bounce back and forth through 
> the message to figure out what's been said and where to reply.
> 
> . . . just my two cents
> /mde/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
                                          

Reply via email to