# Hangfire job is failing due to System.Data.SqlClient.SqlException (0x80131904): Timeout expired on operations with JobQueue table

**URL:** <https://discuss.hangfire.io/t/hangfire-job-is-failing-due-to-system-data-sqlclient-sqlexception-0x80131904-timeout-expired-on-operations-with-jobqueue-table/10653>\
**Category:** question\
**Tags:** recurring, sql-server, aspnetcore, dotnetcore\
**Created:** [April 29, 2024, 12:52pm UTC](https://discuss.hangfire.io/t/hangfire-job-is-failing-due-to-system-data-sqlclient-sqlexception-0x80131904-timeout-expired-on-operations-with-jobqueue-table/10653 "2024-04-29T12:52:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreeraj\_Thottipparam](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/sreeraj_thottipparam/32/3669_2.png) [@Sreeraj\_Thottipparam](https://discuss.hangfire.io/u/Sreeraj_Thottipparam)\
**Post date:** [April 29, 2024, 12:52pm UTC](https://discuss.hangfire.io/t/hangfire-job-is-failing-due-to-system-data-sqlclient-sqlexception-0x80131904-timeout-expired-on-operations-with-jobqueue-table/10653/1 "2024-04-29T12:52:29Z")

</div>

Hello Hangfire team,

We are intermittently facing an issue with Hangfire as the job failed as the SQLServer DB returns timeout errors. WHen we looked at the DB events, its shows that some operations with the table JobQueue is waiting with wait type LCK\_M\_IX.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/hangfire/original/2X/d/dccb8dd49166f90e91ce7d11c068e6ed5d13233d.png)

DB Schema version: 5  
Hangfire.SqlServer: 1.7.33  
Hangfire.AspNetCore: 1.7.33

Code snipper to connect to DB:

```auto
var option = new SqlServerStorageOptions
{
      CommandTimeout = TimeSpan.FromMinutes(60)
};
config.UseSqlServerStorage(AppSettings.Config.DbConnectionString, option);

```

How to resolve this locking issue?

---

<div class="post-metadata">

**Author:** ![dawncold](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/dawncold/32/3674_2.png) [@dawncold](https://discuss.hangfire.io/u/dawncold)\
**Post date:** [April 30, 2024, 1:46am UTC](https://discuss.hangfire.io/t/hangfire-job-is-failing-due-to-system-data-sqlclient-sqlexception-0x80131904-timeout-expired-on-operations-with-jobqueue-table/10653/2 "2024-04-30T01:46:02Z")

</div>

Updates for the Hangfire version, Hangfire.SqlServer and Hangfire.AspNetCore, both are 1.7.33
