4

I am getting the following problem on a number of windows 2008 servers.

0x80041323 Task Scheduler failed to start task \Reporting" in TaskEngine "S-1-5-18:NT AUTHORITY\System:Service:" for user "NT AUTHORITY\System". User Action: Reduce the number of tasks running in the specified user context.

I've done lots of research around the web but have been unable to come up with a working answer.

I have found some information suggesting increasing a value in the registry key "TasksInMemoryQueue" which I have done, but even setting this as high as 500 has not helped. I have rebooted the server after setting this value.

The server does run a high volume of Scheduled tasks, there could be 150 or so running at any one time, but certainly not 500. The scheduled tasks are all running under the system user.

Does anyone have any ideas?

  • Can your system still cope with the tasks ? (resources) – Lucas Kauffman Jan 14 '12 at 14:40
  • The error specifically calls out the number of tasks running in the "specified user context" which in your case is all under the System. Have you tried creating a service account (with appropriate permissions) to run a few of these? From a logging and auditing perspective, that would shift some of the weight to different files opened by different users than just the System account. – George Erhard Mar 24 '17 at 17:20
  • Looks like there are tasks scheduled too often, what does the task scheduler logfiles tells you which tasks of that user run how often and for how long? – eckes May 28 '17 at 21:03
1

try this as linked here http://technet.microsoft.com/en-us/library/dd315645(WS.10).aspx

Resolve

Increase queue size

Increase the task queue quota by modifying the TasksInMemoryQueue registry key under HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Schedule\Configuration.

Caution: Incorrectly editing the registry can corrupt the system. Back up valued data before making changes to the registry.

To perform this procedure, you must have membership in the Administrators group, or you must have been delegated the appropriate authority.

To modify the TasksInMemoryQueue registry key:

  1. Click the Start button and type regedit in the Start Search box.

  2. Select the Regedit.exe program to start the Registry Editor.

  3. Expand the folders in this path: HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Schedule\Configuration.

  4. Click the Configuration node, right-click the TasksInMemoryQueue registry key, and select Modify.

  5. Change the value of the key and click OK. The default value is 64.

Verify

To verify that the task execution has completed successfully:

  1. Click the Start button and type Task Scheduler in the Start Search box.

  2. Select the Task Scheduler program to start Task Scheduler.

  3. Select the task to run by locating the task in the task folder hierarchy.

  4. On the Actions menu click Run. You can also click Run in the Actions pane.

  5. Click the History tab for the task to verify that it contains events indicating the task was registered successfully.

Related Management Information

1

Another thing to try would be increasing the heap size for non-interactive tasks.

This can be modified under

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems]

The Windows key contains a long text string. If you find SharedSection, that defines the heap size for the system, desktop, and non-interactive tasks.

So if your SharedSection is

SharedSection=1024,20480,512

You would want to increase the 3rd value to something higher, like 2048.

It's not always the amount of tasks, but the amount of resources each task needs. On one of my servers, 10 tasks fill the non interactive memory pool so the first 9 load fine but the 10th fails until allocating more memory.

The second option would be to run the task interactively. Meaning you would have to set an account to auto login to the machine and run the application or script at startup.

Many admins are not fond of this approach for various reasons, but it will work.

  • Quick follow-up question: How do you know that your tasks are using the non-interactive Desktop Heap Size? Are you iterating through all the User Objects via the GetUserObjectInformation function? – hot2use Jul 23 '18 at 14:06
  • It's hard to say what context it is running under, however since it is running under the "System" account I am assuming it is running in session 0. If I were the OP I would start with increasing it and see if it makes a difference. If not restore the reg file and then try increasing the system heap size. I don't think it is the desktop heap size because that is already very large. – Brian D. Jul 24 '18 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.