• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Server Error Logs max user connection


Active member

This been happening from time to time and I kind of observe this.
I have the server error logs (see attachment)

I emailed my hosting to report this, and this is the reply:

It looks like the code for your site is not closing the connections to the database. What I suggest is to enable caching on your website, most CMS have caching plugins. I was able to connect to your database through terminal so it seems that the error occurs when your website gets a lot of traffic.
my question is...
is there caching plugins for xenforo?
or perhaps some add on that cause the connections to database is not closing?

any advise or idea?

thanks in advance for any help...




XenForo moderator
Staff member
I checked your site and I wouldn't consider it to be particularly busy.

I would suggest switching hosts.


XenForo developer
Staff member
I would note that we're not using PHP's persistent connections feature with MySQL, so by definition, the database connection will be closed when the script is running. They may be seeing the INSERT DELAYED system, which you can disable if you wish ("Enable Delayed Insert SQL Queries"), though it shouldn't make a huge difference for a smallish form.

It could happen if there's a burst of activity or if the server is overloaded (thus taking pages longer to generate, making the error more likely). If it happens very infrequently (2 times in 2 months is not particularly often), it may be tolerable.


Active member

I just recently got more error log (attached)

Also have send the email to the my hosting to ask about that... This is the reply I got:

"From the error described, there does not seem to be an issue with slow queries. As a user on a shared hosting platform, you share resources with all accounts on that server. This includes max MySql connections. There is a set limit for the entire server and if this is reached, errors will be thrown on not only your site, but others that require connections to MySql. As a forum, every page view connects to the database, sometimes with multiple connections. It is the calls to the database that need to be addressed within your installation."
I'm not sure what he means though... I've asked them but haven't got replied yet.

As Brogan suggested I might try to get other hosting solution... my question is, how many connection is considered normal?
what to ask from the hosting company to make sure this thing is not happening?

appreciate for anyone help.



Jake Bunce

XenForo moderator
Staff member
Basically what Brogan said... change hosts or get a better server at your current host. You are on a shared server which means resources are shared. In a shared hosting environment these kinds of errors can happen as a matter of course because the available resources are unreliable. It's not something you can fix in XenForo. You have exceeded the capacity of your server and you need a better server with more resources.

If you were on a dedicated or virtualized server then you could increase the connection limit in MySQL, but a shared server doesn't allow you this control. Your web host would have the ability to increase the limit but they usually aren't willing to do this on shared servers.
Recently, we were having some error issues with our script and per Bluehost, an upgrade was the solution so we upgraded and paid in advance for one year. We then starting have connection issues, so I was back on the phone again with them. They said we needed to optimize, so we did as per their instructions. The problems have not gone away and now I have concerns from paying a year in advance. Which way would you go at this juncture? Should I continue calling them all the time? They are no longer using the ticket service.

We are growing well and want to be able to find partners that would be excited to grow with us.:confused:



XenForo moderator
Staff member
Your site is very small.

You shouldn't be getting those sort of server issues with such low traffic.

My advice is to find a new host.