Blazor Server Side - IIS - App becomes slow until it will not be responsive

Arnold Mendoza 11 Reputation points
2022-10-03T10:45:02.63+00:00

Good day everyone

We have developed an local blazor servee application for our company,now when we are testing it on our staging server, sometimes too much request will make the application slow, until it will be unresponsive, and this will reflect to all users who is using the app, this will be fix if we start and stop the app in IIS. Take note there are only 10 people who is testing the app.

Stoping and starting is not good solution as we have tl wait until someone have to report it, does anyone know how to fix this kind of problem? Here's the detail of our app.

Type of Blazor: Blazor Server Side
.Net version: .Net 6
Windows Server Version: Windows Server 2019 (I correct this)
IIS Version: IIS 8.5

I'm getting stuck and some other people told me to remodel the app to WebAssembly, but it will take time and we can't afford to remodel it.

Is there a possible way to fix this?

Thanks everyone

Windows development | Internet Information Services
Developer technologies | .NET | Blazor
Windows for business | Windows Server | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2022-10-03T16:10:03.95+00:00

    a blazer server app has a dedicated thread, network connection and state memory for each connected client. how many clients it will supports depends on server resources

    1) network - how chatty is the app.
    2) memory - how much state information each client requires
    3) cpu - how compute intensive is the app

    you would use the system performance tools to determine which of these three resources you are maxing out. with just 10 clients, I'd expect memory or cpu first. run just 5 clients and check cpu and memory. if you want to support 20 clients, the cpu and memory should be under 16% used.

    also there is no windows server 2010 (IIS 8.5 is typically 2012 r2) hopefully you are not trying to use windows 10. also windows server 2012 r2 supports ends next year.


  2. Limitless Technology 39,926 Reputation points
    2022-10-04T07:41:41.143+00:00

    Hi,

    Thank you for posting your query.

    Kindly follow the steps provided below to resolve your issue.

    Blazor uses web assembly, on paper web assembly should be faster than any JS library, however not all browsers have a mature web assembly parser yet. So, you might find that browsers will not run web assembly in an optimal speed as of now.

    You can create a small Blazor app and run it in Firefox, chrome or edge. In most cases Firefox runs Blazor apps much faster than chrome or edge, which implies that browser makers still need to improve, even Firefox can improve.

    If your app needs to access DOM frequently, then definitely web assembly / Blazor will be slower compared to any JS libraries since web assembly can't directly access DOM without using Invokes.

    Go to this link for your reference https://blazor-tutorial.net/knowledge-base/50422396/blazor-performance

    Note: This is non-Microsoft website kindly take precaution before downloading anything.

    ------------------------------------------------------------------------------------------------------------------------------------------------

    If the answer is helpful kindly click "Accept as Answer" and upvote it. Thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.