Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Clustering / August 2005

Tip: Looking for answers? Try searching our database.

Failover causes General network error in ASP.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt Chubb - 15 Aug 2005 16:05 GMT
I've searched everywhere on the internet and now this newsgroup for an
answer to this problem and haven't managed to find a solution.

I've built an Active/Passive cluster with two nodes, the cluster runs SQL
Server and IIS. IIS Session state has been configured to run from SQL Server
using installpersistsqlstate.sql and I've written a very simple ASP.NET test
application that inserts/updates data contained in the virtual SQL Server
and writes data to the session.

The problem I'm experiencing is caused by performing a Move Group operation
in Cluster Administrator and then refreshing my ASP.NET application, after a
few seconds it causes a General Network Error. Once the group has been moved
and I refresh again everything is working fine. I can see the problem is
because the virtual server is offline for a limited period so I increased
timeout on all database commands, but this still does not correct the
problem.

Any help with this matter would be much appreciated, I'm thinking I may have
to talk to Microsoft and get some answers.

Thanks in advance

Matt
Mike Epprecht (SQL MVP) - 15 Aug 2005 16:29 GMT
Hi

During the failover, there is no server listening. All the DB conenctions
are dropped, transactions that were in progress get rolled back and tempdb
cleared.

You need to in your code, handle re-connecting and then re-sumit the batches.

If you want total transparent failover, you will have to wait for Database
Mirroring in SQL Server 2005.

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

> I've searched everywhere on the internet and now this newsgroup for an
> answer to this problem and haven't managed to find a solution.
[quoted text clipped - 19 lines]
>
> Matt
Matt Chubb - 15 Aug 2005 17:12 GMT
Thanks for the prompt response.

I've removed all session and database code from the ASP.NET test
application, but I'm still receiving the same error message as it is caused
by the session. IIS sessions are handled by SQL Server so I don't have
control over detecting whether the SQL Server connection is available. Is it
the way I've configured the session state in SQL Server?
Does session state running from SQL Server in a clustered environment not
work correctly on a failover?
Should I consider removing Session state all together from our applications?

Thanks in advance for the help.

Matt

> Hi
>
[quoted text clipped - 46 lines]
>>
>> Matt
Mike Epprecht (SQL MVP) - 15 Aug 2005 19:39 GMT
Hi

Normal ASP.NET session state, by default, is stored in TempDB in .NET 1.0
and 1.1 (http://support.microsoft.com/default.aspx?scid=kb;en-us;317604).

This is bad as TempDB is cleared during a failover.
http://support.microsoft.com/default.aspx?scid=kb;en-us;311209 is the
instruction to persist session state so that it will live though a failover.

During those few seconds of failover, the DB is not available, so anyone
hitting the server may get an error. A cluster failover should be a very
rare occurrence (if it is not, you have major problems as your cluster is
then not operating correctly).

What are your expectations?

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

> Thanks for the prompt response.
>
[quoted text clipped - 67 lines]
>>>
>>> Matt
Geoff N. Hiten - 15 Aug 2005 19:49 GMT
There is a version of the Session object that can live in its own database.
You are still going to get massive timeouts and network errors while the
service is down.  I would build a stand-alone test platform to determine how
the system behaves with the dedicated session database.  Simulate a failover
by doing a simple SQL service restart.

Signature

Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP

> Hi
>
[quoted text clipped - 97 lines]
>>>>
>>>> Matt
Matt Chubb - 16 Aug 2005 08:43 GMT
Thanks for the help.

I understand session state used to be stored in tempdb. However, I found the
sql file InstallPersistSqlState.sql. This file configures the session state
to be stored in the tables ASPStateTempApplications and ASPStateTempSessions
within the database ASPState. It gets around the problem of losing session
data on a failover, but still causes a General Network Error that is
difficult to spot and correct.

I know a fail over should be a rare occurrence, but surely when Microsoft
release patches manual failovers will need to be performed in order to
update the servers. The idea of the solution was to allow us to perform
these manual failovers within office hours and not have to inform users.

Clustering is a new experience to me, so I wasn't sure on my expectations. I
was hoping, with minimal code changes a failover could occur gracefully and
allow an application to continue operating even if the failover occurred
during the processing of an ASP.NET application.

Thanks for your input, all I wanted to find out was whether these problems
are by design and not because the cluster isn't quite configured correctly.
Now I can move back to our application code and re-write to fall inline with
the clustering solution.

Matt

> Hi
>
[quoted text clipped - 97 lines]
>>>>
>>>> Matt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.