XF 2.3 Database Exceeds Available Storage

articulatedthoughts

Member
Licensed customer
My relatively small forum (~300 members) filled up 2GB of available database disk space in just over a year. From what I can tell, this is pretty unusual.

I believe the issue stems from a repeated error I saw in the Admin panel. I ignored the error (lesson learned!) because I completely misunderstood it when I first researched it. The error was max_user_connections exceeded. On a call with my server provider (IONOS), they said the database was full because of this error. This doesn't make any sense to my non-web-developer brain, but it is the only issue I've had with the site.

For reference, I received 1.88M traffic requests over the last 24 hours. I went into my Cloudflare dashboard and began disallowing bot traffic, but it was too late to save my database from exceeding capacity. I'm hoping that my bot mitigation efforts will fix this going forward, but the site will be down until I either decrease the database size or buy more database space.

I entered a query into MySQL and found that xf_search contains nearly half of this data, at 937MB. Is this something I can clear? Should I run this "TRUNCATE xf_search" command? I'm assuming I don't need to keep the search queries.

Any and all advice is greatly appreciated.
 
@AndyB helped me get this sorted.

I cleared the IP data and search data tables, and that was enough to get me under the 2GB database limit. The site is back online now.

Disabling search for unregistered users seems to have done away with most of my max_user_connection errors.

Despite Cloudflare's free bot mitigation tools, I still have an absurd number of guests (around 15,500 concurrent). I'm not sure what else to do there.
 
Despite Cloudflare's free bot mitigation tools, I still have an absurd number of guests (around 15,500 concurrent). I'm not sure what else to do there.
Read this thread and you might get an idea or two:


If you have access to your server you can block AI bots (Claude, OpenAI etc.) via htaccess and/or Firewall.
Which clearly won't solve the problem.
 
Which clearly won't solve the problem.

It solves the database storage problem because the bots won't reach the site which will reduce the visits of bots for the future because they're blocked. I block all AI bots with htaccess and there is one request every 4-6 hours from OpenAI, Claude etc. which is responded with a 403 Forbidden and no other visit until the next 4-6 hours. So yes, it does help.
 
that cause trouble today are for the most part resident proxies that don't identify themselves. Thus I highly doubt that
I block all AI bots with htaccess
as it is technically impossible to achieve this via .htaccess and clearly this
the bots won't reach the site
is not true. Please read the linked thread about loads of guests.
 
Back
Top Bottom