iis7 application pool hanging - iis-7

I have a .net 4.0 website that was running on physical Windows server 2003 boxes on IIS6 32bit just fine. We have migrated to new virtual servers running Windows Server 2008 32 bit with IIS7. The application pool is running in classic mode.
Since the move, I at random get a situation where the application hangs. The request queue rockets and then I get 503 errors. If the application pool is recycled, then the error goes away till the next time it occurs.
There are no entries in the event logs relating to it except that it notes when the application pool took to long to shut down during the recycle process. I have reporting in my .net application that logs to a DB and sends me errors but it sends me nothing when this application is hanging.
What tools can I use to diagnose the problem and figure out what is causing it?

In opinion, whatever the structure of application is, if you're pretty sure that there is no bug, changing sort of properties on the application pool might solve the problem.
First on the 'Advanced Settings...' menu of the application pool change the 'Enable 32-Bit Applications' to the relevant value. If the platform used for building application is x86 then the value should be 'True'.
Second if your application demands to access disk resources, also you should the relevant security context for running the application pool in the 'Identity' property. The identity should access all the directories that your application wants to change or list.
After doing all the things, in case the problem existed, you should let me know about the platform of your application. Is it .NET or ISAPI?
Cheers

Related

Why asp web site on IIs10 hangs after migration?

I have an asp website with framework.net 4. I change the server to 2019 with IIs 10. after migration my web site hangs. my application pool is classic. I check the network but I can not find the reason. I have virtual network for server.
What is the problem? How can I check the truble?
Open the EventView on server and see what are the asp.net errors there.
Usually when you setup a new server, and you have a new pool, the settings on the pool is to stay down if too many errors appears, and if for example can connect to the database, it may stay down...
So find your error on event viewer, then check the settings of you pool to see if have set to stay down after some errors.

IIS application pool crashes several times a day

I have an application that has a application pool that shuts down a couple of times a day and I can't figure out why. the website is hosted on a VM with SQL Server R2. the version of IIS is 7 and the website has a dedicated application pool using .NET framework v4.0.30319.
At the application level the website is using a target framework of 4.5 and seems to run just fine for a 24-48 hour period and then for some reason the application pool just stops. We do have other .NET 4.5 applications running on this machine and their application pools do not have this problem. The only thing slightly different about this application is that we initiate a separate thread to send a order confirmation email when an order is completed. We average about a couple of hundred orders a day for this website.
According to the event log the error reported prior to the shutdown is
"A process serving application pool 'RetailSupport' suffered a fatal communication error with the Windows Process Activation Service"
Please help
I would check, if your code could hit under some circumstances an endless loop or a recursive
call of methods. This is often the reason for this error.
What always helps me in such cases is to add debug logs (e.g. log4net) in your case especially before the email is sent, status info about resources, etc. They can be more informative then the IIS logs.
If this does not help, check http://support.microsoft.com/kb/919789/en how to use the debug Diagnostic tool, to get more details for the error.
Look also for IIS: Web Application hangs periodically needs system reboot it could help you.
Also: what recycle strategy on IIS do you have?

IIS 7.5 32-bit app pool starts as 64-bit

