Page 1 of 1

Table "OKM_ACTIVITY" in database

PostPosted:Sat Jun 08, 2013 1:39 am
by turtleizzy
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!

Re: Table "OKM_ACTIVITY" in database

PostPosted:Mon Jun 10, 2013 8:42 am
by jllort
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.

Re: Table "OKM_ACTIVITY" in database

PostPosted:Mon Jun 10, 2013 3:19 pm
by turtleizzy
Um, so I assume purging this table will not influence normal function?

Re: Table "OKM_ACTIVITY" in database

PostPosted:Wed Jun 12, 2013 7:33 pm
by pavila
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.

Re: Table "OKM_ACTIVITY" in database

PostPosted:Sun Feb 26, 2017 5:29 pm
by openkm_user
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).

Re: Table "OKM_ACTIVITY" in database

PostPosted:Sun Feb 26, 2017 7:10 pm
by jllort
We suggest periodically clean OKM_ACTIVITY data ( export before if you need some audit on future ). Also you can clean OKM_DASHBOARD.

Re: Table "OKM_ACTIVITY" in database

PostPosted:Mon Feb 27, 2017 1:08 pm
by openkm_user
Thank you, is there anyway that we could have the activity.log.actions property to manage logs?

Re: Table "OKM_ACTIVITY" in database

PostPosted:Tue Feb 28, 2017 11:07 am
by jllort
In the class ActivityLogServlet you have a complete list of the activity log events.
https://sourceforge.net/p/openkm/code/H ... rvlet.java