IIS 7 and Above
Big applicationhost.config file and Windows Process Activation Servic...
Last post Mar 31, 2014 04:17 AM by GrZeCh
Mar 29, 2014 07:44 AM|GrZeCh|LINK
today I've tried to upgrade one of my Windows 2008 Web Server R2 hosting www servers to Windows Server 2012 R2. As always system upgrade went fine. Also everytime I have to make some changes to applicationhost.config file from IIS7.5 to make it usable in
IIS 8.5 (after upgrade IIS is starting with clean applicationhost.config file). I've done that before and every time it worked until now. Issue was with starting service "Windows Process Activation Service". It just didn't wanted to start. I've started checking
applicationhost.config files for some errors. If this file has syntax errors then IIS Manager when checking application pools or websites is showing exactly where this issue is (one interesting thing though IIS service has some problems with national characters
used in applicationHost.config file - but this is something to check because this can be caused by file character encryption). After fixing some issues with national characters and removing application warmup old entries I was able to see in IIS Manager all
of my previous application pools and websites all stopped since IIS Service is not starting because of "Windows Process Activation Service" not startig issue.
So I've started with removing ALL entries from <sites> in applicationHost.config file. When I removed them WAS started correctly so I started to add websites which I've previously removed. I've come to interesting thing. In some point WAS was again stopped
to startup correctly. This was very weird because <site> which I've added didn't had anything interesting. Just another website and here we have totally weird situation. I've started changing latest <site> entries in <sites> list and I ended with conclusion
that this is not issue with <site> configuration but with just some kind of limit which I could not understand. I've checked my applicationHost.config file where are all of my websites present and he has 77289 lines. Does someone experienced similar issue?
I had to go back to snapshot created befure upgrading to 2012 but I have some error which WAS was returning "%%2148734210". When entering this error in google I'm getting this page:
but I don't see there any post with this error number or whatever that is.
EDIT: I've tried to use my production system applicationHost.config file on Windows 2012 R2 Standard test box and I was able to reproduce this issue. When I was trying to start WAS with all of websites in <sites> I'm getting error "Windows could not start
the Windows Process Activation Service on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code -2147467259". When I removed all of <site>
entries in <sites> node from some point which I remember that WAS was starting on my production server to the end of <sites> entries (just before <siteDefaults>) I was able to run WAS service.
Errors from event log:
"The Windows Process Activation Service encountered an error trying to read configuration data with AppHostProvider. The error message is: Bad Data. The data field contains the error number."
"The configuration manager for Windows Process Activation Service (WAS) did not initialize. The data field contains the error number."
"Windows Process Activation Service (WAS) is stopping because it encountered an error. The data field contains the error number."
"The Windows Process Activation Service service terminated with the following service-specific error: Unspecified error"
applicationHost.config file with removed part of <site> entries which allows WAS to start has now 56503 lines.
EDIT2: Another example that something must be wrong with number of informations stored in applicationHost.config file. For working scenario I've added next <site> entry which started to make WAS service not to start correctly (the same error). After that
I've removed first <site> entry which is ID=1 Default Web Site (created for default website configuration with IIS). After removing this first website WAS can start correctly again. <site> node for Default Web site does not contain any specific entries. Interesting
part is that WAS allows EXACTLY 100 <site> entries in <sites>. This is veeeery weird and I have no explanation for that. Is there any IIS guru here which can explain this situation? Normally this applicationHost.config file contains entries for almost 2k websites
runned currently under IIS 7.5.
Mar 29, 2014 09:55 AM|GrZeCh|LINK
I've moved forward a little. I've started to look here and there for 100 website limit in IIS and this is what I've found:
Interesting part is that when I change this weblimit number to value for example 2000 WAS service with IIS are starting correctly. So now we have question why mentioned by me issue exists when dynamicRegistrationThreshold has value smaller than website number.
Mar 31, 2014 04:05 AM|Pengzhen Song - MSFT|LINK
As the document said, it has default value 100 for dynamicRegistrationThreshold. In IIS 8.5, when there are a large number of configured sites (100 or greater, by default), the service will not activate any of the sites when the service is started. But
IIS will activate each site as it is accessed the first time with more websites number.
Mar 31, 2014 04:17 AM|GrZeCh|LINK
I understand what it does but if this value is less than sites number no page is able to start and whole IIS is down.