+++ This bug was initially created as a clone of Bug #1193193 +++ Description of problem: The php cartridges on various gear sizes are showing anomalous apc.shm_size values. For example, a large php-5.4 gear should show apc.shm_size => 256M, but instead shows apc.shm_size => 32M. Version-Release number of selected component (if applicable): devenv_5432 (ami-a8c48ec0) How reproducible: Always Steps to Reproduce: 1. Create php-5.3 and php-5.4 carts with small, medium, and large gear sizes: rhc app create ptest1 php-5.3 -g small rhc app create ptest2 php-5.4 -g small rhc app create ptest3 php-5.3 -g medium rhc app create ptest4 php-5.4 -g medium rhc app create ptest5 php-5.3 -g large rhc app create ptest6 php-5.4 -g large 2. In the gear of each of the above apps, run: php -i |grep apc.shm_size Actual results: 5.3 small = 64M 5.4 small = 64M 5.3 medium = 128M 5.4 medium = 128M 5.3 large = 256M 5.4 large = 256M Expected results: 5.3 small = 64M 5.4 small = 32M (Discrepancy) 5.3 medium = 64M (Discrepancy) 5.4 medium = 32M (Discrepancy) 5.3 large = 64M (Discrepancy) 5.4 large = 32M (Discrepancy) Additional info: --- Additional comment from Chris Ryan on 2015-02-16 15:16:23 EST --- Apologies, the actual and expected results should be reversed. --- Additional comment from Ben Parees on 2015-02-16 15:29:25 EST --- Like your fuse bug, this is based on the OPENSHIFT_GEAR_MEMORY_MB env variable...can you check yours and confirm it has the correct value for your gear size? since you're using a devenv, i don't think those values actually get setup correctly. try it in prod. --- Additional comment from Chris Ryan on 2015-02-16 16:50:36 EST --- These are the values I'm seeing in prod: 5.3 small = 64M 5.4 small = 32M (Discrepancy) 5.3 medium = 128M 5.4 medium = 64M (Discrepancy) 5.3 large = 256M 5.4 large = 128M (Discrepancy) --- Additional comment from Ben Parees on 2015-02-16 16:53:09 EST --- can you correlate the OPENSHIFT_GEAR_MEMORY_MB variable in those gears? --- Additional comment from Chris Ryan on 2015-02-16 16:55:53 EST --- For OPENSHIFT_GEAR_MEMORY_MB, in prod, I'm showing the following values: 5.3 small = 512 5.4 small = 512 5.3 medium = 1024 5.4 medium = 1024 5.3 large = 2048 5.4 large = 2048 --- Additional comment from Ben Parees on 2015-02-16 17:18:49 EST --- Maciej can you take a look? Seems like this was fixed previously, there's a rich history here: https://bugzilla.redhat.com/show_bug.cgi?id=1162950 --- Additional comment from Maciej Szulik on 2015-02-23 10:15:58 EST --- For some reason we're dividing the memory by 16 and not by 8 for php 5.4. Fixed in https://github.com/openshift/origin-server/pull/6082 --- Additional comment from openshift-github-bot on 2015-02-24 10:38:36 EST --- Commits pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/87757ac3abc5d85cde222a8dc84c6a798cee9f6a Bug 1193193 - Fixed apc.shm_size values for php-5.4 https://github.com/openshift/origin-server/commit/48b59118a599bbf1c47482ea84f4a69c891d8894 Merge pull request #6082 from soltysh/bug1193193 Merged by openshift-bot --- Additional comment from madeshuai on 2015-02-26 05:52:34 EST --- Test on int evn,the result is: php-5.3 small apc.shm_size => 64M => 64M php-5.4 small apc.shm_size => 64M => 64M php-5.3 medium apc.shm_size => 128M => 128M php-5.4 medium apc.shm_size => 128M => 128M php-5.3 large apc.shm_size => 256M => 256M php-5.4 large apc.shm_size => 256M => 256M
Verify this bug with openshift-origin-cartridge-php-1.31.4.2-1.el6op.noarch Checked php-5.3 and php-5.4 cartridge, apc.shm_size was setting as 1/8 of OPENSHIFT_GEAR_MEMORY_MB. With memory_limit_in_bytes=1073741824 setting in /etc/openshift/resource_limits.conf, create a php cartridge. [php1-123.ose22-manual.com.cn 123-php1-1]\> env|grep OPENSHIFT_GEAR_MEMORY_MB OPENSHIFT_GEAR_MEMORY_MB=1024 [php1-123.ose22-manual.com.cn 123-php1-1]\> php -i |grep apc.shm_size apc.shm_size => 128M => 128M
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0779.html