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