Вопрос

First of all, I'd like to say upfront that some of the details on this question may be a little vague as it relates to commercial code that I obviously cannot divulge here. But anyway, here goes.

I am currently dealing with a .Net based web application that also has pages of classic ASP in certain areas - this application has a backend MSSQL database. The data access for the classic ASP areas of the application are handled by a 32 bit DLL added into Component Services on the IIS server. The application has recently been changed so all components (IIS authentication, .Net Application Pool and a data access DLL added to Component Services) now run under a single Windows account.

The problem I have found recently is that whilst .Net data access to the database is running at a perfectly normal speed, the classic ASP data access that goes via the COM+ component is extremely slow. Unfortunately, this doesn't seem to be throwing any errors anywhere, not in IIS logs and not in Event Viewer.

The COM+ component is instantiated in a standard fashion and this is done in an include file that is referenced on any ASP page needing data access, eg.

var objDataProvider = Server.CreateObject("DataAccess.DataProvider");

The ASP pages then use methods in the COM+ to execute queries such as;

objDataProvider.Query(...)
objDataProvider.Exec(...)

I have enabled failed request tracing in IIS for any ASP pages that are taking longer than 20s to process and can see that the majority of the calls are dealing with record sets as seen in the examples below.

if(rsri.EOF)

and

theReturn = rsData(0);

The two examples above both take over 9s to run. Profiling the SQL that runs in the background shows this runs in a matter of milliseconds which suggests the problem lies with the COM+ returning the data back to the ASP OR the ASP being slow to process it.

  • Windows Server 2008 R2 SP1 (64 bit)
  • Intel Xeon CPU
  • 2GB RAM

Has anyone experienced a similar situation to this before or able to point me in the direction of any further diagnostics that might help?

Это было полезно?

Решение

After days of messing around with this, I've finally found the answer and it's the simplest of issues solved by going back to basics.

The web server hosting the application was in a DMZ and required a hosts file entry for the SQL server. Once this was added, the application was flying along again.

Другие советы

You'll have to go deeper by yourself. I had used before Ants Performance Profiler to improve the performance of .Net applications. It seems it can profile COM+ as well.

http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/walkthrough

This or some other similar profiling tool is the only option I see to solve your problems.

I'm on the same issue. I have migrated a iis server from W2003-SQL express 2005 to W2012R2-SQL Server 2014 express and the asp scripts are 2 times slower. The sql querys inside are executed with the same or better speed and I test the server locally to discard internet bandwith problems. And I think it may be a dns issue.

What change had you done in hosts file? and, What sql string connection or connection type had you used? Thanks

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top