XF 2.1 Can’t restore a deleted thread

ssj2_ssbm

Member
Hi,
a moderator accidentally deleted one of our biggest threads. The good thing is, it was just a soft delete. I just tried to undelete/restore that thread but when I do that I get this error

Oops! We ran into some problems. Please try again later. More error details may be in the browser console.

When I enter the ACP I see this in the error logs

ErrorException: Fatal Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 125523216 bytes) src/XF/Db/Mysqli/Statement.php:86


Stack trace
#0 [internal function]: XF::handleFatalError()
#1 {main}


Request state
array(4) {
["url"] => string(22) "/index.php?inline-mod/"
["referrer"] => string(51) "https://www..com/index.php?forums/off-topic.2/"
["_GET"] => array(1) {
["inline-mod/"] => string(0) ""
}
["_POST"] => array(6) {
["type"] => string(6) "thread"
["action"] => string(8) "undelete"
["_xfRequestUri"] => string(30) "/index.php?forums/off-topic.2/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 
Increase your server's memory:

php_value memory_limit 256M
It's 256M already. Can I go higher than that?

EDIT: I increased the limit to 512M. Now I see the animation that something is loading for longer but then, after like 15 seconds, the site does not respond at all. I can't even access the ACP. I had to restart the server. But the thread is still soft-deleted.
 
Last edited:
That’s what we already tried, but that method messes up the post count. It successfully restored the thread, however there are about 80k posts missing in the statistics widget and in the user profiles. We fixed the latter one by using this add-on but the statistics count (I think it’s called global/total count) is still off. How can I rebuild that count?
 
Top Bottom