# Tags getting frozen due to Store and Forward

**URL:** <https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499>\
**Category:** Ignition\
**Created:** [March 11, 2025, 10:30am UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499 "2025-03-11T10:30:17Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 10:30am UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/1 "2025-03-11T10:30:17Z")

</div>

Hi,  
The tags are getting frozen due to being quarantined in the Store and Forward.  
I didn’t have much knowledge on Store and Forward , for now I have increased memory buffer size.  
Now I deleted the quarantine data and tags became unfrozen.

What to do for this, please guide me.

Thanks!

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 12:08pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/2 "2025-03-11T12:08:38Z")

</div>

> [@Anita.Shinde](#):
>
> The tags are getting frozen

What do you mean by this? Do you mean your trends?

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 12:13pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/3 "2025-03-11T12:13:24Z")

</div>

Here I am storing History data in DB.  
here is screenshot of error.

java.lang.RuntimeException: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK\_\_sqlt\_dat\_\_BE126DD1975C00AB'. Cannot insert duplicate key in object 'dbo.sqlt\_data\_1\_2025\_01'. The duplicate key value is (63, 1737730046000).

at com.inductiveautomation.ignition.common.functional.FragileConsumer.lambda$wrap$1(FragileConsumer.java:47)

at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)

at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)

at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)

at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)

at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Unknown Source)

at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)

at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)

at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)

at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)

at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)

at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)

at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)

at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)

at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)

at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:186)

at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:156)

at com.inductiveautomation.ignition.gateway.history.sf.sinks.AggregateSink.storeData(AggregateSink.java:180)

at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:147)

Caused by: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK\_\_sqlt\_dat\_\_BE126DD1975C00AB'. Cannot insert duplicate key in object 'dbo.sqlt\_data\_1\_2025\_01'. The duplicate key value is (63, 1737730046000).

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2101)

at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:242)

at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:242)

at com.inductiveautomation.ignition.gateway.datasource.DelegatingStatement.executeBatch(DelegatingStatement.java:60)

at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRStatement.executeBatch(SRConnectionWrapper.java:767)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink$BatchedTagInsert.onComplete(TagHistoryDatasourceSink.java:1296)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.insertTagValues(TagHistoryDatasourceSink.java:1088)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeScanClassSet(TagHistoryDatasourceSink.java:550)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeDataToDatasource(TagHistoryDatasourceSink.java:525)

at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.lambda$storeToDatasource$2(AbstractDatasourceSink.java:186)

at com.inductiveautomation.ignition.common.functional.FragileConsumer.lambda$wrap$1(FragileConsumer.java:45)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 12:15pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/4 "2025-03-11T12:15:54Z")

</div>

> [@Anita.Shinde](#):
>
> Cannot insert duplicate key in object 'dbo.sqlt\_data\_1\_2025\_01'. The duplicate key value is (63, 1737730046000).

That the error... so something is trying to double log data.

How do you have your historian setup? Database connections?  
Does this happen routinely?

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 12:18pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/5 "2025-03-11T12:18:45Z")

</div>

yes, connection with SQL server.  
History is updating daily.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 12:20pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/6 "2025-03-11T12:20:29Z")

</div>

Does this happen often?

How do you have your database connections setup? Can you show that?  
Is this a redundant Gateway System?  
Are you using the Ignition Historian, or are you scripting adding data to the database?

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 12:25pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/7 "2025-03-11T12:25:58Z")

</div>

yes it happens more frequently.  
No, It is not redundant system.  
we have opc tags history enabled, through this we are storing the data I think.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2ae8b3590102402e82bf605e655e6ab2d9e399fb.png)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 1:02pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/8 "2025-03-11T13:02:46Z")

</div>

Can you show how your database connection is configured? I've seen this when a datasource is being used for the historian, and there is a fail over datasource configured rather than using the Tag Splitter.

Can you show a screen shot of the Config -\> Tags -\> History page? That will help understand how the Tag Historian is setup as well.

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 1:13pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/9 "2025-03-11T13:13:54Z")

</div>

I dint see any failover datasource.

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

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 1:16pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/10 "2025-03-11T13:16:04Z")

</div>

That's the tag history configuration.  
Can you check the Config -\> Database -\> Connections -\> ARTIE\_HISTORY configuration? That is where the failover datasource would be located.

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 1:18pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/11 "2025-03-11T13:18:33Z")

</div>

I checked there, not failover datasource is assigned.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/35067a4b942c83686b4e77b2f8e0f9bcdda24123.png)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 1:22pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/12 "2025-03-11T13:22:38Z")

</div>

You may want to reach out to support directly and have them take a look. Everything looks setup correctly with no red flags, so either there is an issue in the database directly, or there is logging happening from a different source creating those issues.

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 1:25pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/13 "2025-03-11T13:25:04Z")

</div>

okay will check with them.  
For now, is there any work around I can do, like some script checking tags are frozen if yes then it will try to push the data to DB and then delete the quarantine data.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 1:26pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/14 "2025-03-11T13:26:17Z")

</div>

Not that I'm aware of.

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [March 11, 2025, 1:28pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/15 "2025-03-11T13:28:37Z")

</div>

how to raise ticket for support?

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 11, 2025, 1:30pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/16 "2025-03-11T13:30:20Z")

</div>

[https://support.inductiveautomation.com](https://support.inductiveautomation.com) is typically where I start.

Note... this forum isn't official support.

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [March 11, 2025, 1:33pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/17 "2025-03-11T13:33:42Z")

</div>

Are the historical tags configured on the local gateway, or are they configured on a remote gateway?

> [@Anita.Shinde](#):
>
> Violation of PRIMARY KEY constraint

In general, this means that the historical data was already inserted into the database previously, but something went wrong during the acknowledgement of the data inserted. As a result, data is requested to be inserted again. the duplicate entry error you're seeing appears to be an expensive operation. This can be the result of poor network connection between remote gateways & DB, among others.  
+1 for IA support. If you have a support agreement - this would be a great time to use it. They might recommend other settings to optimize your S&F engine, as well as help troubleshoot the underlying issue.

---

<div class="post-metadata">

**Author:** ![anita.10704951](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@anita.10704951](https://forum.inductiveautomation.com/u/anita.10704951)\
**Post date:** [March 11, 2025, 4:03pm UTC](https://forum.inductiveautomation.com/t/tags-getting-frozen-due-to-store-and-forward/103499/18 "2025-03-11T16:03:49Z")

</div>

it is on local gateway
