Service unavailable IIS application pool service stopped. How can this problem be solved?

Source: Internet
Author: User

Today, the server site displays the service unavailable, and the server cannot be restarted. The application pool can be started but cannot be used. It is very strange that many methods are found online, and they are ineffective. In the end, you only need to check the "Event Viewer" and find that "all ISAPI filters of the SITE/service cannot be loaded". Finally, find the filter problem and reinstall the component. Then, OK, the first step is to find out and solve the problem. Otherwise, it will be half the effort.

The solution is as follows:

 

I. 2003 applicationsProgramThe pool is automatically dead and cannot be recovered. The common methods for service unavailable are as follows.

1: This iis6.0 will be suspended when the SP1 Patch Is Not Installed, but now Microsoft has released a patch in the automatic update. Generally, this problem will not occur after you finish the latest patch. (So the current IIS false death is not very closely related to this)

2: Since iis6.0, CPU resources are limited in the application pool, unlike the previous iis.5. The reason for the suspended pool is that the pool is pulled to death. When the website cannot be opened, you can see that one of your application pools is disabled and a Red Cross is displayed on it. Right-click the website and the website will be automatically restored. This is probably because of the following factors.

(1): You have limited the resources of the application pool. The limit is too small, for example, 50 or less. In this case, if the website under your pool occupies too much CPU, for example, if it exceeds 50%, it will automatically die in five minutes. By default, the application pool created manually exceeds the resource limit and will not be operated.
Solution to the above problem: 1: No CPU resources are restricted (this is not desirable, there is no limit on resources, some programs have bugs occupying resources, the server will be killed, and you may not be able to operate the server .) 2: If you choose to disable the service when the resource is exceeded, the service will fail 5 times by default and be restored within 90 seconds. Generally, the service will be available by default. The website can be automatically restored. If the website is not permanently closed, it means that the resource is closed more than once, and the pool is automatically restored within a certain period of time. No operation means no recovery. This is a misunderstanding of many people.

(2): The memory is limited to the virtual memory and the maximum memory limit on the iis6.0 application pool. If this is set. If the website traffic is too large, it will also be suspended. Therefore, we do not recommend that you set it here. By default.

3: the memory of the server itself is too small. Of course, the website needs to use the memory. When the memory is insufficient, the application pool will also die and become disabled. The application pool can be restored only when all the memory is released. In this case, you need to consider adding memory or checking which program occupies the memory. For example, the MSSQL database is a large memory user. It is best not to use the same server as the web server. Many people use 1g memory as the 2003 system, and the 2003net structure occupies a lot of memory. Therefore, to select 2003 for the server, they have to add the memory to 2G or higher. The memory is not enough as mentioned in the previous two points, and it cannot be operated or automatically restored.

4: The ACCESS database is too large or there are too many queries, this will also lead to the failure of IIS, solution; repair the ACCESS database, or use the ACCESS database as little as possible, upgrade to the sqlserver database; or in terms of technology innovation, such as some website Systems, news, mobile and other CMS, pjblog, zblog and other blog programs, all support generating static functions.

5. Use different application pools for different websites: depending on your actual situation, it is best to separate an application pool with a large site. If the resource limit exceeds automatic recovery, see the preceding figure (1) as mentioned, this will not affect other sites. Medium-sized site: multiple websites share one application pool. For example, five sites use one pool and set their resource time. In this way, even if they exceed resources, they will not affect the websites of other application pools.

6: Set the recycle time: Many people think that the shorter the recycle pool is, the better it is. In fact, the memory is recycled every time it is recycled, but the load on the server is increased, when the server is busy, other application pools may die. We recommend that you set 1000 in total. Other independent pools can be set to 600 based on their website traffic. We do not recommend that you set too short for sharing.

7: the website background may not be too long before it will automatically exit and re-log in again: in this case, you set the recovery time to be too short. Set it. Do not set 20 or 30 points. This is not good. Another reason is that it is related to the response setting time of the site, and the setting takes a little longer.

8: "Service unavailable" is displayed when IIS6 of Windows 2003 accesses the site of the local machine ";
View the application pool of IIS. The status prompt is: no error is specified, and the application pool stops running automatically;

Use Event Viewer to view system error logs and find the following prompt:
-----------------------------------
Application-the COM server application (CLSID is
{A9E69610-B80D-11D0-B9B9-00A0C922E750}
The Local activation permission for grant the user nt authority \ Network Service Sid (S-1-5-20 ). You can use the component service management tool to modify this security permission.

Solution: add the permission to access the IIS service to the network service. The specific method is as follows:

Click "start"-"Control Panel"-"Administrative Tools"-"component service"-"computer"-"My Computer"-"DCOM,
Select "IIS Admin Service" under it, right-click "properties", find "security", and edit "Custom" in "Start and activate Permissions ", add the "Network Service" account and grant the "local start" and "Local activation" permissions to this account. After IIS is restarted and then accessed to the same site, everything is normal.

9: restart specific application pool commands and automatic restart methods in IIS

If the operating system is Windows Server 2003 SP1 +, run the following command to restart the IIS application pool:

Cscript.exe c: \ windows \ system32 \ iisapp. vbs/a "defaultapppool"

/A indicates Alternatively, and "defaultapppool" indicates the Instance name of the application pool. If you want to set Automatic Restart of this application pool, you can try to put it in batch processing and use a scheduled task to call this batch processing. Many people think that scheduled tasks are not safe and should be banned. In fact, the anxiety of scheduled tasks is based on the premise that they are insecure in other aspects. If they are insecure in other aspects, it is put into the execution program and the scheduled task is executed, which has no direct relationship with the scheduled task. Of course, turning it off will reduce some security risks, which is good.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.