EPiServer Custom Scheduled Job is not triggering at the specified time

Vote:
 
Hi , We have a custom scheduled Job, We are using this to Index content which is used for EPiServer Find. When We start the Job Manually it is running succesfully, if we Scheduled the Job, the Job is not running. And sometimes the Job is running but stopping abruptly after running about an hour. The Job needs to run for 1.30 hour to completly Indexing the Content used for EPiServer Find. I checked the Services,it says EPiServe Scheduler is started and type is automatic only. Please tell me what is the reason . Thanks in advance.
#71877
May 31, 2013 9:11
Vote:
 

If you have your own scheduled job then you need to provide a lot more information about the error. Have you got any logs?

#71878
May 31, 2013 9:16
Vote:
 

How is your IIS apppool configured for recycling? Could it be that you either hit a configured recycle time or that the application exceed a memory threshold for recycling?

#71881
May 31, 2013 9:25
Vote:
 
Hi Johan I'm new to EpiServer , Can you please tell me how to check the Apppool Recycle time. And how to Increase it. Thanks
#71909
May 31, 2013 15:58
Vote:
 

Recycling of app pool is an IIS feature and nothing special for EPiServer. You can configure it in IIS Manager if you select your app pool and choose Recycling from the Actions menu.

#71910
May 31, 2013 16:03
Vote:
 
Hi Johan I checked the App pool and in App pool it specified as follows : Shut Down Worker Process after being idle for : 20 Minutes. My doubt is the Indexing Job is started with a seperate thread , when the indexing Job is running for 20 Mins . Is this is really stopping the Scheduled job . I have started the Scheduled Job by using a seperate thread , and I found that the Scheduled Job stopped after 20 Minutes. Please confirm me once. Thanks
#71915
May 31, 2013 16:34
Vote:
 
Thanks alot Johan. I tried to increase the worker process idle time, now the Job is running without any problems when I start manually. But, the problem is If We scheduled the Job it is not triggered at the specefied time , it is giving an error message as "Object reference not set to an inctance of an object" .Not able to finds why this error is coming and I have enabled the EPiServer Log level to Error also and nothing is logged in EPiSrver Log file. Please help us why we are getting this error only when we scheduled the Job. Thanks.
#71942
Edited, Jun 02, 2013 13:17
Vote:
 

You may get NullReferenceException if you are trying to use current HTTP context in the job code when the job is triggered automatically. In this case there is no HTTP context and things like HttpContext.Current.User or HttpContext.Current.Server.MapPath() will throw exception.

#71943
Jun 02, 2013 14:48
Vote:
 
Thanks for your reply Dmytro. We are not using any code like HttpConetxt.Current.User or HttpContext.Current.Server.MapPath(). And just before I tried to Schedule the Job by logging in to EPiServer CMS and the Job is triggered and succefully completed, I gave another try immediately after 10 minutes and again the Job is running now. We have specified AppPool Configuration as : Shut down worker process after beingh Idle for : 120 Minutes. Is this is any way causing the problem ? And Is there any problem if I set this time limit for some more time like 5 hours or 0 ? Thanks.
#71945
Jun 02, 2013 15:25
Vote:
 

The shutdown of the worker process of being idle can be a problem.

Since the job is running in a background thread IIS will not be able to detect that the site is actually working. So if there is no other "ordinary" request at the same time IIS may take down the process. Then the soultion is to remove the app cycle recycling for idle time.

#71953
Jun 03, 2013 9:54
Vote:
 
Thanks a million Johan.I tried by changing the time limit ,and the scheduled Job istriggered and succesully completed the Job. One last doubt : Is there any performance issue if we remove the apppool reclying time limit ? Thanks again.
#71957
Jun 03, 2013 10:49
Vote:
 

The typical reason for having recycling configured is to get a new "fresh" process and release all hold memory. For an EPiServer site memory allocation should typically not be a problem since most things that are stored are not "hard" rooted (like e.g. in static dictionary or similar) but instead the ASP.NET cache is used. The ASP.NET cache works so that if the process needs more memory if can evict items from the cache.

If you still want to have recycling configured you could instead configure it to run at a specific time (where you should choose a time that is not conflicting with where you have scheduled your job to run).

#71958
Jun 03, 2013 10:58
Vote:
 
Thanks Johan for your quick reply and help.
#71959
Jun 03, 2013 11:14
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.