Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Tomcat Deadlock

Tomcat Deadlock

2004-01-09       - By George Sexton

 Back
Reply:     <<     11  

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:brian.hooper@(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 Source code of 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@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)




©2008 junlu.com - Jax Systems, LLC, U.S.A.