SQL SERVER – Error: 17300 – SQL Server Was Unable to Run a New System Task

One of my clients was performing load tests on the timesheet application. They noticed that application jobs are failing with the below error message about running a new system task.

TimesheetSaveFailed (24014) – A severe error occurred on the current command. The results, if any, should be discarded. Details: id=’10914′ name=’ TimesheetSaveFailed’
Error=’A severe error occurred on the current command. The results, if any, should be discarded.’

At the same time, here is another error noticed in SharePoint logs which was running on the same server.

System.Data.SqlClient.SqlException (0x80131904): A severe error occurred on the current command. The results, if any, should be discarded.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

When we checked ERRORLOG and looked at the same time when issue was reported, we could clearly see below messages.

System Task

2017-12-20 09:22:23.64 Server Error: 17300, Severity: 16, State: 1.
2017-12-20 09:22:23.64 Server SQL Server was unable to run a new system task, either because there is insufficient memory or the number of configured sessions exceeds the maximum allowed in the server. Verify that the server has adequate memory. Use sp_configure with option ‘user connections’ to check the maximum number of user connections allowed. Use sys.dm_exec_sessions to check the current number of sessions, including user processes.

SQL SERVER -  Error: 17300 - SQL Server Was Unable to Run a New System Task error17300-800x230

We see that SQL Server is reporting a resource exhaustion error – it mentions that either there is a low memory or even the maximum number of sessions threshold has been passed. Luckily, I was also running performance monitor at the same time and when I opened the performance monitor, log and looked at the same time frame, we saw that we are surpassing the default maximum for user connections which is 32,767:

WORKAROUND/SOLUTION

Based on the above, we concluded that the SQL server was under severe pressure due to heavy number of connections. We then engaged the developer to check if there are having any connection leak in the application. I must confess that the developer was smart and he knew the code he has written. Within no time he figured out that they were not closing the connections at certain places in the application. As a SQL performance consultant, my job was complete and with the help of smart developer, my client was able to fix the issue.

If you have any performance issue with SQL Server, you can hire-me and we can work together to fix the performance issues with SQL Server.

Reference : Pinal Dave (https://blog.sqlauthority.com)

SQL Error Messages, SQL Server, SQL Server Configuration, Starting SQL
Previous Post
SQL SERVER – Msg 32055 – sp_refresh_log_shipping_monitor – There Was an Error Configuring the Remote Monitor Server
Next Post
SQL SERVER – The SaveToSQLServer Method Has Encountered OLE DB Error Code 0x80004005

Related Posts

2 Comments. Leave new

  • You wrote twice this paragragph:

    We see that SQL Server is reporting a resource exhaustion error – it mentions that either there is a low memory or even maximum number of sessions threshold has been passed. Luckily, I was also running performance monitor at the same time and when I opened the performance monitor log and looked at the same time frame, we saw that we are surpassing the default maximum for user connections which is 32,767.

    Reply

Leave a Reply