High CPU Issue with Kentico 9 site

Matt Payze asked on May 26, 2016 03:28

Hi Gurus,

I have a Kentico website running on a Windows Server 2012 R2 host. Just performed an upgrade from 8.2 to 9 and since then I have identified an issue with high CPU. Basically at approximately the same time each night (~midnight) the CPU would go to 99-100% and stay there until application pool was restarted. Due to some errors in the log I did the following; • Settings > Content > Content Management > Mobile development > Enable device profiles. Set to disabled. • Settings > Integration > 51Degrees.mobi > Enable device detection. Set to disabled. • Settings > Online Marketing > Web analytics > Visitors > Track mobile devices. Set to disabled

The high CPU still occurs but is able to recover after in 1-2 hours. This leads me to believe a scheduled task was causing the issue however all tasks running at that time I can run manually no problem.

I have narrowed down the time, process (w3wp), thread and function. My question is does anyone know what the following thread and associated functions are related too?

Thread 3632 - System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus ByRef)

All functions in this thread (excludes boiler-plate functions) System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus ByRef) System.Globalization.TextInfo.InternalChangeCaseString(IntPtr, IntPtr, System.String, System.String, Boolean) System.Enum.InternalBoxEnum(System.RuntimeType, Int64) System.Array.InternalCreate(Void, Int32, Int32, Int32*)

Any advice/direction would be much appreciated.

Cheers Matt

Recent Answers

Brenden Kehren answered on May 26, 2016 03:50

Are you trying to rebuild a lot of search indexes or do something that writes to the App_Data folder? There's an issue out there with Server 2012 which has a hotfix released for it here. So if it's causing your app to continue to shutdown and restart, it would cause high CPU usage. Worth looking at.

1 votesVote for this answer Mark as a Correct answer

Matt Payze answered on May 26, 2016 04:25

Thanks for the quick response. Unfortunately for me that is not related to the problem as I already have that hotfix installed.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 26, 2016 13:05

Have you tried applying the Kentico hotfix as well? The description fits one of the bugs that was already fixed. It was caused by the content publishing scheduled task that got stuck in a loop exactly arouond midnight:

9.0.10 hotfix:
Scheduler - Infinite loop when planning the next run time of scheduled tasks in rare cases. Planning of the next run time for scheduled tasks resulted in an infinite loop in rare cases. This could cause very high CPU usage on the server.

2 votesVote for this answer Mark as a Correct answer

Matt Payze answered on May 27, 2016 01:16

Thanks Juraj, I will give that a go and post results.

0 votesVote for this answer Mark as a Correct answer

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