I recently tracked the website and found that "Regular Network errors" still exist ."

Source: Internet
Author: User
Search for related questions in China first, but it is not suitable.
I can't help but try again abroad. Now we finally find the correct solution.

Error: An accidental error occurs after about half an hour.

The error is probably because the data connection in the SQL connection pool has become bad connection for some reasons.
So, reference thisThe error actually indicates that the connection has expired.An exception occurs when you perform the operation. If
If I perform the operation again, the connection pool will remove the connection and re-open it. Then the second execution will be fine. That is to say, if an error occurs on the webpage and I refresh the page again, you can. This is generally the reason.

And, in myProgramIn, I close the connection immediately after it is used up, so I think it should not be because there are too many connections.

Therefore, the query is re-executed according to the limited number of times written by a foreign user.

If there is no problem tomorrow, you can rest assured.

SpecificCode:

/**/ ///   <Summary>
/// Allow the data adapter to be retried to obtain data
///   </Summary>
///   <Param name = "sqldataadapter"> Data adapter </Param>
///   <Param name = "dataset"> Dataset </Param>
///   <Param name = "tablename"> Table Name </Param>
Public   Static   Void Filldatasetallowretry (sqldataadapter, dataset, String Tablename)
{
Int Retrycount =   0 ;
While ( True )
{
Try
{
Sqldataadapter. Fill (dataset, tablename );
Break;
}
Catch (Sqlexception ex)
{
Sqldataadapter. selectcommand. Connection. Close ();
Sqldataadapter. selectcommand. Connection. open ();
Retrycount ++ ;
If (Retrycount > = Retrylimit)
{< br> applicationlog. writeerror ( " filldatasetallowretry exceed the limit times! " + ex. message);
throw ex;
}
}
Finally
{
Sqldataadapter. selectcommand. Connection. Close ();
}
}

}

My current situation:The website and database are not on the same physical server.
-------------------------------------------------
After tracking for one day, the problem is no longer solved. There are two solutions: on the one hand, the network management has made some settings for the firewall, so that no response-free connections will be closed regularly for this IP address. On the other hand, the program adds the function of repeated execution after an error-how many errors are allowed in disguise.

Now I feel much more stable. The heart is also safe.

------------------------------
555555555 ................ there is still a problem, depressed
however, now an errorpage is set by setting the config defaultredirect. aspx
then refresh the page and jump to the homepage. There should be no more problems.
-------------------------------
plus,
some reasons are found that the destruction of the connection pool of the host is not timely.
for example, I uploaded the DLL of the website again. Because there are too many hosts attached to the website host, you cannot compile the new
DLL in time. Therefore, you must wait 10-20 minutes and re-access the website host to restore the normal state. This is also quite depressing.
----------------------------------
plus
Delete the DLL in the bin and upload it again to compile it immediately.
it may be because the VM responds slowly.

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.