Large Image Hosting Site Help! - Killing HTTPD Requests (restart apache)

Discussion in 'Apache' started by Matth3wJL, Feb 25, 2008.

  1. #1
    Hey guys my site has grown a bit and im having trouble with the cpu load on the server with all the httpd requests.

    So far I've found only one solution and this is to set a cron to restart apache every 3 hours or so to kill all request and reset cpu usage back to normal.

    Is there another option to kill these long requests?

    I rather not have to restart apache everytime I do it takes a awhile to get back up and people may think there images are down...

    Thanks

    Matt
     
    Matth3wJL, Feb 25, 2008 IP
  2. pipsbank

    pipsbank Banned

    Messages:
    1,187
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Matt, how is ur server dns configuration. Some scripts tend to do cron jobs each time people ask for the url.
    It is like the script will loop back to ur dns each time request being made.

    Please check make sure you have your own dns setup (private dns)
     
    pipsbank, Feb 25, 2008 IP
  3. Matth3wJL

    Matth3wJL Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    pips not sure im understanding what your saying or maybe you didn't read what I asked right.. im confused.
     
    Matth3wJL, Feb 25, 2008 IP
  4. Matth3wJL

    Matth3wJL Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    what about if i use HUP directive is passed to the kill command.

    read that in a forum on here
     
    Matth3wJL, Feb 25, 2008 IP
  5. Matth3wJL

    Matth3wJL Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
  6. gate2vn

    gate2vn Peon

    Messages:
    809
    Likes Received:
    33
    Best Answers:
    1
    Trophy Points:
    0
    #6
    Killing processes is not a good way for your customers. If your site is growing, why not upgrade to better hardware?
     
    gate2vn, Feb 25, 2008 IP
  7. qualityhostings

    qualityhostings Well-Known Member

    Messages:
    1,764
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    105
    #7
    Why dont you install LiteSpeed
    You can replace Apache with LiteSpeed. Its much better than Apache.
    It will reduce your server load too.

    Regards
     
    qualityhostings, Feb 27, 2008 IP
  8. Matth3wJL

    Matth3wJL Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Do these request timeout after so long?

    What kind of hardware do you think would suffice?
     
    Matth3wJL, Mar 17, 2008 IP
  9. Neptune

    Neptune Well-Known Member

    Messages:
    1,465
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    108
    #9
    lighthttpd is the best way to go from an image host. you should also upgrade hardware and tweak your conf files.
     
    Neptune, Mar 17, 2008 IP
  10. schoash

    schoash Active Member

    Messages:
    291
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #10
    yes tweaking config should do the job.
    how many req/sec do you get? Maybe code needs optimization?
     
    schoash, Mar 18, 2008 IP
  11. Matth3wJL

    Matth3wJL Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Getting over 2000 Req/sec

    Current apache config:

    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 3
    MinSpareServers 5
    MaxSpareServers 10
    StartServers 5
    MaxClients 2000
    MaxRequestsPerChild 0
    AccessFileName .htaccess
    UseCanonicalName On
    DefaultType text/plain
    HostnameLookups Off

    Any recommendations?
     
    Matth3wJL, Apr 3, 2008 IP