Experience of timeout timeout in ASP

Source: Internet
Author: User
Tags pack query
Recently used ASP and MSSQL to do a database application,
It all went well, but as the volume of data increased,
There are timeout problems in several queries.
Refer to the Option Pack documentation and the articles in the community,
Now the problem has been solved (at least no new one has been found).

The solution is summed up:

The settings that affect server generation timeouts are roughly:
1. Server.ScriptTimeout,
2. The CommandTimeout property of the Connection object,
3. Command object's CommandTimeout property,
4. IE browser settings.

Server.ScriptTimeout, the default value is 90 seconds.
To enlarge it, add a sentence to your ASP file, as follows:
server.scripttimeout=999,
Set the page timeout to 999 seconds.

Initially I only set server.scripttimeout,
However, there will still be a timeout error, regardless of its value set in Chengdu how big.
After seeing a post in the community, referring to the CommandTimeout attribute,
So I looked at the Option Pack document and there were other timeout.

Both the connection object and the command object have a CommandTimeout attribute.
The default is 30 seconds, if you have a time-consuming query or data processing,
It's easy to time out. To enlarge it, it is also easy to create an object after the
Set its properties as follows:
Con.commandtimeout = 999,
Set to 999 seconds, where con is a connection object.
If set to zero, will infinite wait, without this timeout limit.

The command object does not inherit this property of connection,
So also set the CommandTimeout property separately for the command that might timeout.

Finally, IE also has a timeout setting, 5 minutes from the server can not get data, also timed out.
This situation may be rarely encountered,
But when I save the results of the more than 1.1 million query as an MDB file,
I met him. (For the preservation method, please refer to a post in the Essence area.)
Workaround: (Refer to Q181050 in Microsoft KB)
1. IE to 4.01 SP1 above version.
2. Hkey_current_usersoftwaremicrosoft in the registry
In Windowscurrentversioninternet settings
Add a DWORD type ReceiveTimeout, the value set to be like 8 9.
3. Restart Computer.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.