Performance issue and SQL lite tag reference error

org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (cannot rollback - no transaction is active)

at org.sqlite.core.DB.newSQLException(DB.java:1179)

at org.sqlite.core.DB.newSQLException(DB.java:1190)

at org.sqlite.core.DB.throwex(DB.java:1150)

at org.sqlite.core.DB.exec(DB.java:198)

at org.sqlite.SQLiteConnection.rollback(SQLiteConnection.java:460)

at com.inductiveautomation.ignition.gateway.localdb.sqlite.SingleConnectionDatasource$ProtectedConnection.rollback(SingleConnectionDatasource.java:192)

at com.inductiveautomation.ignition.gateway.localdb.DelegatingDataSource$DelegatingConnection.rollback(DelegatingDataSource.java:289)

at com.inductiveautomation.ignition.gateway.tags.config.storage.resource.valueStore.db.TableHelper.useConnection$commitLogic(TableHelper.kt:123)

at com.inductiveautomation.ignition.gateway.tags.config.storage.resource.valueStore.db.TableHelper.useConnection(TableHelper.kt:133)

at com.inductiveautomation.ignition.gateway.tags.reference.TagReferenceTableHelper.insert(TagReferenceTableHelper.kt:40)

at com.inductiveautomation.ignition.gateway.tags.reference.DbTagReferenceStore$TagTraceBatch.storeCurrentBatch(DbTagReferenceStore.kt:186)

at com.inductiveautomation.ignition.gateway.tags.reference.DbTagReferenceStore$TagTraceBatch.executeAndReturnSize(DbTagReferenceStore.kt:176)

at com.inductiveautomation.ignition.gateway.tags.reference.DbTagReferenceStore$TagTraceBatch.execute(DbTagReferenceStore.kt:165)

at com.inductiveautomation.ignition.gateway.tags.evaluation.BatchContextImpl$OpController.run(BatchContextImpl.java:237)

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

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

at java.base/java.lang.Thread.run(Unknown Source)

getting this error beside I don't have any SQL lite connection to my gateway.


and also getting the performance warning.

You have tagged this as Ignition81 but that looks like an 8.3 Gateway overview. Please clarify what version you are on?

yes it 8.3.2 I didn't see the option for 8.3


This the error i am getting for the performance of the gateway
.

Can you zoom in on that RAM usage.

Your RAM usage should look like a sawtooth pattern.

In your Ignition Conf, set the init ram and max ram to the same.

In your image, you are using 8.7GB.

What are the settings for Max in conf?

How much RAM does the server have? Is this installed on bare metal or a VM?

Can you zoom in on that RAM usage.

Your RAM usage should look like a sawtooth pattern.
--No, its is breaking in between not following a continuous sawtooth pattern.

In your Ignition Conf, set the init ram and max ram to the same.
-- Init RAM is 1gb and max RAM is 24GB

In your image, you are using 8.7GB.

What are the settings for Max in conf?
-- The max setting in conf is 24GB.

How much RAM does the server have? Is this installed on bare metal or a VM?
--It is installed in EC2 instance.

Ignition v8.3 stopped using SQLite for its internal DB. This suggests you are using SQLite for a regular DB connection, possibly with history?

If so, DO NOT DO THIS.

SQLite is absolutely NOT suited to use in production for anything other than configuration content.

I have to SQLlite db connection and so i upgraded init RAM to max RAM and restarted my gateway but now my gateway is not starting.

Do you have enough memory allocated to the machine to support all the activities on that machine?

Anything in the wrapper.log file that might indicate an error?

My wrapper log is here

Why?

Really.

SQLite is single-threaded and cannot do connection pooling as most Ignition subsystems expect. Use a real database. Use MariaDB or PostgreSQL if you need it to be free.

(This is why v8.3 has QuestDB for the internal historian--the prior implementation based on SQLite sucks and cannot be fixed.)

Sorry, I want to say that i don’t have any sql connection in my gateway. I had shared my wrapper log also for reference.

It looks like there are two SQLite files being referenced in your logs. The first one is used by the Tag Reference Tracker and is located in the \data\var\ignition\tags\{tag_provider} directory. I believe yours is coming from the default tag provider. The second one is used for Memory Tag Value Persistence and is located in the \data\config\ignition\tags directory.

I’m not sure what caused them to be corrupted, but can you try removing the files from those directories and then restart the gateway again?

You can move them to a temporary folder rather than delete them if any of the data matters and you might want to try to recover some of it.

1 Like


After deleting directory still facing the same issue.

Did you delete both SQLite files?

Can you upload a new copy of your logs?

The new wrapper log file is here

Looks like there’s still an issue with a Tag Value Persistence file. Possibly with the MQTT Distributor provider. Try moving the SQLite file for that provider and restarting again.

Edit: Apologies, it’s actually the reference tracker that has a file per provider. The valueStore.idb contains values for all providers.

This issue can be caused due to full disk space. Ignition 8.3 is heavily reliant on the file system to run and if all disk space is consumed the gateway will not be able to start properly. By default Ignition’s live tag values will store to the valueStore.idb which is a SQLite database. If you see a SQLite Error I’d strongly recommend checking your disk space and reaching out to Support.

4 Likes