The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

increasing apache max connections

Discussion in 'EasyApache' started by Stephen, Feb 19, 2002.

  1. Stephen

    Stephen Active Member

    Joined:
    Aug 14, 2001
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    I am experiencing long delays while accessing the domains on one of my servers. I did a search around and looks like I will need to increase apache MaxClients,... then recompile apache (with php, mysql, etc...) but I have never done this before.

    May I have some suggestions, commands or instructions please! Thank you very much!

    I am using Redhat 7.2 with php4.1.1, apache 1.3.22, mysql 3.23.39 (default cpanel config).
     
  2. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    16
    Shouldn't need to recomplie, per se....

    Increase your OS limits -&
    /etc/rc.d/init.d/filelimits start

    Then,
    Increase max clients in your httpd.conf and restart apache.
     
  3. Stephen

    Stephen Active Member

    Joined:
    Aug 14, 2001
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    && Increase your OS limits

    Would you please advise on how I can do this! I am using kernel 2.4.x

    Thank you!!!
     
  4. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    16
    That init script should do the trick for you..........
    Regardless of your kernel version.

    /etc/rc.d/init.d/filelimits start
     
  5. Stephen

    Stephen Active Member

    Joined:
    Aug 14, 2001
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    Thank you!!!
     
  6. Stephen

    Stephen Active Member

    Joined:
    Aug 14, 2001
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    I thought I got it fixed but the pages are loading very slow today. I set max clients to 1000.

    Here is the error I received when ran
    /etc/rc.d/init.d/filelimits start

    --
    /etc/rc.d/init.d/filelimits: /proc/sys/fs/dquot-max: No such file or directory
    --

    I tried to create dquot-max but can't seem to do so. error &E212: Can't open file for writing& when I do a &vi dquot-max& then &:w&

    Is there a specific way I need to do in order to create this file?
     
  7. Stephen

    Stephen Active Member

    Joined:
    Aug 14, 2001
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    Anyone please help!!!
     
  8. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    [quote:91893ea30a][i:91893ea30a]Originally posted by Stephen[/i:91893ea30a]

    Anyone please help!!!
    [/quote:91893ea30a]

    Hummmm ..have you done TOP to check loads? How about tracerout or ping plotter to watch for sluggesh net problems?

    A way you can tell how APACHE is doing is by runing /apache-status behind a domain . (hint you will need to enable this in httpd.conf)

    When you call that page you wil lsee html something like this:

    -------------------------------------------------------
    Server uptime: 17 hours 10 minutes 41 seconds
    Total accesses: 322262 - Total Traffic: 1.9 GB
    CPU Usage: u3.86 s2.65 cu.65 cs.26 - .012% CPU load
    5.21 requests/sec - 31.9 kB/second - 6.1 kB/request
    11 requests currently being processed, 8 idle servers

    -------------------------------------------------------------------

    and this might tell you what is going on further.
     
  9. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    16
    Hmmmmmmmmmmmmmmm......

    Also tail and or grep for tons of duplicates in /usr/local/apache/logs (the base error_log, and base access_log).....

    If your server is getting assaulted or a particular domain or account abused , this will give you clues as to WHOM.


    You did increase the max connections in your apache config file right? I don't think this issue has anything to do with your file descriptor sizes as far as what we were discussing earlier.
     
  10. Stephen

    Stephen Active Member

    Joined:
    Aug 14, 2001
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    I have noticed this from the top command:

    when the processes are at around 250 - 270 the sites load very fast (at night time)

    then at around 6 - 7:00am the processes jump to 340, the web pages load a little slow.

    then during the day time the processes jump to 450 - 500 =& the pages load very slow or sometimes not loading at all.

    I did ran &/etc/rc.d/init.d/filelimits start& then increase MaxClients to 1024 in httpd.conf.
     
  11. AlaskanWolf

    AlaskanWolf Well-Known Member

    Joined:
    Aug 11, 2001
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Fremont CA
    how many customers you got on this server and whats the specs? if you overload a server, theres nothing you can really do to it other then move the customers to another box to allivate the high loads
     
Loading...

Share This Page