XF 1.4 Xf_search table crashing

briansol

Well-known member
This table has grown huge... 32gb. My posts table is 400mb.

Is something wrong? These numbers don't make sense to me. My search and session tables keep crashing. I repair them 3 times a week lately.

Can I truncate the search table and rebuild it?
 

Brogan

XenForo moderator
Staff member
The xf_search table is a record of all (recent) searches carried out by visitors.

It should be cleared periodically (daily cleanup).
What date (you will need to convert the unix timestamp) is the oldest record in the table?

Disabling search for guests should cut down on the number of searches.

The table can be truncated if it is that large to reset it.
 

Brogan

XenForo moderator
Staff member
What has likely happened is the table grew so large in a short period of time that the cron failed and then just continued to grow.

Disabling search for guests is probably a good idea if it happens again.
 

briansol

Well-known member
Thanks. I turned it off. Truncated the table. The site is flying again.

Sounds reasonable. I'll keep an eye on it.

Cpanel upgrade a few weeks back updated backup retention after export to s3 so I filled a hard drive. It's been chaos ever since. The cron probably failed that night and hasn't run since. My backups were taking longer than 24 hours so it never finished.

I know I'm out of date and planning to update soon but a feature request could be a better alert around cron failures via email instead of just the cp.
 
Top