CMS.Eventlog.EventLogWorker not showing any messages

Srikanth N asked on September 19, 2019 16:57

Hi,
In our Kentico 10 application, When i'm viewing worker thread progress in our production environment, it is not displaying any messages but in my local environment it is showing some messages related to event logging and deleting older events.

In production, we are having around 11 lakh events logged but in my local setup it has only 4100 because older logs are not automatically deleted in prod.

The worker thread is running since last 20 hours in production but not displaying any information.

Any suggestions?

Regards, Srikanth N

Recent Answers


David te Kloese answered on September 23, 2019 15:49

Hi,

What do you have set as number of records to keeping in the event log? Could it be that it's getting filled quicker then it has time to cleanup?

Any errors in the related to cleanup?

0 votesVote for this answer Mark as a Correct answer

Srikanth N answered on September 24, 2019 06:37

Hi David,
Thanks for the response.

We are having event log setting as 2000 both in production as well as in my local environment.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on September 24, 2019 10:29 (last edited on September 24, 2019 10:30)

Can you see if anything is cleaned up at all?

As by default Kentico tries to remove 10% of the max row you have set in the settings... which would be around 200. So if you have 1.100.000 (if I got the meaning of Lakh correctly :)) removing 200 a time isn't a lot. Considering a production site can easily create thousand records in a minute.

If you see that some of the older records are cleaned try setting the "Event log size" to 300.000 (making the cleanup around 30.000 records a time).

If you don't see any action might be wise to just manually script and remove event log records from the database.

e.g. to remove anything from before jan 1st of this year.

DELETE
FROM CMS_EventLog
WHERE EventTime < '2019-01-01'

Be aware running direct SQL scripts isn't recommended and be sure to always create a db backup before

1 votesVote for this answer Mark as a Correct answer

Srikanth N answered on September 24, 2019 11:28

Hi David Since two weeks, We are observing that even though the "EventLogWorker" thread runs daily, event log count is increasing. I cross checked this by selecting the last page in event log pagination. It is the same date and time i noted down two weeks before.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on September 24, 2019 11:41

Potentially something broke, but keep in mind that the total number of records is the number of sites + global times what you set as "Event log size".

So it could still be cleaning the site specific records, but have an issue on the global records.

I'd suggest removing it using SQL.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.