Hang Up Followed By Can’t select database

Try a plugin like Query Monitor to see if there are queries or things you can identify quickly. A DB may need a log rotated or you could have some DEBUG process turned on that is logging. Backups running on your server will also have an impact. It’s something you’ll have to look into. Same with crons, virus scanners and any other bulk process.

If you have too many connections then you can create a DB bottleneck. Check your pages and process that you aren’t using an excessive amount of queries when they could be reduced. Also make sure to use functions that cache queries when possible.

Some good info at https://10up.github.io/Engineering-Best-Practices/php/#performance is worth looking into.

Also try connecting to your DB to see what is happening. Running EXPLAIN can tell you more about slow queries. https://dev.mysql.com/downloads/workbench/

tech