-2

I am experiencing a strange issue when publishing an ASP MVC application to Windows Server 2012.

The app is fairly simple, and on most of the pages visited it will query an Access database which is hosted on the server.

I noticed that the queries are quite slow (often taking between 7-10 seconds to complete), as shown when running the app with MiniProfiler.

As a simple test, I decided to host the app on my Windows 10 laptop to see if there was a difference, and it is much faster (Most queries are under 200ms).

This is what I tried so far:

  • Match advanced Application Pool settings
  • Match Firewall settings
  • Enabled link local multicast name resolution (LLMNR)
  • Confirmed that ODBC tracing is disabled (32 and 64)
  • Moved the Access Backoffice.mdb file to the server's C drive (same as on the laptop)
  • Made sure web.config match (apart from connectionString Data Source)
  • Added C:\inetpub\wwwroot\website and C:\Test\Database to antivirus scan exclusions
  • Increased the MaxBufferSize key value from 0 in Access Connectivity Engine in the registry

Does anyone know of a way that I can try debugging this issue, or any possible solutions?

notes

Both my laptop and the server are on the same network while testing this, and I am accessing the app from an ipad.

I am also experiencing the same slowness when using the application from a browser on the server itself (url = 10.0.0.1 or localhost)

When I execute the exact same query code from a console app on the server, it runs a lot faster (on par with the laptop). I am only experiencing this issue via the asp app.

Laptop Details:

  • Processor : Intel Core i7-6700HQ CPU @ 2.60GHz
  • RAM : 16.0 GB
  • OS : Windows 10 x64

Server Details

  • Processor : Intel Xeon CPU E5-2603 v4 @ 1.70GHz (2 processors)
  • RAM : 32.0 GB
  • OS : Windows Server 2012 x64

Connection String

I have tried the following:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=W:\My Backoffice.mdb
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Test\My Backoffice.mdb
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\ServerName\W\My Backoffice.mdb
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\ServerName\C\Test\My Backoffice.mdb

With both 16.0 and 12.0 as the ACE.OLEDB version, where W is a Local server drive which is used as a network share acrcoss the domain. All of these gave the same result.

Bassie
  • 193
  • 2
  • 11
  • 2
    Does the server host other services? What are the resource usage stats like on the server? – Cory Knutson Jun 09 '17 at 20:11
  • @CoryKnutson IIS is not hosting any other sites or services, is that what you mean? Looking in Task Manager, Memory~=20%, CPU ~=4%, let me know if I can get any other details which might help, I really dont know where to start with this – Bassie Jun 09 '17 at 20:27
  • 1
    SSD in the Notebook? 10 year newer CPU? – eckes Jun 09 '17 at 20:30
  • 1
    Do you mean 127.0.0.1 for "on itself"? – eckes Jun 09 '17 at 20:31
  • 1
    I meant are you running other services such as DNS, File services, etc. on that server. By those resource stats, it looks calm enough. Only other resource concern would be disk, but that is much harder to get a valid stats for. – Cory Knutson Jun 09 '17 at 20:31
  • @eckes The laptop does have an SSD, but when running the same queries locally from a console app on the server, the execution time is similar to the laptop so I assumed this is not the cause. laptop is an `i7`, server is `Xeon 1.7ghz`. Both `127.0.0.1` and `10.0.0.1` give the same result – Bassie Jun 09 '17 at 20:36
  • @CoryKnutson I am not sure about those other services, is this something to check in Services.msc? Should I disable 1 by 1 and see what happens? The server is mainly used to run an access back office, and contains a shared network drive, both of which are used by no more than ~20 people at any given time. – Bassie Jun 09 '17 at 20:38

1 Answers1

1

If your laptop has an SSD, that would explain it it me. SSDs have 10 times the IOPS performance of spindle drives. It may be worth looking at your MVC coding and see if the programming has some processing or code iterations that may be slowing down the web application.

Cory Knutson
  • 1,866
  • 12
  • 20
  • Thanks for your answer Cory. The latptop does have an SSD, but running the same query from a console app on the server is a lot faster than via the MVC application, does this not suggest that the hard drive is not the issue, as it is making the same call either way? – Bassie Jun 09 '17 at 20:48
  • Yes and no. It may be using the exact same SQL query, but ASP MVC code can add complexity to it that may not be apparent on your laptop. If your laptop is an i7, it probably has a higher clock rate than your server at 1.7 Ghz. You could edit your question to include Make/Model of the server, and possibly the model of the proc in both as well. – Cory Knutson Jun 09 '17 at 21:14
  • Many thanks for all your help Cory. I am not sure how I would test your theory on ASP adding this complexity - I get the feeling this is a networking or security (perhaps caused by AV) issue, but you may be right. I added the computer details to my question in the hopes that someone may be able to shed some light – Bassie Jun 09 '17 at 21:36