Modify the error level in the error log in apache2

Source: Internet
Author: User
Modify the error level in the error log in apache2. problems may occur because writing logs will cause great losses to the system. After logging is disabled, the overall performance can be improved by nearly 40% (roughly estimated). how can this problem be solved? You can reduce log reading and writing by reducing the log level .... Modify the error level in the error log in apache2. problems may occur because writing logs will cause great losses to the system. After logging is disabled, the overall performance can be improved by nearly 40% (roughly estimated). how can this problem be solved? You can reduce log reading and writing by reducing the log level. It is worth noting that this will cause troubles for "intrusion detection" and other log-based analysis work. Therefore, use it with caution. 2. solve the problem by editing httpd in the conf folder. conf, find the following content: # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn where LogLevel is used to adjust the details of the information recorded in the error log. (See ErrorLog command ). You can select the following levels in descending order of importance: Level Description Example emerg emergency-the system is unavailable. "Child cannot open lock file. Exiting" alert must take immediate action. "Getpwuid: couldn't determine user name from uid" crit fatal. "Socket: Failed to get a socket, exiting child" error. "Premature end of script headers" warn warning. "Child process 1234 did not exit, sending another SIGHUP" notice is generally important. "Httpd: caught SIGBUS, attempting to dump core in..." info common information. "Server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers )... "debug error level information" Opening config file... "The default level is warn, so logs above the warn level will be recorded, and a large number of erro-level error logs will be generated" file does not exist. We recommend that you use the crit-level settings to record logs with more than the fatal level, effectively reducing the number of logs. Change LogLevel warn to LogLevel crit and restart apache.
Related Article

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.