# I am using 7.9 ignition version I am getting dead lock error please could tell where is wrong since this happen weekly or monthly how we can avoid the error

**URL:** <https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [January 20, 2026, 1:27pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409 "2026-01-20T13:27:38Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 20, 2026, 1:27pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/1 "2026-01-20T13:27:38Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/b/db47e4b22c2411962b908b49d6b59352cadd9085.png)

if system.tag.read('[default]M3/Communication\_OK').value == 1:  
#Get all the finished injectors from EOL  
kitSN\_DS = system.db.runQuery("""SELECT DISTINCT trace.KITSN FROM [XPI\_INJ\_TRACE].[dbo].[T\_INJ\_TRACEABILITY] trace  
INNER JOIN [XPI\_INJ\_TRACE].[dbo].[T\_INJ\_ASSEMBLY] assambly on trace.ID\_TEST = assambly.ID\_TEST and trace.KITSN = assambly.KITSN  
WHERE trace.KITSN IN (SELECT KITSN FROM KITSN\_MAPPING WHERE D\_OK = 0) AND trace.kitsn not in (SELECT kitsn FROM [XPI\_INJ\_TRACE].[dbo].[T\_INJ\_TRACEABILITY] WHERE id\_test = 'NEW') AND not trace.KITSN = 'SALVAGE' AND NOT trace.INJSN IS NULL AND NOT assambly.TEST\_PASS IS NULL  
""")

for row in kitSN\_DS:  
kitSN = row[0]  
call = system.db.createSProcCall("writeEOLQualityCheck") #Set correct stored procedure  
call.registerInParam(1, system.db.NVARCHAR, kitSN) #Send the correct kitSN number to the stored procedure

```python
	system.db.execSProcCall(call) #Run the Stored Procedure
	
	XMLdata = call.getResultSet().getValueAt(0, 0) #Get the returned XML-string from Stored Procedure

	try:

		post_return = system.net.httpPost("http://SESOG1216.global.scd.xxx.com:8126", "text/xml", XMLdata)
	except:
		post_return = 'Failed'
	
	if post_return.find('The request was succesfully processed') > 0: #Good response back from M3 
		shared.Log_Handler.WriteLog('httpPost','D_EOLQualityCheck',XMLdata) #Write the transfered data to database for traceability
		system.db.runPrepUpdate("UPDATE KITSN_MAPPING SET D_OK = 1 WHERE KITSN = ?", [kitSN],'XPI')
	elif post_return == 'Failed': #Communication crashed
		system.tag.write('M3/Communication_OK',0)
		break
	else: #Communication ok, but faulty response from M3
		shared.Log_Handler.WriteLog('httpPost','D_EOLQualityCheck','Not succefully processed from M3') #Not succefully processed from M3

```

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 20, 2026, 1:31pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/2 "2026-01-20T13:31:07Z")

</div>

Please format your code using triple backticks to make it easier to read.

```python
# like this

```

Can you copy and paste the whole error stack?

First thing that sticks out to me - looks like you are running this script on a 60 second timer. Does it actually complete in less than 60 seconds typically? Might want to confirm that / test how long it takes.

I do see one of the `caused by:` lines references a query and a deadlock scenario within your db so I don’t know that this is an ignition problem and instead a SQL problem.

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 20, 2026, 2:53pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/3 "2026-01-20T14:53:33Z")

</div>

at org.python.core.Py.JavaError(Py.java:495)

at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:362)

at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.runPrepUpdate(AbstractDBUtilities.java:258)

at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.python.core.PyReflectedFunction. **call** (PyReflectedFunction.java:186)

at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. **call** (ScriptManager.java:431)

at org.python.core.PyObject. **call** (PyObject.java:422)

at org.python.core.PyObject. **call** (PyObject.java:426)

at org.python.pycode.\_pyx99.f$0(:8)

at org.python.pycode.\_pyx99.call\_function()

at org.python.core.PyTableCode.call(PyTableCode.java:165)

at org.python.core.PyCode.call(PyCode.java:18)

at org.python.core.Py.runCode(Py.java:1275)

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:636)

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:603)

at com.inductiveautomation.ignition.common.script.TimerScriptTask.run(TimerScriptTask.java:88)

at java.util.TimerThread.mainLoop(Unknown Source)

at java.util.TimerThread.run(Unknown Source)

Caused by: org.python.core.PyException: Traceback (most recent call last): File "", line 25, in at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:362) at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.runPrepUpdate(AbstractDBUtilities.java:258) at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(UPDATE KITSN\_MAPPING SET D\_OK = 1 WHERE KITSN = ?, [260191472], XPI, , false, false)

... 20 common frames omitted

Caused by: java.lang.Exception: Error executing system.db.runPrepUpdate(UPDATE KITSN\_MAPPING SET D\_OK = 1 WHERE KITSN = ?, [260191472], XPI, , false, false)

