473,320 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need help on blocking problems!

Hello,

Currently we have an ASP.NET 2003 app running, on one function the app
calls to a stored procedure to SQLServerONE, that stored procedure
creates some TEMP tables with the results of a stored procedure that
is remotely called con SQLServerTWO that generates TEMP tables that
are used to return results.

When we begin stress-testing the app issuing the same function from
many clients at the same time and check the open connections with
sp_who on both the local server SQLServerONE and the remote server
SQLServerTWO, we see that connections remain open on the remote server
SQLServerTWO: at first, the function runs ok, but when we repeat the
operation with the other clients we notice that connections are not
terminated and in most cases stay blocking the table that will be used
later by another client, causing a blocking issue and increasing the
number of opened connections on the remote server SQLServerTWO.

We already tried turning on pooling for the ADO.NET connection that
connects to the local server SQLServerONE and the same happens.

Any help or guidance will be greatly appreciated!

Thanks,

Mauricio
Nov 18 '05 #1
4 930
Mauricio wrote:
Hello,

Currently we have an ASP.NET 2003 app running, on one function the app
calls to a stored procedure to SQLServerONE, that stored procedure
creates some TEMP tables with the results of a stored procedure that
is remotely called con SQLServerTWO that generates TEMP tables that
are used to return results.

When we begin stress-testing the app issuing the same function from
many clients at the same time and check the open connections with
sp_who on both the local server SQLServerONE and the remote server
SQLServerTWO, we see that connections remain open on the remote server
SQLServerTWO: at first, the function runs ok, but when we repeat the
operation with the other clients we notice that connections are not
terminated and in most cases stay blocking the table that will be used
later by another client, causing a blocking issue and increasing the
number of opened connections on the remote server SQLServerTWO.

We already tried turning on pooling for the ADO.NET connection that
connects to the local server SQLServerONE and the same happens.

Any help or guidance will be greatly appreciated!

Thanks,

Mauricio


