Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

IIS "failed to generate an application pool config file for application pool" "error type is '7'" with start/stop website using Powershell

$
0
0

Hello,

we have a problem in our CI environment that occurs sporadically. The same workflow has a failure rate of about ~20%, and tends to self-resolve at a second run.

The basic workflow is done via Powershell, on lines of

PS> import-module webadministration
PS> # to emulate restart website
PS> start-site -name "somesite"
PS> stop-stie -name "somesite"

When it fails, subsequent pinging will yield

System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at GetResponse(Object , Object[] )
at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, Object[] arguments, MethodInformation methodInformation, Object[] originalArguments)

At the same time, windows event log will record the error of

The Windows Process Activation Service failed to generate an application pool config file for application pool 'somePool'.
The error type is '7'. To resolve this issue, please ensure that the applicationhost.config file is correct and recommit
the last configuration changes made. The data field contains the error number.


In terms of set up, I should mention that we attempt to install multiple sites at the same time, leveraging on a mutex.

$mutex = New-Object System.Threading.Mutex($true, "Global\deploymentmutex")
$mutex.WaitOne(180000)
...
... setting up the specific application pool, website, application ...
... restarting app pool, web site ...
...
$mutex.ReleaseMutex()

Since the specific error in the windows events log seems to point to a config directory access issue (cf. http://technet.microsoft.com/en-us/library/cc734988(v=ws.10).aspx), I wonder if anyone can provide some suggestions on how to improve
a) the mutex
b) the installation work flow in terms of start- / stop-website.

We seem to have particular trouble with powershell, as starting/stopping on the IIS Manager (via the GUI) seems to work fine all the time.

Feedback much appreciated.

Regards,


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>