I am running a windows 2003 server with close to 150 websites. The majority of the sites, which are all running the same very complex classic ASP portal application using ASPImage/ASPMail/ASPUpload, are receiving the vast majority of the traffic and all are working fine. However all of my smaller websites that do not use this application or any of those 3rd party COM DLL's, and only get a tiny bit of traffic across just a few simple ASP scripts, all fall into a state of perpetual 500.13 errors after about an hour. I have had to put IISRESET onto an hourly scheduled task to keep them from being down too much, but this adversely affects all my users because they're getting Service Unavailable errors ever hour. The main clue I've found so far is that the Application log is completely full of Event 4689 errors that are happening at a rate of sometimes several per second. The text of this eventlog entry is always the same:
I've been scouring the web for weeks and the only solution I found so far was to completely uninstall/reinstall IIS and DCOM, and I'm not really convinced that this step would solve the problem as both of my webservers do the same thing.
One other thing that seems like it's probably relevant (but may not be at all), is the way in which I set up my websites. I use an ASP script to build or rebuild my websites in IIS. It's based on code put out by microsoft in their IIS admin scripts, I just simplified it into functions that I could call from within my scripts. Originally it was built to work with Windows 2000 Server so it would just set the app to isolated on each site and that worked great, and I never had any 500.13 erros. For Win2003 I modified the script so that it creates an app pool for each website as it builds or rebuilds the website. If the app pool already exists, it seems to still work fine: either because another duplicate pool is not created, or because the first one is deleted when the script deletes the existing website before replacing it (I'm not sure which). HOWEVER in my Component Services control panel, I see that duplicate COM+ applications are being added with each successive rebuild of each site. Again I'm not sure if this really SHOULD affect anything, and I didnt even add the part of the script that created separate app pools until AFTER this problem started happening and I wanted to isolate out the sites causing the problem.
Code:
The run-time environment has detected an inconsistency in its internal state. This indicates a potential instability in the process that could be caused by the custom components running in the COM+ application, the components they make use of, or other factors. Error in d:\nt\com\complus\src\comsvcs\threads\stathread.cpp(285), hr = 8007000e: CSTAThread: CoGetApartmentID failed
One other thing that seems like it's probably relevant (but may not be at all), is the way in which I set up my websites. I use an ASP script to build or rebuild my websites in IIS. It's based on code put out by microsoft in their IIS admin scripts, I just simplified it into functions that I could call from within my scripts. Originally it was built to work with Windows 2000 Server so it would just set the app to isolated on each site and that worked great, and I never had any 500.13 erros. For Win2003 I modified the script so that it creates an app pool for each website as it builds or rebuilds the website. If the app pool already exists, it seems to still work fine: either because another duplicate pool is not created, or because the first one is deleted when the script deletes the existing website before replacing it (I'm not sure which). HOWEVER in my Component Services control panel, I see that duplicate COM+ applications are being added with each successive rebuild of each site. Again I'm not sure if this really SHOULD affect anything, and I didnt even add the part of the script that created separate app pools until AFTER this problem started happening and I wanted to isolate out the sites causing the problem.
Comment