469,643 Members | 1,220 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Service Unavailable after Database restart caused by exceptions?

My services shows once a while the infamous error "Service
Unavailable" (http 503 error). This error happens only if my asp.net
application encounters a problem with the SQL Server. In my case it
occured when my DB logs were full or the server administrator on the
shared server environment restarted the DB.

After my ISP restarts the DB, my services are still unavailable, which
means I have to connect myself to the webhosting panel and restart the
service myself. That is very troublesome especially if it happens
during the weekend with no staff in the office to check the service.

My ISP told my that my exception handling might cause the problem. The
service likely kills itself when a few hundred exeption occured.

In my code I normally catch every exception in the APPLICATION_ERROR.
>From there I send myself an error email, and redirect the user to an
error page (set in the web.config files)

In my code I normally do not catch an exception since it bubbles up to
the APPLICATION_ERROR anyway. All exceptions are handled in the
Questions )

Do I need to enclose my db execution statements in a TRY CATCH block?
Will this prevent the "Service Unavailable" Error.

Is there a difference when I catch an exception with a TRY CATCH block
or let it "naturally" bubble up to the APPLICATION_ERROR?

Would following code make a difference?

Catch ex As Exception
End Try

Feb 21 '07 #1
0 1038

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.