locked
[UWP] Background tasks 'ExecutionTimeExceeded' RRS feed

  • Question

  • Hi, this seems to occur regularly when the system is really busy. But I think this reason is misleading. It's not that the task is taking too long, it's that the system is somehow throttling resources available for the task, to the point where it doesn't even reach the completed deferral. There have been several instances where, with the debugger attached, tasks that take about 3 wall clock seconds don't fire the final steps of the task.  For instance, incrementing progress to notify the UI sometimes won't fire, giving the perception that the UI is hanging.

    Update:  Getting this exact error after 25 and 27 seconds.  Once again, ONLY when the machine is busy loading a program or some other trivial, regular use.

    Update:  Wall clock execution time reached 43 seconds, and background task did not cancel.  So it's really difficult to understand the pattern here and what to prepare for.



    • Edited by TaskBasic Tuesday, August 23, 2016 4:39 PM
    Tuesday, August 23, 2016 1:34 AM

All replies

  • Hi TaskBasic,

    It's hard  to reproduce the situation you described because devices with different memories may behave differently(here you mentioned 25 and 27 seconds).And would you please describe more specifically about what the background task is used for?

    Thanks


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 24, 2016 12:15 PM
  • The background task is used to connect with OneDrive and upload/download a small file.  Really small.  Our process is not the problem.  I guarantee that.  Something about how background processing is implemented or documented is off.  What does wall-clock usage mean internally for you guys? Also, background tasks get cancelled quite often, and I can't quite see how we're supposed to "support our app" with background tasks that get cancelled anytime a user actually uses their system.
    • Edited by TaskBasic Wednesday, August 24, 2016 7:23 PM
    Wednesday, August 24, 2016 3:54 PM
  • Now we have background tasks cancelled for ExecutionTimeExceeded after .26 seconds!  Yes, just over a quarter of a second.
    Friday, August 26, 2016 6:03 PM

  • Hi TaskBasic,

    Background tasks are limited to 30 seconds of wall-clock usage according to the official doc.

    Usually it’s 25+5 pattern(25 seconds for task execution, 5 seconds for cancelation).

    Therefore it’s normal for tasks to execute between 25-30 seconds.

    Best Regards,

    Neal Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 6, 2016 2:52 AM
  • If you look at my response, it said .26 seconds.    That's under a second.
    Wednesday, September 7, 2016 7:37 AM