Database connection issue

After our client's database stopped due to luck of disk space, Ignition was unable to reconnect to it after the issue has been resolved. We needed to restart the gateway to reconnect to database, is there any setting that could prevent ignition from reconnecting to DB after it was down for some time?

One easy solution here would be to prune data. I would recommend doing it on a relatively frequent basis (daily or less - dependent on amount of data) to keep the execution time of the query low.

I typically use a query to get the data I want to drop, export to CSV with date (and time if you're pruning more than once a day) and export it into an "old data" folder on the gateway. Then DELETE the rows using the same query.

You should be able to use the size of the DB and the date of the oldest row to estimate how long to keep data (and err on the side of having a little extra space).

Luck of disk space is not the issue here.

Ignition couldn't reconnect to the database even despite it was up and running for some time, it looked like the gateway simply stopped trying to reconnect.
Thats all i can see in the logs:

What is the specific error when you expand the event?

Did you try restarting just the DB connection? (Edit but save without changes. In a script, you can disable it, then immediately re-enable. system.db.setDatasourceEnabled())

Error happened on Saturday and connection was restored when server was restarted for maintenance on Sunday. I wasn't working on the weekend, so when i got back it was working again. I'm looking for something that could prevent this from happening again not a one time fix.

It might be a bug. Are you on the latest version? (v8.1.25)

If not, or you cannot upgrade at the moment, consider a timer script that checks the DB connection status regularly, and if broken for some minutes in a row, script the disable/enable operation.

1 Like