Table "OKM_ACTIVITY" in database

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
turtleizzy
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Sat Sep 15, 2012 2:15 am

Table "OKM_ACTIVITY" in database

Post by turtleizzy » Sat Jun 08, 2013 1:39 am

We have been using OpenKM for 9 months, total number of files reached 3000 and total size of repository reached 30G. The whole system was reinstalled once with repository restored after 6 months of usage because of significant increase in latency of web interface. Despite of a few problems while restoring repository ( security data was completely lost after restoring the repository, but we managed to rebuild them), eventually everything worked.

We ascribed the decrease in efficiency to the limitation of built-in HSQL when the size of database is too large ( at the time of reinstallation, built-in HSQL database reached 500M ). So we switched to mySQL database when we rebuilt the system.

After the new system was set up for 3 months, I found table "OKM_ACTIVITY" enlarges rapidly with no sign of reducing. This table seems to be saving activity log since the system was built, and this table takes up 163M in mySQL database after 3 months of usage. Although there was no apparent sign of efficiency deterioration up till now, eventually this table will cause problem as long as its size monotonously increases.

My question is, is it safe to purge this table manually, or is it possible to add a option for administrators to manage the activity log in administration panel?

Thanks in advance!

jllort
Moderator
Moderator
Posts: 9590
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Table "OKM_ACTIVITY" in database

Post by jllort » Mon Jun 10, 2013 8:42 am

Clean activity log table will never have administration panel option, this is not the idea because the companies have different policies. The solution is each one build their own crontab task to export, clean etc... under their own preservation policies.

turtleizzy
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Sat Sep 15, 2012 2:15 am

Re: Table "OKM_ACTIVITY" in database

Post by turtleizzy » Mon Jun 10, 2013 3:19 pm

Um, so I assume purging this table will not influence normal function?

pavila
Moderator
Moderator
Posts: 3031
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: Table "OKM_ACTIVITY" in database

Post by pavila » Wed Jun 12, 2013 7:33 pm

This table is used mainly to trace users actions but also used by others. I recommend always to keep the last month entries because this information is used to generate the information in the Dashboard.

openkm_user
Expert Boarder
Expert Boarder
Posts: 113
Joined: Thu Dec 17, 2015 7:38 am

Re: Table "OKM_ACTIVITY" in database

Post by openkm_user » Sun Feb 26, 2017 5:29 pm

If we are not going to use Dashboard, is it safe to purge this table completely? Our initial import logs are not needed for now, and activity.log.actions property is unavailable in Community version (?) so we are not able to manage which to log and which not to. Now the table has got 2.5 million records and we are still importing documents, seems like a dead weight to have these unusable data (and waste of storage).
Production Configuration: OpenKM Community 6.3.3 | Windows Server 2012 | Intel (R) Xeon (R) CPU E5-2670 2.60GHz | RAM: 50GB | 16 Core | MySQL 5.7.14 | Virtualized

jllort
Moderator
Moderator
Posts: 9590
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Table "OKM_ACTIVITY" in database

Post by jllort » Sun Feb 26, 2017 7:10 pm

We suggest periodically clean OKM_ACTIVITY data ( export before if you need some audit on future ). Also you can clean OKM_DASHBOARD.

openkm_user
Expert Boarder
Expert Boarder
Posts: 113
Joined: Thu Dec 17, 2015 7:38 am

Re: Table "OKM_ACTIVITY" in database

Post by openkm_user » Mon Feb 27, 2017 1:08 pm

Thank you, is there anyway that we could have the activity.log.actions property to manage logs?
Production Configuration: OpenKM Community 6.3.3 | Windows Server 2012 | Intel (R) Xeon (R) CPU E5-2670 2.60GHz | RAM: 50GB | 16 Core | MySQL 5.7.14 | Virtualized

jllort
Moderator
Moderator
Posts: 9590
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Table "OKM_ACTIVITY" in database

Post by jllort » Tue Feb 28, 2017 11:07 am

In the class ActivityLogServlet you have a complete list of the activity log events.
https://sourceforge.net/p/openkm/code/H ... rvlet.java

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests