Too many connections - bots?

Liam C.

Member
Our forum site has been experiencing a few errors here and there, quite normal and all and I'm looking to try and tone down the errors

Today I seen "Too many connections" as an error - something that pops up often but I figured to look into it now and ask for thoughts.

From what I assume, it is bots? The request state has a field stating: ["url"] => string(37) "/?category=news& (then a bunch of random characters and numbers)

The category at times changes, and sometimes it's not even specifying a category, such as: ["url"] => string(32) "/?limit=10&wPUH4UBeLjaA&CiNl6tgjBB"

Does anyone have any additional thoughts to this? Any pre-existing addons that might prevent these bots without affecting the general user? We aren't having major issues, just wanting to pay more attention to errors right now
 
You're not the first person to complain about this recently - I also assume it is bot related.

My advice - first thing to do is to ensure your database server is well tuned and has sufficient RAM allocated to allow fast queries.

Slow queries can cause an increase in connections required - since each thread will need to wait for the query to complete before being released for another query, thus requiring more threads/connections to deal with any increase in load.

If you don't already use it, consider installing my Known Bots addon - although to be clear - this does NOT provide any functionality to deal with too many bots, it just helps you identify which visitors are bots.

I use Cloudflare for managing bot traffic - their automated tools for blocking bad bots are very good, especially if you're on a paid plan. Even so, you can use firewall rules to block problematic bots.

You can also use Cloudflare to block entire networks at an ASN level if you're seeing suspicious activity from a range of IP addresses - although you do need to be careful that this doesn't also block genuine users using VPNs etc - so using Cloudflare's "Managed Challenge" instead of an outright block, can be useful there.
 
Back
Top Bottom