https://bz.apache.org/bugzilla/show_bug.cgi?id=66217

            Bug ID: 66217
           Summary: RLimitMEM doesn't work
           Product: Apache httpd-2
           Version: 2.4.53
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Hi there,

I'm trying to limit memory usage by Apache 2.4, and RLimitMEM doesn't work. No
matter where I place RLimitMEM, limits stay the same, here is PHP script called
from within apache2 with RLimitMEM set to 6442450944 (6GB)

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 30534
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 8192
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 30534
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Here is var_dump(posix_getrlimit());
array (size=20)
  'soft core' => int 0
  'hard core' => string 'unlimited' (length=9)
  'soft data' => string 'unlimited' (length=9)
  'hard data' => string 'unlimited' (length=9)
  'soft stack' => int 8388608
  'hard stack' => string 'unlimited' (length=9)
  'soft totalmem' => string 'unlimited' (length=9)
  'hard totalmem' => string 'unlimited' (length=9)
  'soft rss' => string 'unlimited' (length=9)
  'hard rss' => string 'unlimited' (length=9)
  'soft maxproc' => int 30534
  'hard maxproc' => int 30534
  'soft memlock' => int 67108864
  'hard memlock' => int 67108864
  'soft cpu' => string 'unlimited' (length=9)
  'hard cpu' => string 'unlimited' (length=9)
  'soft filesize' => string 'unlimited' (length=9)
  'hard filesize' => string 'unlimited' (length=9)
  'soft openfiles' => int 8192
  'hard openfiles' => int 8192

I decided to look into the code, httpd/os/unix/unixd.c, function
ap_unixd_set_rlimit and I can't see call to setrlimit. I'm not a C coder, so I
suppose modifying struct returned by getrlimit is enough?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to