Hi,
We've started having issues when updating the patch definitions. This prevents the running of scans.
Running the 'refresh files' process fails with the error;
"Failed to update the database with new deifinitions."
and
"The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements."
Initial thoughts were the size/vintage/upgrades that the db has had, so a fresh one was created. This has been ok for a few weeks but the error has returned...
looking at the st.protect.managed(username).log reveals:
2015-08-10T03:28:02.8549135Z 0007 E WorkItemCatalogDataImport.cs:147|ST.UI.UserViewableException: Failed to update the database with new definitions. ---> System.InvalidOperationException: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ST.Data.CatalogData.DataAdapters.PatchDataAdapter.UpdatePatchProductCveLink(DataTable patchProductCveDataTable, SqlConnection connection)
at ST.Data.CatalogData.DataAdapters.PatchDataAdapter.UpdateNonBulk(PatchUpdateDataSet patchData, String sysXmlVersion, SqlConnection connection)
at ST.Data.CatalogData.DocumentParsers.Hf7Parser.PersistModelInternal(AssessmentData model)
at ST.Data.DbAccessLayer.AttemptTransaction.Try[TArgument1](Action`1 transactedOperation, TArgument1 argument1)
at ST.Data.CatalogData.DocumentParsers.Hf7Parser.PersistModel(AssessmentData model)
at ST.Data.CatalogData.CatalogDataFileImporter.ExecuteCatalogImport(Func`1 createModel, Version currentFileVersion, String sqlConnectionString, Hf7Parser parser)
at ST.Data.CatalogData.CatalogDataFileImporter.ImportPatchDataDocument(Func`1 createModel, Version currentVersion)
at ST.BusinessObjects.FileDownload.CatalogImportOperation.Import(Boolean alwaysImport)
at ST.UI.Controllers.CatalogData.CatalogImportController.UpdateDatabase(Boolean alwaysImport)
at ST.UI.Controllers.Tasks.WorkItemCatalogDataImport.<RunAsync>d__0.MoveNext()
--- End of inner exception stack trace ---
Which seems to indicate a deadlock condition in the database - the question is why? The DB server is MSSQL 2012 on Windows Server 2008R2, Console is v9.1.0 Build: 4511 on Windows Server 2008R2, SQL load is low (currently only used for 'internal' applications like Shavlik, backups catalogs/antivirus etc.)
Both machines are ESX5.5 VM's on 10Gbe iSCSI SAN storage and vFRC allocated to 'workload' volumes. The SQL VM is provisioned with 20GB vRAM and 4 vCPU's. Console VM has 8GB & 4 vCPU's,
Any help appreciated!