XF 2.2 Too many Guests

sufilala

Active member
Licensed customer
Hi all, happy 2025!

Our forum is small and never has over 20 registered users logged in, but recently it's been getting stuck due to 3000+ "Guests"/unregistered visitors arriving at the same time, which eventually triggers this error:
  • MySQL query error [1114]: The table 'xf_session_activity' is full
and the forum content becomes unavailable and displays a standard message on the front end about a problem generating content. Then it seems to resolve itself and the content comes back up, but this is happening more and more often - a few times a day now. I suspect content scrapers for AI but 🤷‍♀️ i just really want the forum to be stable again.

I've set the forum not to display to unregistered users, but that makes no difference

I've checked access logs - user agents and IP addresses are not showing any obvious (to me anyway) culprits whose IP I could block

I've looked up the database error and found various obscure suggestions but i hope there may be a better way to sort this out than fiddling with the database?

Any suggestions would be very much appreciates, thanks in advance
 
Cloudflare is the only way to fix this problem or get close
Simply no. There are a bunch of different ways. Using Cloudflare is one of them, but neither the only one nor necessarily the best one, nor does it necessarily "solve" the problem or get close to do so. There's an epic thread about the issue with all sorts of hints and experiences:

 
Simply no. There are a bunch of different ways. Using Cloudflare is one of them, but neither the only one nor necessarily the best one, nor does it necessarily "solve" the problem or get close to do so. There's an epic thread about the issue with all sorts of hints and experiences:

Not a problem then , Enjoy your bots. Been in the forum game since 2001 and this isn't 2001 anymore, I stand by my statement , a 25$ per month cloud flare plan is worth it's weight in gold. Trying to manage a forum where you already have them hitting your server wastes resources port 80 and 443 needs to be blocked and then only allow CF ip's to deliver sanitized traffic to the server

Here is what a 25yr old domain deals with daily
1788609645633.webp

and here are my actual server numbers
  • 08:01:13 up 1:42, 0 users, load average: 0.19, 0.08, 0.03
  • 213 total, 1 running, 212 sleeping, 0 stopped, 0 zombie
  • 1.5 us, 3.1 sy, 0.0 ni, 93.8 id, 0.0 wa, 1.5 hi, 0.0 si, 0.0 st
  • 15663.9 total, 12148.6 free, 1228.2 used, 2287.1 buff/cache
  • 8028.0 total, 8028.0 free, 0.0 used. 14089.0 avail Mem
You can block all this crap at the server level but all that noise will use your resources
 
Enjoy your bots.
I don't have an issue with bots. They are mitigated successfully, w/o using Cloudflare.
Been in the forum game since 2001

port 80 and 443 needs to be blocked and then only allow CF ip's to deliver sanitized traffic to the server
If all you've learned about server management in 25 years is to praise CF as the only solution and to become aggressive towards anyone that hints that there are other solutions as well you've obviously not learned much. For the bot purpose CF is basically nothing more than a firewall on a different host and this is a very classical setup that existed already years before you joined the forum game. There are many ways to build something like that (and even more with todays options for virtualization) w/o even thinking about CF and wether one really needs a setup like that highly depends from the own situation. But then again you seem not interested to learn anything aside your beliefs.
 
Having an issue here - see post linked below. Mine has gradually gone up from a regular 500, to 2000 and now regularly 5,000 - trying to work out if this is what is causing the issue in the post below - or something else causing it.

Server said very heavy request volume from service_worker.js maxing out cpu

 
Mine has gradually gone up from a regular 500, to 2000 and now regularly 5,000 - trying to work out if this is what is causing the issue in the post below - or something else causing it.

Server said very heavy request volume from service_worker.js maxing out cpu
5.000 users is normally nothing that would bring XF to sweat, not even on a good shared hosting account. So it depends from your configuration, your add ons and the power of your hosting if they are an issue.

The fastest and easiest to ease up load is to not allow guest to use the search and to see the "what's new" page. If these 5000 users are bots (which is probably the case) you can (and should) follow one of the strategies for fighting those as developed in the thread linked further up:

 
5.000 users is normally nothing that would bring XF to sweat, not even on a good shared hosting account. So it depends from your configuration, your add ons and the power of your hosting if they are an issue.

The fastest and easiest to ease up load is to not allow guest to use the search and to see the "what's new" page. If these 5000 users are bots (which is probably the case) you can (and should) follow one of the strategies for fighting those as developed in the thread linked further up:

Thanks. I already have the cloudflare app. However, what else could be causing very heavy usage of service_worker.js please?
 
I already have the cloudflare app.
Do you only have the app or do you have CF configured as well? If you still have 5.000 users in parallel CF does not seem to work against bots on your forum, possibly partly b/c of a wrong config. I heavily doubt that hamsters are so popular that you have that many genuine people in parallel visiting your forum, especially not a ratio of 1 registered user to 3000 guests:

Bildschirm­foto 2026-09-05 um 18.01.16.webp

As a standard CF caches pages. Obviously, dynamic and interactive pages like search or what's new cannot be cached. So w/o checking your config sorrowfully there is no way to give advice and even less so if you don't follow it anyway.
 
That was a bit harsh and a lot of assumptions! I wondered if someone could answer my question - if not bots then what else could be causing very heavy usage of service_worker.js please?
 
Few months ago I blocked Singapore due to large bot swarm and lost Google search pages because it seems some Google crawlers run from Singapore. It was bad took some time to recover.
If blocking Singapore you need to add this "and not cf.client.bot" at the end - see below - after the country name. This screenshot is from a managed challenge rather than a block, but it's the same phrase needed. It blocks everything except Google, Bing, Duck Duck go and all reputable search engines - just lets them through. I later added other countries to be challenged but left the phrase for all of them, just in case Google et all launch from another country at times, and it does no harm.

Not cf client bot.webp
 
Back
Top Bottom