1 kwa Aug 30, 2005 01:36
3 kwa Aug 30, 2005 02:12
EdB wrote:
Stop logging hits that are either robots or syndication! [... Anyway here's the hack to stop logging those hits. (BTW I'm assuming not logging a hit means your server works a teeny bit less.)
Once the Auto pruning of old stats feature removed/reduced, I don't notice any significant speed difference between an empty log_hit() function and a normal one. Bottlenecks have to be found elsewhere.
4 strojanoff Sep 07, 2005 15:53
I just had to get rid of the log hit function completely, it didn't make a lot of sense to log visitors as I have thousands of visitors daily... the database server was going totally crazy, and in a shared hosting environment I was the black sheep causing problems... to know who visits is nice, but not a a "production" site with many visitors...
5 edb Sep 07, 2005 16:21
Did you remove it from 8 of the 9 files in the xmlsrv folder as well as the _main.php files in your skin(s)? Syndication feeds make up a heck of a lot of the hits because people update their aggregators frequently. You might have nothing new, but you get hit by them in order for them to find that out.
Also you should still keep your antispam guard up because spammers don't seem to care if they actually get through to your page. In fact they don't seem to care if they are getting 403s sent their way - once you're on their list they keep trying to spam you. Blech. I hate them.
6 fplanque Sep 09, 2005 00:45
What actually takes a lot of time here is MySQL checking what stats need to be pruned and which not.
This will be addressed in version 0.9.1 "Dawn". Due very shortly (sth like next week).
7 fplanque Sep 25, 2013 01:32
For future reference, this is the cron job you need to use:
http://b2evolution.net/man/back-office-reference/system/scheduler-tab/scheduled-jobs/task-prune-old-hits-and-sessions
I've never enabled that feature, but I'll give you another hack that I think helps with server work load. Stop logging hits that are either robots or syndication! Maybe other people care about those hit types but I sure don't. I mean, do I really care that a robot indexed me or someone told their aggregator to update? You get hit by aggregators even if you have no new posts, so why bother? My opinion, and others probably have a different view. Anyway here's the hack to stop logging those hits. (BTW I'm assuming not logging a hit means your server works a teeny bit less.)
Open b2evocore/_functions_hitlogs.php and find this bit:
Now add two little ifs right before the last line above:
EDIT: sorry, but I submitted when I wanted to preview. It's a drop in the bucket, but *I think* every little bit helps. You lose the stats data, but - as I said - since it seems meaninless to me I figured why log it.
If you want to get really smart about it you would remove "log_hit()" from every file in your xmlsrv folder. That will stop rss hits from calling this function in the first place.
If you don't care about stats data AT ALL then remove that function call from your the xmlsrv folder AND your skin's _main.php file. I personally like to see referers and search engine hits, so I've left it intact. Obviously you make the call that's right for you.