Windows Server 2008 Scheduled Tasks not running - 0x80041323 - Reduce Number of tasks running in the specified context?

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?

windows-server-2008
scheduled-task
asked on Server Fault Jan 14, 2012 by Mayb2Moro • edited Jun 9, 2012 by Mayb2Moro

2 Answers

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

answered on Server Fault Jan 14, 2012 by Eric C. Singer
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.

answered on Server Fault Jan 17, 2017 by Brian D. • edited Feb 20, 2018 by Brian D.

User contributions licensed under CC BY-SA 3.0