Website Fault Handling notes: problems caused by apache

Source: Internet
Author: User
Article Title: website Fault Handling Note: problems caused by apache. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Before the Spring Festival, I received a call from my colleagues, saying that the Forum was slow and the user complained that I should handle it immediately. This bbs runs on Redhat AS 5 and is composed of apache, mysql, php, and discuz. It has 129550 registered members and the maximum number of online users is 11128. According to the current hardware conditions, access needs should be met (newly launched HP servers ). Enter the url of the Forum in the browser, which is really slow. Contact your friends to help test it. It is still slow to open the network.

Malicious attack? Mysql paralysis?

No matter how much it is, log on to the server and check the next step. Fortunately, the logon was smooth. Run the command uptime to check the system load. It is very low. Then run the command top, which is basically consistent with the conclusion of uptime. Therefore, the conclusion is: the system load is not large.

Is it maliciously attacked? Based on this idea, check the system account-open the file/etc/passwd without seeing any exceptions. Run the command iptables? L? N finds that the firewall rules are still executed according to the policy I set at the beginning, which indicates that the system has no security issues.

Will it be the performance problem of mysql? Use the mysql client to connect to the database and check the load as follows:
Mysql> show processlist;
+ --------- + ----------- + -------- + --------- + ------ + ------- + ------------------ +
| Id | User | Host | db | Command | Time | State | Info |
+ --------- + ----------- + -------- + --------- + ------ + ------- + ------------------ +
| 1917230 | bbsdiscuz | localhost | discuz | Sleep | 284 | NULL |
| 1917412 | bbsdiscuz | localhost | discuz | Sleep | 223 | NULL |
| 1917442 | bbsdiscuz | localhost | discuz | Sleep | 222 | NULL |
| 1917554 | bbsdiscuz | localhost | discuz | Sleep | 205 | NULL |
| ....................... Omitted .............................
| 1918404 | bbsdiscuz | localhost | discuz | Sleep | 0 | NULL |
+ --------- + ----------- + -------- + --------- + ------ + ------- + ------------------ +
19 rows in set (0.00 sec)

According to the output, the connections and retention time are also within the normal range. In the past, there were many mysql database connections (up to the set maximum number of connections) and too long session persistence (Time), which led to slow Website access and became intolerable. As a result, this fault is not caused by the mysql database.

Now apache is left. It seems that you should doubt it. Let's first look at the number of httpd processes. The process is as follows:
[Root @ web1 ~] # Ps aux | grep httpd | grep-v grep | wc-l
256
The result is the maximum number of connections set by apache by default, and then run [root @ web1 ~]. # Netstat-n | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print, S [:
LAST_ACK 3
SYN_RECV 628
............ Omitted ............
TIME_WAIT 524

[1] [2] Next page

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.