When hitting concurrent requests using jmeter, deadlock exceptions occurred?
Clash Royale CLAN TAG#URR8PPP
When hitting concurrent requests using jmeter, deadlock exceptions occurred?
Here is the C# code which is using Ambient Context with the EF6
public async Task<bool> RemoveRefreshToken(RefreshToken refreshToken)
using (var dbContextScope = _dbContextScopeFactory.Create())
_refreshTokenRepository.Delete(refreshToken);
return await dbContextScope.SaveChangesAsync() > 0;
Getting the following exception
Exception Source: EntityFramework Inner Exception: Transaction (Process ID
89) was deadlocked on lock resources with another process and has been chosen
as the deadlock victim. Rerun the transaction.
This error is occurring only when concurrent requests are there using JMeter
congratulations! your performance testing have found a bug, not otherwise reproducible. Nothing wrong with your test in that regard.
– Kiril S.
Aug 9 at 14:08
@mjwills, You are right!! this is database deadlock error. I will look into that direction now. Thanks for your guidance
– Deepak
Aug 9 at 14:43
Are there any ways to prevent these database deadlocks?
– Deepak
Aug 10 at 8:51
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Before we continue, do you understand what a database deadlock is? What database are you using?
– mjwills
Aug 9 at 12:01