cancel
Showing results for 
Search instead for 
Did you mean: 

IIS stops (restarts), the reason can be SA

5,579

Hello,

IIS server (w3wp.exe process) sometimes stops (and almost always starts again immediately), and the problem can be associated with SQL Anywhere. Logs show that an error occurs in dbdata.dll file which probably causes the restart. All connections to the database from webserver are dropped but after that users can connect again immediately. This occurs once or twice a day (typically on working days, when there are 150 - 200 users connected from that server).

Server: Windows Server 2008 R2 Standart (64 bit) or Windows Server 2003 Service Pack 2.  
Platform: .NET Framework 4.0.  
Programming language: C#.  
IIS 7 (the same problem with IIS 6).  
iAnywhere.Data.SQLAnywhere.v4.0.dll from SQL Anywhere 12 directory (Runtime version v4.0.30319, Version 12.0.1.32984).  

Connection pooling is being used.

Windows log:

Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bcd2b  
Faulting module name: dbdata.dll, version: 12.0.1.3298, time stamp: 0x4d7645f2  
Exception code: 0xc0000005  
Fault offset: 0x0003b24c  
Faulting process id: 0xc48  
Faulting application start time: 0x01cc50c106bfdb1d  
Faulting application path: C:\\Windows\\SysWOW64\\inetsrv\\w3wp.exe  
Faulting module path: C:\\Windows\\TEMP\\{16AA8FB8-4A98-4757-B7A5-0FF22C0A6E33}_1201_1\\dbdata.dll  
Report Id: 4fe89609-bce0-11e0-aff4-005056bd007c  

Here is a stack trace from memory dump which was generated when the unmanaged error occured:

Name: System.String  
MethodTable: 79b9fb64  
EEClass: 798d8bb0  
Size: 3774(0xebe) bytes  
File: C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_32\\mscorlib\\v4.0_4.0.0.0__
b77a5c561934e089\\mscorlib.dll  
String: at  
iAnywhere.Data.SQLAnywhere.PInvokeMethods.AsaConnection_CloseDataReaders(Int3
2 idConn)  
at iAnywhere.Data.SQLAnywhere.SAInternalConnection.ReturnToPool()  
at
iAnywhere.Data.SQLAnywhere.SAConnectionPool.ReturnConnection(SAInternalConnec
tion connection)  
at
iAnywhere.Data.SQLAnywhere.SAConnectionPoolManager.ReturnConnection(SAInterna
lConnection connection)  
at iAnywhere.Data.SQLAnywhere.SAConnection.Dispose(Boolean disposing)  
at iAnywhere.Data.SQLAnywhere.SAConnection.Close()  
at DBBaseMethods.CloseConnection()  
at Controls.BasePage.BasePage_Unload(Object sender, EventArgs e)  
at System.Web.UI.Control.OnUnload(EventArgs e)  
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)  
at System.Web.UI.Page.UnloadRecursive(Boolean dispose)  
at System.Web.UI.Page.ProcessRequestCleanup()  
at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  
at System.Web.UI.Page.ProcessRequest()  
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)  
at System.Web.UI.Page.ProcessRequest(HttpContext context)  
at ASP.inside_files_tpvcapd_casco_bta_aspx.ProcessRequest(HttpContext
context)  
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplicatio
n.IExecutionStep.Execute()  
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)  
at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception
error)  
at
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(H
ttpContext context, AsyncCallback cb, Object extraData)  
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)  
at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)  
at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32
iWRType)  

Can something be fixed here or should i provide some more information?

Accepted Solutions (1)

Accepted Solutions (1)

jeff_albion
Product and Topic Expert
Product and Topic Expert

Update: Thu Oct 27 - There has been an additional fix for this issue made in CR #690295, in builds 10.0.1.4297, 11.0.1.2709, 12.0.0.2759, 12.0.1.3499 and up.


This issue has been resolved in CR #687578, in builds 10.0.1.4279, 11.0.1.2685, 12.0.0.2742, 12.0.1.3466 and up.

There are no known workarounds for this issue.

0 Kudos

Thank You, we'll try it next week in production system (if it becomes available in downloads.sybase.com till then).

It seems that the problem has gone after installation of 12.0.1.3505. Thank you for the fix.

