0

I have a triggered WebJob which executes deletion of thousands of records. Based on dashboard, the maximum running time of for every execution is 5 minutes only: enter image description here

When checking the list, it manages to delete around 4,000 records in 5mins. What I need is to delete all the records in single run but due to the 5 minutes running time, there are records left during every run. Is there a way to increase the limit of this?

I did some refactoring with the Console Application the WebJob invokes to make sure that all records are deleted. However, It keeps coming back to the 5 minute running time. Please help.

tymtam
  • 31,798
  • 8
  • 86
  • 126
  • 1
    Please note that I executed the WebJob multiple times and it consistently run for maximum of 5 minutes only, to which I think is limiting the number of records it is processing. – ElisseV Feb 02 '23 at 11:23
  • For triggered WebJobs the way to increase idle timeout is using the app setting: WEBJOBS_IDLE_TIMEOUT. Set it to your desired timeout in seconds. – Tarun Krishna Feb 02 '23 at 11:26
  • @TarunKrishna Hi Tarun, thanks for answering. But based on logs, it doesn't encountered any timeout. It was able to complete the entire operation (from status Running to status Success). Do you think it has something to do with the app setting you mentioned? – ElisseV Feb 02 '23 at 11:31
  • it might solve your problem check the [link](https://github.com/projectkudu/kudu/wiki/WebJobs#configuration-settings) once. – Tarun Krishna Feb 02 '23 at 11:36
  • Deleting thousands of records should be quick. Are you deleting them with Entity Framework by any chance? – tymtam Feb 02 '23 at 12:29
  • 1
    Hi @tymtam, I'm using API call to delete records. And the number of records that can be deleted simultaneously via this endpoint is limited to 100, so I'm doing it by batch. – ElisseV Feb 02 '23 at 12:57
  • I'd recommend running more often for shorted period. Also, can you make multiple api calls at the same time? If you do 2 at the same time you'll be done in .5 the time :) – tymtam Feb 02 '23 at 13:05
  • @TarunKrishna I've tried the adding the WEBJOBS_IDLE_TIMEOUT in appsetting. But after testing, still the running time stopped at 5mins. – ElisseV Feb 02 '23 at 13:26
  • @tymtam not sure about it. But I'll check if it's possible for the endpoint. Thanks for the suggestion. – ElisseV Feb 02 '23 at 13:28

0 Answers0