XF 2.2 Hourly cleanup cron times out forum

themago

Member
I have a pretty large forum and during peak hours, 10 minutes past the hour each time (when the hourly cleanup cron starts) the forum starts to go very slow, and causes 502 timeouts on cloudflare, anyone have any ideas of what I could look for to stop this? I have a server admin who's been trying to diagnose the issue for a while now, but so far we haven't been able to come up with anything
 
I have a server admin who's been trying to diagnose the issue for a while now, but so far we haven't been able to come up with anything
Get a better server admin ;)

Now, jokes (with some truth though) aside:
Check which cron job is causig this, when you've identified the job check what it is doing.
I'd expect that you do have some issues with MySQL not being properly configured and/or the cronjob running non-optimal queries.
 
Last edited:
I've replied to your ticket, but checking what MySQL is doing at this time is likely to be the most significant thing, at least to see if that shows something (such as long running queries).

MySQL/InnoDB tuning is also absolutely vital, particularly as the default values for some options are really bad for sites with substantial amounts of data. There are a lot of variables in this that depend on your specific server setup though, for example.
 
i had issues with the search table failing to truncate. once it fails once, it fails over and over again and then there's a billion rows of old searches in there that won't tuncate out via cron.

take a look at the tables and see what shouldn't be so large
 
In my experience, timeouts are almost always caused by MySQL tuning issues.

Run mysqltuner to help identify issues. Number one thing to check is that you have enough RAM available for your database server and allocated to MySQL/InnoDB.
 
Top Bottom