Do memory limits include the php fcgid executable?
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Kevin Brooks
  2. 06.02.2012
  3.  Subscribe via email
With a 10 MB memory limit set for the LVE I execute a small PHP app that allocates a large array. Here\'s 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?
Rate this post:
  1. 06.02.2012 22:02:45
  2. # 1
Igor Seletskiy Accepted Answer
Posts: 1201
Joined: 09.02.2010
0
Votes
Undo
Kevin,

Which kernel is it?
  1. 07.02.2012 02:02:50
  2. # 2
Kevin Brooks Accepted Answer
Posts: 14
Joined: 10.08.2010
0
Votes
Undo
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!
  1. 07.02.2012 12:02:18
  2. # 3
Igor Seletskiy Accepted Answer
Posts: 1201
Joined: 09.02.2010
0
Votes
Undo
Kevin,

We will run internal tests, try to figure out what is going on.
  1. 07.02.2012 12:02:07
  2. # 4
Kevin Brooks Accepted Answer
Posts: 14
Joined: 10.08.2010
0
Votes
Undo
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\'t know exactly how LVE is accounting for pages it\'s just a guess.
  1. 27.03.2012 17:03:30
  2. # 5
Kevin Brooks Accepted Answer
Posts: 14
Joined: 10.08.2010
0
Votes
Undo
Any update on why this occurs?
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.