Using SQL Enterprise manager, find out what process is holding a lock, and what it's last statement was. You do know that you have to rollback failed update statements don't you?
-----Original Message----- From: Hooper, Brian [mailto:[EMAIL PROTECTED] Sent: Friday, January 09, 2004 9:19 AM To: Tomcat Users List Subject: Tomcat Deadlock 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]