Log Size

1 view
Skip to first unread message

Trent Adams

unread,
Jan 20, 2008, 12:10:44 AM1/20/08
to habari-dev
I was just looking in my server admin and noticed that my Habari
install database was getting massive which caught my attention as it
only has 8 posts, 0 comments and 0 spam :) After looking at the
database, it seems that with just under a 1000 entries in the log, it
was taking up 50 megs of database space! While the log was primary
with errors from a theme I was using, that is not Habari's fault!

I was thinking that having a limit on the size of the log or a warning
message if it gets up to say "x megs" might be a nice feature.

Thoughts?

Trent

Robin Adrianse

unread,
Jan 20, 2008, 12:36:57 AM1/20/08
to habar...@googlegroups.com
Removing old log entries as new ones get added seems like a good option to have. I can't say log messages from 2 months ago would be that useful.

Scott Merrill

unread,
Jan 20, 2008, 11:22:49 AM1/20/08
to habar...@googlegroups.com
On 1/20/08, Robin Adrianse <robi...@gmail.com> wrote:
> Removing old log entries as new ones get added seems like a good option to
> have. I can't say log messages from 2 months ago would be that useful.

We do have a cron system. It ought not be too hard to construct a
cron job to expire old log entries.

Stanley FONG

unread,
Jan 21, 2008, 2:24:52 AM1/21/08
to habar...@googlegroups.com
I would suggest that this is included in the core then user just enter number of days, in the option page of dashboard, that log should be kept in the database.

Robin Adrianse

unread,
Jan 21, 2008, 2:28:31 AM1/21/08
to habar...@googlegroups.com
Yeah, it makes sense to me as a built-in option. After all, logs can quickly build up.

Christian Mohn (h0bbel)

unread,
Jan 22, 2008, 6:10:20 AM1/22/08
to habari-dev
Yes, they can. Mine is 2.1GB right now.

On Jan 21, 8:28 am, "Robin Adrianse" <robin....@gmail.com> wrote:
> Yeah, it makes sense to me as a built-in option. After all, logs can quickly
> build up.
>
> On Jan 20, 2008 11:24 PM, Stanley FONG <sfon...@gmail.com> wrote:> I would suggest that this is included in the core then user just enter
> > number of days, in the option page of dashboard, that log should be kept in
> > the database.
>
> > On Jan 21, 2008 12:22 AM, Scott Merrill <ski...@skippy.net> wrote:
>

Trent Adams

unread,
Jan 22, 2008, 9:46:19 AM1/22/08
to habari-dev
I was a little startled with a simple 50 meg log file. 2.1GB....
wow!

On Jan 22, 4:10 am, "Christian Mohn (h0bbel)" <h0b...@gmail.com>
wrote:

Matthias Bauer

unread,
Jan 22, 2008, 10:25:46 AM1/22/08
to habar...@googlegroups.com
Trent Adams wrote:

The latest SVN revision adds a cronjob to truncate the log file size
every day, keeping only the logs of the last 13 days. This is not
configurable and it's only a short term fix anyway, but I figure it's
better than having a log table exhaust your memory.

Users of the 0.3.3 release might want to TRUNCATE TABLE habari__logs;
OPTIMIZE TABLE habari__logs; for now.

-Matt

Christian Mohn

unread,
Jan 22, 2008, 3:53:48 PM1/22/08
to habar...@googlegroups.com
Yeah. I win! ;-)

Robin Adrianse

unread,
Jan 23, 2008, 10:48:39 AM1/23/08
to habar...@googlegroups.com
Insane... here I was, thinking about 500 MB at the most... well, I guess that just proves the point even more ;).
Reply all
Reply to author
Forward
0 new messages