tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hooper, Brian" <brian.hoo...@lmco.com>
Subject Tomcat Deadlock
Date Fri, 09 Jan 2004 16:18:35 GMT
I'm having a weird problem with Tomcat locking up.  I have a couple of
functions on my site that rely heavily on transactions.  To do a simple
load test, I picked the function that hits the database the most and
opened that same page in two different browser windows.  I hit the
submit button at roughly the same time, and waited.  It appeared that
both browser windows stalled.  I looked at the processes in SQL Server
(2000) and it said that all of the processes for the app were sleeping,
and the two being used were sitting on insert statements for the same
table (database deadlock?).  I let both browsers sit trying to load for
a lot longer than it should have taken for the page to finish, then just
closed the windows.  After that, the site was no longer accessible.  The
only way to get it working again was to restart the Tomcat service.

Looking at the various log files, the only entry that appears
interesting is the following from the site's log:
2004-01-09 10:43:18 StandardWrapper[/WIPT:action]: Waiting for 2
instance(s) to be deallocated

I'm using tomcat 4.1.27 with SQL Server 2000 on a Win2K box.  I've been
having similar problems off and on for the last couple of weeks and have
tried a number of different things to fix it.  I made sure I closed all
connections, statements, and result sets.  I put all of the close code
in a finally block.  Another quick question - if the browser is closed
in the middle of an operation, is the code in the finally block
executed?

Here is the JNDI data source definition from server.xml:

  <Resource name="jdbc/WIPTDataSource" auth="Container"
type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/WIPTDataSource">
 
<parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataS
ourceFactory</value></parameter>

 
<parameter><name>driverClassName</name><value>com.jnetdirect.jsql.JSQLDr
iver</value></parameter>
 
<parameter><name>url</name><value>jdbc:JSQLConnect://XXXX:1433/WIPT</val
ue></parameter>
    <parameter><name>username</name><value>XXXX</value></parameter>
    <parameter><name>password</name><value>XXXX</value></parameter>

    <parameter><name>maxActive</name><value>15</value></parameter>
    <parameter><name>maxIdle</name><value>15</value></parameter>
    <parameter><name>minIdle</name><value>2</value></parameter>
    <parameter><name>maxWait</name><value>10000</value></parameter>

    <parameter><name>validationQuery</name><value>SELECT
1+1</value></parameter>
    <parameter><name>testOnBorrow</name><value>true</value></parameter>
    <parameter><name>testOnReturn</name><value>true</value></parameter>
    <parameter><name>testWhileIdle</name><value>true</value></parameter>
 
<parameter><name>timeBetweenEvictionRunsMillis</name><value>1800000</val
ue></parameter>
    <parameter><name>testWhileIdle</name><value>true</value></parameter>
 
<parameter><name>numTestsPerEvictionRun</name><value>3</value></paramete
r>

 
<parameter><name>removeAbandoned</name><value>true</value></parameter>
 
<parameter><name>removeAbandonedTimeout</name><value>300</value></parame
ter>
    <parameter><name>logAbandoned</name><value>true</value></parameter>
  </ResourceParams>

Thanks!
-Brian

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


Mime
View raw message