Could not obtain list of posts to prune

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
LiNC
Registered User
Posts: 14
Joined: Sat Mar 02, 2002 4:55 pm
Location: Sweden
Contact:

Could not obtain list of posts to prune

Post by LiNC » Wed Jul 30, 2003 11:11 pm

On 64bits.se, we've been running phpBB2.0 since RC2, and upgrading to every release on the way. We're running 2.0.5 now.

We've had some problems with the pruning in the two (out of the 19 forums we have) forums we're using pruning in. We got error messages like this:
Could not obtain list of posts to prune

DEBUG MODE

SQL Error : 2006 MySQL server has gone away

SELECT post_id FROM phpbb_posts WHERE forum_id = 24 AND topic_id IN (21154, 21154, 21154, 21154, 21154, ............, 21154)

Line : 69
File : /usr/home/64bits/www/forum/includes/prune.php


It repeats '21154' 171686 times. ;)

Well, we didn't know what to do about it so we simply disabled autopruning. For a while that was ok, but the forum became a bit to big, so we thought that we should delete the two forums (and their content) and create two new ones.

One of them was no problem to delete, but the other was a bit messy. We couldn't figure it out, so I asked in #phpbb on freenet, and a friendly op tried to help me. He told me to delete every (visible) topic in the forum. It didn't solve the problem, and strangely enough the index.php-page listed about 25 topics in the forum, even if the viewforum.php-page listed none. Synchronizing the forum from the admin panel didn't work. He got admin in our forum, and tried a few things (while I translated swedish to english for him ;)). But he couldn't solve it. So I was asked to post the problem here instead.

It's been a couple of days since then, but since we've just hidden the forum with the problem it's not been critical.

The problem came with one of the new forums today, with the error message above. So I did a little research, and found out that the topic with the ID of 21154 had '0' as topic_first_post_id and topic_last_post_id. So I searched for all topics with 0 as topic_first/last_post_id, and came up with 169 others. Some (15 or so) belonged to the forum we couldn't delete, and the others belonged to other forums without autopruning enabled. Some of them was new, like a couple of hours old, but they didnt show up in the respective forums index (although a copy of the thread was visible, with the same title, but another ID). I made a backup of the database and deleted every row from phpbb_topics where topic_first_post_id and topic_last_post_id was 0. Index.php still reported our troublesome forum to have 10 (or so) topics left, but now I was finally able to delete the forum.

So my question now is how I can prevent the forum from creating topics with topic_first/last_post_id of 0?

Sorry for any bad english and I appreciate any help I can get. :)

Edit: Strange.. now after I've deleted the rows in phpbb_topics with topic_first/last_post_id = 0, at least one of the rows were recreated (same topicID), with the same data as the orginal, but this time it had non-zero values in the two fields.

LiNC
Registered User
Posts: 14
Joined: Sat Mar 02, 2002 4:55 pm
Location: Sweden
Contact:

Post by LiNC » Thu Jul 31, 2003 12:38 pm

Sorry for doing this, but... bump.

LiNC
Registered User
Posts: 14
Joined: Sat Mar 02, 2002 4:55 pm
Location: Sweden
Contact:

Post by LiNC » Fri Aug 01, 2003 2:16 pm

My last bump, I promise. :)

Isn't there anyone who can help me?

Ken Creason
Registered User
Posts: 4
Joined: Sun Dec 15, 2002 6:18 pm
Location: Apple Valley, CA, USA
Contact:

Similar Problem

Post by Ken Creason » Fri Aug 01, 2003 6:56 pm

LiNC,
I have experienced the same problem over the last 6 months. I just upgraded to 2.0.5
in hopes of fixing it, but that seems not the case.

A while back, when a couple of fora started getting over 5000 posts or so, the pruning
would start to error (as you have described, with one ID in the query being repeated
thousands of times) because the maximum query size would be exceeded (we use
postgresql and it has a default max_query_size of 10k). I posted a message about it
and the only response I remember getting was "maybe you should switch to mysql" :roll:
So I turned off pruning and ignored the problem as best as I could but I must address it
again now because it seems to be related to other things, things that I need to function.
For instance:

When I delete a single post, it takes between 2 and 3 minutes to complete. Why is that?
If I try to prune a forum that has about 4000 messages (not enough to cause the query
error), it takes about 3 hours to complete :(

Perhaps between the 2 of us we can get this problem resolved :)
_Ken

LiNC
Registered User
Posts: 14
Joined: Sat Mar 02, 2002 4:55 pm
Location: Sweden
Contact:

Post by LiNC » Sun Aug 03, 2003 6:54 pm

Nice to hear that we're not alone with the problem. ;)

It takes a while to post or edit in our forum too, and to delete a topic or post. Sometimes it takes so long that the browser times out, leaving an unsynced topic/forum behind (although the post usually gets posted). Pretty strange, but we're not sure what is causing it, because if you send a PM it takes about 2-3 seconds. We don't know if it's the server that's overloaded either, since we dont have that kind of access to it.

Many questions, little answers.. ;)

Locked

Return to “2.0.x Support Forum”