Skip to main content

PurgeEventLog – Cause SQL Blocking in Dotnetnuke Website

We are using Dotnetnuke 4.5.5 with Microsoft SQL 2005 database. We have faced the blocking issues in past and I would like to share issue & resolution tips with everyone.

Dotnetnuke has a very good logging mechanism to log error and events (audit trail). This can be easily configured per portal or globally for all portals. To edit go to Admin -> "Event Viewer" page.

By default logging is enable for every event so system creates lots of log entries. Dotnetnuke runs a scheduler to delete these log entries (configurable). This Scheduler use a store procedure "PurgeEventLog" to delete old log entries based on configuration setting. This store procedure “PurgeEventLog” causes the SQL blocking issue and ultimately bring the website down. The store procedure looks like bellow:

PROCEDURE [dbo].[PurgeEventLog]

AS

DELETE FROM dbo.EventLog

FROM dbo.EventLogConfig elc

WHERE

    (

    SELECT COUNT(*)

    FROM dbo.EventLog el

    WHERE el.LogConfigID = elc.ID

      and dbo.EventLog.LogTypeKey = el.LogTypeKey

      and el.LogCreateDate >= dbo.EventLog.LogCreateDate

    ) > elc.KeepMostRecent

AND elc.KeepMostRecent<>-1

Incase there are lots of log entries in the EventLog table then procedure “PurgeEventLog” will take longer time to purge all those log entries and blocks other SQL users.

Resolution of the issue: We had to ask DBA to truncate the EventLog table to delete all the log entries. To test this issue you can open the even log page and it will show error that can’t load page.

To avoid this make sure the logging is disabled. Only use logging when you are working on a issue or enable it only for errors and exceptions.

Comments

  1. Thank you for sharing. I had the same issue, your post helped to solve that easily. After having so many troubles with SQL I decided to find a good variant of data room in virtual data rooms reviews.

    ReplyDelete

Post a Comment

Popular posts from this blog

SharePoint WebPart Error - Unable to add selected web part (s) – MOSS 2007

ISSUE: Recently I faced this issue that when I try to deploy my WebPart.  Unable to add selected web part(s).WebPartName: Cannon unregister UpdatePanel with ID ‘ctl00RTMPanel’ since it was not registerd with the ScripManager. This might occure if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel.I faced this issue twice and both the time the issue was not what display here. This could be sure to any error in the WebPart. Following are list resolution from multiple instances.RESOLUTION: 1. Check the WebPartName.webpart file. Check whether you have a proper PublicKeyToken value. When I face the issue the value was PublicKeyToken=$PublicKeyToken$. If you have used WSP builder then in the Visual Studio you will find this file at \WebPartsProject\12\TEMPLATE\FEATURES\WebPartName\WebPartName.webpart. Sometime when you create a new WebPart using WSP builder then you do not get the correct value. The WebPartName.we…

How To Create Virtual Machine Using Existing vmdk file in VMWare Workstation

vmdk file is hard disk of the VMWare virtual machine. There are many scenarios where you may need to create a new virtual machine for an existing vmdk file. This is also an alternate Method to the “vmx is not a valid virtual machine configuration file – Could not open virtual machine” issue.Please refer to the previous post “Could not open virtual machine – vmx is not a valid virtual machine configuration file” for a full list of possible resolution. This post is to describe one of the solution in more details. How To Create a new virtual machine & attach the existing .vmdk file:1. Open VMware and select create a new virtual machine with custom (advanced) configuration option.2. Chose “I will install the operating system later”. and chose “I will install the operating system later”. 3. Select the operating system that matches the operating system in your existing .vldk file.4. Select a location of the new virtual machine5. Chose “Use an existing virtual disk”. This will allow yo…

My Grandparents – Grand Parents Day Essay Competition Winner

Vedic won the Grand Parents Day Essay Competition at HSCF New Age Sr. Group function. There were 27 participants in his category (Elementary School Category) and he won 1st price.Full list of winners are available at http://www.hindutempleorlando.org/new-age-group.

Video of Vedic reading his essay after winning:


My Grandparents – Grand Parents Day Essay Competition Winner from Laksha on Vimeo.

Below is the script of his Essay: My Grandparents I have three grandparents, my “dada ji, dadi ji and nani ji”. My grandparents live in India. Sometime I go to India and stay with them.

My dada ji is a homeopathic doctor. Whenever I get sick he gives me sweet medicine. I love my dada ji because my dada ji take me out for a walk and always play with me. And whenever we go for a walk my dada ji tells me stories.

My grand ma takes me to temple. She even played with me and made food for me.

My nani ji sing “Bhajans” everyday. She play with me and take me to the satsang.

I love my gr…