1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Rebuilding Thread Cache (starting from a specific ThreadID)

Discussion in 'Troubleshooting and Problems' started by nrep, Jun 1, 2014.

  1. nrep

    nrep Well-Known Member

    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.
    Last edited: Jun 1, 2014
  2. Liam W

    Liam W Well-Known Member

    Not without custom development or editing of files.
  3. nrep

    nrep Well-Known Member

    Is it a simple text edit to manually specify a starting ID? I was hoping I could append a string to the rebuild cache page ideally, as it's just a one off.
  4. Mike

    Mike XenForo Developer Staff Member

    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.
  5. nrep

    nrep Well-Known Member

    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.
    Last edited: Jun 2, 2014
  6. nrep

    nrep Well-Known Member

    Hmm, I tried looking in the xf_deferred table when I run the rebuilt thread information task, but I didn't see any new entries created (just a task that was previously there marked as a cron task).

    Is that what I should expect?
  7. Mike

    Mike XenForo Developer Staff Member

    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.
    nrep likes this.
  8. nrep

    nrep Well-Known Member

    Cheers, I'll give that a try every half day and then if it goes down, I'll re-insert the row and catch up :).

Share This Page