Posts registering in Activity feed, but disappearing
I’m running SVN builds of bbPress 2.1-rc2 and Buddypress 1.6-beta1
Some forum posts go through just fine. Others log in the Buddypress activity stream, but disappear and never show up on the forum. I’m going to go through my Apache logs to see if I can figure out more about what is happening. I’ll gladly open a bug in Trac, but first I want to make sure this is a bug and not something in my particular site config.
What can I do to help troubleshoot and vet this issue?
This is what I’m seeing in my access.log at the time a post disappears. I’ve grepped out all the successful 200 messages.
[28/Jun/2012:10:15:32 +0400] “POST /topic/mass-effect-3-ending/ HTTP/1.1″ 302 701 “http://blindscribblings.com/topic/mass-effect-3-ending/” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1″
[28/Jun/2012:10:15:33 +0400] “POST /wp-admin/admin-ajax.php HTTP/1.1″ 500 509 “http://blindscribblings.com/topic/mass-effect-3-ending/” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1″
From my error log, it looks like PHP is running out of memory when trying to post occasionally.
I’m on a VPS with 2GB memory on a development box with no one really hitting it. I’ve cranked up the memory limit in php.ini to 256MB. I don’t have memory limitations in my site config or wp-settings.php and I don’t use .htaccess files. But it seems like php won’t allocate more memory even though it isn’t near its limit.
So this does not appear to be a bbpress bug.
Well, I take it back. I disabled a few plugins that weren’t absolutely necessary and now I’m not getting PHP memory errors. However, I’m still seeing the same issue for some users. Forum posts go into site activity, but the posts aren’t making it into the forums.
I’ve disabled just about every plugin I can on the site except what I really need. I can load any other page on the site with no problems, but loading forum pages always spikes the server memory. And I’ve discovered that the reason I can’t allocate PHP memory even though I’m under the PHP limit is the server is running out of memory completely.
Each pageload of a bbPress page on my server is consuming a good 300-400MB by itself. With 2GB of memory, my server crashes when a few people hit it at once.
At this point I’m not sure I have much choice but to rip out bbPress and replace it with another forum solution.
Access log isn’t very helpful here. The error log will be, as well as any information you can provide on the memory monitoring side. What function causes the spike, etc…
My error log keeps showing PHP memory errors:
PHP Fatal error: Out of memory (allocated 63963136) (tried to allocate 49152 bytes) in /var/www/wp-admin/includes/ajax-actions.php on line 1483, referer: http://blindscribblings.com/topic/test-post/
I’m not seeing anything consistent before those errors to suggest what is happening. If there is a way to trace how much memory is used by each PHP page along the way, or to trace the memory consumption in any way, I’d be happy to try it.
You can see my phpinfo() here.
You can see an example here where the post makes it to the site activity:
The first post you see there in the activity did successfully post to the forums, but the second one didn’t.
I’m looking in the DB and the posts that disappeared did in fact get written to the DB and they’re pending.
It looks like Akismet is flagging 90% of the forum topics/replies as spam. So they remain in “Pending” status.
bbPress doesn’t put posts in pending status, for any reason.
Does this problem happen for all forums? Group forums? Can you narrow the issue down to something smaller and reproducible?
Not sure if you saw my last post, but Akismet says it marked 17 comments as spam, but there are no pending comments. There were however pending forum posts. So it looks like Akismet was flagging them.
I’m Googling up right now and people have run into issues in the past when using Cloudflare where Akismet marks everything as spam because multiple accounts appear to be coming from one IP address.
This was supposedly fixed in the beginning of June with the latest Akismet plugin which I’m running.
I could disable Akismet and see if that resolves it.
If I’m reading this correctly, it does like bbPress can put the posts in pending status.
Here is an Apache error log cranked up to debug level when it happened.
/** Topic Moderation ******************************************************/
$post_status = bbp_get_public_status_id();
if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
$post_status = bbp_get_pending_status_id();
I do think bbPress was setting the posts to Pending before putting them through moderation, but this may not be a bbPress bug.
I’ve been trying most any troubleshooting step I can find.
I turned off EnableSendfile in Apache, and every forum post has come through successful since then. But since the issue was intermittent and only a few people are testing the forums right now, it’s hard to tell.
My memory utilization is still pretty high, but I cranked down my Apache settings considerably (using recommended settings for a 256MB VPS on my 2GB VPS) and I turned off eaccellerator in PHP as well.
If I get a few more successful test posts from users, then I’ll close the ticket in Trac.
Memory utilization could really be any bad piece of PHP code on my site, and I’m not sure where that is coming from yet. But if no one else reports it, then my case is anecdotal.
You must be logged in to reply to this topic.