Jump to content

I messed up my "httpd.conf & my.cnf "

Recommended Posts

I was trying to optimize my httpd.conf & my.cnf and end up doing more harm then good. I don't remember the default settings either and now I'm stuck with a super lagging server.

Can someone please help me re-config these files?

Current Server Load 58.49

Total Server Memory 1536 MB

Available Server Memory 17 MB

Server Spec

768 MB Guaranteed (1.5 GB Burst RAM)

CentOS 5 Operating System


Timeout 300

TraceEnable Off

ServerSignature Off

ServerTokens ProductOnly

FileETag None

StartServers 5

<IfModule prefork.c>

MinSpareServers 5

MaxSpareServers 20


ServerLimit 150

MaxClients 150

MaxRequestsPerChild 1000

KeepAlive On

KeepAliveTimeout 5

MaxKeepAliveRequests 300







local-infile = 0








Link to comment
Share on other sites

Not sure about the Apache config. Looks "ok", although that would depend on your traffic. Hard to say. The MySQL config looks really low. You could probably download the source code to MySQL and get the default config. They have several "recommended" configs for different situations.

Link to comment
Share on other sites

I get about 500 users per hour.

I found the my-medium.cnf, but it not listing what my host had on their default (thought I did play with the values a bit). Should I just remove everything I had on and replace with this (my-medium.cnf)?


key_buffer = 16M

max_allowed_packet = 1M

table_cache = 64

sort_buffer_size = 512K

net_buffer_length = 8K

read_buffer_size = 256K

read_rnd_buffer_size = 512K

myisam_sort_buffer_size = 8M

Link to comment
Share on other sites

You could just try merging them. Use your best judgement. Hard to say without knowing what you had before (that was working). Any value in my-medium.cnf just replace. Keep track of your changes though. You could just try using my-medium.conf.

Link to comment
Share on other sites

How do I turn off "log-slow-queries"?

Do I simply remove it from the my.cnf or should it look something like this: "log-slow-queries OFF" ?

I'm not very familiar with perl scripts, I actually never even executed them before.
How do I run it on my server?

Link to comment
Share on other sites

slow_query_log = 0

to run perl script, upload it to your home directory, make sure it can execute (probably chmod 700 mysqltune.pl)
then run eg:
perl mysqltune.pl


perl mysqltune.pl > mysqltuneresults.txt
(which you can grab and keep the results for reference)

Link to comment
Share on other sites

OMG -- I'm going to shoot myself for being an idiot!
I should had ran the script and tested it before ordering a dedicated server (currently running on a VPS)

Sigh.. . I asked my hosting for help and they kept telling me I needed to upgrade and they where not able to find what's eating up all the resource. They claimed they had been looking in to it for days. I suggested there might be a problem with my my.cnf or httpd.conf, but he said there was nothing wrong with it and it's optimized to it's full potential. I'm actually pretty surprised they would lie about it just to get me to upgrade since they are a respected host.

Oh well, I end up going on a different host with more resource then I actually need. Too bad they don't do refunds. :(

Anyway, thank you Cargelock! The script was a HUGE help and will be most useful on my new server. Do you know if there a script that would help with "httpd.conf"? :D

Link to comment
Share on other sites

I don't think there is an apache tuner of sorts, although that doesn't mean there isn't one somewhere. Generally, I tweak a few ssettings in apache.conf and then bombard my server (usually a test server with same specs) using apachebench

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...