Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

"No, Seriously Vanilla, STOP LOGGING IP ADDRESSES!"

Andy KAndy K
edited April 2008 in Vanilla 1.0 Help
Hi all, a problem that I'm currently having with my forums is performance. I noticed for the past few days my forum has been ass-slow to load (other sql installations on my server? Fine. Other Vanilla installations on the same SQL host? fast). I went into the DB, and sure enough the LUM_IpHistory table is filling up again. It climbs to a dozen mb a week, and every once in a while I have to empty it like a clogged pipe or a toilet.

Empty that table, and boom my forum performance returns to Sleek and Fast.

Here's the thing: Last time I checked "Log and Monitor IP Addresses" in Application Settings was like way back in .9, maaaaybe 1.0.0. I noticed slowness way back when when that was enabled (I also used to use the extension that showed which IP users were using), so I disabled it well over a year ago. I unchecked that setting, and yet over on the DB, LUM_IpHistory keeps growing and growing. I flush it, and in a few minutes it's back into the hundreds of kilobytes.

Is there a way to get Vanilla to dump that data to null, or perhaps (maybe there's a setting or something I'm missing) change a setting so that it really doesn't log/monitor IP addresses any more? I've got a HUGE amount of traffic, and unfortunately that table and IP logging is just way too much overhead for my install to handle.

Thanks!
-Andy

Comments

  • Options
    If that box is not checked, then it shouldn't be monitoring. The core code regarding that setting is very watertight. Some extensions could override that--Do you have who's online enabled?
  • Options
    ===
    Do you have who's online enabled?
    ===

    Ah, yes I do!
    ...
    ...
    Just tested. That was, in fact, the issue! Who's Online is a great tool for my community, though: I think I'll leave it running, and just flush that table regularly via crontab.

    Thanks Wallphone!
  • Options
    You could probably tinker with the WhosOnline code slightly to stop it doing that. Then again if you're not familiar with PHP and you're happy with crontab that would probably be a simpler option...
  • Options
    So what's the difference between dropping a table and emptying one?

    Posted: Saturday, 5 April 2008 at 7:27AM

  • Options
    One obliterates the table and one truncates it.

    A table is like a wine glass. If you empty it, you still have a wine glass. If you drop it, you neither have wine nor a wine glass.

  • Options
    obliterates it = removes it altogether?
    truncates it = empties the contents?

    Which one do I do to speed things up and empty recover the space it's taking up?

    Is there any harm in doing one or the other or both?

    Posted: Saturday, 5 April 2008 at 7:58AM

  • Options
    I anticipated your question, so I answered it in my above post with some sneaky hidden text. (use mouse selection, block comment, view source, whatever...) Kind of poetic.
  • Options
    You can drop a table that has been truncated, but you can't truncate a table that has been dropped. (because it no longer exists) It may be better for this extension's purposes to delete from the table where the date added is older than x days rather than emptying it right out.
  • Options
    Please could I have a simple answer?

    I'm not interested in writing an extension, my forum has ground to a halt, the LUM_IpHistory table is over 3000 pages long (in PHPmyAdmin) and I simply want to remove the contents in PHPmyAdmin.

    Do I EMPTY or DROP this table?

    OH so I just saw your hidden text, empty it is, thanks.

    The reason I was reluctant to EMPTY it is because the icon beside it is a trash can, the icon beside DROP is a red cross, hence my confusion.

    Posted: Saturday, 5 April 2008 at 8:44AM

  • Options
    What's up with that? A trash can is pretty well known to mean 'delete' not empty! And why label the tab (empty and drop really shouldn't be tabs either) with 'empty' but pop a confirmation that says 'truncate'?
  • Options
    Never said they were tabs, just a command with an icon beside it.
  • Options
    LoOkOuTLoOkOuT
    edited April 2008
    WallPhone It may be better for this extension's purposes to delete from the table where the date added is older than x days rather than emptying it right out.
    Any instructions for doing this? (Using PhPmyAdmin I assume). What are the repercussions of just emptying the table outright?
  • Options
    edited April 2008
    The worst thing that could happen by emptying the table would be that the data shown will be inaccurate for this extensions' purposes for the next 30 minutes (which appears to be as far back as it looks)

    So, if you wanted to dump everything older than 30 minutes, you would run this SQL:DELETE FROM LUM_IpHistory WHERE DateLogged < DATE_SUB(NOW(), INTERVAL 31 MINUTE)
  • Options
    Thanks WP.
  • Options
    Yeah, just a followup, I've never had any problems at all with emptying that table (and yeah, in phpMyAdmin, this is the little trash can).

    -Andy
  • Options
    an extension that automatically cleared ip history x minutes/hrs/days/months old would be neat! :-) hint hint
This discussion has been closed.