# Tabledeletetask error

**URL:** <https://forum.inductiveautomation.com/t/tabledeletetask-error/28470>\
**Category:** Ignition\
**Created:** [September 23, 2019, 12:53pm UTC](https://forum.inductiveautomation.com/t/tabledeletetask-error/28470 "2019-09-23T12:53:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [September 23, 2019, 12:53pm UTC](https://forum.inductiveautomation.com/t/tabledeletetask-error/28470/1 "2019-09-23T12:53:07Z")

</div>

we are getting a repeating error, looks like it is part of some transaction group table maintenance?  
it starts with the warning:  
“Slow query “SELECT max(“tower\_c\_ndx”) FROM Tower\_C WHERE “t\_stamp”\<?” took 36 seconds”  
then an error:  
“TableDeleteTask 21Sep2019 15:46:41 Error executing table data delete maintenance task.”

the following is part of the error details. Any idea what would be causing this?  
Thanks

com.microsoft.sqlserver.jdbc.SQLServerException: Read timed out

at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1355)

at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1532)

at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:3274)

at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:4433)

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

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.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)

at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)

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.factorysql.maintenance.TableDeleteTask.run(TableDeleteTask.java:133)

at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$SelfSchedulingRunner.run(BasicExecutionEngine.java:483)

at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:565)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 23, 2019, 1:02pm UTC](https://forum.inductiveautomation.com/t/tabledeletetask-error/28470/2 "2019-09-23T13:02:36Z")

</div>

The table data delete operation is taking longer than the connection’s timeout, preventing it from completing. Incomplete statements are typically rolled back, so no progress is made. You may have to perform the delete manually outside of Ignition (in your DB workspace tool of choice).

Meanwhile, ensure your DB has an appropriate set of indices on table timestamp columns.

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [September 23, 2019, 1:04pm UTC](https://forum.inductiveautomation.com/t/tabledeletetask-error/28470/3 "2019-09-23T13:04:03Z")

</div>

Is the table delete function part of the transaction group normal operation?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 23, 2019, 1:05pm UTC](https://forum.inductiveautomation.com/t/tabledeletetask-error/28470/4 "2019-09-23T13:05:53Z")

</div>

It is optional.
