Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Search Time out
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Search Time out

 Post Reply Post Reply
Author
bruce View Drop Down
Groupie
Groupie
Avatar

Joined: 16 April 2003
Location: United States
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote bruce Quote  Post ReplyReply Direct Link To This Post Topic: Search Time out
    Posted: 20 April 2006 at 3:12pm
After upgrading to v8.1, I'm still getting time outs in the forum search.  I've brought up the issues with Jodohost and this was their reply.
 
Hello,

You can try to use "Connection Timeout=360" in your connection string.
This is certainely a DB issue and you need to create an index to help with "Any date" queries.

You can take help about this at WebWizforums.

 
So..  A couple questions.
 
Is their reply correct and if so how do I change the timeout in the connection string?  Will change the connection string resolve my problem?
 
Right now the search is timing out at 30 seconds which is not nearly enough time for the search to complete.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2006 at 10:06am
An index on the database in this instance would not help as indexs are already created.

The problem is with searches on 'Any Date' that search the entire post is that the post column in the database needs to be searched and as this is a large text datatype in can not be indexed anyway.

How many posts do you have in your forum for this to happen?

Searches shouldn't take that long to do, unless you have half a million posts to search through or the SQL Server is running slow.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2006 at 10:14am
If this continues to be an issue, one thing you could do is limit the number of results returned in the search to say 100 by editing the file 'search_process.asp'

Change the part in red below to 100, or less if need be, of the file 'search_process.asp':-

intMaxResults = 500

By limiting the number of results to 100 you will get 10 pages of search results instead of 500 which should be enough search results for anyone to sift through.

By setting it to 100 it will also speed up large searches by 5 times.
Back to Top
bruce View Drop Down
Groupie
Groupie
Avatar

Joined: 16 April 2003
Location: United States
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2006 at 5:12pm
If the search critirea takes more than 30 seconds then it times out.
 
I have ~ Our users have posted 234,163 Posts in 17,597 Topics in 18 Forum(s)
 
I have to set intMaxResults to 10 or it times out most of the time, unless the criteria is really narrowed down.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2006 at 5:28pm
It still shouldn't be that slow with that many posts, unless the SQL server is under allot of load.

I've been doing tests on a similar size database and by searching ALL posts I was getting the results in under 20 seconds with a max of 500 results returned and 9 seconds with 100 results returned.

I have been playing with the SQL though and got this down to around 1 second with 500 results returned, by changing the ORDER BY clause to go by Thread_ID instead of Message_Date in the SQL


Edited by -boRg- - 24 April 2006 at 5:30pm
Back to Top
bruce View Drop Down
Groupie
Groupie
Avatar

Joined: 16 April 2003
Location: United States
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2006 at 5:34pm

I'm on a semi dedicated server with Jodohost and the SQL db is on the same server, so server load should not be an issue.

Sounds like your doing some tweaking, let me know if you have any suggestions.

Back to Top
bruce View Drop Down
Groupie
Groupie
Avatar

Joined: 16 April 2003
Location: United States
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2006 at 5:50pm
Is there any way to increase the time-out form 30 seconds to 60 seconds or more?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 25 April 2006 at 9:09am
To increase the timeout in the connection string change line 186 of the file database_connection.asp to the following:-

strCon = "Provider=SQLOLEDB;Connection Timeout=360;" & strCon
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.