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

Scheduled job timing out

Vote:
 

I've got a scheduled job that isn't working on Episerver. I think it must be timing out as my job calls a service that gets data sent to it and if gets 3 or 4 records it is ok, but if it gets sent 1000 it's already said the job has failed before the service has finished collecting it's data.

Is there a timeout setting or something I need?

#188504
Feb 26, 2018 12:59
Vote:
 

Hi Dave

The job itself should wait as long as its needed to run (or until the application pool recycles). Is there any way the external job can return pages of data rather than all items in one go? It could be that the request size is just too big if you are accessing the external service over HTTP then its the remote service thats timing out? 

David

#188560
Feb 27, 2018 0:41
Vote:
 

So there's no time out setting as such in Episerver?  Must be something else blocking it on the network I guess if the job is taking too long to get a response back.  It seems to stop running the scheduled job after about 30 seconds, which is very low.  The service if getting a 1000 record can take a couple of minutes to return something.

#188573
Feb 27, 2018 10:00
Vote:
 

What version are you using?

Some older versions, when you start a scheduled job manually, would run the job in the current request and that would time out in 30s with default settings.

#188648
Feb 28, 2018 14:18
Vote:
 

We're on version 10.  I did try running it via a time instead of manually, but got the same result.  Thanks for your help anyway.

#188649
Feb 28, 2018 14:25
Vote:
 

Do you catch and log all exceptions in your scheduled job?

We had issues where our jobs have thrown an unhandled exception that wasn't handled in our code and would be caught by episerver's caller, which would just ignore the exception and write a success message in the job log.

#188653
Feb 28, 2018 14:51
Vote:
 

we have similar trouble. job is created in episerver 7.0.5 and takes about 3 minutes and we get request time out error.

any fix?

#219147
Mar 30, 2020 9:43
Vote:
 

Hi Dave, when you say that your job calls a service (it is quite abstract) - so the service that gets called, do you mean you are calling eventually some 3rd party API service using for example HttpClient / HttpWebRequest / etc - so making a network request at some point and the timeout might actually come from here (if you don't handle exceptions in your code path it will eventually bubble up to your scheduled job and you might think it has timed out?). So if you are using those "clients" to make the requests check the Timeout value used, the default is 100 seconds so maybe the coder has changed that to something lower like the 30 seconds you are experiencing.

#220770
Apr 04, 2020 8:42
Sanjay Kumar - Apr 05, 2020 3:40
Hi Dave, I also agree with Antti post.
Vote:
 

Hi Dave,

If you are calling a 3rd party API then you need to check the incoming data size which is syncing into the Episerver database. Mainly the timeout problem has raised when incoming data limit has been exceeded from 262144 bytes. So you need to split data into packets and then start syncing.

 
#220789
Edited, Apr 05, 2020 3:39
* 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.