Admin search timing out

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Admin search timing out

Post by AbleMods » Tue Jul 16, 2013 2:20 pm

We're running a Gold R5 (patched) install and we can't use the admin search any more. It always times out with the following page error. We have not seen any other pages or the shopper side search cause a timeout.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The Error log reports this: (The keyword value is an order number)
An error has occured at https://www.firefold.com/Admin/Search.aspx?k=800875
Exception: Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Inner Exception: could not execute query [ SELECT DISTINCT TOP 100 U.* FROM ac_Users U WHERE U.StoreId = @p0 AND U.UserId IN (SELECT [Key] FROM CONTAINSTABLE(ac_Users, *, @p1 )) OR U.UserId IN (SELECT A.UserId FROM ac_Addresses AS A INNER JOIN CONTAINSTABLE(ac_Addresses, *, @p1 ) AS FTS ON FTS.[KEY] = A.AddressId WHERE A.IsBilling = 1 ) ] Name:storeId - Value:1 Name:keywords - Value:"800875" [SQL: SELECT DISTINCT TOP 100 U.* FROM ac_Users U WHERE U.StoreId = @p0 AND U.UserId IN (SELECT [Key] FROM CONTAINSTABLE(ac_Users, *, @p1 )) OR U.UserId IN (SELECT A.UserId FROM ac_Addresses AS A INNER JOIN CONTAINSTABLE(ac_Addresses, *, @p1 ) AS FTS ON FTS.[KEY] = A.AddressId WHERE A.IsBilling = 1 ) ] Inner Exception Stack Trace: at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) at NHibernate.Impl.SessionImpl.List[T](NativeSQLQuerySpecification spec, QueryParameters queryParameters) at NHibernate.Impl.SqlQueryImpl.List[T]() at CommerceBuilder.Search.Providers.SqlFtsSearchProvider.SearchUsers(String keywords, Int32 maximumRows) at CommerceBuilder.Search.SearchDataSource.Search(String keywords, SearchArea searchArea, Int32 maximumRows) at AbleCommerce.Admin.Search.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Inner Exception: could not execute query [ SELECT DISTINCT TOP 100 U.* FROM ac_Users U WHERE U.StoreId = @p0 AND U.UserId IN (SELECT [Key] FROM CONTAINSTABLE(ac_Users, *, @p1 )) OR U.UserId IN (SELECT A.UserId FROM ac_Addresses AS A INNER JOIN CONTAINSTABLE(ac_Addresses, *, @p1 ) AS FTS ON FTS.[KEY] = A.AddressId WHERE A.IsBilling = 1 ) ] Name:storeId - Value:1 Name:keywords - Value:"800875" [SQL: SELECT DISTINCT TOP 100 U.* FROM ac_Users U WHERE U.StoreId = @p0 AND U.UserId IN (SELECT [Key] FROM CONTAINSTABLE(ac_Users, *, @p1 )) OR U.UserId IN (SELECT A.UserId FROM ac_Addresses AS A INNER JOIN CONTAINSTABLE(ac_Addresses, *, @p1 ) AS FTS ON FTS.[KEY] = A.AddressId WHERE A.IsBilling = 1 ) ] Inner Exception Stack Trace: at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) at NHibernate.Impl.SessionImpl.List[T](NativeSQLQuerySpecification spec, QueryParameters queryParameters) at NHibernate.Impl.SqlQueryImpl.List[T]() at CommerceBuilder.Search.Providers.SqlFtsSearchProvider.SearchUsers(String keywords, Int32 maximumRows) at CommerceBuilder.Search.SearchDataSource.Search(String keywords, SearchArea searchArea, Int32 maximumRows) at AbleCommerce.Admin.Search.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Admin search timing out

Post by AbleMods » Tue Jul 16, 2013 2:39 pm

The problem seems to be when the keyword value does not exist i.e. searching for an order # that isn't in the system.

With SQL FTS and regular SQL providers, keyword that exists is found quickly.

But with SQL FTS and the keyword does not exist, the timeout occurs. Switching to SQL (non FTS) provider does not throw a timeout when searching for a keyword that does not exist.

Our only solution to keeping admin global searches from crashing on not-found is to switch store to SQL non-FTS.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Admin search timing out

Post by ForumsAdmin » Tue Jul 16, 2013 6:03 pm

We have tried but we couldn't reproduce this. We created tens of thousands of test orders as data but in all our testing the above mentioned issue could not be produced. Could there be something specific to your setup that we haven't recreated?

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Admin search timing out

Post by AbleMods » Tue Jul 16, 2013 7:33 pm

ForumsAdmin wrote:Could there be something specific to your setup that we haven't recreated?
User maintenance was running at the time. We're doing more tests to determine if this was the cause.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
bkort@web2market.com
AbleCommerce Partner
AbleCommerce Partner
Posts: 113
Joined: Thu Jan 22, 2004 3:17 pm
Location: Illinois
Contact:

Re: Admin search timing out

Post by bkort@web2market.com » Thu Jul 25, 2013 11:04 am

We got the same thing too. The error is below.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:


