Database Connection State Connecting

Hi All,

I am having issues our database connection turns connecting from valid state as soon as we save the configuration(same config) or sometime suddenly even when we dont do anything(probably because of lost connection).In order for it to turn valid we need to restart the gateway as whole.Does anyone have any idea about this.Also the normal queries are running the one not running are tag value change script to write on database.

Are you getting database errors in your gateway log? If so, please expand them and show examples here. Are the tag scripts throwing errors? Have you tried disabling your tag events and turning them back on one by one to see when the problems start? Are you sure you have a beefy enough server for the load? CPU performance charts, etc?

Hi pturmel,
1)I don’t see any logs since usually it happens on weekends.
2) Tags doesn’t show any error just that they are not writing into MYSQL.

Today again it happened however one database this time showed faulted.“To many connection fault” other was just reconnecting. Again i restarted gateway and it went fine.

Before Restart:

After Restart:

We have database and Gateway running on different machines.

while it was down I was getting this error in tag provider logs:

Is there a max amount of databases that we can connect to like 6? I am just wondering.

one more thing while it shows connecting we can still query (read out of MYSQL but cannot do any inserts)

Are these connections all going to the same database server? If so, why? Each connection definition in Ignition is for a pool of actual connections, from which actual connections are reused over and over. You should only have additional connections if there are different actual databases, or you have some role-based security setup at the database level to accommodate.

You are probably hitting your single MySQL server’s total connection limit because each Ignition named connection is actually a pool. See the advanced properties in the connection definitions.

I would get in contact with support at this point. Getting someone remoted onto your system live would be the best option for troubleshooting, but if that’s not an option our support engineers are still going to be better able to work through the issues you’re experiencing.