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.
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.
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:
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)