Line 24: if (string.IsNullOrEmpty(keywords)) Response.Redirect(AbleCommerce.Code.NavigationHelper.GetAdminUrl());
Line 25: Caption.Text = String.Format(Caption.Text, keywords);
Line 26: _SearchAreaResults = SearchDataSource.Search(keywords, SearchArea.All, 100);
Line 27: ProductUrl = Page.ResolveUrl("~/Admin/Products/EditProduct.aspx?ProductId={0}");
Line 28: UserUrl = Page.ResolveUrl("~/Admin/People/Users/EditUser.aspx?UserId={0}");


Source File: c:\inetpub\wwwroot\remybattery_gold\Admin\Search.aspx.cs Line: 26

Stack Trace:


[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59
System.Data.SqlClient.SqlDataReader.get_MetaData() +118
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6414593
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6416162
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +23
NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +845
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) +580
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +275
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +205
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +195

[GenericADOException: could not execute query
[ SELECT DISTINCT TOP 100 U.* FROM ac_Users U WHERE U.StoreId = @p0 AND U.UserId IN (SELECT [Key] FROM CONTAINSTABLE(ac_Users, *, @p1 )) OR U.UserId IN (SELECT A.UserId FROM ac_Addresses AS A INNER JOIN CONTAINSTABLE(ac_Addresses, *, @p1 ) AS FTS ON FTS.[KEY] = A.AddressId WHERE A.IsBilling = 1 ) ]
Name:storeId - Value:1 Name:keywords - Value:"test"
[SQL: SELECT DISTINCT TOP 100 U.* FROM ac_Users U WHERE U.StoreId = @p0 AND U.UserId IN (SELECT [Key] FROM CONTAINSTABLE(ac_Users, *, @p1 )) OR U.UserId IN (SELECT A.UserId FROM ac_Addresses AS A INNER JOIN CONTAINSTABLE(ac_Addresses, *, @p1 ) AS FTS ON FTS.[KEY] = A.AddressId WHERE A.IsBilling = 1 ) ]]
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +637
NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +23
NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) +504
NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) +440
NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters) +435
NHibernate.Impl.SqlQueryImpl.List() +290
CommerceBuilder.Search.Providers.SqlFtsSearchProvider.SearchUsers(String keywords, Int32 maximumRows) +592
CommerceBuilder.Search.SearchDataSource.Search(String keywords, SearchArea searchArea, Int32 maximumRows) +369
AbleCommerce.Admin.Search.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\remybattery_gold\Admin\Search.aspx.cs:26
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.2012

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Admin search timing out

Post by ForumsAdmin » Fri Jul 26, 2013 1:00 am

Which search provider is in use?

User avatar
bkort@web2market.com
AbleCommerce Partner
AbleCommerce Partner
Posts: 113
Joined: Thu Jan 22, 2004 3:17 pm
Location: Illinois
Contact:

Re: Admin search timing out

Post by bkort@web2market.com » Fri Jul 26, 2013 7:48 am

Full Text Search.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Admin search timing out

Post by ForumsAdmin » Fri Jul 26, 2013 10:18 am

There is Lucene Full Text Search and there is SQL Server Full Text Search. I assume you mean SQL Server FTS?

User avatar
bkort@web2market.com
AbleCommerce Partner
AbleCommerce Partner
Posts: 113
Joined: Thu Jan 22, 2004 3:17 pm
Location: Illinois
Contact:

Re: Admin search timing out

Post by bkort@web2market.com » Fri Jul 26, 2013 1:03 pm

Yes, SQL Server FTS.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Admin search timing out

Post by ForumsAdmin » Sun Jul 28, 2013 5:25 pm

Loged in to the issue database for futher investigation.

User avatar
bkort@web2market.com
AbleCommerce Partner
AbleCommerce Partner
Posts: 113
Joined: Thu Jan 22, 2004 3:17 pm
Location: Illinois
Contact:

Re: Admin search timing out

Post by bkort@web2market.com » Fri Aug 16, 2013 7:54 am

Any further word on this?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Admin search timing out

Post by mazhar » Fri Aug 16, 2013 10:12 am

bkort@web2market.com wrote:Any further word on this?
We are still not able to reproduce this on our end.

User avatar
bkort@web2market.com
AbleCommerce Partner
AbleCommerce Partner
Posts: 113
Joined: Thu Jan 22, 2004 3:17 pm
Location: Illinois
Contact:

Re: Admin search timing out

Post by bkort@web2market.com » Tue Sep 03, 2013 3:00 pm

It's working for us now. The client made some changes in their admin to improve overall site performance. Under SEO Settings he changed the Cache size from 1000 to 10000 – I believe I have more than 1000 redirects and I’m adding more as they come up. He also disabled the Statistics Tracking. Lastly in the Page Tracking area I cleared the log – which had 90000 records stored.

So my assumption is that the it was an overall performance issue. Just posting this in case others run into the problem.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Admin search timing out

Post by ForumsAdmin » Tue Sep 03, 2013 10:24 pm

We have analyzed the query in question and we have improved it for the next version (R6). The performance of the new query is almost 10 times better especially when the dataset is very large.

Post Reply