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

  New Posts New Posts RSS Feed - objCommand.Timeout
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

objCommand.Timeout

 Post Reply Post Reply Page  12>
Author
dudboy View Drop Down
Newbie
Newbie


Joined: 01 August 2003
Location: United Kingdom
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote dudboy Quote  Post ReplyReply Direct Link To This Post Topic: objCommand.Timeout
    Posted: 26 July 2005 at 4:20am
I am still trying to fix the search timeout problem that has been around for ages.
 
I have found a article that says to alter the Command timeout as well as the sessions and server timeouts.
 
Can someone point me in the right direction for this setting in the forum script
Quote
If you really have to increase the connection or command timeouts there are
properties of the connection and command objects to do this:

objConn.Timeout = xx
objCommand.Timeout = xx
 
http://p2p.wrox.com/archive/asp_database_setup/2002-07/6.asp
 
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2005 at 11:54am
I noticed that you have over 750,000 posts.  That's pretty healthy number of records to search through in a non-indexed field.  Perhaps someone else here can tell us if "Full-Text Indexing" on the Message field in tblThreads would improve the query speed.
 
To answer your question, look in common.asp.  About half way through the file you should see:
 
'Set the connection string to the database
adoCon.connectionstring = strCon
 
'Set an active connection to the Connection object
adoCon.Open
 
Simply add "adoCon.ConnectionTimeout = 30" after "adoCon.ConnectionString = strCon" to change the default 15 second timeout to 30 seconds.
 
If you enable the Full-Text Indexing, run an identical query in the SQL Query Analyzer before and after the Full-Text Indexing and let us know if the Execution Plan shows any significant improvement.  This may also be a good query to turn into a Stored Procedure.
 
 
Back to Top
dudboy View Drop Down
Newbie
Newbie


Joined: 01 August 2003
Location: United Kingdom
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote dudboy Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2005 at 5:06am
Hopefully someone can help.
 
Addin the extra timeout setting has not fixed the age old search.asp timeout issue.
 
Going buy a PM I got from -boRg- there is known issue with the permissions. See below.
 
Quote
Becuase of the way the permisisons work in the present version etc. the search page performance is always going to be bad.

However, version 8 has a new permissions system so I will be writting a new search page for that version, however, at present I am working over 60 hours a week and don't have much time to work on the next version. Most of my spare time is taken up with anwsering questions instead of coding the next version
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2005 at 3:06pm

With all due respect to boRg, I doubt a change to any permission functionality is going to change your situation.  I've done several searches of your messages and found that even in cases where the result is zero records, the timeout still results.  That means that the sub-query of the main query doesn't have time to complete within the timeout.

I ran this query on your site: SELECT tblTopic.Topic_ID, tblTopic.Forum_ID, tblTopic.Poll_ID, tblTopic.No_of_views, tblTopic.Subject FROM tblTopic WHERE tblTopic.Topic_ID IN  (SELECT tblThread.Topic_ID  FROM tblThread  WHERE ( tblThread.Message LIKE '%jetta golf gti abdbflashada%'))  ORDER BY tblTopic.Last_entry_date DESC;
 
The result could not possibly return a result yet the timeout would expire 4 out of 5 times, so the sub-query "(SELECT tblThread.Topic_ID  FROM tblThread  WHERE ( tblThread.Message LIKE '%jetta golf gti abdbflashada%'))" is probably where the problem starts.  The problem with the subquery is that it's doing a query against the message field which is a 'text' datatype.  This problem exists for the entire SQL world (Oracle, MS SQL, MySQL, MS Access, etc).  To get acceptable performance when doing text/memo/long searches you need to use something like the Full-Text Search or simply speed up the machine running SQL Server.
 
Is your SQL Server running on a dedicated machine?  What kind of hardware is it running on?  Does it have plenty of memory?
 
However, given the fact that I did get a response in 1 of the 5 attempts of the same search, extending the timeout even further might work.
 
I wish I could get your data to do a test run on my MySQL-based WWF.  I think all forum developers eventually start using the Full-text indexing option and then start using Natural Language searches when the forum data gets large.
Back to Top
dudboy View Drop Down
Newbie
Newbie


Joined: 01 August 2003
Location: United Kingdom
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote dudboy Quote  Post ReplyReply Direct Link To This Post Posted: 28 July 2005 at 12:50pm
I have uped the time out to 360 and still no joy.
 
 
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2005 at 11:45am

OK.  Here's my last last suggestion and it starts with question... can you afford a second SQL server?

You have an impressively active forum.  This morning I noticed over 100 active users when I did the same searches I did before.  I think it's time for you scale up and use a second SQL server to offload the search functions, especially the message body search.  I think your entire forum response time will increase dramatically.
 
The second server could be a complete mirror of the main server (so a handy fail-over), or you could just mirror the tblThreads table.  The amount of WWF code required to redirect searches to the second SQL server should be minimal.
 
Since your message body search is practically useless at the moment, you should consider disabling it altogether, or restricting its use to particular users and/or based on the number of active users.
 
I've not done it myself, but if you're interested in scaling the search to a second SQL server, I would be happy to help.  Just send me a PM.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2005 at 2:40pm
Been a while since I set up an sql server but ISTR that there's also a default timeout setting on the sql server that you might have to adjust.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
dudboy View Drop Down
Newbie
Newbie


Joined: 01 August 2003
Location: United Kingdom
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote dudboy Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2005 at 4:27pm
Originally posted by JJLatWebWiz JJLatWebWiz wrote:

OK.  Here's my last last suggestion and it starts with question... can you afford a second SQL server?

You have an impressively active forum.  This morning I noticed over 100 active users when I did the same searches I did before.  I think it's time for you scale up and use a second SQL server to offload the search functions, especially the message body search.  I think your entire forum response time will increase dramatically.
 
The second server could be a complete mirror of the main server (so a handy fail-over), or you could just mirror the tblThreads table.  The amount of WWF code required to redirect searches to the second SQL server should be minimal.
 
Since your message body search is practically useless at the moment, you should consider disabling it altogether, or restricting its use to particular users and/or based on the number of active users.
 
I've not done it myself, but if you're interested in scaling the search to a second SQL server, I would be happy to help.  Just send me a PM.
 
Unfortunatley the cost implications of this are to big for a non profit making club. Thanks for the advise though
Back to Top
 Post Reply Post Reply Page  12>

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.