Developer forum

Forum » CMS - Standard features » Truncation the GeneralLog table

Truncation the GeneralLog table

Roald Haahr
Reply

We recently had a project, running 9.5.3, that ran out disk space for the Dynamicweb database. The database was located on a 30GB drive that was dedicated to that database alone.

After reviewing Decrease database size by deleting statistics I checked to see the table sizes and found that the table GeneralLog was taking up almost 22GB of space. As the referenced post is about clearing statistics tables, I was wondering whether it is in fact safe to truncate this table. I compared with other Dynamicweb databases, but their GeneralLog tables did not take up even close to that amount of disc space. What will it affect if I do truncate it.

And is there a way to disable that kind of logging?

Kind regards,
Roald, Novicell


Replies

 
Martin Vang
Martin Vang
Reply

Hi Roald,

The generallog is just a log. Nothing will happen when you drop the data (except of cource, that you wont be able to see the events that you just deleted).

The reason why your log is so big is probably because some piece of custom code that generates a lot of exceptions. Probably. You need to read the logged events to figure out why the database has so many logged events - are they Informational, Warning or Error? Do we have a lot of the same message?

Hope this helps you get to the bottom of the problem - because just deleting the logs that tell you that something is wrong with the site is probably not the best idea (at least read some of them first)

Let me know how it goes.

BR

Martin

PS. If you do delete the content of the database, it's probably worth it to also delete the content of this folder: "/Files/System/Log/EventViewer", as it  contains the extended loginformation like a full stacktrace, or a scrape of the page that failed. This has been put on disk to make it easier to auto-purge this "extra" data every 30 days, which is the standard setup, I belive.

 

You must be logged in to post in the forum