Developer forum

Forum » Development » Read from EcomProducts WITH (NOLOCK)

Read from EcomProducts WITH (NOLOCK)

Anders Ebdrup
Anders Ebdrup
Reply

Hi Dynamicweb,

 

We have an issue with some heavy update of products from dataintegration jobs and I hope you could add som table hints when accessing the database? E.g. we have a specific issue with products and exceptions like this. Exception:

System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 168) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. 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.TryHasMoreRows(Boolean& moreRows) at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) at System.Data.SqlClient.SqlDataReader.Read() at Dynamicweb.Ecommerce.Products.Product.GetProductById(String productId, String productVariantId, String productLanguageId, Boolean useAssortments) at Dynamicweb.Ecommerce.Products.Product.GetProductById

 

Best regards, Anders


Replies

 
Kevin Steffer
Kevin Steffer
Reply

Hi Anders,

I know it sounds odd, but in our cases where we face this error, we have found out that more memory to the SQL Server solves the issue.

Give it a try.

 

You must be logged in to post in the forum