Hey guys:
I have a Gateway Script Timer which is executed per minute to do a query from my database,
while recently I found that the database connection woule be faulted every serveral minutes:
Check on the ignition status page how many connections you’re seeing connected to the database. If it gets to 8 or close to, increase your Max connections number. I don’t know if this is your issue, but definitely good to check at least. Any errors in your wrapper log or in your gatewua logs?
There’s a “Connection Refused” error as the ultimate cause. That means your setting of 8 connections is more than your DB allows. Consider other (non-Ignition) connections to your DB when configuring the DB’s own limits.
Hello Phill:
I notice that my colleagues have configure mysql events executed periodically, is the executions some sort of connections?
I think the error may have certain relation with these timed tasks.
Under this circumstance, should I increase the max active/idle of decrease them?
I would think so, but I am not a MySQL expert (I avoid it, actually). I would recommend increasing the allowed connections on the DB side, leaving Ignition's settings alone. It is also possible that this external operation is bogging down your MySQL instance. In that case, you will probably need a more powerful DB setup.