MySQL thousands connections after convert MyISAM to InnoDB on fail-over structure
If you are using transactions, please ensure that you use either a COMMIT or ROLLBACK statement before closing the connection.

If this is already the case, you probably need to increase the thread_cache_size value in order to reuse as much as possible the existing connection threads instead of creating new ones from start.

Please note the following values:


mysql&gt; SHOW GLOBAL VARIABLES LIKE 'Connections';
mysql&gt; SHOW GLOBAL VARIABLES LIKE 'Thread_created';
mysql&gt; SHOW GLOBAL VARIABLES LIKE 'Max_used_connections';


If Thread_created/Connections> 0.01, you have to increase the value of thread_cache_size.
The upper limit should be the value of Max_used_connections.