Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I prevent IIS from compiling website?

I have an ASP .NET web application which on the backend is talking to an ASMX web service. We have counted and the average wait time for the initial request is 20s. I am wondering if there is a way I can send the web service up to the server precompiled, thus negating the need for compilation.

We have also noticed that IIS tends to recycle its worker threads and this also causes a compilation. The process itself is not accessed terribly often, but it needs to be much quicker when it is.

Any thoughts?

Thanks in advance

Update: thanks to all the suggestions, I have tried a number of them and here is what I have found. Recycle time shutdown/tinkering is dangerous cause I dont want threads to just sit around doing nothing. Upon further inspection the site is going up precompiled, so my question is why is there an initial spin up time for a web service?

Right now: Leaning towards the warmup script suggestion below

Update: The service is being hit from a web server on a different machine. We are seeing problems with the initial request only.

like image 687
xximjasonxx Avatar asked Mar 01 '10 21:03

xximjasonxx


People also ask

Does ASPX need to be compiled?

aspx. cs file) must first be compiled. This compilation can happen explicitly or automatically. If the compilation happens explicitly then the entire application's source code is compiled into one or more assemblies ( .

Does pages compile in server?

Yes the code behind compiles on server with the first call and product dlls. In server, pages will compile or execute? After the pages have been compiled on dlls, on every call the system use the dll + aspx to create the page. You can call it execution, maybe not of the page but of the pool.

Why is IIS so slow?

Causes of IIS website slow to load issue This can be due to faulty website code, resource crunch on the server, bad server settings, etc. Many times, the end result that we see as slowness will be a combination of many factors.


1 Answers

One alternative approach is to write a "warm-up script" which simply executes one page from your app. This will make the server spin-up for you and the next person will get a fast hit. You could also set a scheduled process to run that script occasionally (like, if you schedule the thread pool to recycle at 4 am, schedule the warm-up script to run at 4:01 am)

like image 78
tgolisch Avatar answered Oct 17 '22 00:10

tgolisch