# Redundant Ignition system, MySQL latency/issues (vsat)

**URL:** <https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365>\
**Category:** Ignition\
**Created:** [October 5, 2020, 8:59am UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365 "2020-10-05T08:59:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBL\_MC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl_mc/32/56813_2.png) [@SBL\_MC](https://forum.inductiveautomation.com/u/SBL_MC)\
**Post date:** [October 5, 2020, 8:59am UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/1 "2020-10-05T08:59:33Z")

</div>

Hi all,

We have a running redundant system onboard a vessel with very limited bandwidth (vsat), connected to 3 MySQL servers. Local, backup and remote. The remote SQL server is hosted in the AWS cloud. Both servers are always connected to all SQL servers.

As the connection goes down and varies a lot I made a gateway script running every 10 minutes checking the connection, disables is if not equal valid, and enables if status is disabled.

What we very often see is that the primary ignition server does not succeed in connecting, while the backup does. Still, on the MySQL client connections I can see two valid connections.

Is there a way to “disable” SQL connections on the secondary as long as primary is present?

Is there any recommendations regarding SQL connection parameters on such narrow band connections? I tried to play with time out etc, but is should be plenty. I can connect to the gateway interface and designer, but its slow.

The log tells me nothing about why it cant connect.

Thanks all.

---

<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:** [October 5, 2020, 11:11am UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/2 "2020-10-05T11:11:54Z")

</div>

Client connections to databases are very sensitive to both dropped packets and latency, which are both terrible for satellite connections. You probably should consider a multi-master MariaDB setup, with Ignition only connecting to the local pair, and those propagating the changes as comms permit to the third server. (The local MariaDB servers should **not** be on the same computers as the Ignition gateways.)

---

<div class="post-metadata">

**Author:** ![SBL\_MC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl_mc/32/56813_2.png) [@SBL\_MC](https://forum.inductiveautomation.com/u/SBL_MC)\
**Post date:** [October 5, 2020, 1:39pm UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/3 "2020-10-05T13:39:35Z")

</div>

Maybe the primary is failing as it s trying to send data from the S&F buffer. I do still find it a bit odd that it just says “Connecting” while the backup goes straight to “Valid”. On Friday when I implemented the gateway script I could toggle “Enabled” and it was working for almost two days.

Propagating is also possible between MySQL servers, but I would think it still need a proper connection?

Can you please elaborate why we should not run SQL servers on the same computers as the gateways?

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [October 5, 2020, 3:02pm UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/4 "2020-10-05T15:02:26Z")

</div>

What type of data are you sending? Just history data, or are you running general queries as well?

---

<div class="post-metadata">

**Author:** ![SBL\_MC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl_mc/32/56813_2.png) [@SBL\_MC](https://forum.inductiveautomation.com/u/SBL_MC)\
**Post date:** [October 5, 2020, 3:19pm UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/5 "2020-10-05T15:19:32Z")

</div>

Only queries. Run prep update with SF at a very slow rate.

---

<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:** [October 5, 2020, 4:18pm UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/6 "2020-10-05T16:18:05Z")

</div>

> [@SBL\_MC](#):
>
> Propagating is also possible between MySQL servers, but I would think it still need a proper connection?

Yes, but replication is [designed to operate with connections that come and go](https://mariadb.com/kb/en/replication-overview/). They will also transmit data in a bulk form that is more efficient with high-latency connections.

> [@SBL\_MC](#):
>
> Can you please elaborate why we should not run SQL servers on the same computers as the gateways?

Mainly because databases are memory and CPU hogs. Also to minimize the recovery disruption when broken parts are restarted.

---

<div class="post-metadata">

**Author:** ![SBL\_MC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl_mc/32/56813_2.png) [@SBL\_MC](https://forum.inductiveautomation.com/u/SBL_MC)\
**Post date:** [October 6, 2020, 8:40am UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/7 "2020-10-06T08:40:53Z")

</div>

Store & Forward, it looks to me that we can configure it to transmit data in bulk.

I tried to set up schedule pausing the transfer, but I can’t get a valid connection from the primary.

---

<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:** [October 6, 2020, 1:01pm UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/8 "2020-10-06T13:01:43Z")

</div>

What version of MySQL are you connecting to? Have you updated to the latest JDBC driver for MySQL?  
Any errors in the MySQL logs that correspond to the event?

---

<div class="post-metadata">

**Author:** ![SBL\_MC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl_mc/32/56813_2.png) [@SBL\_MC](https://forum.inductiveautomation.com/u/SBL_MC)\
**Post date:** [October 7, 2020, 6:35am UTC](https://forum.inductiveautomation.com/t/redundant-ignition-system-mysql-latency-issues-vsat/39365/9 "2020-10-07T06:35:40Z")

</div>

AWS RDS is running MySQL engine 5.7.17

2020-10-07T06:18:56.598263Z 99873 [Note] Aborted connection 99873 to db: ‘removed’ user: ‘removed’ host: ‘removed’ (Got an error reading communication packets)

This is what I get from the log.
