November Happy Hour will be moved to Thursday December 5th.

Scheduler tasks not running automatically: EPiServer CMS6

Vote:
 

EPiServer CMS6

It's been reported elsewhere (http://world.episerver.com/FAQ/Items/Scheduler-does-not-run-scheduled-jobs-automatically/) that scheduler does not run automatically, but will run okay when started manually.

I am experiencing this problem and have worked through the remedy suggested in the above link - but no joy.

After restarting IIS the new EPiServer.SchedulerService.Sites.xml file is created (although it was identical to the renamed one), and still the scheduler will not run automatically.

When the scheduler is kicked off manually to run our subscription job, the logs get a couple of errors that may be related to this problem: regardless, advice on how to address these errors would be appreciated.  Please let me know if they should be separated out to new topics to help others when searching the forum:

One:

2011-05-10 16:13:02,976 ERROR [1] EPiServer.Core.OptimisticCache`1.Read - cacheKey=EPPageData:5909, last exception was:
EPiServer.Core.PageNotFoundException: Page 5909 was not found
at EPiServer.DataAccess.PageLoadDB.LoadPageInternal(PageReference pageLink, Int32 languageBranchId, IDataReader reader)
   ... [snip] ...
   at EPiServer.Core.OptimisticCache`1.Read(String cacheKey, ReadAndCacheObject`1 readAndCacheObject)
 

Two:

2011-05-10 16:13:26,398 ERROR [6] EPiServer.Global.Global_Error - 1.2.5 Unhandled exception in ASP.NET
System.Web.HttpException: Server cannot append header after HTTP headers have been sent.
at System.Web.HttpResponse.AppendHeader(String name, String value)
   ... [snip] ...
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

For ONE - I would like to know how to remove the deleted page reference from the cache

For both ONE and TWO - could they be related to the scheduler not working automatically, or where else can I investigate.

 

#50682
May 10, 2011 6:33
Vote:
 

Resolved

Should anyone else encounter a similar problem where the documented steps (http://world.episerver.com/FAQ/Items/Scheduler-does-not-run-scheduled-jobs-automatically/) don't help, this is what occured.

In mid-April we changed the domain our site was running on - making all the appropriate changes under our site config files (and in the EPiServer admin system area).  The scheduler stopped working from this date and it was always anticipated that this was a potential cause for the problem ... but still not definite.

After enabling scheduler service logging (http://www.epinova.no/blog/Tore-Gjerdrum/dates/2010/11/enable-debugging-in-episerver-scheduler/) the logs showed that [at least] one task was scheduled next to run in mid-April ... a past date.  Checking through all next run dates and setting them to a future time resolved the problem.

#50851
May 16, 2011 2:17
Vote:
 

Had the same problem but I also needed to edit an old NextExec item directly in the database with:

select * from tblScheduledItem where pkID ='b740749e-61aa-48ce-b38a-5119ce6b453a'

update tblScheduledItem set NextExec = '2011-08-10 11:53:03.430' where pkID = 'b740749e-61aa-48ce-b38a-5119ce6b453a'

 

#52696
Aug 10, 2011 10:22
Vote:
 

One additional thing on this:  the problem recurred, and was able to be fixed in the same way each time.  Further investigation proved to be that one of the scheduled tasks was not completing (have not remedied that one yet - but want to: te execellent tool LinkDetective is running awry for us).  Stopping the errant scheduled task has resolved the problem completely in the interim.

#52755
Aug 11, 2011 22:44
Vote:
 

Did this also resolve the errors you got regarding EPiServer.Core.OptimisticCache ?

#52968
Aug 23, 2011 14:23
Vote:
 

Finally I thought I got the solution, I tried this http://world.episerver.com/Blogs/Tobias-Nilsson/Dates/2010/12/Troubleshooting-the-Scheduler/ but after 5 days it stopped again...

#52969
Aug 23, 2011 14:50
Vote:
 

I think this is the same problem I had. You should contact EPiServer support, see this thread: http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=52210

#52971
Aug 23, 2011 16:00
Vote:
 

@Kjetil - sorry for delayed replied: No, the OptimisticCache errors still occur.  I have seen an article for supressing these from logs.  I can try and hunt that out if it's of interest.

@Torbjorn - We've had another site behave such as yours but htis time unable to find a errant scheduled task associated with it.  It came right (magically - which is always disappointing).  I will have a read of Kalle's linked thread. 

#55713
Dec 14, 2011 5:21
Vote:
 

The optimistic cache error is when the we can't find the page in the cache so we try to get it from the database, but we can't find it there either. So there must be some link in the code that points to a deleted page. 

#55714
Dec 14, 2011 8:44
Vote:
 

Do you mean that the link is referenced in the code somewhere, and not as a part of the content?

Any suggestions as to how we can trace these links' origin?

@piquet: I have also seen an article about supressing this form the logs, but rather than treating the symptoms, I would like to treat the cause. :)

 

#55716
Edited, Dec 14, 2011 9:01
Vote:
 

Part of the content or part of the code. You can have hardcoded links in your code. If you enable the log on debug level you should be able to follow what happened before the error.

#55717
Dec 14, 2011 9:04
Vote:
 

@Kjetil:  Agreed - wouldn't it be nice to have empty error logs!  :-)  In this case, and agreeing with Toni, I feel this is much less of an ERROR and would better sent to logs as a WARN.   Anyway, I'm straying from topic.

#55737
Dec 14, 2011 20:42
Vote:
 

Just to close off reducing the OptimisticCache logging:  The line in EPiServerLog.config is:

<!-- Reduce amount of logging from OptimisticCache -->
<logger name="EPiServer.Core.OptimisticCache" additivity="false">
<level value="Error" />
</logger>
 

#55738
Dec 14, 2011 20:46
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.