I have a curious problem.
A 64-bit Windows 7 Pro box has IIS 7.5/64 installed. An application pool has been configured to enable 32-bit applications, and a site has been created using this application pool. However, when the worker process for the site starts, it is always started as a 64-bit process. The "bitness" of the app pool is evidenced in Task Manager, which has no "*32" tag with the w3wp.exe process name.
I've tried deleting and recreating the application pool, creating a new application pool, and re-registering the 32-bit framework, restarting IIS each time, all to no avail. I'm sure I'm overlooking something trivial, in "forest for the trees" mode, so a push in the right direction to clear up the fog would be appreciated.
I've read through several posts on issues like this, but most center on ensuring the app pool is configured to "Enable 32-bit apps," which was one of the first steps taken.
Have you set
enable32BitAppOnWin64
to true?
This is exposed as a property on the ApplicationPool class that can be set programmatically: ApplicationPool.Enable32BitAppOnWin64.
Also, here is a SO question about setting the property on IIS 7 (not sure if you are on Azure or not, but I believe the idea shold be transferrable to a non-Azure environment).
How to change property Enable32BitAppOnWin64 of Application Pool on IIS 7 on Windows Azure?
Finally, you could set it up in your Application Pool Defaults: http://www.iis.net/configreference/system.applicationhost/applicationpools/applicationpooldefaults
Well, after a couple of days of head scratching, I finally solved this problem.
After verifying through the IIS management tool that each application pool on the box had "Enable 32-bit Applications" explicitly set to True, I went into the machine's applicationHost.config, and those same pools had this property set to False. I manually edited these entries to True, restarted IIS, then re-registered the 32-bit version of ASP.NET, and the machine now operates properly.
Thanks for the suggestions. I'm not entirely why the IIS admin tool was essentially lying to me about the Enable 32 bit app setting, but oh, well... :)

IIS 6.1 Server 2003 Web Apps Don't Startup on Reboot Sometimes

Occasionally when I reboot one of the servers at a client site the Web Apps running in IIS do not automatically start backup when the server is done rebooting. The IIS service starts up just fine, its set to Auto Start and there are no errors in the event log. Just none of the Web Apps are running, I have to click each one and click start. This only happens occasionally, as they usually start but its completely baffling.
Any thoughts? Its a mix of Classic ASP and ASP.NET applications. There are a total of 4 application pools running between around 8 web applications.
I have seen this happen when apps rely on a resource that is not yet available to the server, such as a network share.
Some people combat this problem by writing a Windows Service who's job is to check for such conditions and start the application.

Application Pools not starting after iisreset

Before I start, I know using iisreset is considered bad practice, but this shouldn't happen anyway..
What we have:
Several machines with IIS6 on Windows Server 2003 R2 (both 64 and 32 bits)
Several WCF webservices (.NET runtime 2.0) deployed in several applications, each with it's own application pool, each application pool running under an other windows account.
What happens:
All appPools are started, all services operational
IISReset is executed (or the machine is rebooted)
IIS comes back up, but not all application pools start properly. Sometimes they all come back up, sometimes one or more pools won't start. They can be started manually however.
Is this "normal" iis behavior and should I just avoid using iisreset, or are we doing something wrong in our .NET code?
The application pools should restart on an iisreset, but they do run outside of iis (in COM+) for reliability. This mean they may may not come back if the application is misbehaving, but IIS and the other apps will(should) come back. So yes, This is "normal".
P.S.
I would also like to "OUT" myself as a proud user of iisreset. Bad practice? Bah! ;D
IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When you say "not started", does it mean you attempt to access some WCF web services (after iisreset), and you get a Service Unavailable error because the appPool cannot be started? Do you see any IIS W3SVC related entries in the Event logs?
If there are, they may be able to clue you in why they cannot start; post them up here.
Reason:
IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When it says "not started" it mean you attempt to access some WCF web services (after iisreset) failed due to object was holding some space in memory, and you get a Service Unavailable error because the appPool cannot be started.
Workaround:
Create Batch file with following commands & schedule it.
net stop 23svc
net stop msftpsvc
net stop smtpsvc
net stop PleskControlPanel
net stop HTTPFilter
iisreset /restart
net start w3svc
net start msftpsvc
net start smtpsvc
net start PleskControlPanel
net Start HTTPFilter
Had similiar issue - after IIS has been restarted, DefaultAppPool was stopped.
In application event logs found an error:
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, or that your network is functioning correctly. If this problem persists, contact your network administrator.
DETAIL - Access is denied.
Fixed by setting in DefaultAppPool Advanced Settings option Load User Profile to False.
Hope it could be usefull.
In a prior support role, I managed several IIS servers running all kinds of .NET mess. When an AppPool failed to start, it was usually a bad login credential.
Re-setting the identity (auth credentials) via advanced settings of the Application pool worked for me.
Earlier I changed my active directory password and as the app pool was already running, it worked fine until I performed IISRESET.

Resources