Error 14258: Cannot perform this operation while SQL Server Agent is starting. Try again later

 I saw SQL Server error 14258 today while i was diagnosing my log shipping issue in which primary and standby servers was not in sync. I checked log but i didn’t find anything even SQL Server agent was running and all jobs was showing as successful. Then I tried to bounce Agent service on primary node where i got below error:

“Error 14258: Cannot perform this operation while SQL Server Agent is starting. Try again later.”

To fix this issue, I tried stopping and then restarting just the Agent service but it never start and reported the same error again and again.


To fix SQL Server error 14258, I looked into SQL Server advanced server configuration option where i saw that SQL Server was running into fiber mode scheduling because Lightweight pooling option was set to 1.

Lightweight pooling option provide a means of reducing the system overhead associated with the excessive context switching sometimes seen in symmetric multiprocessing (SMP) environments. Setting lightweight pooling to 1 causes SQL Server to switch to fiber mode scheduling. The default value for this option is 0.

Fiber mode is intended for certain situations in which the context switching of the UMS workers are the critical bottleneck in performance. Because this is rare, fiber mode rarely enhances performance or scalability on the typical system.

The lightweight pooling option is an advanced option. If you are using the sp_configure system stored procedure to change the setting, you can change lightweight pooling only when show advanced options is set to 1. The setting takes effect after the server is restarted.

 I set lightweight pooling option back to the default value by running below T-SQL code.

sp_configure 'show advanced options', 1
sp_configure 'lightweight pooling', 0

And after this change, my issue about error 14258 got resolved.

Read more about Server Level Configuration Options:

If you like this tip, you can follow us on our facebook page and on Twitter handle to get latest updates.

Manvendra Deo Singh
Follow me:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *