Solution to httperr occupying a large amount of system space

Source: Internet
Author: User

C: \ win2003 \ system32 \ logfiles \ httperr folder contains many small files, one of which is exactly kb. The file name is in the format of httperr *****. log.

In IIS 6.0, the logging function has been changed to HTTP. sys, and HTTP. sys runs in kernel mode. This improvement accelerates log writing and prevents multiple working processes from competing to use the same log file. In some special cases, HTTP. sys may encounter an error. At this time, it should but cannot write the log information into the log of the web site. For example, the working process is being recycled and HTTP is forbidden. sys processes user requests, or the user tries to connect to the server, but the request only provides part of the information required by IIS. In this case, HTTP. sys writes the event to a new log file httperr. log.

In the process of troubleshooting and optimizing IIS 6.0, the httperr. log file is very important. By default, the httperr. log file is saved in the \ system32 \ logfiles directory. In httperr. the following information can be found in the log file: All 503 (unavailable Service) errors, idle connection timeout, various errors during URL parsing, And the last 10 submitted to failed applicationsProgramPool request.

IIS 6.0 also has a feature called binary log. After this feature is enabled, IIS 6.0 writes all the log information of the web site to a binary log file, the log file extension is. ibl. To enable the binary log function, set the w3svcc/centralbinaryloggingenabled entry in the configuration file to true (1. This function should be very useful for ISPs. Each ISP machine may have 1000 or more web sites. If each web site generates a log file every day, the total number of log files will soon reach an astronomical number. The log parser 2.0 tool recently released by Microsoft can read binary log files and generate reports. Log parser 2.0 can also read the preceding httperr. Log File and generate a report.

Solution

If you check whether the c: \ windows \ system32 \ logfiles \ httperr *. log file is on the parent sus server, you may see timer_minbytespersecond error or timer_connectionidle error. These are set by default by IIS and are in its metadatabase. They are defined to allow connection interruption before the rate of a small active communication flow and the maximum idle time.

1) Right-click the Internet Information Server (IIS) Manager-level root directory from IIS manager and go to properties. Select the edit metabase to enable. Click OK.
Open the c: \ windows \ system32 \ inetsrv \ metabase. xml file 2 in Notepad ). To search for "minfilebytespersec ". Change the settings used for minfilebytespersec from 240 to 0. Execute another search. The time will be 600 "connectiontimeout ". Save the changes and exit.
3) restart the IISADMIN service to make the change take effect.

1. Disable the IIS httprerr log function

By default, the 2003 Server will write all IIS Access Error records to the log files under C: \ windows \ system32 \ logfiles \ httperr. If the access volume is large, after a period of time, the log file may occupy the space on the drive C, causing the server to crash.

At the same time, because all IIS access records need to be written, if the access traffic is large enough, the server CPU usage will be greatly increased.

How to disable httperr

Enter Regedit to enter Registry Editor
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ HTTP \ Parameters]

Right-click on the right and choose create DWORD Value enableerrorlogging to restart the server.

"Enableerrorlogging" = DWORD: 00000000.

After the restart, 2003 will not be written into the httperr log file. You can see that the server CPU usage is significantly reduced!

2. Modifying the storage directory is also a good solution.

Search:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ HTTP \ Parameters
Create a string value below, that is, REG_SZ
The Value Name Is errorloggingdir.
The value data specifies the path for you, such as D: \ logofilse.

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.