Page 1 of 1

MySQL reports too many connections..

Posted: Wed Dec 06, 2017 1:44 pm
by KGB1st
WAH with mysql? It reported that "Too many connections" In mysqls' servers configuration file I set the max_connections = 1000, in server.properties default as 100 connections. Why I've on other resources, such as php engine, and it reported about error with too many connection?

I thought that 1000-MaximumDbConnections = 900 free connections. But java used more that 100 connection, or reopen new connection very fast, before old asc closed. Are you lost your mind? What a hell with mysql connections, why there are so many?

Re: MySQL reports too many connections..

Posted: Wed Dec 06, 2017 8:39 pm
by Sacrifice
KGB1st wrote: Wed Dec 06, 2017 1:44 pm WAH with mysql? It reported that "Too many connections" In mysqls' servers configuration file I set the max_connections = 1000, in server.properties default as 100 connections. Why I've on other resources, such as php engine, and it reported about error with too many connection?

I thought that 1000-MaximumDbConnections = 900 free connections. But java used more that 100 connection, or reopen new connection very fast, before old asc closed. Are you lost your mind? What a hell with mysql connections, why there are so many?
I have noticed the guts of the source code and it is clear that when a try is made to open a connection to the database and interact with it, I have seen that there is usually no finally to close the connection if it has nothing what to do. But it is also true that there is a task that takes care of every 60 seconds in closing the open connections (all) so you do not worry about that.

Re: MySQL reports too many connections..

Posted: Thu Dec 07, 2017 11:42 am
by KGB1st
not fully understand what you mean. But something I know, if default mysqls' configuration named such as "connection timeout" is unlimited or very long, we can see a lot of mysql connections in sum.

p.s. maybe my dedicated server not supported many TCP connections, before posting I didn't cheked this. sorry/
p.s.s. limited to 50 connections and problems out..

.. and linux can use sockets)