... 19 common frames omitted

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 61) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)

at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)

at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)

at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)

at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)

at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRPreparedStatement.executeUpdate(SRConnectionWrapper.java:955)

at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runPrepUpdate(SRConnectionWrapper.java:180)

at com.inductiveautomation.ignition.gateway.script.GatewayDBUtilities.\_runPrepStmt(GatewayDBUtilities.java:132)

at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.runPrepUpdate(AbstractDBUtilities.java:256)

... 17 common frames omitted

Logger:  
I  
...com.inductiveautomation.ignition.gateway Time:  
20Jan2026 07:03:31  
Message:

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 20, 2026, 2:56pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/4 "2026-01-20T14:56:22Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d08f7de68e00310fc573fcc61e5500d910832f92.png)duplicate message

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 20, 2026, 3:04pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/5 "2026-01-20T15:04:22Z")

</div>

"""  
if system.tag.read('[default]M3/Communication\_OK').value == 1:  
#Get all the finished injectors from EOL  
kitSN\_DS = system.db.runQuery("""SELECT DISTINCT trace.KITSN FROM [XPI\_INJ\_TRACE].[dbo].[T\_INJ\_TRACEABILITY] trace  
INNER JOIN [XPI\_INJ\_TRACE].[dbo].[T\_INJ\_ASSEMBLY] assambly on trace.ID\_TEST = assambly.ID\_TEST and trace.KITSN = assambly.KITSN  
WHERE trace.KITSN IN (SELECT KITSN FROM KITSN\_MAPPING WHERE D\_OK = 0) AND trace.kitsn not in (SELECT kitsn FROM [XPI\_INJ\_TRACE].[dbo].[T\_INJ\_TRACEABILITY] WHERE id\_test = 'NEW') AND not trace.KITSN = 'SALVAGE' AND NOT trace.INJSN IS NULL AND NOT assambly.TEST\_PASS IS NULL  
""")  
#Go through all the injectors and send the data to M3, then delete it from temporary table in SCADA (KITSN\_MAPPING)  
for row in kitSN\_DS:  
kitSN = row[0]  
call = system.db.createSProcCall("writeEOLQualityCheck") #Set correct stored procedure  
call.registerInParam(1, system.db.NVARCHAR, kitSN) #Send the correct kitSN number to the stored procedure

```python
	system.db.execSProcCall(call) #Run the Stored Procedure
	
	XMLdata = call.getResultSet().getValueAt(0, 0) #Get the returned XML-string from Stored Procedure

	try:
		#post_return = system.net.httpPost("http://sesoco3811.global.scd.xxx.com:8126", "text/xml", XMLdata)
		post_return = system.net.httpPost("http://SESOG1216.global.scd.xxx.com:8126", "text/xml", XMLdata)
	except:
		post_return = 'Failed'
	
	if post_return.find('The request was succesfully processed') > 0: #Good response back from M3 
		shared.Log_Handler.WriteLog('httpPost','D_EOLQualityCheck',XMLdata) #Write the transfered data to database for traceability
		system.db.runPrepUpdate("UPDATE KITSN_MAPPING SET D_OK = 1 WHERE KITSN = ?", [kitSN],'XPI')
	elif post_return == 'Failed': #Communication crashed
		system.tag.write('M3/Communication_OK',0)
		break
	else: #Communication ok, but faulty response from M3
		shared.Log_Handler.WriteLog('httpPost','D_EOLQualityCheck','Not succefully processed from M3') #Not succefully processed from M3

```

""" code I have to avoid the duplicate d message

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 20, 2026, 3:36pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/6 "2026-01-20T15:36:49Z")

</div>

60 sec

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 20, 2026, 4:04pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/7 "2026-01-20T16:04:20Z")

</div>

Is your code running on the gateway scope and on just one gateway?

What version of SQL Server?

I suspect this is an issue in how you’re interfacing with SQL server and it might be caused by multiple clients hitting the same database.

It might be SGAM contention. I think you’re getting an SGAM lock when you do the “UPDATE WHERE NOT IN” Statement. If that code executes from multiple clients before one of them finishes and you only have 1 ldf file configured on your database you will get an SGAM contention and possibly a deadlock. This could also happen if your code executes again before the first execution’s lock is lifted.

You can increase the number of SGAM locks your database can have by adding log files because you get 1 SGAM lock per log file. Research this before doing it so the new ldf files are configured correctly. It’s generally good to have 1 per CPU core on your db server. Newer versions of SQL Server do this automatically when you make a database. Older versions just created 1 ldf file.

Look into SGAM contention to get some diagnostic queries you can run to confirm or rule out an SGAM contention issue.

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 20, 2026, 5:18pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/8 "2026-01-20T17:18:56Z")

</div>

