Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing Script Timeout Errors - possible?

Status
Not open for further replies.

XgrinderX

Programmer
Mar 27, 2001
225
0
0
US
Hello,

I am fairly new to ASP programming (one year experiance) and I have a problem that I need to resolve.

I need to be able to gracefully handle a Script Timeout, but I do not know how. Increasing the Timeout time is NOT an option. I am doing some complex searches on huge databases and if the user puts in some search criteria that is too vague, it is possible for the search to take over 180 seconds. That is not acceptable to our management team, all scripts should run under 60 seconds. SO...what I want to be able to do, is to send the user to an error page that tells them that their search is too broad and that they need to narrow their search to get some results, but right now all they get is a Script Timeout error.

I found a tip on the Microsoft website that says to include TRANSACTION=Required in the @ directive at the top of the page. Then, use the Sub OnTransactionAbort() to redirect the user to an error page. This works fine on a small test script I wrote, but on the real life code, it fails at the database connection line with a Distributed Transaction Error.

2 questions:

1) is there any easy way to capture a Script Timeout and redirect gracefully?

2) any ideas on now I may be able to get the MTS version to work? I am an MTS virgin and know almost nothing about it, so hopefully I am nopt in over my head.

Thanks,

-Greg
 
I am having the same problem that you have mentioned. Did you have find any solutions. If so. Can you please help me out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top