#1
The users on my forum are getting frequent errors when they try to search. The error they are seeing is "An error occurred while searching." It looks like some kind of timeout, here's the log:


System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
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 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at YAF.Classes.Data.DBAccess.GetDatasetBasic(SqlCommand cmd, Boolean transaction)
at YAF.Classes.Data.DBAccess.GetData(SqlCommand cmd, Boolean transaction)
at YAF.Classes.Data.DB.GetSearchResult(String toSearchWhat, String toSearchFromWho, SearchWhatFlags searchFromWhoMethod, SearchWhatFlags searchWhatMethod, Int32 forumIDToStartAt, Int32 userID, Int32 boardId, Int32 maxResults, Boolean useFullText)
at YAF.Pages.search.SearchBindData(Boolean newSearch)


My forum is at www.thecandidadiet.com/forum,  running YAF 1.9.3. This error has started appearing over the last month or so.

I'm not sure if this has anything to do with it, but looking in the error log I'm seeing a different error that seems to be appearing every 9 seconds. Here it is:


System.FormatException: The specified string is not in the form required for an e-mail address.
at System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
at System.Net.Mail.MailAddress.ParseValue(String address)
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at System.Net.Mail.MailAddress..ctor(String address, String displayName)
at YAF.Classes.Utils.SendMailThread.SendMailThreaded(Int32 uniqueId)


I'm no expert, but could this be slowing the server down somehow and causing the timeouts on the search function? Any help would be much appreciated!
Topic Starter
  • wilkinsj
  • Rank: YAF Camper
  • Reputation:
    Neutral
    53%
  • Joined: 16/07/2011
  • Posts: 14
  • Thanks: 1 times
#2
I have also had this problem frequently in the past, when I had a 2-core AMD server, so I had to set the max search results parameter to about max 200. However, it could still time out due to high CPU load (presumably) and RAM strain causing a lot of paging....

When we got new "iron" with an Intel quad-core CPU, 64-bit Win & SQL 2008 R2, more RAM and such it worked better so I dared to up it to 1000 search results. After another hw upgrade to 2 quad-core CPU's & more memory it was like the plug was pulled - now I can return all search results from the 10-11 years posts... So now my search limit is set to 20 000 results which covers most of possible simple searches... Within seconds...

I think the server hardware specs are affecting the functionality of the search routine as well as overall database performance.

I have 330 000+ posts to search in my forum.

He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
  • JP
  • Rank: YAF Leader
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor for Bug Finder: Given for kick-assery at finding bugs by being excellent at QA.YAF.NET Supporter: Loves YAF.NET!YAF.NET Supporter: Supports our efforts. Thank you.
  • Joined: 08/01/2009
  • Posts: 398
  • Thanks: 86 times
  • Was thanked: 39 time(s) in 35 post(s)
#3
Hi and thanks for your feedback.

I currently have Max Search Results set to 100, and there are only 20,000 posts. Do you think that this needs to be set lower again?
Topic Starter
  • wilkinsj
  • Rank: YAF Camper
  • Reputation:
    Neutral
    53%
  • Joined: 16/07/2011
  • Posts: 14
  • Thanks: 1 times
#4
Actually, I think the search will scan all messages even if you set a max search result and the number of messages returned are less than the max search result number. So if you hit 100 results "early", all is ok, otherwise you will you will get a full scan of all messages and a timeout. So it's a balance act to be sure that he max search results are actually reached.

As I said, more raw iron solved it for me, I run 1.9.6.1+ (some later modules than 1.9.6.1 RTW). However, this is not a guarantee that it will solve issues in 1.9.3, Have no idea if the search routine has changed between versions.

While I had the problems, many users used the Search with Google option instead.... Don't know it it exists in 1.9.3, I started with 1.9.4 RC1 since there was a major redesign work done between 1.9.1-3 and 1.9.4.

Sorry if I can't help you so much, but at least I can share my experiences.
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
  • JP
  • Rank: YAF Leader
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor for Bug Finder: Given for kick-assery at finding bugs by being excellent at QA.YAF.NET Supporter: Loves YAF.NET!YAF.NET Supporter: Supports our efforts. Thank you.
  • Joined: 08/01/2009
  • Posts: 398
  • Thanks: 86 times
  • Was thanked: 39 time(s) in 35 post(s)
#5
I am hosting the forum with Act Now Domains and they just told me that I can't upgrade to the current version yet. So I have to stick with v1.9.3.

This wasn't a problem at all until recently but I do need to find a solution within 1.9.3 somehow.. Could it be those repeated errors that I am seeing every few seconds in the event log? Here is the log again:


System.FormatException: The specified string is not in the form required for an e-mail address.
at System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
at System.Net.Mail.MailAddress.ParseValue(String address)
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at System.Net.Mail.MailAddress..ctor(String address, String displayName)
at YAF.Classes.Utils.SendMailThread.SendMailThreaded(Int32 uniqueId)


Again, this is happening every 9-11 seconds, so could this be the problem? Here is a copy of the event log page so you can see the frequency of the error...


Guest 5/22/2012 1:10:58 PM System.String Show | Delete
Guest 5/22/2012 1:10:47 PM System.String Show | Delete
Guest 5/22/2012 1:1😇6 PM System.String Show | Delete
Guest 5/22/2012 1:10:25 PM System.String Show | Delete
Guest 5/22/2012 1:10:14 PM System.String Show | Delete
Guest 5/22/2012 1:10:03 PM System.String Show | Delete
Guest 5/22/2012 1:09:52 PM System.String Show | Delete
Guest 5/22/2012 1:09:41 PM System.String Show | Delete
Guest 5/22/2012 1:09:30 PM System.String Show | Delete
Guest 5/22/2012 1:09:18 PM System.String Show | Delete
Guest 5/22/2012 1:09:07 PM System.String Show | Delete
Guest 5/22/2012 1:08:56 PM System.String Show | Delete
Guest 5/22/2012 1:08:45 PM System.String Show | Delete
Guest 5/22/2012 1:08:34 PM System.String Show | Delete
Guest 5/22/2012 1:08:23 PM System.String Show | Delete
Guest 5/22/2012 1:08:12 PM System.String Show | Delete
Guest 5/22/2012 1:08:01 PM System.String Show | Delete
Guest 5/22/2012 1:07:50 PM System.String Show | Delete
Guest 5/22/2012 1:07:39 PM System.String Show | Delete
Guest 5/22/2012 1:07:28 PM System.String Show | Delete
Guest 5/22/2012 1:07:17 PM System.String Show | Delete
Guest 5/22/2012 1:07:06 PM System.String Show | Delete
Guest 5/22/2012 1:06:55 PM System.String Show | Delete
Guest 5/22/2012 1:06:44 PM System.String Show | Delete
Guest 5/22/2012 1:06:33 PM System.String Show | Delete
Topic Starter
  • wilkinsj
  • Rank: YAF Camper
  • Reputation:
    Neutral
    53%
  • Joined: 16/07/2011
  • Posts: 14
  • Thanks: 1 times
#6
I've been getting this since I split DNN out of my site and am standalone YAF. I was going to wait for the next iteration, but it's getting pretty annoying.

Under Host Settings > Search > I checked Full Text Search and the issue is gone.

  • Zero2Cool
  • Rank: YAF Leader
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor for the Support Knight: Given to a community member who has assisted lots and lots of people!
  • Joined: 26/04/2011
  • Posts: 1,073
  •  Man  United States
  • Location: in a van down by the river
  • Thanks: 243 times
  • Was thanked: 102 time(s) in 93 post(s)
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved