You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robert Weeks <va...@vaiism.com> on 2003/10/08 00:35:22 UTC

Tomcat/Struts app hanging (Waiting for xx instance(s) to be deallocated)

Hello -

I am seeing a perplexing problem with an app I am using with Tomcat 
(4.1.24), struts (1.1) and MySql (4.0.12) running on RH.

It seems that after a certain amount of time, the whole app freezes and 
tomcat has to be restarted, and the top of the daily log that is 
created/appended says:

2003-10-07 11:37:45 StandardWrapper[:action]: Waiting for 38 
instance(s) to be deallocated
2003-10-07 11:37:55 WebappLoader[]: Deploying class repositories to 
work directory /usr/local/jakarta-tomcat-4.1.24/work/Standalone/xxx...

The number of instances is variable.

I have seen a number of queries on the 'Waiting for xx instance(s)...' 
around - but I cannot seem to find an answer to this problem.

Is anyone else seeing this?

I am using org.apache.commons.dbcp.BasicDataSource for the datasource:

<data-sources>
    <data-source type="org.apache.commons.dbcp.BasicDataSource">
      <set-property
         property="autoCommit"
         value="false"/>
      <set-property
         property="driverClassName"
         value="com.mysql.jdbc.Driver"/>
      <set-property
         property="maxActive"
         value="30"/>
      <set-property
         property="url"
         value="jdbc:mysql://localhost/xxxx"/>
      <set-property
         property="username"
         value="xxxx"/>
      <set-property
         property="password"
         value="xxxx"/>
      <set-property
         property="validationQuery"
         value="SELECT COUNT(*) FROM Users" />
    </data-source>
  </data-sources>



Thanks for any help.


--
Robert B. Weeks
vaiism@vaiism.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat/Struts app hanging (Waiting for xx instance(s) to be deallocated)

Posted by Justin Ruthenbeck <ju...@nextengine.com>.
At 04:23 PM 10/7/2003, you wrote:

>>Can you collect the output from sending Tomcat the -QUIT signal when this
>>happens?
>
>I am not sure I understand this one.
>
>I am kinda restricted on the deployment machine (the linux machine 
>mentioned above) - it was developed on a Solaris 9 machine and moved over 
>- everything works pretty normal 'cept this freezing problem. Same 
>versions of all software on both machines tho (java,mysql,tomcat,struts).
>
>I can ask the admin to give me the output of it the next time it freezes 
>(we are periodically restarting it right now via cron just to make sure 
>there is as little downtime as possible).

Basically, you've got XX number of non-daemon threads that are busy doing 
*something* such that the process can't shutdown.  These threads might be 
something your application has created (easier), or something created by 
Tomcat (I've seen this happen on several machines running Tomcat with AJP13 
Connector) which is much more difficult.

To debug it, you need a Thread dump of all threads in your app.  Next time 
your app freezes, give it a kill -3 <pid> to get the thread dump to 
StdOut.  From there, you should see XX threads spining wheels 
somewhere.  If they're not spinning, it's also possible that you have 
deadlocked threads.  This could explain why subsequent requests fail, 
especially if the dealock is happening on some static resource.

Hope that helps ... am curious to hear what you find out.  Please keep me 
posted.

justin

____________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
    See http://www.nextengine.com/confidentiality.php
____________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat/Struts app hanging (Waiting for xx instance(s) to be deallocated)

Posted by Robert Weeks <va...@vaiism.com>.
Hello -

>
>>
>> I am seeing a perplexing problem with an app I am using with Tomcat
>> (4.1.24), struts (1.1) and MySql (4.0.12) running on RH.
>
> What version of RedHat and what JDK?

Red Hat Linux release 6.1 (Cartman)
Kernel 2.2.12-20 on an i686

(Yes I know, old, but I am not in control of that one  ;)  )

[rweeks@***]$ java -fullversion
java full version "1.4.1_03-b02"


>
>> It seems that after a certain amount of time, the whole app freezes 
>> and
>> tomcat has to be restarted, and the top of the daily log that is
>> created/appended says:
>>
>> 2003-10-07 11:37:45 StandardWrapper[:action]: Waiting for 38
>> instance(s) to be deallocated
>> 2003-10-07 11:37:55 WebappLoader[]: Deploying class repositories to
>> work directory /usr/local/jakarta-tomcat-4.1.24/work/Standalone/xxx...
>>
>> The number of instances is variable.
>>
>> I have seen a number of queries on the 'Waiting for xx instance(s)...'
>> around - but I cannot seem to find an answer to this problem.
>
> Can you collect the output from sending Tomcat the -QUIT signal when 
> this
> happens?

I am not sure I understand this one.

I am kinda restricted on the deployment machine (the linux machine 
mentioned above) - it was developed on a Solaris 9 machine and moved 
over - everything works pretty normal 'cept this freezing problem. Same 
versions of all software on both machines tho 
(java,mysql,tomcat,struts).

I can ask the admin to give me the output of it the next time it 
freezes (we are periodically restarting it right now via cron just to 
make sure there is as little downtime as possible).

Thanks again.

--
Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat/Struts app hanging (Waiting for xx instance(s) to be deallocated)

Posted by David Rees <dr...@greenhydrant.com>.
On Tue, October 7, 2003 at 3:35 pm, Robert Weeks sent the following
>
> I am seeing a perplexing problem with an app I am using with Tomcat
> (4.1.24), struts (1.1) and MySql (4.0.12) running on RH.

What version of RedHat and what JDK?

> It seems that after a certain amount of time, the whole app freezes and
> tomcat has to be restarted, and the top of the daily log that is
> created/appended says:
>
> 2003-10-07 11:37:45 StandardWrapper[:action]: Waiting for 38
> instance(s) to be deallocated
> 2003-10-07 11:37:55 WebappLoader[]: Deploying class repositories to
> work directory /usr/local/jakarta-tomcat-4.1.24/work/Standalone/xxx...
>
> The number of instances is variable.
>
> I have seen a number of queries on the 'Waiting for xx instance(s)...'
> around - but I cannot seem to find an answer to this problem.

Can you collect the output from sending Tomcat the -QUIT signal when this
happens?

-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org