When attempting to connect to our development environment this morning, we were greeted with the following error in Service Studio:


This went on for about 10 minutes and then things went back to "normal" and we were able to connect to the environment and pull up our applications. Upon further inspection, we pulled up service center and found this error in the logs and the detailed messages are a bit concerning:


  • The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions.
    Cannot continue the execution because the session is in the kill state.
    A severe error occurred on the current command. The results, if any, should be discarded

  • The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions.
    Cannot continue the execution because the session is in the kill state.
    A severe error occurred on the current command. The results, if any, should be discarded.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.ExecuteReader(IDbCommand cmd)
    at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.ExecuteScalar(IDbCommand cmd)
    at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.GetServerProperty(String propertyname)
    at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.GetServerEngineEditionProperty()
    at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.get_ServerEngineEdition()
    at OutSystems.HubEdition.DatabaseProvider.SqlServer.Platform.DMLService.PlatformDMLIdentifiers.EscapeAndQualifyIdentifier(IDatabaseInfo database, String objectName)
    at ssServiceCenter.ENParameterEntity.LocalViewName(Nullable`1 tenant, String locale)
    at ssServiceCenter.AppUtils.EntityToTablename(String entity, Int32 tenantId)
    at OutSystems.HubEdition.RuntimePlatform.Sql.ReplaceEntities.rpf#lloobamv(Match acc)
    at OutSystems.HubEdition.RuntimePlatform.Sql.ReplaceEntities.rpf#lloobamw(String acd, Regex ace, MatchEvaluator acf)
    at OutSystems.HubEdition.RuntimePlatform.Sql.ReplaceEntities.ProcessSQLSpan(String sqlSpan, Boolean allowCommentHints)
    at OutSystems.HubEdition.RuntimePlatform.Sql.SimpleSQLParser.ParseSQL(String sql, Boolean allowCommentHints)
    at OutSystems.HubEdition.RuntimePlatform.BaseAppUtils.ReplaceEntityReferences(HeContext heContext, String sql)
    at ssServiceCenter.Actions.FuncActionWebService_Handshake.datasetCompilerLastUpgradeVersion(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount)
    at ssServiceCenter.Actions.ActionWebService_Handshake(HeContext heContext, String inParamusername, String inParampassword, String inParamversion, String inParamlastUpgradeVersion, String inParamclient, Boolean& outParamok, String& outParamerror)
    at ssServiceCenter.Actions.WsServiceStudio.WebSrvcServiceStudioHandshake(HeContext heContext, String inParamusername, String inParampassword, String inParamversion, String inParamlastUpVersion, Boolean& outParamok, String& outParamerror)
    at ssServiceCenter.WebServices.ServiceStudio.Handshake(String inWSusername, String inWSpassword, String inWSversion, String inWSlastUpVersion, Boolean& outWSok, String& outWSerror)



Has anyone seen this error before and know what may have caused it and why would it suddenly clear itself up?


Hi Shane,

Let me start by saying this is not my field of experience.

You should have a DBA look into this, as the probem might not be directly related to the OutSystems platform. It seems that your SQL Server has reached the maximum amount of memory it can allocate for locks.

The following article explains how this error might occur and how further analysis can be done.

Hope this helps!

Regards,

Nordin