2

Sometimes my MVC 4 application starts very slowly, but all the following requests come up quickly. It's running on IIS 8 and it uses Forms authentication. The first start-up might take 20 seconds or so. I'm not 100% sure how long does it take to get a slow start-up again, but I guess it's more than an hour.

It's the same issue as described here: MVC slow if site has been idle

So checking out the Application Pool recycling thing, I stopped the application pool, started it again, then browsed to the address, but it still came up quickly. I then ran the Powershell command (Get-Process -Id ).StartTime on the IIS, and it told me that last recycling for this application pool was when I started it. I suppose that exludes the pool recycling?

The project is using Devexpress MVC layout, and I have removed all the assemblies/references that I don't need, but I didn't notice much difference afterwards.

The other applications on this IIS are made with Web forms, and they always come up quickly. The other applications also don't have the Forms authentication.

As a workaround I'm about to make a service that opens the address every 30 minutes or so, but still would be interested to figure out the real cause.

Any ideas?

Community
  • 1
  • 1
punatiainen
  • 147
  • 1
  • 9
  • I suspect this is very localised to your code and dev PC setup. If this can be solved on SO we will probably need a lot more context. – Matt Kocaj Sep 19 '16 at 07:15
  • this issue could be cause by any factor, may be caching static data resolve the concern or code refactoring is required – A.T. Sep 19 '16 at 07:17
  • Session State set to InProc in IIS?, is there any active directory connections(LDAP)? – Henry24 Sep 19 '16 at 17:01
  • @Henry24 I have sessionState mode="InProc" in my webconfig and there are no ldap connections. – punatiainen Sep 21 '16 at 09:09
  • Check also your Idle Time-Out on the app pool, default is 20 minutes, you could try 0 and see if that helps, or you could have a memory leak in the app – Henry24 Sep 21 '16 at 15:13
  • Possible duplicate of [ASP.NET startup Performance profiling web](https://stackoverflow.com/questions/10918631/asp-net-startup-performance-profiling-web) – ivan_pozdeev Nov 24 '18 at 04:58

1 Answers1

0

Its may happen sometimes if configuration is not made properly.

You can use following techniques for improving performance. 1. Enable compression; 2. Optimize caching; 3. Optimize CSS; 4. Optimize HTML; 5. Optimize images; 6. Optimize callback management; 7. Optimize data management.

Please find a link here for more details how can we improve performance of website while using devexpress. Devexpress support describes a lot about each small points regarding performance. https://www.devexpress.com/Support/Center/Question/Details/K18541