locked
EventCache and EventLog size out of control RRS feed

  • Question

  • Hello

    The size of the wss database keeps growing ( basically all the available disk space). I took a deep look in the database tables and found that EventCache has millions of records as well as EventLog (I beleive they are related with the workflows ?)

    Does anyone has any idea how to overcome this problem? Can I clear this tables?

    Best Regards,

    André Cunha
    Tuesday, September 1, 2009 9:36 AM

Answers

  • Hi,

     

    Yes, the October 2008 Cumulative Update (CU) was included in SP2.

     

    I saw an similar case when upgrading from SPS 2003, the service account lose the db_owner role in the content database, so the records cannot be deleted by timer service.

     

    You could use the following SQL Server commands to deleted the rows in the event cache table at your own risk.

    While exists (SELECT TOP 1 * FROM eventcache where eventtype In(8192,1048576) AND EventTime < DATEADD(day, -5, GETUTCDATE()))
    begin
    DELETE eventcache
    FROM (SELECT TOP 100000 * FROM eventcache where eventtype In(8192,1048576) AND EventTime < DATEADD(day, -5, GETUTCDATE()) ) AS e1
    WHERE eventcache.id = e1.id
    End

     

    Then, please make sure the SharePoint Timers Service account is the db_owner to the content database, it would deleted the records regularly.

     

    Hope the information can be helpful.

    -lambert


    Sincerely,
    Lambert Qin | Microsoft TechNet Managed Forum Support
    Posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by arec Friday, September 4, 2009 6:20 PM
    Friday, September 4, 2009 6:41 AM

All replies

  • Hi,

     

    A known issue cause EventCache table becomes very large was fixed in October 2008 Cumulative Update (CU).

     

    Here is the description in the http://support.microsoft.com/kb/957691/ for your information:

    When the size of the EventCache table becomes very large, SharePoint may stop responding. Therefore, you must have support methods to clear the old entries in the EventCache table.

     

    You could try to apply the CU and verify whether the issue is resolved.

     

    To get the latest update of SharePoint, please visit Updates Resource Center for SharePoint Products and Technologies (http://technet.microsoft.com/en-us/office/sharepointserver/bb735839.aspx)

     

    Hope the information can be helpful.

    -lambert


    Sincerely,
    Lambert Qin | Microsoft TechNet Managed Forum Support
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, September 2, 2009 10:08 AM
  • Hello,

    Thank you for your reply.

    I found that hotfix, but I was not sure that it could still be valid (or already included in newer updates). I already have the SP2 installed.

    I will apply the fix, meanwhile do you know if I can manually clear the old records?

    Best Regards,

    André Cunha
    Wednesday, September 2, 2009 10:26 AM
  • Hello

    I am not able to install the hotfix. I already have SP2.

    The problem I have is as described.

    Do you have any clues?

    Best Regards,

    André
    Thursday, September 3, 2009 9:52 AM
  • Hi,

     

    Yes, the October 2008 Cumulative Update (CU) was included in SP2.

     

    I saw an similar case when upgrading from SPS 2003, the service account lose the db_owner role in the content database, so the records cannot be deleted by timer service.

     

    You could use the following SQL Server commands to deleted the rows in the event cache table at your own risk.

    While exists (SELECT TOP 1 * FROM eventcache where eventtype In(8192,1048576) AND EventTime < DATEADD(day, -5, GETUTCDATE()))
    begin
    DELETE eventcache
    FROM (SELECT TOP 100000 * FROM eventcache where eventtype In(8192,1048576) AND EventTime < DATEADD(day, -5, GETUTCDATE()) ) AS e1
    WHERE eventcache.id = e1.id
    End

     

    Then, please make sure the SharePoint Timers Service account is the db_owner to the content database, it would deleted the records regularly.

     

    Hope the information can be helpful.

    -lambert


    Sincerely,
    Lambert Qin | Microsoft TechNet Managed Forum Support
    Posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by arec Friday, September 4, 2009 6:20 PM
    Friday, September 4, 2009 6:41 AM
  • Hello,

    Thank you for your reply.

    In fact the Timer Service account didn´t had db_owner permissions in the content database.

    I have change that, nevertheless i am deleting the eventcache record manually.

    Best Regards,

    André
    Friday, September 4, 2009 6:20 PM