It seems that every 15 or so seconds (according to fiddler) the admin-ajax.php checks for new comments and new posts.
If i had say 20 users sat on the page this would give the server a fair bit of hammering even though the users are not doing anything, right.
Is this an inherent part of the P2 theme that nothing can be done against
go to your functions.php file and delete these two lines:
add_action( 'wp_ajax_prologue_latest_posts', 'prologue_latest_posts' ); // Load new posts
add_action( 'wp_ajax_prologue_latest_comments', 'prologue_latest_comments' ); //check for new comments and loads comments into widget
@texet
go to your functions.php file and delete these two lines
Tried it but the only problem is that new post and replies don’t appear until the page is refreshed…
cool that is a plan if the host gets a bit upset.
Thanks texet that is a good backup
as gene says this is a dirty fix but not a complete solution as it doesnt function the same.
althought people are used to pressing f5 to refresh the page which is ok i guess
Hi Hal, have you checked to see if your server resources have gone down considerably since you applied texet’s fix?
Thanks,
Gene
althought people are used to pressing f5 to refresh the page
Hmm, After applying texet’s fix, I wonder if there would be some code that could be added added that would refresh the page after clicking on “Post it”…
nope not tried it yet – just about to go on hols to south africa for weeks
@hal: Have a great vacation!
Search for “var updateRate” in functions.php.
You’ll see a number. This is the frequency Ajax would check for updates in milliseconds. Update the number to something larger.
[signature moderated Please read the Forum Rules]
Thanks smallwei, I’ll do that.
Cheers,
Gene
I have changed the updateRate from 30000 (30 seconds) to 3600000 (1 hour) but can still see lurking visitors accessing the same page every 30 seconds.
Is the file cached client side ?
Mark, how did you find out the accessing time? Did you use firebug? How about when you try it yourself? Is it still hitting it every 30 sec?
The file shouldn’t be cached as far as I know.
– smallwei
Thanks smallwei , I am using tail to watch the logs via ssh.
Our apache2 was set to not log our local connections but when disabled I can see all the local machines accessing every 30 seconds just like the outside visitors.
Here is just one client example :-
mnhm-5f74c811.pool.mediaways.net - - [19/Nov/2009:08:08:14 +0100]
mnhm-5f74c811.pool.mediaways.net - - [19/Nov/2009:08:08:44 +0100]
mnhm-5f74c811.pool.mediaways.net - - [19/Nov/2009:08:09:14 +0100]
mnhm-5f74c811.pool.mediaways.net - - [19/Nov/2009:08:09:44 +0100]
mnhm-5f74c811.pool.mediaways.net - - [19/Nov/2009:08:10:15 +0100]
I am using WordPress-MU if that makes any difference to the way themes are shared / handled.
Mark,
It’s possible the reason is due to WP-MU.
Sorry I don’t have WP-MU installed so can’t really tell you exactly.
– smallwei
OK , well the constant refreshing doesn’t appear to be a problem at the moment as my site isn’t busy , but its something to bear in mind.