potential mysql limit issue

After migrating a customers Gallery2 over (not using scriptworx) we ran into a few issues that were diagnosed using the debug output of the gallery.

We noticed that a large gallery, such as the one we imported utlizes alot of connections since it appears each image that it loads makes a connection, it was easily maxing out the default max connections of sql. We increased Connections (max): for sql and it solved our problem. Im not sure of a safe number at the present time, I just selected the max to get the gallery working.

However if your having issues like this with large gallery2 deployments, this might be your culprit!