Print Page | Close Window

objCommand.Timeout

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15983
Printed Date: 13 April 2026 at 7:55pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: objCommand.Timeout
Posted By: dudboy
Subject: objCommand.Timeout
Date 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 - http://p2p.wrox.com/archive/asp_database_setup/2002-07/6.asp
 


-------------
www.clubgti.com
www.clubgti.com/forum



Replies:
Posted By: JJLatWebWiz
Date 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.
 
 


Posted By: dudboy
Date 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.
 
 
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


-------------
www.clubgti.com
www.clubgti.com/forum


Posted By: JJLatWebWiz
Date 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.


Posted By: dudboy
Date Posted: 28 July 2005 at 12:50pm
I have uped the time out to 360 and still no joy.
 
 


-------------
www.clubgti.com
www.clubgti.com/forum


Posted By: JJLatWebWiz
Date 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.


Posted By: dpyers
Date 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.


Posted By: dudboy
Date 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


-------------
www.clubgti.com
www.clubgti.com/forum


Posted By: dudboy
Date Posted: 29 July 2005 at 4:28pm
Originally posted by dpyers dpyers wrote:

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.
 
Thanks for the tip, I have already tried this one and no joy either


-------------
www.clubgti.com
www.clubgti.com/forum


Posted By: JJLatWebWiz
Date Posted: 22 August 2005 at 6:28pm
Interesting suggestion for this problem found here:
http://forums.webwiz.net/forum_posts.asp?TID=16163 - http://forums.webwiz.net/forum_posts.asp?TID=16163
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net