What are some good Apache settings to use with wordpress?

My server has 756m of RAM. Every few days I get

[error] server reached MaxClients setting, consider raising the MaxClients setting

Related posts

Leave a Reply

2 comments

  1. Just to break cycle of “doesn’t belong here”.

    WordPress basically has no specific requirements for web server itself (which doesn’t even have to be Apache), aside from permalinks.

    The message you are getting seems to be performance-related and may or may not be connected to you using WordPress. For starters check if your traffic had recently increased and ask your hosting if they recommend specific Apache configuration for your hardware and traffic.

  2. Depending on your server configuration, you can change the setting for MaxClients in /usr/local/apache/conf/httpd.conf.

    [edit: Since I’ve only been given a line or two about it myself from my server admin, here is a better explanation as to what MaxClient is

    ServerLimit controls the maximum
    configured value for MaxClients.
    Reducing MaxClients on a webserver
    that is serving dynamic content (e.g.
    WordPress) can make a big difference.
    If you experience a traffic spike on
    your VPS and your MaxClients is set
    too high your server will more than
    likely get stuck in an endless loop of
    swapping pages from physical memory to
    virtual memory, commonly referred to
    as thrashing. The accepted way of
    calculating an appropriate MaxClients
    value is dividing your total available
    system memory by the size per Apache
    process. For example, if you had a
    500MB left for Apache to use and each
    Apache process was using around 10MB
    you would set your MaxClients to
    (512-12) / 10 = 50. To check real time
    memory usage on your VPS use top.

    -from The Theme Foundry]

    As others have suggested, consult a server administrator before changing settings if you don’t know what you’re doing.

    As for your more general question, I would steer you to a similar question I asked some weeks ago: What are best practices for configuring a server for WordPress sites?