Database has gone away, too many connections

Good afternoon,

I am showing slow queries on every query. My database supports 2000 max connections and I am often around 1800+ without any users connected. My database shows two processes, sleep and the query of showing me processes. I check Work Flow processes and everything seems normal, nothing is getting hammered. I checked and cleaned my job_queue.

I have used Global DB to make a few database updates on logic hooks and did not use beans as some where very complicated queries. Does using Global DB not close the connection. Wouldn’t the connection time out over the weekend when there are no users. I am guess this maybe the issue. I highly doubt it and have not idea.

What would be causing this issue? I have no idea where to start.

 Sat May 22 17:25:02 2021 [35694][-none-] [FATAL] Could not connect to DB server as XXXXXXXX. port : MySQL server has gone away

Sat May 22 17:30:01 2021 [13935][-none-][FATAL] Could not connect to DB server as XXXXXXX. port : Too many connections


Have you checked your database for overgrown tables?

Try the first query in this post:

It’s common problem and everything starts going down-hilll from there. Your errors don’t appear related to this, but I advise that you give it a quick check,… just in case.

And please let us know your versions of MySQL and PHP and SuiteCRM.