max_user_connections WordPress mysql error

Solution:

This tends to happen when something is holding its own connections open. Most shared hosting limits this and does not allow you to manage it at all yourself.

If there is some custom code that is opening a connection does it ever close that connection? or just keep making new ones?

My guess is it never actually never closes those connections and keeps just making new ones and runs into this limit.

https://www.php.net/manual/en/mysqli.close.php