XF 1.3 Multiple Server Errors - Too Many Connections

Disciple of Nagash

Active member
Last week I converted my forum to XF. (vampirecounts.net)

All seemed ok at first, until in the early hours of Monday morning my site went down for 20 minutes:

Zend_Db_Adapter_Mysqli_Exception: Too many connections - library/Zend/Db/Adapter/Mysqli.php:333 (x16 logs)

Did a bit of searching here, which suggested it was a problem with my server, spoke to Nimbus who I host with and they altered a setting.

This morning from around 2AM (problems started around the same time?) the same error (too many connections) happened again, this time however it took the site offline for 5 and half hours. The xf_session table also crashed and created hundreds of reports, which was repaired.

Again a bit of searching, and the addon Sitemap came up as a possible issue? Reported to Nimbus again who suggested I could possible need more memory, (they are not sure on the addon). So just in case I disabled the addon.

Then the following errors popped up:

Got error 28 from storage engine
Error writing file '/tmp/.......

Finally followed again by the "too many connections" error.

Now I am reasonably certain that my site is just not handling the amount of traffic to cause these issues. So I can only assume that something in the installation is causing these issues. Is there anyway to pinpoint what it may be?
 
These are all server related issues.

Too many connections is a server limit which your host needs to increase.
Error 28 is a lack of disk space.
The session table likely crashed due to the other errors.
 
Is there a recommend standard for the server limit that I can advise to the host - I know they changed something but I don't know to what value? I'll do a cleanup of my backups etc tonight - is there any folders etc within the XF installation itself that is safe to clean / delete?
 
I'm not on shared hosting, I'm on a VPS? Will that still work?

Also my host advised the following:

Yes, the server run out of memory again and had to be rebooted. Its been fine since then.
The server had 6GB of free disk space so that wont be causing the issue. Its something on the site overusing the memory.

My memory is 2GB
 
Updated on this.

My site went offline for 4 and half hours last night (literally 5 minutes after a I logged off and went to bed!!). The inital server error reported at this point was:

Lost connection to MySQL server at 'sending authentication information', system error: 32

Followed shortly by the too many connections error.

I had disabled some likely addons (note not uninstalled, just disabled) and also manually stopped one of the cron linked them (not sure why they did not also disable?). This hasn't fixed it.

For the time being I have disabled nearly all the rest barring Widget Framework and TaigaChat. Someone has suggested it could perhaps be a bot attack?
 
So further update following working with support at Nimbus:
  • More server tweaks reduced the severity of the "Too Many Connections" error, although it still occurred over the weekend for ten minutes (again around 2AM BST, seems to be a common time?)
  • Nimbus applied a memory power boost to see what affect this had
  • Once applied no more downtime or "Too Many Connections" error. Therefore they feel that the problem definitely lies with XF and possibly the addons.
I am confused, as certainly my traffic doesn't warrant it. To quote some of my messages to them:

I'm a little confused as to why the memory usage is high, has this always been the case since I have been with you?

I am just trying to understand why there was no memory issues when I was using the MyBB software, but there is now with the XenForo? I know Nimbus are XF specialists so I was hoping you could maybe give me some direction as to why this might be? This is especially concerning as the Tornado package I am on now is actually the most powerful and expensive VPS I have ever had for my site, yet the site at the moment is receiving the lowest traffic in the last 6 years. As an example on average I am only getting approx 110 members logging in a day, maybe approx 1000 guests. There are typically no more 50-60 (total) online at any one time.

and

My concern is what this extra load is. Whilst I understand MyBB core does not have as many functions as XF, my old forum had lots of custom work done which would have increased the load. This managed to operate with less memory when I at our height we had approx 11,000 posts in month compared to our average of around 2,400 now.

Does XF really put that much extra load on the server? I do have various plans which should increase traffic on the forum, however I am now concerned if the basic XF functions put such a large load on memory.


The response to that from Nimbus was:

The site is working MySQL pretty hard. Unfortunately we cannot go into why that is happening, that'd be up to your developer.

Unfortunately I don't have a developer, only myself with my limited technical knowledge. I would really appreciate if anyone can help. It seems that in general my XF installation is putting a high load on MySQL, and I am pretty certain it is not my traffic.
 
It's either going to be add-on or server related.

Out of the box, 100 members logging in per day to XenForo is nothing.
My old shared hosting which cost less than £50 per year could handle double that without breaking a sweat.
 
That's what I thought! Is there anyway to trace what is putting the load on the server? I did disable some addons previously, the only one I left active was Taiga Chat.

Would it help if I listed my addons and perhaps we could narrow it down to a likely set of suspects?
 
Just a thought on this, would the fact that I imported data from MyBB have made any difference? What I mean is, would it have imported it in a fashion that would somehow make the queries have to work harder etc?
 
Top Bottom