Thursday, October 05, 2006

MaxClients exceeded error in apache

Ever see an error in your log files that says you have exceeded your Max Clients? This is a simple problem; the most common configuration of apache is 10. If you have enough traffic on your website this simple setting can put your out of business. To fix this just change the number. You can find your configuration file at /etc/httpd/conf/httpd.conf. I would recommend that you use a simple editor to touch this file, like VI. Be sure to understand the commands of VI before editing any files. You will have to be logged in as Root or Super User to access this file.

Here is a few tips for editing a file with vi, to make the change we where just talking about. Do this.

vi /etc/httpd/conf/httpd.conf

Now you can see the contents of the file, make sure that you do not get a read only message. If you do, nothing you change can be saved.

To search for the line you are trying to edit, type this.

/MaxClients

The / command will search for anything after the slash.

With the arrow keys on your keyboard go to the number in this case ten, move your cursor below the first number. In this case 1.

The “x” lower case, command will erase a character at a time. Once you have removed both characters you want to put in a new number.

To do this hit “i” lower case, this is the insert command. After you hit “i” type in your number, say 25. You must hit escape to stop inserting.

Now if all is clean you need to exit the program, to do this type in “:wq”, the w stands for write, the q stands for quit. Now you will have to restart apache for this to take affect. Depending on how Apache is configured there are many ways to do this. If you have PLESK installed I would restart apache with PLESK. Restarting anything at the command prompt should not be taken lightly.

Obviously remove the “ quotes surrounding each command

Labels:

0 Comments:

Post a Comment

<< Home

My Photo
Name: Aaron Shear
Location: San Francisco, California, United States

I have been in the search industry since the late 90’s, no not 10-20 years. My career started early in the search Day’s at Inktomi, where I supported large search portals. For example, MSN, AOL, iWon, Hotbot, CNet too name a few. After Inktomi I became a freelance consultant. I consulted for a few of the Top SEO’s around 2002 time frame; obviously the market has changed since then. After consulting I joined a small SEO firm called SEO Inc as the CTO. At SEO Inc. I successfully optimized some of the largest clients including IGN, Sony, VEGAS.com, Beaches and Sandals Resorts to name a few. Even though SEO Inc was a ton of fun, I still wanted the ultimate SEO challenge. I moved on as the global head of SEO for Shopping.com an eBay company. This challenge was an interesting one, how do I optimize a site with 50 million products? Every month I helped the business grow by leaps and bounds. I am now consulting for mostly enterprise e-commerce clients. Yes there is more too me than this profile shows, but you will just have to ask.

Powered by Blogger

Add to Google Subscribe in Bloglines