Recent Topics

1 Feb 04, 2012 20:16    

I'm trying to get my head around how "random" ordering works.

Each time you refresh the page the posts are "randomized" again.

Unless you use caching, which i do.So the order is only randomized when i clear the blog cache. Or it expires*i guess*.

So how long does the cache last ?
I use caching to lighten things up.I expect around 40k unique visitors and 100-200k pageviews.Would it put too much weight if i disable caching ?

Can i "randomize" post order only ONCE ? Or once a day / on demand ? How can i control this ?

2 Feb 04, 2012 22:22

You can control the time in /conf/_advanced.php

$pagecache_max_age = 900;

Even if you set page cache to expire in 120 seconds, it will save a huge lot of mysql queries.

Can i "randomize" post order only ONCE ? Or once a day / on demand ? How can i control this ?

There's no control. It would be nice to have blog settings for that.
- randomize after X hits
- randomize after X minutes/days
- randomize at X o'clock

Are you talking a bout the same website that was crashing on hitlog prune cron job? I thought it would be cool to investigate this and maybe make b2evo to store stats in mysql partitions grouped by day. Then it would be super easy to drop the whole partition (a day) with millions of rows instead of deleting each row one by one.

3 Feb 04, 2012 23:25

sam2kb wrote:

You can control the time in /conf/_advanced.php

$pagecache_max_age = 900;

Even if you set page cache to expire in 120 seconds, it will save a huge lot of mysql queries.

Can i "randomize" post order only ONCE ? Or once a day / on demand ? How can i control this ?

There's no control. It would be nice to have blog settings for that.
- randomize after X hits
- randomize after X minutes/days
- randomize at X o'clock

Are you talking a bout the same website that was crashing on hitlog prune cron job? I thought it would be cool to investigate this and maybe make b2evo to store stats in mysql partitions grouped by day. Then it would be super easy to drop the whole partition (a day) with millions of rows instead of deleting each row one by one.

Thank you that was helpful.Yea it's the same "quotes" site.I tried switching it over to WP (thanks to you) but it didnt go as well as i planned.I still have plans of duplicating the b2 install to a wp in a different domian and see which does better though.

Since it's a quote website, it doesnt make sense to order them by "date" or any other criteria for that matter.It'd be nice to shuffle them once and for all, or better occasionaly.May be not 5-10 mins, but every 6 hours or so. And my guess is it would be more seo friendly.Since google bot wouldnt see same posts every time it visits.(You dont have quotes popping up each day like news.You just enter them once and dont update often.)

I once asked & tried to disable stats-hitlog- completely but i couldnt.I am willing to disable it completely if there is a way.It's a nice thing to look at, but it does more damage than it does good.They are not -very- accurate anyway.
btw, the site is not crashing anymore *knocks on wood* - i guess the caches helped a little.

4 Feb 05, 2012 03:40

To disable hit, search keywords, domain and other stats info logging, simply edit /yourskin/_skin.class.php

You can't disable session logging because it may break your blog.

