# High Number of Quarantined Items

**URL:** <https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935>\
**Category:** Ignition\
**Created:** [November 24, 2020, 10:42pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935 "2020-11-24T22:42:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [November 24, 2020, 10:42pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/1 "2020-11-24T22:42:21Z")

</div>

Hi Guys,

I noticed that the number of quarantined items on one of our gateways is very high. Can someone please help me get to the bottom of what is causing these?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/133a48986906f55a50dfd77320e3188039e79b31.png)

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [November 24, 2020, 10:46pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/2 "2020-11-24T22:46:36Z")

</div>

Found this in the logs:

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

> java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from UNKNOWN to VARCHAR is unsupported.
> 
> at com.inductiveautomation.ignition.common.functional.FragileConsumer.lambda$wrap$1(FragileConsumer.java:47)
> 
> at java.base/java.util.stream.ReferencePipeline$2$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.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source)
> 
> at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source)
> 
> at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
> 
> at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:147)
> 
> at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:117)
> 
> at com.inductiveautomation.ignition.gateway.history.sf.sinks.AggregateSink.storeData(AggregateSink.java:180)
> 
> at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:149)
> 
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from UNKNOWN to VARCHAR is unsupported.
> 
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:228)
> 
> at com.microsoft.sqlserver.jdbc.DataTypes.throwConversionError(DataTypes.java:1094)
> 
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.setObject(SQLServerPreparedStatement.java:1595)
> 
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.setObject(SQLServerPreparedStatement.java:1514)
> 
> at org.apache.commons.dbcp2.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:529)
> 
> at org.apache.commons.dbcp2.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:529)
> 
> at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRPreparedStatement.setObject(SRConnectionWrapper.java:1131)
> 
> at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink$TagInsert.populatePreparedStatement(TagHistoryDatasourceSink.java:979)
> 
> at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink$BatchedTagInsert.insert(TagHistoryDatasourceSink.java:1029)
> 
> at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.insertTagValues(TagHistoryDatasourceSink.java:926)
> 
> at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeScanClassSet(TagHistoryDatasourceSink.java:482)
> 
> at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeDataToDatasource(TagHistoryDatasourceSink.java:459)
> 
> at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.lambda$storeToDatasource$3(AbstractDatasourceSink.java:148)
> 
> at com.inductiveautomation.ignition.common.functional.FragileConsumer.lambda$wrap$1(FragileConsumer.java:45)
> 
> ... 15 common frames omitted

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [November 30, 2020, 3:17pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/3 "2020-11-30T15:17:40Z")

</div>

Bump

---

<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:** [November 30, 2020, 6:36pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/4 "2020-11-30T18:36:26Z")

</div>

You are going to have to figure out which queries in your app are throwing these errors and fix those bugs. If you find the query and calling code but can’t figure out what’s wrong, post those details.

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [November 30, 2020, 8:08pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/5 "2020-11-30T20:08:56Z")

</div>

I am not the sole Ignition Developer and we have more than a handful of projects, I don’t really know how to track down the location of whatever’s failing…

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 30, 2020, 8:17pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/6 "2020-11-30T20:17:12Z")

</div>

I’d start by disabling every project and enabling 1 at a time to find the the project(s) causing this.  
If you can’t disable every project then you’ll most likely have to comb through every project.

---

<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:** [November 30, 2020, 8:54pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/7 "2020-11-30T20:54:23Z")

</div>

Export the quaratined items so you can examine the failing SQL in detail.

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [November 30, 2020, 9:15pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/8 "2020-11-30T21:15:10Z")

</div>

File is too large (80MB) to upload to forum but looks mostly something like this:

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

---

<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:** [November 30, 2020, 9:51pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/9 "2020-11-30T21:51:36Z")

</div>

That would be tag history choking. Meaning, your DB isn’t keeping up, or isn’t storing at all. If not storing at all, look in your DB to see if the sqlt\* tables are present–there might be a permissions issue preventing the tag historian from creating them automatically.

If storing but not keeping up, get more horsepower for your DB. (It is on a separate machine already, I hope.)

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [November 30, 2020, 11:55pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/10 "2020-11-30T23:55:49Z")

</div>

DB is storing, I have no issue bringing up recent data on an easy chart. Yes db is on a separate server.

Inspecting the quarantine export, it looks like only a few tags (\<30) that are there.

1 of them is from an AB controller.

~20 are from a particular modbus TCP device

~10 of them them are duplicates within a set of OPC devices.

This makes me think its not the db getting choked as I would see all the other tags I have setup logging on (several thousand).

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [December 1, 2020, 6:58pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/11 "2020-12-01T18:58:31Z")

</div>

All of the duplicates (99% of quarantined items) are referring to tags that I originally created (within a UDT) but later deleted…

---

<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:** [December 1, 2020, 9:46pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/12 "2020-12-01T21:46:12Z")

</div>

Sounds like you can discard those from the quarantine.

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [December 1, 2020, 9:49pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/13 "2020-12-01T21:49:26Z")

</div>

I never though to press the delete button i always just tried the retry button which brought back all the quarantined items after about 5 minutes. I just pressed the delete button and nothing is returning. Thanks Phil!

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 10, 2021, 5:29pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/14 "2021-03-10T17:29:05Z")

</div>

Is there a guide or hints on how to interpret the causes when looking at a quarantine file? I haven’t been able to find one.

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [April 4, 2021, 3:14am UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/15 "2021-04-04T03:14:51Z")

</div>

I wonder this as well… Theres only one error message on the store and forward screen for the quarantine data. Does that mean only one of the values in the quarantine has an error or does it mean all of them are in error?

---

<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:** [April 4, 2021, 9:44pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/16 "2021-04-04T21:44:59Z")

</div>

If you export it iirc there are more details on why that point is in quarantine.

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [April 5, 2021, 2:49pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/17 "2021-04-05T14:49:19Z")

</div>

I don’t see that, but the files are also very large so I may be missing something… If I understand correctly, if one value in the transaction is wrong it will reject all and quarantine. We had our write size up past 100K to try and catch up on a large backlog.

Can someone from IA confirm if all points in the quarantine were rejected, or just some?

---

<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:** [April 5, 2021, 3:09pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/18 "2021-04-05T15:09:27Z")

</div>

You’re correct… I thought the export had more details.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 5, 2021, 4:42pm UTC](https://forum.inductiveautomation.com/t/high-number-of-quarantined-items/40935/19 "2021-04-05T16:42:41Z")

</div>

> [@salbrechtsen](#):
>
> Theres only one error message on the store and forward screen for the quarantine data. Does that mean only one of the values in the quarantine has an error or does it mean all of them are in error?

The details page will 'collapse' the errors if the underlying cause is the same, iirc; it doesn't necessarily mean that they have _exactly_ the same problem, but might all share (the most common) a duplicate primary key error.

> [@salbrechtsen](#):
>
> I don’t see that, but the files are also very large so I may be missing something… If I understand correctly, if one value in the transaction is wrong it will reject all and quarantine. We had our write size up past 100K to try and catch up on a large backlog.

That's not exactly how it works. Basically, S+F is a cache of 'records', where records can originate from any Ignition system. For efficiency, most Ignition systems (such as tag history) do not send single insert statements into S+F one-at-a-time; instead, records to insert are batched together. From S+F's perspective, there's only one record - so if it triggers an exception, S+F will then have to hold onto all of the 'inner' records. But that still only counts as one row for S+F's purposes. There's no way to undo that batching, short of manually editing the quarantine export file and re-importing it.
