Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Mark Thomas
On 22/12/2010 11:48, Rhonny David wrote:
 Hi ALL,
 
 
 
 We are using tomcat 6.0 in production environment

Exactly which version? Also exact versions for JDK and OS please.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Rhonny David


I think i have already provided these except tomcat. Anyways we are using 
Tomcat 
6.0.29, which is pointed to jre 1.5.0_10. And the OS is Microsoft Windows 
Server 
2003, R2 , Standard Edition, Service Pack2.

Regards,
David




From: Mark Thomas ma...@apache.org
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, December 22, 2010 4:52:52 PM
Subject: Re: Tomcat Hangs with variable frequency

On 22/12/2010 11:48, Rhonny David wrote:
 Hi ALL,
 
 
 
 We are using tomcat 6.0 in production environment

Exactly which version? Also exact versions for JDK and OS please.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Konstantin Kolinko
 net.sourceforge.jtds.jdbc.JtdsResultSet.close ( JtdsResultSet.java:486 )

I think it is an issue with implementation of JtdsResultSet.close(), [1]

0485:if (!getConnection().isClosed()) {
0486:// Skip to end of result set
0487:// Could send cancel but this is safer as
0488:// cancel could kill other statements
in a batch.
0489:while (next())
0490:;
0491:}

[1] 
http://www.java2s.com/Open-Source/Java-Document/Database-JDBC-Connection-Pool/jTDS/net/sourceforge/jtds/jdbc/JtdsResultSet.java.htm

[2] 
http://jtds.svn.sourceforge.net/viewvc/jtds/branches/jTDS%201.2%20%28stable%29/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java?revision=1107view=markup#l467

It tries to dispose the resultset by reading through it and hangs in
the process (or maybe the resultset is too big and reading it takes a
while).

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Rhonny David
I won't support your reasoning, because the same JTDS driver version we are 
using for our other site and there the number of concurrent users of the 
application is more than 800 and therefore the volume of concurrent requests is 
very high, but we never faced the issue of this nature. Secondly, we have 
recently started using JTD driver and tomcat jndi connection pooling for our 
current site and earlier we used microsoft driver and our own connection 
pooling 
mechaninsm, but the same issue of tomcat hanging was occurring at that time.


Regards,
David




From: Konstantin Kolinko knst.koli...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, December 22, 2010 6:53:46 PM
Subject: Re: Tomcat Hangs with variable frequency

 net.sourceforge.jtds.jdbc.JtdsResultSet.close ( JtdsResultSet.java:486 )

I think it is an issue with implementation of JtdsResultSet.close(), [1]

0485:if (!getConnection().isClosed()) {
0486:// Skip to end of result set
0487:// Could send cancel but this is safer as
0488:// cancel could kill other statements
in a batch.
0489:while (next())
0490:;
0491:}

[1] 
http://www.java2s.com/Open-Source/Java-Document/Database-JDBC-Connection-Pool/jTDS/net/sourceforge/jtds/jdbc/JtdsResultSet.java.htm


[2] 
http://jtds.svn.sourceforge.net/viewvc/jtds/branches/jTDS%201.2%20%28stable%29/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java?revision=1107view=markup#l467


It tries to dispose the resultset by reading through it and hangs in
the process (or maybe the resultset is too big and reading it takes a
while).

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Konstantin Kolinko
If closing the result set requires reading it in full (as JTDS does),
it can take significant time.

You should take thread dumps to see what the threads are doing and
what they are waiting for. (Three thread dumps taken several seconds
apart).

Post them inline, or somewhere else (like pastebin site). Attachments
are usually stripped off by the mailing list software.

2010/12/22 Rhonny David rhonnyda...@yahoo.com:
 I won't support your reasoning, because the same JTDS driver version we are
 using for our other site and there the number of concurrent users of the
 application is more than 800 and therefore the volume of concurrent requests 
 is
 very high, but we never faced the issue of this nature. Secondly, we have
 recently started using JTD driver and tomcat jndi connection pooling for our
 current site and earlier we used microsoft driver and our own connection 
 pooling
 mechaninsm, but the same issue of tomcat hanging was occurring at that time.


 Regards,
 David



 
 From: Konstantin Kolinko knst.koli...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wed, December 22, 2010 6:53:46 PM
 Subject: Re: Tomcat Hangs with variable frequency

 net.sourceforge.jtds.jdbc.JtdsResultSet.close ( JtdsResultSet.java:486 )

 I think it is an issue with implementation of JtdsResultSet.close(), [1]

 0485:                        if (!getConnection().isClosed()) {
 0486:                            // Skip to end of result set
 0487:                            // Could send cancel but this is safer as
 0488:                            // cancel could kill other statements
 in a batch.
 0489:                            while (next())
 0490:                                ;
 0491:                        }

 [1]
 http://www.java2s.com/Open-Source/Java-Document/Database-JDBC-Connection-Pool/jTDS/net/sourceforge/jtds/jdbc/JtdsResultSet.java.htm


 [2]
 http://jtds.svn.sourceforge.net/viewvc/jtds/branches/jTDS%201.2%20%28stable%29/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java?revision=1107view=markup#l467


 It tries to dispose the resultset by reading through it and hangs in
 the process (or maybe the resultset is too big and reading it takes a
 while).

 Best regards,
 Konstantin Kolinko



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 12/22/2010 11:56 AM, Konstantin Kolinko wrote:
 If closing the result set requires reading it in full (as JTDS does),
 it can take significant time.

Especially if the queries are something like

SELECT * FROM huge_table

 You should take thread dumps to see what the threads are doing and
 what they are waiting for. (Three thread dumps taken several seconds
 apart).

I would also inspect the queries that are in progress when these
connections appear to hang.

We had a problem with Oracle long ago where the table indexes had just
become horribly fragmented and performance slowed to a crawl. In an act
of desperation, someone ran OPTIMIZE TABLE on one of the tables
involved in particularly slow queries and basically everything got
better. From then on out, we called that turning off the 'suck' bit on
Oracle. :)

I would definitely like to see what queries are running on the server
and what their status is.

The problem is certainly /not/ Tomcat, here: threads are stuck in a
3rd-party library connecting to a 3rd-party database. Tomcat just
happens to be in the stack trace because that's the DBCP in use: the
driver appears to be hanging, not Tomcat's DBCP.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0SNXUACgkQ9CaO5/Lv0PDAUQCfWgdgZY61qly2Z0xDP4vhZcbX
OyYAn14lv4chUAmiD4h4z3jqgDPxOGda
=Fqs8
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org