webERP Forum

Full Version: Audit trail not self cleaning
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Folks

weberp version 4.14.1

I have my audit trail "Months of Audit Trail to Retain:" set to 1 but despite this I just noticed today that I have 1.5 million records in it, everything for the past two years

Could you point me to the file where the trimming is supposed to happen?

Thanks!
It is executed in the includes/UserLogin.php

I suspect you have the perform database maintenance at login set to "Never" and the audit trail deletion won't occur if that is set. I would move the lines 165-172 outside of that conditional statement. Line 154 looks a good bet. The next time you login it might take a short while to delete all that audit trail but after that it shouldn't be an issue.

I'm not sure why the audit trail deletion was put there anyway.

Thanks
Tim
Thanks Tim!