XF 2.3 XF\Db\Exception: Too many connections

I have had my forum hosted on AWS for a few years now, and as far as I can tell there are no changes in traffic. Peak traffic is around 100 users (members and guests).

Up until the last week or so I have never gotten this error before and now I have gotten it over 1300 times.

It started to happen around the same time I upgraded to 3.3.6 so I don't know if it could be related or not.

This forum is the only thing on the EC2 and RDS T3.small MariaDB database.

What are some things I should look for that could be triggering the too many connections error.
 
I'm not sure how AWS operates , ie; singular or shared hosting but if its shared, they could have likely changed some configurations to offset. If its similar to a VPS then I would adjust your my.cnf (maybe use Releem to optimize) and use guest caching to offset live queries on static content.
 
This error started happening a lot more often in the logs, enough so I was able to see what was going on when it was happening.

Essentially my issue was I was being hammered with bot traffic. For example, when the errors were being logged I had around 43 members online and 2500+ guests according to the Who's Online built into the forum, and pretty much ever guest had a unique IP address and was viewing an "unknown page". The bot traffic was so high it was almost like experiencing a DOS attack.

I anded up having to buy Cloudflares Pro protection and switching my DNS management over to them instead of through AWS directly. That has really help a lot in eliminating the high guest traffic and the forum so far has been stable. I did notice this past week that guest traffic was getting high again, around 1,200 guests at once point so I'm keeping my eye on it. Hoping I don't need to upgrade to their most expensive package at $1200 a year for sophisticated bot detection and protection.
 
I anded up having to buy Cloudflares Pro protection and switching my DNS management over to them instead of through AWS directly. That has really help a lot in eliminating the high guest traffic and the forum so far has been stable. I did notice this past week that guest traffic was getting high again, around 1,200 guests at once point so I'm keeping my eye on it. Hoping I don't need to upgrade to their most expensive package at $1200 a year for sophisticated bot detection and protection.

You shouldn't need to upgrade Cloudflare further - I use the Pro version on my two big sites and it gives me everything I need.

You may even have been okay with the free version, but they do have more sophisticated bot detection and blocking in the Pro version, so it definitely gives you more control.
 
You shouldn't need to upgrade Cloudflare further - I use the Pro version on my two big sites and it gives me everything I need.

You may even have been okay with the free version, but they do have more sophisticated bot detection and blocking in the Pro version, so it definitely gives you more control.

I tried the free version for a week. It really didn't do anything for me. Upgrading to Pro and getting the extra controls is what made the difference.
 
  • Like
Reactions: Sim
Back
Top Bottom