Developer forum

Forum » CMS - Standard features » New index - Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

New index - Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have a solution with a rather large set of products. I am trying to run the index but no matter what I do, I get the timeout message and eventually a Native Lock message.

Usually this timeout was thrown when the time needed to run the Count() operation exceeded 20 seconds. Since the timeout is not editable, I can't get past this step.

Here is the error (not sure if it helps)

<span style="cursor: pointer; color: red" title="   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&amp; 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)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean asyncWrite)
   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 Dapper.SqlMapper.<QueryImpl>d__61`1.MoveNext() in D:\Dev\dapper-dot-net\Dapper NET40\SqlMapper.cs:line 1589
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType) in D:\Dev\dapper-dot-net\Dapper NET40\SqlMapper.cs:line 1479
   at Jayco.eCommerce.JaycoProductIndexBuilder.GetSerialNumbers(String productId) in C:\Projects\BrandFusion\Jayco-FloydPepper\src\Jayco.eCommerce\Infrastructure\Indexing\JaycoProductIndexBuilder.cs:line 44
   at Jayco.eCommerce.JaycoProductIndexBuilder.ExtendDocument(IndexDocument document) in C:\Projects\BrandFusion\Jayco-FloydPepper\src\Jayco.eCommerce\Infrastructure\Indexing\JaycoProductIndexBuilder.cs:line 25
   at Dynamicweb.eCommerce.Indexing.ProductIndexBuilder.WriteDoc(IndexDocument doc, Int64 currentAutoId)
   at Dynamicweb.eCommerce.Indexing.ProductIndexBuilder.ProcessProducts()
   at Dynamicweb.eCommerce.Indexing.ProductIndexBuilder.Build(IIndexWriter writer, Tracker tracker)" class="ng-binding">Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.</span>

 

Please help,

Thanks,

Adrian


Replies

 
Nicolai Pedersen
Reply

This looks an awful lot like custom code...

Do you have the count SQL in your own code? How does it look? If it takes more than 20 seconds you probably need to change it or optimize your database.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Unfortunately is the standard Ecommerce Schema

 

Screen_Shot_09-23-16_at_02.10_PM.PNG
 
Nicolai Pedersen
Reply
This post has been marked as an answer

According to your attached stack trace, the timeout comes from JaycoProductIndexBuilder.cs:line 44

Can I see that code?

Votes for this answer: 1
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Good catch!

That was the issue. We have removed the custom code and now it runs.

Thank you very much for your help

Adrian

 
Nicolai Pedersen
Reply

Great, you are welcome!

 

You must be logged in to post in the forum