473,395 Members | 1,535 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,395 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
8 1903
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
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.