Announcement

Collapse
No announcement yet.

Do memory limits include the php fcgid executable?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Do memory limits include the php fcgid executable?

    With a 10 MB memory limit set for the LVE I execute a small PHP app that allocates a large array. Heres what I see:

    The PHP (fcgid based) process is allowed to instantiate:

    VSZ RSS COMMAND
    116164 9336 /usr/bin/php

    As you can see the VSZ is ~116 MB and allowed to run even though I limit the LVE to just 10 MB.

    # lvectl --list
    ID CPU IO MEM EP
    default 25 25 262144 5
    501 25 25 2560 5

    The PHP program runs and is allowed to allocate a 1.3 MB array before it dies with a memory fault error.

    # cat /proc/257447/statm
    29041 2334 1533 1880 0 1000 0

    # top
    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    257447 infra 20 0 113m 9336 6132 S 0.0 0.5 0:00.05 php

    Why is PHP allowed to run if the total VSZ of PHP itself exceeds the LVE limit? What are we really measuring/limiting?

  • #2
    Kevin,

    Which kernel is it?

    Comment


    • #3
      Linux vpc1 2.6.32-231.21.1.lve0.9.18.1.x86_64 #1 SMP Thu Jan 5 06:59:41 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

      Thanks!

      Comment


      • #4
        Kevin,

        We will run internal tests, try to figure out what is going on.

        Comment


        • #5
          I suspect resources (memory) may be allocated to the fcgid php process prior to the fork/exec/euid change. We had the same issue with suexec and RLimMem. But, since I don know exactly how LVE is accounting for pages its just a guess.

          Comment


          • #6
            Any update on why this occurs?

            Comment

            Working...
            X