1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to limit CPU & Memory Usage ?

Discussion in 'Apache' started by Hostingspace4u, Aug 24, 2008.

  1. #1
    Hi,

    I wanted to know how can I limit max Memory & CPU usage for my users ?
    Like if someone use a php script that use aound 30% CPU & that script should get blocked auto.

    Is there any script available for this ?

    Thanks in advance.
     
    Hostingspace4u, Aug 24, 2008 IP
  2. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #2
    set php memory limit in php.ini. Probably it will help you.

    Kailash
     
    kailash, Aug 26, 2008 IP
  3. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #3
    I don't think so. You can write one to use the averages from WHM, but you might want to use suPHP.
     
    jayshah, Aug 26, 2008 IP
  4. mihailty

    mihailty Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    suPHP is very good, i recomand it.
     
    mihailty, Aug 27, 2008 IP
  5. erdubya

    erdubya Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I second that... Running php in apache is soo... 2007.
     
    erdubya, Aug 27, 2008 IP
  6. nimhost

    nimhost Active Member

    Messages:
    235
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #6
    you can use csf which will check for any process running or use process monitor script :)
     
    nimhost, Aug 27, 2008 IP
  7. blackflagwtf

    blackflagwtf Peon

    Messages:
    154
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Login to SSH and type nano /etc/security/limits.conf
     
    blackflagwtf, Nov 16, 2008 IP