Solved

ASP Error Message

Posted on 2012-12-21
4
315 Views
Last Modified: 2012-12-21
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
Comment
Question by:Bob Schneider
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 250 total points
ID: 38712600
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
 
LVL 10

Assisted Solution

by:Umar Topia
Umar Topia earned 250 total points
ID: 38712634
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
 

Author Comment

by:Bob Schneider
ID: 38712666
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
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 38712677
Well I use it all the time  now!
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question