I need to rebuild the thread cache ("Rebuild Thread Information" on cache page) on a particularly large forum, but it's taking AGES (I guess it will take over a week to do at the current rate). I've tried it twice, but encountered a problem part way through (80!%) - due to table locks during automated backups, which caused a timeout.
Is there a way I can rebuild the thread cache and specify which number to start from? I know the exact ThreadID where it stopped and I've save days of time by specifying where to begin rebuilding from.
There isn't an option to do that -- you'd mostly need to be editing binary data in the DB (xf_deferred table), which I can't really recommend. You might be able to do it by manually building a request but it's questionable.
Even with a timeout, the data should ideally be stored back in the DB (unless the script was forcibly killed) and you should be able to pick it back up.
Thanks Mike. I suppose I could at least monitor the xf_deferred table and take regular snapshots so I can take up from where it left off?
Normally the deferred tasks has taken up where it left off, but if I've had a PHP timeout or HTTP 500 error (caused by background backup scripts running at quiet times) then it hasn't done so. I've come back to the admin panel some hours after it has failed, press F5 or back, then I'm prompted to log in again and I'm taken back to the main admin panel page without any deferred tasks notice.
The record isn't in the DB while it's running. To see it, you would really need to start the process and close the rebuild window (it should complete that page but it won't be able to continue; you could pick it up after a minute or so when the stopped processes notice comes up).
Alternatively, you might be able to get really lucky with timing but I don't think that'd be consistent.