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.

what's wrongwith this

Discussion in 'cPanel Developers' started by Spring0105, Dec 12, 2009.

  1. Spring0105

    Spring0105 Registered

    Joined:
    Dec 5, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    on my cluster i'm using FCGI, and i want to set limits on processes number, memory usage and cpu usage.

    I've tried many many ways, but any of them seems to be working.

    Here are some examples:

    ---
    /home/USER/.profile

    ulimit -t 3 -u 1

    - Also with this setting, if i try to reload many times an user page i can see douzens of php processes
    ---

    ---
    /etc/profile

    GID=`id -g`

    if [ "$LIMITUSER" != "root" ]; then
    ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000
    2>/dev/null
    elif [ "$GID" -gt "500" ]; then
    ulimit -n 100 -u 20 -m 40000 -d 40000 -s 8192 -c 40000 -v 40000 -t 10
    2>/dev/null
    else
    ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v
    unlimited 2>/dev/null
    fi

    - Same as above, this seems to be ignored
    ---

    ---
    FCGI Wrapper:

    #!/bin/sh
    ulimit -u 2 -m 40000 -d 40000 -c 40000 -v 40000 -t 10
    exec /usr/local/cpanel/cgi-sys/php5

    - Still seems being ignored
    ---
     

Share This Page