Volatile Behavior Preload ()

I have a WCF application hosted on Windows Azure. It has IIS v8.0

I used the IProcessHostPreloadClient's Preload() method to warm up the application

Now I have two questions:

1) whenever my application pool is processed, the Preload() function is called twice. I have some static variables that are initialized in the Preload() method, which will be saved in my workflow (w3wp.exe) .

What I saw is interesting:

My current workflow ID ( w3wp.exe 1234 , say)

when reused, preload is called twice:

1st time: in w3wp.exe, which has Process ID : 5678 , say (new workflow)

2nd Time: in w3wp.exe, which has Process ID: 1234 (same as output)

Now I have configured my application pool so that there is only one instance of w3wp.exe. Therefore, after reprocessing, there is w3wp.exe that exists, this is the process identifier: 5678.

My question is why the dying w3wp.exe with process id: 1234 preloaded

Between them there is a gap of 3ms.

EDIT I just found out that this is exactly what happens due to the utilization of the pool application, the old w3wp.exe terminates and the new w3wp.exe starts. What causes the preload call twice:

1) new process w3wp.exe - calls preload () to call a new process (process ID: 5678 in our example)

2) the old w3wp.exe process (process ID: 1234): its application domain is restarted before it is destroyed. Therefore, when the application domain restarts, preload () is called

Now, my question is why the last app domain w3wp.exe was restarted. He was going to die anyway in the next 3 ms (as mentioned above)

2) I started the service and I did some testing. Meanwhile, for some time, the workflow did not serve any requests. But my w3wp.exe has a thread that runs continuously.

After some time, we observed that the existing instance of w3wp.exe (process identifier 1234, say) ended abruptly and preload () was called in the same process ( w3wp.exe with process identifier 1234)

I guess for some reason the preload was called again. I used to think that preload will be called only when a new w3wp.exe is created (in turn, this means that the application pool has processed)

This behavior has been observed twice. Can someone tell me something about this?

EDIT

Answer: Partial: due to restarting the application. I still don’t know why the domain application was restarted

+2
c # iis-8 azure preload application-pool
Jan 09 '15 at 11:29
source share

No one has answered this question yet.

See similar questions:

69
What makes the application pool in IIS recycle?
0
IIS preload function runs twice

or similar:

238
The "ExtensionlessUrlHandler-Integrated-4.0" handler has a bad "ManagedPipelineHandler" module in its list of modules
29th
IIS Application Pools - Stop / Start vs Recycle
10
How to force restart the IIS application pool when rebooting the application domain?
9
IIS Auto-Start Does Not Disable Standby Timeout
3
Reuse of application pool after "Fixed number of requests"
one
Trying to find out why (or whether) the application pool is being processed in IIS 8.5 / Windows 2012 R2
0
IIS Recycling
0
IIS application pool configuration questions
0
After reusing IIS global.asax is not called
0
IIS application pool recycles every 20 minutes despite configuration



All Articles