Answers (3)

Answers (3)

Former Member

I think it is likely that the tools team will require more information to make any headway. If the problem is reproducible, I'll ask you to open a case with technical support to convey all of the details, including possibly components of your application.

0 Kudos

The biggest problem is namely that we can't reproduce the problem. We tried to reproduce the load in test system but no stops occured. It happens only in production system. We even have changed working with connections in the way that every connection is now opened and closed right before and after each transaction (not on the page unload). Still no positive influence.

0 Kudos

By the way, I have opened a case a few months ago (case id: 11670293) - the same problem was with SA11 client. But I did not get any useful response except that the response is not guaranteed. :) Maybe I could send mini dump files somewhere?

0 Kudos

We've tried to drop conn.Dispose() from our code (it was after conn.Close()) but this seems to have no influence. Errors in windows log remain the same.

0 Kudos

This is a record from windows log on the last crash:

Event Type: Error
Event Source:   ASP.NET 4.0.30319.0
Event Category: None
Event ID:   1325
Date:       2011.08.08
Time:       11:22:41
User:       N/A
Computer:   A-51VCD8TNO6CCA
Description:
An unhandled exception occurred and the process was terminated.

Application ID: DefaultDomain

Process ID: 1608

Exception: System.AccessViolationException

Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

StackTrace: at iAnywhere.Data.SQLAnywhere.PInvokeMethods.AsaConnection_CloseDataReaders(Int32 idConn) at iAnywhere.Data.SQLAnywhere.SAInternalConnection.ReturnToPool() at iAnywhere.Data.SQLAnywhere.SAConnectionPool.ReturnConnection(SAInternalConnection connection) at iAnywhere.Data.SQLAnywhere.SAConnectionPoolManager.ReturnConnection(SAInternalConnection connection) at iAnywhere.Data.SQLAnywhere.SAConnection.Dispose(Boolean disposing) at iAnywhere.Data.SQLAnywhere.SAConnection.Close() at DBBaseMethods.ExecuteScalar(String SQLStatement, ArrayList Parameters) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webprojectsDBUtilDBUtil.cs:line 932 at PremiumCalculatorXML.CalculationParameter.parametras_subjekto_miestas(Int32 aiSubjektoId) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webPremiumCalculateCalculationParameter.cs:line 863 at PremiumCalculatorXML.CalculationParameter.Tarif_parameter_DRAUDEJO_MIESTAS() in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webPremiumCalculateCalculationParameter.cs:line 475 at PremiumCalculatorXML.CalculationParameter.GetParametersValue(String _ls_Parameter, Parameter& _tp) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webPremiumCalculateCalculationParameter.cs:line 90 at PremiumCalculatorXML.CalculationParameter.FormParametersForPremiumCalculation(InsObjRisk IORisk, InsuredObject IObject, String LineCode) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webPremiumCalculateCalculationParameter.cs:line 47 at PremiumCalculatorXML.CalculatePremium.CalculatePremiumObject(Policy& policy) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webPremiumCalculateCalculatePremium.cs:line 124 at PremiumCalculatorXML.CalculatePremium.CalculatePremiums(Policy& policy, String TiesinisTarifikavimas) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webPremiumCalculateCalculatePremium.cs:line 58 at ECADraud.ECA_Base.paskaiciuoti_imokas_object_db() in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webprojectsECAECADraud.cs:line 8434 at ECADraud.ECA_Base.paskaiciuoti_imokas() in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webprojectsECAECADraud.cs:line 8189 at TPVCAPD_Polices.TPVCAPD_CASCO_BTA.paskaiciuoti_imokas() in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webTPVCAPD_PolicesTPVCAPD_CASCO_BTA.cs:line 196 at ECADraud.ECA_Base.btnSkaiciuotiImoka_Click(Object sender, EventArgs e) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webprojectsECAECADraud.cs:line 12243 at ECADraud.ECA_PAP.btnSkaiciuotiImoka_Click(Object sender, EventArgs e) in C:Inetpubwwwrootsaikas_web_etalonas_btasaikas_webprojectsECAECA_PAP.cs:line 428 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.inside_files_tpvcapd_casco_bta_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

The result is the same even though connection handling was modified (as I mentioned in comments above).