1000s of acivity related tables are being created automatically
-
Hello,
For past few hours, I have been noticing that budypress is creating 1000s of activity related tables automatically.. this process is not allowing the site to load (though admin panel works fine)
I deleted around 3,000 tables but the process of table creation is still going on.. I have no idea what to do..
The table names are as below:
wp_user_xx_activity
wp_user_xx_activity_cached
wp_user_xx_friends_activity_cached
xx is the automatically generated user ID.
Some kind of pointers would help?
Regards,
Deep
-
Maybe you are hit by a spam bot that creates new users? Have you tried to disable the signup?
It’s realy sounds indeed like a spam bot, do you have a signup captcha ? Or, maybe indeed dissable new registrations, until the wind blows over
It doesn’t look like spam as I don’t see much increase in registration (wp_users table) The tables are being generated for the users which are already present..
I have disabled the registrations now.. let’s see how it goes.. I really doubt if it will work though..
Thanks for the inputs.. any other pointers which I should look for?
What version bp and wpmu deep? Any custom code or new plugins installed? What changes happened recently?
You have to be using a version of bp prior to trunk rev 1265 because bp no longer uses individual user activity tables.
I am on RC1.. I had Send Invites plugin installed, it messed up the whole thing (i.e. it automatically disabled the JS for some reason), so I deleted the plugin file and folder.
I had installed WP Super Cache too, it did not work well, so I had to take it off too..
Other than that, no MU plugins…
Here is the list of plugins I have installed for a single blog:
Akismet
All in One SEO Pack
Global Translator
Google XML Sitemaps
SexyBookmarks
Smart Youtube
Smilies Themer
Twitter for WordPress
Twitter for WordPress
WordPress 2.6+ and bbPress 0.9 cookie integration
WP Custom Login Logo
I disabled all the plugins but still the issue remains.
In my previous reply, I had disabled registration just to cross verify.. but still the new tables are getting created..
I traced the user from the User ID mentioned in the table name.. the user looks like a spammer to me.. but now sure what the user is trying to do as those created tables have 0 records…
Also what I have noticed it.. the page still calls for JS and CSS file from the deleted folder bp-invitefriends.. no idea why it calls.. I tried to delete the traces from the DB too but still it calls the same files.. (Firebug shows internal server error 500 for these files)
There was a recent change (Changeset 1295) to bp-blogs.php that stopped spam comments from being recorded in activity streams.
As Burt points out, newer versions of BP no longer have individual user activity tables, but I suppose this bug combined with an older version of BP could expose you to significant spam problems. I cannot verify this without looking at the older code. It is just a hunch.
I would recommend taking your site offline (if in production) and then upgrading your installation following the instructions found here: https://buddypress.org/forums/topic.php?id=1994
This is what I found in the error log of the server.. (apache)
[Mon Apr 13 09:35:55 2009] [error] [client xxx.xxx.xx.xxx] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace., referer: http://xxx.com/
[Mon Apr 13 09:36:25 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: include_once(bp-invitefriends/bp-invitefriends-admin.php5) [function.include-once]: failed to open stream: No such file or directory in /var/www/html/xxx/wp-content/mu-plugins/_bp-invitefriends_.php on line 37
Did you just delete the invite friends plugin? I’m thinking that you may not have deleted the entire plugin. There seems to be a php file in /mu-plugins called bp-invitefriends.php and then the files in the directory /bp-invitefriends
Make sure you deleted the file in the /mu-plugins dir and the files in the plugin directory.
Yes I deleted it long time back.. but still the error keeps on coming..
@Jeff Sayre – Will it be safe to have latest SVN version on production site? I am not sure about it so asking..
For now, I am going to export the online DB to my local machine and see if it makes a difference or not.. (if the tables are not automatically getting created that means, the issue is with the spam bots else the issue is with something else)
I will post updates in a while..
What version of wpmu are you using and are you using the wp object cache? Disable object caching and flush the existing cache directory. There was a bug in wpmu until recently in the 2.7 trunk that tries to load plugins that don’t exist anymore.
I am using RC1 downloaded from the site..
WP Object Cache – I don’t think so it is enabled.. it was taken out from WPMU 1.5.1? I haven’t touched any other core files except the config file..
Will it be safe to have latest SVN version on production site? I am not sure about it so asking..
Safe? Well, both the latest WPMU branch and BuddyPress trunk versions are still in development. It is always a gamble to use pre-release packages in production.
By the way, BuddyPress RC1 is not production ready. So, you take risks running it on a production site. Once BuddyPress has its first public release, you can then start deploying it into a production environment.
However, it sounds like you’re already using BP on a production site. You might want to consider temporarily shutting that aspect of your site until you either fix this issue, or until BuddyPress is officially released and you’ve upgraded to the pubic release version.
Getting back to the invite friends plugin issue, did you just delete it or did you first deactivate it then delete it? Have you done any updates to WPMU since deletion?
This is what IRC is for people. #buddypress irc.freenode.net
We are posting around each other.
It sounds to me like a bot is hitting your registration hard, and keeps attempting to refresh a page or is getting stuck on the creation reload or activation email, and is overloading the server with requests.
It’s kinda one of those situations now, where all those plugins start to muck up our ability to figure out if this is BP’s fault or not. Usually the recommended plan of attack is to disable all plugins now, try to create a test user yourself, and see what happens.
Even if you upgrade to the most recent trunk, and a bot or an unruly plugin are to blame, rather than creating tons of new tables, you’re still getting the overload of requests which is causing all sorts of havoc.
@Jeff – I will give it a try with the version which is on Trunk..
About the invite friends plugin – I think there is no option to activate / deactivate if the plugin is installed in mu-plugins directory.
I just fixed that issue.. I had basically renamed the directory and file.. I deleted now and invite plugin issue is gone but still the site issue still remains.
I will get on IRC now.
Thanks
Deep
I’m not sure that the plugin issue has anything to do with repetitive activity table creation. However this:
[Mon Apr 13 09:35:55 2009] [error] [client xxx.xxx.xx.xxx] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’
Should be of concern.This is an apache configuration problem.
Hi John,
I registration is disabled but still the table creation is going on.
The server is pretty much stable.. by running netstat command, I found only 27 active connections..
Deep
This is what IRC is for people. #buddypress irc.freenode.net
We are posting around each other.
Good point, Burt!
Deep and I are in irc now people.
Will see you there later. Off to a meeting.
Damn, I”m bit confused. I’m using RC1. Please answer this simple question:
Q> When the stable version of Buddypress is released, will it be possible to migrate to the stable version from RC1?
I’m sure the database tables will be altered. So when I migrate to the stable version, will I be required to do custom database migrations? Or will it be handled by the upgrade script?
@thebigk, it will be handled by the migration script.
Hi Guys,
I finally managed to fix the issue with the help of Burt.. I really appreciate the help.. very few people go so far and stay till the end.. I was with him on IRC for almost 2 hours..
The issue was related to one of the plugins (Sexybookmarks), the plugin was trying to connect to remote site to fetch some data, the remote site had some problems so was throwing back error 500, so in this process, the server was not able to load the whole page. (May be it was retrying)
We disabled all the plugins and tried enabling all one by one.. and thats how the issue was traced.
Now back to the 1000s of table issue.. earlier I thought it might be causing the issue but later realized that, it was actually not the issue, this is how BuddyPress RC1 behaves to track activity of each user.. it creates 3 tables for each user..
I think like Jeff mentioned, it has been taken care in the latest version over the trunk.. the latest trunk version will fix the issue as I think it stores all the activity in single table.. thus it’s a good idea for the sites with the large user base.
I guess that’s it, all cool now.. issue resolved with the help of Burt (Burtadsit)
Thanks everyone for their inputs.
Regards,
Deep
- The topic ‘1000s of acivity related tables are being created automatically’ is closed to new replies.