Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsOther Extension...Other Extension...Scheduler behind the scenesScheduler behind the scenes
Previous
 
Next
New Post
2/26/2014 6:57 PM
 
If you look at the log of that test run - its is clear to see that dnn START SCHEDULER ATTEMPT is actually being fired up 3 separate times.
Which is creating three separate worker threads in the system - all attempting to load up the scheduler.

I dont have time at the moment to dig further to understand the ramifications of this in terms of what this means inside the scheduler - its a mess of static objects and instantiated objects that are likely conflicting with each other - so god knows what is really going on ....

HOWEVER - regardless - while I forced this situation to occur by stacking page requests when I knew that the application pool was restarting - in a heavy loaded dnn site - this is ironically something that is likely to happen.

If something causes the app pool to recycle - while people are on the site - then its very possible to get a queue of new page requests hitting the site - trying to get their next page to display.

The same is also likely to occur with sites that are in low demand that dont have keep alive actions - if they are targeted by a web crawler when they are in app pool not running state.
Crawlers send multiple page requests at pretty much the same time.

If a low use site - gets hits by a crawler - it too could have numbers of requests queued up while the site is trying to start up to server the first request.
Westa
 
New Post
2/26/2014 6:58 PM
 
If you look at the log of that test run - its is clear to see that dnn START SCHEDULER ATTEMPT is actually being fired up 3 separate times.
Which is creating three separate worker threads in the system - all attempting to load up the scheduler.

I dont have time at the moment to dig further to understand the ramifications of this in terms of what this means inside the scheduler - its a mess of static objects and instantiated objects that are likely conflicting with each other - so god knows what is really going on ....

HOWEVER - regardless - while I forced this situation to occur by stacking page requests when I knew that the application pool was restarting - in a heavy loaded dnn site - this is ironically something that is likely to happen.

If something causes the app pool to recycle - while people are on the site - then its very possible to get a queue of new page requests hitting the site - trying to get their next page to display.

The same is also likely to occur with sites that are in low demand that dont have keep alive actions - if they are targeted by a web crawler when they are in app pool not running state.
Crawlers send multiple page requests at pretty much the same time.

If a low use site - gets hits by a crawler - it too could have numbers of requests queued up while the site is trying to start up to server the first request.
Westa
 
New Post
2/26/2014 7:11 PM
 
And to fix this - what is needed is some sort of lock - that prevents the code running more that once.
Ive added a simple lock command wrapper that puts a hold a new static read only object.

If the file - DNN Platform\Library\Common\Initialize.cs

-------------------------------------------------------
private static readonly object _schedulerStarting = new object();
public static void RunSchedule(HttpRequest request)
{
if (!IsUpgradeOrInstallRequest(request))
{
try
{
lock (_schedulerStarting)
{
if (SchedulingProvider.SchedulerMode == SchedulerMode.REQUEST_METHOD && SchedulingProvider.ReadyForPoll)
{
Logger.Trace("Running Schedule " + (SchedulingProvider.SchedulerMode));
var scheduler = SchedulingProvider.Instance();
var requestScheduleThread = new Thread(scheduler.ExecuteTasks) { IsBackground = true };
requestScheduleThread.Start();
SchedulingProvider.ScheduleLastPolled = DateTime.Now;
}
}
}
catch (Exception exc)
{
Exceptions.LogException(exc);
}
}
}
---------------------------------------------------------------

and the trace result is ...

'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\assembly\dl3\c6c7e936\7315128a_4f33cf01\DotNetNuke.Providers.FiftyOneClientCapabilityProvider.dll', Symbols loaded.
dnn RUN SCHEDULER HTTPREQUEST
dnn START SCHEDULER ATTEMPT
The thread '' (0x3d28) has exited with code 0 (0x0).
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'A_fd13bc11_58bb_40fc_b072_62ec60e80f45'
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_dq0mqzz1.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_2jx2f4cb.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_4jyfvmm4.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_ledl3b5i.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_rymqoiy5.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_imcs5cyf.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_xyg14owe.dll', Symbols loaded.
The thread '' (0x2bfc) has exited with code 0 (0x0).
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_uqqfammj.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_yj3kwkr3.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_01rlzxl3.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\dnn_platform\9a78750d\754f9f06\App_Web_wpwyemun.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'Anonymously Hosted DynamicMethods Assembly'
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'System.Xml.Xsl.CompiledQuery.1'
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'Microsoft.GeneratedCode'
dnn RUN SCHEDULER HTTPREQUEST
dnn RUN SCHEDULER HTTPREQUEST
dnn RUN SCHEDULER HTTPREQUEST
dnn RUN SCHEDULER HTTPREQUEST
dnn RUN SCHEDULER HTTPREQUEST
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
 
New Post
2/26/2014 7:56 PM
 
can you please log any issues found/suggestions to support.dnnsoftware.com - our product team is in the middle of drawing up some documentation on scheduler changes so it would be good to ensure that any known bugs get fixed (or closed if the code they're in get's changed/removed due to the proposed enhancements).

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/26/2014 8:07 PM
 
PS - have raised a ticket for this in support - just finished putting it together

https://dnntracker.atlassian.net/brow...

Interestingly just been looking thru logs on one of our low use sites - there is a common thread of what have always been considered to be weird errors in the event log - all relating to visits from web crawlers - in most cases causing a application pool fatal restarts.

Im suspecting now that i understand what is happening that maybe this is at the cause of those issues - god knows what sort of resource overload issues the potential creation of multiple background worker threads is having on those systems.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsOther Extension...Other Extension...Scheduler behind the scenesScheduler behind the scenes


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out