Hum, first thing: Pooling will keep the connection open. If you want to
make sure the logical connection (and not the actual network connection)
is properly closed after executing something from your .net code, you
have to call the Close method explicitely as soon as you're finished.
You can also use the *using* keyword to do that automatically (C# only):

using (SqlConnection connection = new SqlConnection(whateverparam))
{
// execute your code here
} <- at this point the connection will be closed no matter what

If I didn't get the full problem, could you post more details about what
is calling what, who access which database, in which order and using
what code?

--
Sebastien Lambla [TheTechnologist]
The Geeky Lazy Bloggy
http://blog.thetechnologist.net
Nov 18 '05 #2
By any chance are you using BEGIN TRANSACTION inside the stored
procedures and not properly closing out the transaction?

--
Scott
http://www.OdeToCode.com

On 2 Apr 2004 01:00:43 -0800, ma******@mexware.com (Mauricio) wrote:
Hello,

Currently we have an ASP.NET 2003 app running, on one function the app
calls to a stored procedure to SQLServerONE, that stored procedure
creates some TEMP tables with the results of a stored procedure that
is remotely called con SQLServerTWO that generates TEMP tables that
are used to return results.

When we begin stress-testing the app issuing the same function from
many clients at the same time and check the open connections with
sp_who on both the local server SQLServerONE and the remote server
SQLServerTWO, we see that connections remain open on the remote server
SQLServerTWO: at first, the function runs ok, but when we repeat the
operation with the other clients we notice that connections are not
terminated and in most cases stay blocking the table that will be used
later by another client, causing a blocking issue and increasing the
number of opened connections on the remote server SQLServerTWO.

We already tried turning on pooling for the ADO.NET connection that
connects to the local server SQLServerONE and the same happens.

Any help or guidance will be greatly appreciated!

Thanks,

Mauricio


Nov 18 '05 #3
linked servers are cool, but don't hold up under stress, and have very poor
error recovery.

-- bruce (sqlwork.com)

"Mauricio" <ma******@mexware.com> wrote in message
news:5b**************************@posting.google.c om...
Hello,

Currently we have an ASP.NET 2003 app running, on one function the app
calls to a stored procedure to SQLServerONE, that stored procedure
creates some TEMP tables with the results of a stored procedure that
is remotely called con SQLServerTWO that generates TEMP tables that
are used to return results.

When we begin stress-testing the app issuing the same function from
many clients at the same time and check the open connections with
sp_who on both the local server SQLServerONE and the remote server
SQLServerTWO, we see that connections remain open on the remote server
SQLServerTWO: at first, the function runs ok, but when we repeat the
operation with the other clients we notice that connections are not
terminated and in most cases stay blocking the table that will be used
later by another client, causing a blocking issue and increasing the
number of opened connections on the remote server SQLServerTWO.

We already tried turning on pooling for the ADO.NET connection that
connects to the local server SQLServerONE and the same happens.

Any help or guidance will be greatly appreciated!

Thanks,

Mauricio

Nov 18 '05 #4
Thanks for your responses.

To answer some questions:

- We are closing the connections explicitly after executing the query.
- We are not using transactions on SQLServer, in fact the commands are
only SELECTs with some complex joins.

To give you more information:

SQLServerONE is SQLServer 2000.
SQLServerONE is SQLServer 7.0.

SQLServerONE has one stored procedure that is called from ADO.NET with
connection pooling, that stored procedure generates some TEMP tables on
SQLServerONE, between the creation of those tables, a stored procedure
on SQLServerTWO is remotely called, this stored procedure gererates some
TEMP tables on SQLServerTWO and returns the results to SQLServerONE that
are used to populate a TEMP table on SQLServerONE and finally returning
the data to ADO.NET and then the app.

The problem we have is that after performing stress tests on the
application, the number of opened connections on SQLServerTWO increases
gradually because of blockings on the TEMP tables created on
SQLServerTWO, there is a moment when there are so many connections
opened that the server stops responding and timeouts are generated on
the application.

I hope this can clear out more our problem and let you give us some
recommendations / best practices.

Thanks!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Edward | last post by:
SQL Server 2000 Enterprise Edition Access 2000 Front End One of our clients has recently been experiencing problems with an app that has run satisfactorily (though slowly) for some time. To...
1
by: Hal | last post by:
I am experiencing blocking problems on SQL Server 2000, SP3a. I have read the posts and set up a job SQL agent to report on these occurences I save the results to a table before executing an sp to...
3
by: David Sworder | last post by:
This message was already cross-posted to C# and ADO.NET, but I forgot to post to this "general" group... sorry about that. It just occured to me after my first post that the "general" group readers...
4
by: Christopher H. Laco | last post by:
I'm having a problem with the TcpClient that I can only conclude is either a feature, or a complete misunderstanding of the docs on my part. In a nutshell, I'm simply performing the following...
4
by: Joe Kinsella | last post by:
The following code behaves differently from what I would expect: socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp); socket.Blocking = false;...
0
by: Mark Hoffman | last post by:
All, I have an application that spawns several worker threads (using asynchronous callbacks with Begin/EndInvoke) that make calls to the WMI using the System.Management namespace. Since the...
4
by: Anthony Boudouvas | last post by:
Hi to all, i have a form with 2 System.Windows.Forms.Timer objects. One fire every 5 seconds and the other every 10 seconds, the both take actions in two hashtables declared in same form. ...
7
by: Michi Henning | last post by:
Hi, I'm using a non-blocking connect to connect to a server. Works fine -- the server gets and accepts the connection. However, once the connection is established, I cannot retrieve either the...
6
by: roger beniot | last post by:
I have a program that launches multiple threads with a ThreadStart method like the following (using System.Net.Sockets.Socket for UDP packet transfers to a server): ThreadStart pseudo code: ...
0
by: Mauricio | last post by:
Hello, Currently we have an ASP.NET 2003 app running, on one function the app calls to a stored procedure to SQLServerONE, that stored procedure creates some TEMP tables with the results of a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.