function display_init()
{
    global $Hit;
    $Hit->logged = true;

// other stuff below 
. . .

You will still need to prune sessions. You should probably enable session pruning after each page view instead of doing it with a scheduled job.

5 Feb 05, 2012 04:04

Kaspersky says that this page has a virus "HEUR:Trojan.Script.Generic"
+http://www.tilqi.com/skins/chita/reklam.html

Objects covered by this classification delete, block, modify, or copy information, and disrupt the performance of computers or computer networks.

You should revise that page, I'm sure some paranoid visitors already left the website forever :(

6 Feb 05, 2012 05:54

sam2kb wrote:

To disable hit, search keywords, domain and other stats info logging, simply edit /yourskin/_skin.class.php

You can't disable session logging because it may break your blog.

function display_init()
{
    global $Hit;
    $Hit->logged = true;

// other stuff below 
. . .

You will still need to prune sessions. You should probably enable session pruning after each page view instead of doing it with a scheduled job.

Thanks for the tip. i manually empty sessions table from time to time anyway.Just disabling the stats should do good, thanks.

sam2kb wrote:

Kaspersky says that this page has a virus "HEUR:Trojan.Script.Generic"
+http://www.tilqi.com/skins/chita/reklam.html

Objects covered by this classification delete, block, modify, or copy information, and disrupt the performance of computers or computer networks.

You should revise that page, I'm sure some paranoid visitors already left the website forever :(

Actually it is not a virus, just a simple mouse follow javascript, i have seen that too, but i am thinking of keeping it until google warns me : D i dont care about what kaspersky or yandex thinks.

7 Feb 05, 2012 06:40

Kaspersky is used across the world, not only in Russia. I believe that you damage website's reputation and loose visitors.

That's of course just my personal opinion.

8 Feb 05, 2012 14:39

sam2kb wrote:

Kaspersky is used across the world, not only in Russia. I believe that you damage website's reputation and loose visitors.

That's of course just my personal opinion.

On a second thought, you're right, removed it (:

9 Feb 12, 2012 03:55

sam2kb wrote:

You can control the time in /conf/_advanced.php

$pagecache_max_age = 900;

Even if you set page cache to expire in 120 seconds, it will save a huge lot of mysql queries.

That 900 is in ms right (0.9 sec) ? So default is '900', and you recommend that i would set it to 120 sec, ('120000') ? Did i get these right ?

Btw, when the page is cached (lets say for 2 mins), shouldnt the posts NOT be randomized for 2 minutes ? It randomizes every time i refresh.

10 Feb 12, 2012 04:38

It's in seconds, defaults to 15 minutes. You can only see cached page if you are logged out.

So your visitors will see static (non-randoized) items for 15 minutes.

11 Feb 12, 2012 13:43

sam2kb wrote:

It's in seconds, defaults to 15 minutes. You can only see cached page if you are logged out.

So your visitors will see static (non-randoized) items for 15 minutes.

Ahhhhh right ! Forgot about that, thank you.
Can i make it so everyone sees the cached page, not only visitors but also logged in users ?

sam2kb wrote:

You can control the time in /conf/_advanced.php

$pagecache_max_age = 900;

Even if you set page cache to expire in 120 seconds, it will save a huge lot of mysql queries.

And why do you recommend setting it (900) to 120 would save a lot of queries.Isnt it better the value higher ? I mean the more often the cache expires the worse.Isnt it ?

12 Feb 12, 2012 14:40

You can set it to whatever. The higher is the better, of course.

Logged in users generate very little traffic compared to visitors so there is no good reason to cache pages for them. Also don't forget about privacy, you can't cache someone's profile page and make it accessible to others.

If you want to dramatically speed up your blog I recommend you install nginx as a cache proxy. I did it on my tiny VPS server which was crashing last winter, and that brought it alive. Later I decided to move to a dedicated server (for the same price) and now there's no need to cache that aggressively.

13 Feb 12, 2012 14:45

sam2kb wrote:

You can set it to whatever. The higher is the better, of course.

Logged in users generate very little traffic compared to visitors so there is no good reason to cache pages for them. Also don't forget about privacy, you can't cache someone's profile page and make it accessible to others.

If you want to dramatically speed up your blog I recommend you install nginx as a cache proxy. I did it on my tiny VPS server which was crashing last winter, and that brought it alive. Later I decided to move to a dedicated server (for the same ****) and now there's no need to cache that aggressively.

That makes sense.Thanks.Actually i am not having problems with my vps currently, it's running smoothly.But i am expecting higher traffic than usual in recent future, so lets say, i am preparing for the upcoming storm : D i ll look int o that nginex thanks.

14 Feb 12, 2012 15:14

If you have 2 IPs it's pretty easy to set it up on cPanel. I can help you with that if you want. It's not as easy if there's only one IP


Form is loading...