Script TimeOut Problem

Results 1 to 2 of 2

Thread: Script TimeOut Problem

  1. #1
    V R Mehta Guest

    Default Script TimeOut Problem

    I am working with an application where there is for looping for the a recordset from of database, and for every record fetched I again have to create a recordset from another table in the database and move throughout that second recordset through while loop.This process continues for all the records fetched through first recordset. Thus there is a loop inside another loop. The problem I am facing is I am getting the error for Script timeout. I changed the value to 180 sec but the problem still persists. Is there any other way to solve this problem. Any kind of help will be appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: Script TimeOut Problem

    It&#039s easy. Either make your script execute in less than 180 seconds, or increase your timeout value. <BR><BR>You may think that&#039s a flippant answer, but it&#039s true. You should first examine why it is taking so long and consider alternate methods for performing what you want. I mean, do you really expect people to wait for more than three minutes for their browser to be updated? Even if you&#039re on an intranet, and can train your users for what to expect, there are many that will simply move on before the process is complete.<BR><BR>First, check your queries. Are all pertinent fields indexed properly? My guess is that they may not be. Even with millions of records on a heavily loaded server, my queries rarely take much more than a few milliseconds (and yes, I know that is a vague statement, and your queries may be doing something wild, but you have given us no detail on that).<BR><BR>Second, switch to using Getrows and looping through arrays instead of recordsets. This alone can improve your speed 4-10 times.<BR><BR>Third, use some of the optimization techniques described on the 4guysfromrolla website. The most pertinent in this case (after getrows) would be the technique of SETting variables to equal the values contained within the recordset to avoid multiple object lookups.<BR><BR>Fourth, if all of these techniques still fail to produce the results you desire, post your code, so we can get specific.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts