473,503 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
8 1915
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
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 #3
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 #4
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 #5
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 #6
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 #7
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 #8
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 #9

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

Similar topics

2
1986
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
482
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
2181
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
4317
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
16805
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
964
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
4008
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
17378
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
4091
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
247
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
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.