250 concurrent users causes An existing connection was forcibly closed by the remote host for 50% of requests

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi, I have a fresh installation of nopCommerce hosted on Azure App Service.

Azure Web App spec
Production - S1
Database
Standard, DTU 10

I've added ~ 10 ish products and decided to do some load testing on the site.

This is the result from that test run


50% of the requests fail due to An existing connection was forcibly closed by the remote host


Both Azure Web App Service and Database doesn't reach near their max resources reserved.
Database is around 10% DTU and Web App Service 50-60% memory.

I'm worried about these issues when we actually go live next year with 40.000 products and active users.

What could cause this, is it some internal issues/configuration with nopCommerce or is the Web App Service under-dimensioned?

---
I'm gonna install some kind of logger/appinsights in the near days to figure out what actually throws this.

Regards, Haris
5 years ago
Looking forward to your test results!
5 years ago
I've done some further testing with improved results in non-failing requests, altho not approved response results.

Azure Web App spec
Production - S1
Database
Standard, DTU 20

Concurrent payload: 250 users (same as previous test)
Results
  - 0 failing requests of 10.4k
  - 10 second avg response time




Improvments that can be made

  - Use CDN for all static resources, instead of loading from local filesystem
  - Improve server response time, I think the main issue relies within compiling razor views

I've implemented Application Insight to monitor faults/response times and tried out of box miniProfiler.
The miniProfiler actually tells me that database calls are fast, but the request within controller is super-slow.

When Razor views are compiled, I get response time down to 84 M/S, but if clear application cache and browser cache the initial request is around 1-2+ seconds due to compilation.

Initial request of page (browser cache disabled, cleared application cache)


Second request of page (browser cache disabled)



Has anyone done pre-compilation of Razor Views in nopCommerce? I'd appreciate some hint/guiding with it a lot. In return I could give a nice guide on how to deploy to Azure and improve performance, just as I did here.

As database queries are blazing fast (yet), there is no need for cache, is there anything else that could improve initial load (cold load)?
5 years ago
Hi devharis,

I'm currently experiencing the same issue on failing requests.
I'm not sure but did you resolve this by pre-compiling the views?

Thanks!
5 years ago
Hi mate,

Precompiling Razor-view has nothing to do with the large amount of failed request.

I resolved it by a whole lot of steps, some of it involving turning off shadow copying which is a setting in your appsettings.json, deleting .deps files in plugin output folder etc. (Documentation are non-existent regarding this)

However, even tho I resolved it I never got a good response time on first request because of compiling Razor views - around 4 - 10s seconds so I gave up on building our future e-commerce based on nopCommerce. Second request (without caching) is always around 0.1 - 1s because it has compiled the view which is a approved response time.

I have abandoned nopCommerce because the support on forums is close to non-existent. I did as well post a issue on Github regarding Razor views, but still no answer/response regarding precompiling Razor-views.

Regards, Haris
5 years ago
Hi devharis,

Thank you very much. I'll try out what you did here. See how it would work out on our side.

Thanks again!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.