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?

asked 03 Aug '11, 07:41

Arthoor's gravatar image

Arthoor
1.1k264056
accept rate: 0%

edited 03 Aug '11, 08:20

Breck%20Carter's gravatar image

Breck Carter
26.8k420580826

Are there any open data readers before you close the connection?

(03 Aug '11, 12:04) Minghai Chang
Replies hidden

All data readers are closed before closing the connection.

(04 Aug '11, 01:02) Arthoor

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.

permanent link

answered 27 Oct '11, 16:14

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

edited 14 Nov '11, 10:59

Comment Text Removed

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

(28 Oct '11, 00:55) Arthoor
2

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

(19 Dec '11, 02:03) Arthoor

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.

permanent link

answered 07 Aug '11, 10:05

Glenn%20Paulley's gravatar image

Glenn Paulley
10.7k568104
accept rate: 43%

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.

(08 Aug '11, 01:13) Arthoor
Replies hidden

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?

(09 Aug '11, 09:38) Arthoor

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).

permanent link

answered 10 Aug '11, 04:48

Arthoor's gravatar image

Arthoor
1.1k264056
accept rate: 0%

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.

permanent link

answered 26 Aug '11, 01:58

Arthoor's gravatar image

Arthoor
1.1k264056
accept rate: 0%

edited 26 Aug '11, 01:58

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×5

question asked: 03 Aug '11, 07:41

question was seen: 2,980 times

last updated: 19 Dec '11, 02:08