- Issue created by @godotislate
- 🇺🇸United States nicxvan
Investigation here: https://drupal.slack.com/archives/C079NQPQUEN/p1754057444000909 that links to the original discussion in htmx where I found this.
- 🇺🇸United States dww
Misplaced parents?
Bytes::toNumber(ini_get('apc.shm_size')) * ini_get('apc.shm_segments')
Don’t we want:
Bytes::toNumber(ini_get('apc.shm_size') * ini_get('apc.shm_segments'))
?
- 🇺🇸United States dww
Bah, sorry. I hadn't looked at the ini_get() docs about apc settings. apc.shm_size indeed can come back as "32 MB" and friends, which is what we want to convert to a number before we multiply it by the number of segments.
It might be good to print what
ini_get('apc.shm_size')
andini_get('apc.shm_segments')
actually are now in the build env, and whether something isn't converting those values right inBytes::toNumber
.@catch also suggested in slack that maybe we disable Status test for now to get builds working, then reinstate after finding the root cause.
- @dww opened merge request.
- @godotislate opened merge request.
Opened MR to check what the APC values were per #6, and it looks like `ini_get('apc.shm_segments')` might be empty, which would certainly be a problem.
https://git.drupalcode.org/issue/drupal-3539331/-/jobs/6083955OK so
apc.shm_segments
has apparently been removed:
https://git.drupalcode.org/project/drupalci_environments/-/blob/dev/php/...
https://pecl.php.net/package/APCu/5.1.25- 🇬🇧United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 11.2.x, 10.6.x and 10.5.x, thanks!
Don't usually like multiple commits from a single issue but given skipping the test is an emergency stop-gap let's leave this open and continue here maybe?
- @godotislate opened merge request.
OK, used a ternary to set fallback multiplier of 1 if
ini_get('apc.shm_segments')
is empty. This passes tests in MR 12895.- 🇺🇸United States dww
Hah, bit of duplicated effort, since I had started down that same road.
However, it's not just
ini_get('apc.shm_segments')
that can be empty. So, too, canapcu_sma_info(TRUE)['num_seg']
. So I moved the fallback check into a local var, and use that everywhere we check this, either directly or viaapcu_sma_info()
.