Highlighted
Absent Member.
Absent Member.
214 views

Deadlocks in database testing

Hi All,

While executing one of my scripts with 20 concurrent users, The transactions are getting failed and throwing error

Action.c(11992): Error: Server error msg (Number=1205, Severity=13, State=45, Function=dbsqlexec, Server="XXXXX", Procedure="rsp_ProcedureName", Line=33): Due to deadlock.

If i increase think time to 20 sec (multiply think time by 20; The script has a think time of 1 sec after each transaction and none inside it) the dead lock error is not thrown.

Is this a development issue or i need to handle this at script. The procedure is just selecting identity column from a table with where conditions. Thus i am a bit spectacle over here
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: Deadlocks in database testing

Can you please provide more information about the Procedure/Steps you recorded. Just a guess, are all the users running the script is selecting the same record? If yes, then you can modify the script in such a manner that every user is working with unique selection. You might be getting deadlock with less think time because all the users works on same records at same time which may not be happening in case of 20 sec think time as the max allowed limit for users to work on same record is not reached...
0 Likes
Highlighted
Established Member..
Established Member..

Re: Deadlocks in database testing

Do u have access to the application log, if u have then check it then u will be able to know what is the main issue, more whatever description u have given, that looks like a application/DB design issue, more specifically application issue, application is not allowing to access the same data at the same time, which is wrong and that should be rectified.

Thanks,
Prasenjit
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Deadlocks in database testing

When application code is modified to select with (NOLOCK), the deadlocks are not present. Also scripts are dealing with random records.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.