Hi - I am using Wordpress Multisite 3.2.1, I have more than 3000 blogs and users, but the "Right Now Widget" in the network dashboard does not update. It shows "You have 1,766 sites and 2,947 users." while the actual number of blogs and users are more than that.
Hi - I am using Wordpress Multisite 3.2.1, I have more than 3000 blogs and users, but the "Right Now Widget" in the network dashboard does not update. It shows "You have 1,766 sites and 2,947 users." while the actual number of blogs and users are more than that.
9603 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Sales & Support Pro
—
13th December 2011 (5 months ago)
#
Hmm not that then. I'm stumped.
The only other thing I can think of is that because of the number of sites and users you have, WordPress is attempting to update the count but is running out of memory.
I think you might need to post this on the WordPress.org forums as it does seem to be a WP issue.
You've disabled all plugins and tried the default theme yes?
I've already posted on wordpress.org here but I got no response yet.
Yes, I disabled all plugins and tried with default theme and I got the same results.
I am attaching two screen shots, On /wp-admin/network/users.php and /wp-admin/network/sites.php as you can see, the numbers are correct, is there anything I can do so I can get the correct numbers from these areas and show them on the "Right Now Widget"?
@Timothy - I've not upgraded to 3.3 yet, as I am using the multi-db, when is a good time to upgrade? Shall I upgrade right now or wait for an update for multi-db?
10635 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Sales & Support Lead
—
21st December 2011 (5 months ago)
#
Hiya Jamshid,
Quite a stumper here. When you add another user does one of those numbers update and the other not? Is one number completely static or do they both update?
It can take up to 24 hrs for that area to update on multisite... also, did you ever run BuddyPress on this site?
9603 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Sales & Support Pro
—
23rd December 2011 (5 months ago)
#
Hmm, this really is a puzzler. My next thought would be to get all millitant on the issue and insert var_dump() into various places that do the job of updating that figure.... that's not something to be done lightly and only if you're comfortable with PHP coding though...
If I remember from a while ago (it was related to another issue which I can't recall so am having difficulty tracking down the thread) - WP caches the results of one of those results and updates them every 12 hours - I'll see if I can track down the code I found last time.
Yep, the blog and user count are stored in the site options and aren't actually calculated at the time the widget is displayed (from ms-functions.php):
/**
* The number of active users in your installation.
*
* The count is cached and updated twice daily. This is not a live count.
*
* @since MU 2.7
*
* @return int
*/
function get_user_count() {
return get_site_option( 'user_count' );
}
/**
* The number of active sites on your installation.
*
* The count is cached and updated twice daily. This is not a live count.
*
* @since MU 1.0
*
* @param int $id Optional. A site_id.
* @return int
*/
function get_blog_count( $id = 0 ) {
return get_site_option( 'blog_count' );
}
So I would suggest that at some point your wp-cron stopped being fired and if the number has remained the same then it still isn't firing.
If the number has been increasing as new sites or users are being created, then the WP code must be incrementing that count at the time of creation, but you are still not getting the full calculation code running to get the number back to the correct value.
Not 100% sure at the moment unfortunately. Can you check your webserver logs and see if there are any calls in there for the cron? the filename is wp-cron.php.
I'll see if I can put together a debug plugin so you can check if it's being fired or not, and will also see if I can put together a quick plugin to reset the counters to the correct values.
By the way I found the following link which could be useful incase someone might face the same problem. Before moving to my new dedicated server, I was also using Media Temple DV.
Responses (26)
Sales & Support Pro — 30th November 2011 (5 months ago) #
Hiya!
The most likely cause is caching - are you using any caching plugins?
Thanks,
Phil
Member — 30th November 2011 (5 months ago) #
Hi Phil - I am not using any caching plugin, by the way this is almost 6 month that the numbers are not updating.
Member — 5th December 2011 (5 months ago) #
I really appreciate if anyone can help me with this one :)
Member — 10th December 2011 (5 months ago) #
Phil - Any idea here? I really need to fix this issue. This problem did not even after I upgraded the wordpress from 3.0 to 3.2.1.
Sales & Support Pro — 12th December 2011 (5 months ago) #
Hiya!
Sorry for the delay, I didn't see your updates for some reason.
The site and user counts should be present in the wp_sitemeta table of the database.
Can you check that table for the two options; 'blog_count' and 'user_count' and let me know what the numbers are?
Thanks
Member — 13th December 2011 (5 months ago) #
No prob Phil - the 'blog_count' is 1766 and 'user_count' is 2947. Its exactly what I see in my dashboard.
Sales & Support Pro — 13th December 2011 (5 months ago) #
Okay, that's suggesting a cron issue to me.
Do scheduled posts get published okay?
Member — 13th December 2011 (5 months ago) #
Yes, I just scheduled a post for the next 5 min on a test blog and it published on the scheduled time.
Sales & Support Pro — 13th December 2011 (5 months ago) #
Hmm not that then. I'm stumped.
The only other thing I can think of is that because of the number of sites and users you have, WordPress is attempting to update the count but is running out of memory.
I think you might need to post this on the WordPress.org forums as it does seem to be a WP issue.
You've disabled all plugins and tried the default theme yes?
Member — 14th December 2011 (5 months ago) #
I've already posted on wordpress.org here but I got no response yet.
Yes, I disabled all plugins and tried with default theme and I got the same results.
I am attaching two screen shots, On
/wp-admin/network/users.phpand/wp-admin/network/sites.phpas you can see, the numbers are correct, is there anything I can do so I can get the correct numbers from these areas and show them on the "Right Now Widget"?Sales & Support Pro — 14th December 2011 (5 months ago) #
I'm afraid I have no idea - the counts are updated by cron but we've established that's working fine.
Plus, I can't find any mentions of the same issue anywhere....
Support Chimp — 14th December 2011 (5 months ago) #
I've never seen that issue either but my first thoughts would have been the same, cache then the cron.
Have you not tried with the latest WP version, 3.3?
You might want to try on a demo site first. (replica data)
Let us know what happens.
Member — 15th December 2011 (5 months ago) #
@Timothy - I've not upgraded to 3.3 yet, as I am using the multi-db, when is a good time to upgrade? Shall I upgrade right now or wait for an update for multi-db?
Member — 15th December 2011 (5 months ago) #
I've upgraded to 3.3 but still the same issue :(
Sales & Support Lead — 21st December 2011 (5 months ago) #
Hiya Jamshid,
Quite a stumper here. When you add another user does one of those numbers update and the other not? Is one number completely static or do they both update?
It can take up to 24 hrs for that area to update on multisite... also, did you ever run BuddyPress on this site?
Member — 23rd December 2011 (5 months ago) #
Hi Masonjames,
Yes, when I add new user or blog, one number update and the other does not update.
I never run BuddyPress.
Sales & Support Pro — 23rd December 2011 (5 months ago) #
Hmm, this really is a puzzler. My next thought would be to get all millitant on the issue and insert var_dump() into various places that do the job of updating that figure.... that's not something to be done lightly and only if you're comfortable with PHP coding though...
Sales & Support Lead — 30th December 2011 (4 months ago) #
Yeah, on the chance that it's multi-db related I'll ask Barry if he has any other thoughts/suggestions.
Thanks
Developer — 31st December 2011 (4 months ago) #
If I remember from a while ago (it was related to another issue which I can't recall so am having difficulty tracking down the thread) - WP caches the results of one of those results and updates them every 12 hours - I'll see if I can track down the code I found last time.
Developer — 31st December 2011 (4 months ago) #
Yep, the blog and user count are stored in the site options and aren't actually calculated at the time the widget is displayed (from ms-functions.php):
Developer — 31st December 2011 (4 months ago) #
So I would suggest that at some point your wp-cron stopped being fired and if the number has remained the same then it still isn't firing.
If the number has been increasing as new sites or users are being created, then the WP code must be incrementing that count at the time of creation, but you are still not getting the full calculation code running to get the number back to the correct value.
Member — 2nd January 2012 (4 months ago) #
Happy New Year to all of you!
@Barry - how to get wp-cron start firing again?
Developer — 2nd January 2012 (4 months ago) #
Not 100% sure at the moment unfortunately. Can you check your webserver logs and see if there are any calls in there for the cron? the filename is wp-cron.php.
I'll see if I can put together a debug plugin so you can check if it's being fired or not, and will also see if I can put together a quick plugin to reset the counters to the correct values.
Member — 10th January 2012 (4 months ago) #
All - I recently moved my site to a new dedicated server and this issue seems to be fixed after the migration.
Thanks to all of you :)
Member — 10th January 2012 (4 months ago) #
By the way I found the following link which could be useful incase someone might face the same problem. Before moving to my new dedicated server, I was also using Media Temple DV.
http://yoast.com/wp-cron-issues/
Sales & Support Lead — 11th January 2012 (4 months ago) #
Hiya Jamshid,
That is terrific news! :) Thanks so much for letting us know ( and for posting a possible solution for others who come along)
Become a member