The reasons for Apache status 503 are as follows:
1. If the CPU load is too high and the server cannot respond, 503 is returned.
2. The number of system connections exceeds the upper limit of MaxVhostClients. 503 is returned.
3. The number of connections per IP address exceeds the upper limit of MaxConnPerIP. 503 is returned.
After troubleshooting, it was found that the mod_bw module of Apache was set up.
The code is as follows: |
Copy code |
ForceBandWidthModule On BandWidthModule On BandWidth all 1024000 Maxconnections all 150 |
SolutionWe can increase the number of maxconnections to solve this problem. If your server resources are sufficient, we can directly
The code is as follows: |
Copy code |
MaxConnection all 0 |
No restrictions
To give users a good interface
The code is as follows: |
Copy code |
Vi/usr/local/apache/conf/httpd. conf # ErrorDocument 500 "The server made a boo ." # ErrorDocument 404/missing.html # ErrorDocument 404 "/cgi-bin/missing_handler.pl" # Both the equivalent path and the absolute address are acceptable. # ErrorDocument 503 http://www.111cn.net ErrorDocument 503/notice.html |
To sum up, you can modify the number of connections to solve this problem no matter what system you use apache.