In the Activity monitor, the process that hangs is marked as blocking,
status = sleeping, command = awaiting command. On the locks page, the
process shows that it has been granted all locks requested. Basically from
the db side, it looks like we are waiting for the application to issue the
rest of its statements and commit the transaction. However, from the
application side, we are never getting a result back from the statement
execution.
1. This has been reported as an issue with the jDTS driver as well.
Perhaps this is a SQL Server or JVM bug?
2. There does not appear to be a way to specify a socket timeout with the
MS JDBC 2005 driver. Is there a connection string parameter to do this? We
are using lockTimeout to at least return from the blocked processes, and this
works, however the blocking process has all its locks, so lockTimeout doesn't
work there.
3. Anyone else experiencing this?
Generally, this shows up as being a code issue, rather than a driver or database issue. You really should attack this using the command timeout, as
compared to the using the lockTimeout.
Evan
--------------------
>Thread-Topic: bug? socket timeout leaving transaction hung
>thread-index: AcfDCJWKCGnGQH2fRzakVJb3bHWv3g==
>X-WBNR-Posting-Host: 208.102.181.197
>From: =?Utf-8?B?SkFGLTUz?= <JAF...@discussions.microsoft.com>
>Subject: bug? socket timeout leaving transaction hung
>Date: Tue, 10 Jul 2007 08:40:03 -0700
>Lines: 24
>Message-ID: <C6EA548E-491B-4358...@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2826
>Newsgroups: microsoft.public.sqlserver.jdbcdriver
>Path: TK2MSFTNGHUB02.phx.gbl
>Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:235
>NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
>X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
Evan T. Basalik
This posting is provided “AS IS” with no warranties, and confers no rights.
"JAF-53" <JA...@discussions.microsoft.com> wrote in message
news:B6C1274E-2017-4B93...@microsoft.com...
We are using hibernate and c3p0 for database persistence and connection
pooling. Some relevant settings:
hibernate.connection.isolation=1
hibernate.jdbc.use_scrollable_resultset=false
hibernate.c3p0.min_size=3
hibernate.c3p0.max_size=25
hibernate.c3p0.timeout=3600
hibernate.c3p0.max_statements=0
hibernate.c3p0.idle_test_period=300
connection.pool_size=1
statement_cache.size=0
use_outer_join=true
"JAF-53" <JA...@discussions.microsoft.com> wrote in message
news:050ECBFF-1220-411B...@microsoft.com...
"JAF-53" <JA...@discussions.microsoft.com> wrote in message
news:10C88076-7AC8-447D...@microsoft.com...
I really don't think this is an issue with the statements in the
transaction. They are getting key level locks to update single records.
This error is intermittent, I can't reproduce it at will, but with enough
volume I eventually hit it, usually daily.
Thanks
"JAF-53" <JA...@discussions.microsoft.com> wrote in message
news:213AF7BA-0F37-4A5A...@microsoft.com...
Cheers.
In case of a SELECT query, the shared lock obtained should not block any DML
operations, but what is happening is this SELECT query appears to block many
other DML operations and stays in the picture for a very long time.
The blocking pattern that I see is unlike any other environments. Are there
any known issues [such as connection reset] with the JDBC drivers for
Sqlserver?
--
Manoj Kumar
Evan
--------------------
>Thread-Topic: bug? socket timeout leaving transaction hung
>thread-index: AcgmCg7TRs8v308CShGgk7rwvCVuNQ==
>X-WBNR-Posting-Host: 207.46.193.207
>From: =?Utf-8?B?TWFub2ogS3VtYXI=?= <Manoj...@discussions.microsoft.com>
>References: <C6EA548E-491B-4358...@microsoft.com> <t7CO#QzwHH...@TK2MSFTNGHUB02.phx.gbl> <B6C1274E-2017-
4B93-B600-E...@microsoft.com> <2942CAD7-EE1B-420B...@microsoft.com> <050ECBFF-1220-411B-9690-
C89DB5...@microsoft.com> <335D811A-A359-4E59...@microsoft.com> <10C88076-7AC8-447D-9C85-8E0BDAD027A7
@microsoft.com> <0784C75E-25E4-4266...@microsoft.com> <213AF7BA-0F37-4A5A...@microsoft.com>
>Subject: Re: bug? socket timeout leaving transaction hung
>Date: Tue, 13 Nov 2007 07:30:02 -0800
>Lines: 34
>Message-ID: <645FA0D6-834E-41D4...@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>Newsgroups: microsoft.public.sqlserver.jdbcdriver
>Path: TK2MSFTNGHUB02.phx.gbl
>Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:341
>NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
Evan T. Basalik
hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
hibernate.connection.autocommit=false
hibernate.jdbc.batch_size=30
We’re using a custom solution for session-per-transaction strategy.
c3p0 0.9.1 for connection pool (was bundled with
hibernate-distribution-3.3.1.GA)
#c3p0 Connection Pool Config
c3p0.acquireIncrement=3
c3p0.acquireRetryAttempts=0
c3p0.acquireRetryDelay=1000
c3p0.breakAfterAcquireFailure=false
c3p0.autoCommitOnClose=false
c3p0.idleConnectionTestPeriod=60
c3p0.initialPoolSize=10
c3p0.minPoolSize=10
c3p0.maxPoolSize=50
c3p0.maxIdleTime=550
c3p0.maxIdleTimeExcessConnections=300
c3p0.maxStatementsPerConnection=0
c3p0.numHelperThreads=15
c3p0.maxStatements=0
c3p0.preferredTestQuery=select 1;
iNet Opta JDBC driver
SQL Server 2005 (version 9.0.1399)