Need help on blocking problems!!

  • Thread starter Thread starter Mauricio
  • Start date Start date
M

Mauricio

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
 
One thing you'll need to make sure of is that all of your procedures
access resources in the same order. For example, if Process1 starts a
transaction that locks Table1, and Process2 starts a transaction that
locks Table2, and Process1 needs to access Table2 in order to
complete, and Process2 needs to access Table1 in order to complete,
you have a deadlock. Other combinations can produce blocking. If both
access resources always in the same order, then each process goes into
an orderly wait queue. If possible, try to avoid using temp tables and
keep all transactions as short as possible. If you haven't done so
already, create a Profiler trace to take a good hard look to see
exactly what's going on.

--Mary
 
Back
Top