> [@Steve\_Laubach](#):
>
> Is your code running on the gateway scope and on just one gateway? it is running gateway event script timer based script

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/e/6eb33bb36a1bc075f2bc2f2348693b6f68f1d705.png)

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 20, 2026, 5:29pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/9 "2026-01-20T17:29:10Z")

</div>

If you right click on the database in Management Studio and select “Properties”. Then Select “Files” from the menu on the left. I believe you will have 1 mdf file (your database) and 1 ldf file. You get 1 SGAM page per ldf file. SQL can use as many SGAM pages as it has CPU cores.

> **[Recommendations to reduce allocation contention - SQL Server](https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/performance/recommendations-reduce-allocation-contention)**
>
> This article provides resolution for the problem where you notice severe blocking when the server is experiencing a heavy load.

It’s been a while since I’ve had to deal with this, but here’s an article from a source I trust.

> **[Cheat Sheet: How to Configure TempDB for Microsoft SQL Server - Brent Ozar...](https://www.brentozar.com/archive/2016/01/cheat-sheet-how-to-configure-tempdb-for-microsoft-sql-server/)**
>
> The short version: configure one volume/drive for TempDB. Divide the total space by 9, and that’s your size number. Create 8 equally sized data files and one log file, each that size. Presto, the drive is full and your TempDB is configured for easy...

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 20, 2026, 5:46pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/10 "2026-01-20T17:46:22Z")

</div>

SO YOU FeeL THAT ,THIS IS NOT IGNITION PROBLEM ?

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 20, 2026, 6:19pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/11 "2026-01-20T18:19:28Z")

</div>

I don’t think it’s something wrong with Ignition. I suspect you are executing calls against the database that are creating SGAM locks and then other calls you’re sending are trying to hit the same records while they are locked by the previous calls which is causing a deadlock.

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 21, 2026, 5:25am UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/12 "2026-01-21T05:25:43Z")

</div>

How to do to avoid SGAM locks creation ?

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 21, 2026, 12:51pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/13 "2026-01-21T12:51:33Z")

</div>

Did you confirm that your whole script runs in less than 60 seconds? I don’t know the logic of the stored procedure you call, but if the timer script jobs start piling up and the the stored procedure is trying to access the same rows at the same time as the previous call, that could be your issue right there.

Your error occurs on your update statement - but your stored procedure is a black box to us and if its accessing the same table as that update statement that could be the culprit.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 21, 2026, 1:18pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/14 "2026-01-21T13:18:12Z")

</div>

Those 2 things I linked explain that part. There’s a lot to it but you can get the general idea from those. Basically, queries that put things in tempdb can do it to you if you use them from multiple sources concurrently.

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 22, 2026, 7:33am UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/15 "2026-01-22T07:33:47Z")

</div>

> [@bkarabinchak.psi](#):
>
> Did you confirm that your whole script runs in less than 60 seconds? I don’t know the logic of the stored procedure you call, but if the timer script jobs start piling up and the the stored procedure is trying to access the same rows at the same time as the previous call, that could be your issue right there.
> 
> Your error occurs on your update statement - but your stored procedure is a black box to us and if its accessing the same table as that update statement that could be the culprit.

yes it is run below 60 second and timer based script is running

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 23, 2026, 12:39pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/16 "2026-01-23T12:39:23Z")

</div>

is there any feed back

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 23, 2026, 12:49pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/17 "2026-01-23T12:49:17Z")

</div>

Did you see what @Steve_Laubach mentioned?

Also in your error

```python
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 61) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

```

Note the **Rerun the transaction.** I am not really a fan of doing this in the context of database ops, but if you just want to get it working now you may want to add try/retry logic to your script.

If there is a DBA who manages this database - reach out and get them involved. This is a database specific issue not an ignition one. The real problem is your deadlock and the real solution is to change things to avoid that from happening.

Also try indexing the column `KITSN`if it is not already. This will prevent full table scans and if its not could be contributing to deadlocking here.

---

<div class="post-metadata">

**Author:** ![sambhaji.gawade](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sambhaji.gawade](https://forum.inductiveautomation.com/u/sambhaji.gawade)\
**Post date:** [January 23, 2026, 12:58pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/18 "2026-01-23T12:58:02Z")

</div>

if you just want to get it working now you may want to add try/retry logic to your script. - i will use for change the logic in ignition if ignition cab´n avaoid this issue by using the logic

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 23, 2026, 12:59pm UTC](https://forum.inductiveautomation.com/t/i-am-using-7-9-ignition-version-i-am-getting-dead-lock-error-please-could-tell-where-is-wrong-since-this-happen-weekly-or-monthly-how-we-can-avoid-the-error/113409/19 "2026-01-23T12:59:26Z")

</div>

> [@bkarabinchak.psi](#):
>
> Also try indexing the column `KITSN`if it is not already. This will prevent full table scans and if its not could be contributing to deadlocking here.

Do this too. It may be enough on its own tbch.
