Apache Optimization and Concurrent quantity delivery

Source: Internet
Author: User

Problem:

We used LVS to do a load balance, using two servers to do login services, and two resources download service. But in the promotion process, one after another reflects the difficulty of server login.

Resolution process:

1, first we look at traffic logs and server CPU and memory usage, found that every time the flow and CPU usage will be drastically reduced once. And the two log on servers will cycle to a situation where the connection is not present. View the LVS message log/var/log/message

LVS detects Apache 80 port failure, then LVS will kick this machine off, send all requests to another, and then another test failed, just kicked off and back to normal. So it caused the above situation. At first we suspected the LVS had a problem. But finally we found the problem that Apache did not do optimization.

2, first determine how your Apache is using the way

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/

, and then the configuration needs to open, and then need to modify the httpd-mpm.conf file, modify the file also need to be based on their own use of the processing method to modify that, we use the Prefork method. So modify

, the default looks like is 200, that is, can only handle 200 links over this order of magnitude will be an error: Server reached maxclients setting, consider raising the maxclients setting of course the solution is The above mentioned increases the number of clients.

3, after the modification in the absence of connectivity or LVS detection failure. Login server access speed and traffic, straight up.

Author: csdn Blog 邗 zi

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.