MYSQL Connections Help

Nathan Riley
Nathan Riley used Ask the Experts™
on
How can I figure out why I have so many connections on my MYSQL Server?

In the monitor area I'm showing around 90-100k connections at any given time and there are only a handful of people on the website at any given time.  

Is there some way I can start drilling down to see what the issue is?

MYSQL Monitor Screenshot
Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Commented:
This is best answered by getting into all your system logs - syslog + Apache + PHP-FPM + MySQL.

No way to answer with a great deal of context.

Best to get into your logs + trace one Apache request through all your logs + ensure your MySQL connections go through buildup + teardown correctly.

If you're using custom code, it may be that teardown is failing... so connections remain open for very long amounts of time.
Distinguished Expert 2017

Commented:
Look at the MySQL processlist to make sure your issue does not stem from connections hanging around for an extended period of times.

Look at the webserver log stats, requests per second/minute which pages, etc.

What is the setup?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial