Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

ASP Error Message

I have a custom error message page that emails me when an error is encountered by a visitor.  I am receiving following error message on some of the pages on my site, although to my knowledge it is not crashing the page for the end user???  Is that possible and how do I fix it?

[Microsoft][SQL Server Native Client 10.0][SQL Server]Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Thanks!!
0
Bob Schneider
Asked:
Bob Schneider
  • 2
2 Solutions
 
Scott Fell, EE MVEDeveloperCommented:
It sounds like multiple inserts are going on at the same time.

Does your database take a long time to do what it needs to do or do you have a bunch of loops or extracting more data fields then you need?  I just gave a response to somebody else about using getrows instead of do until rs.eof.

if not rs.eof then
     MyArray=rs.getrows()
end if
'close database

' now loop through the array

anything you can do to make it run faster especially if you are on a shared servicer or server with low memory/cpu.
0
 
Umar Topia.Net Full Stack DeveloperCommented:
You can do the following to avoid deadlocks and locks on tables:

1) Replace Cursors with While Loops in SQL Server
2) Replace Temp Tables with Table Variables in Stored Procedures in SQL Server
0
 
Bob SchneiderAuthor Commented:
Padas, that was me that you gave the advice to.  I will try to implement that here.  Wasn't sure that the same solution would prevent this issue from happening.
0
 
Scott Fell, EE MVEDeveloperCommented:
Well I use it all the time  now!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now