How to handle many connections to a large MySQL database
-1
votes
1
answer
582
views
I have multiple java hibernate apps connecting to 1 single mysql DB. Sometimes some of the apps hangs on DB select query. I think it is because of many connections the apps are to DB and remains open. So, I changed variables 'wait_timeout=3' & 'interactive_timeout=3600' & 'max_connections=5000'. After that, I saw many errors/exceptions of not being able to connect to DB OR not being able to insert into DB. Therefore I reset all 3 above variables to their default values: 'wait_timeout=28800' & 'interactive_timeout=28800' & 'max_connections=151'. Now there is no error/exception but hangs of the apps. What should I do?
Asked by محسن عباسی
(99 rep)
Dec 14, 2017, 09:56 AM
Last activity: Dec 14, 2017, 05:03 PM
Last activity: Dec 14, 2017, 05:03 PM