0

I'm just setting up a new faster server for our Drupal site and was setting up APC and tried to set the apc.shm_size up to 128M however after restarting apache and reloading the APC Admin page Apache Simply goes away and returns no requests so I started going down till I found 76M was as high as apc.shm_size would go.

Debian 7

APC 3.1.13

Apache 2.2.22

PHP Version 5.4.39-0+deb7u2

APC was installed via pecl

and my apc config from php.ini

extension=apc.so
apc.enabled=1
apc.shm_segments=1
; 76 Max shm_size is taking
apc.shm_size=76M
apc.max_file_size=1M
apc.stat=0
apc.ttl=0

anyone know why it's stopping me from upping it further?

edit: the only error log for apache is

PHP Fatal error:  PHP Startup: apc_mmap: mmap failed: in Unknown on line 0

and there are no errors in syslog from apache or php

CHP
  • 1
  • 1
  • You might also try adding any logging snippets from your error.log and syslog. – Mike Fiedler Apr 16 '15 at 14:35
  • Is your `sysctl kernel.shmmax` set too high enough for allocating shm segment larger than 76MB? – Fox Apr 16 '15 at 16:18
  • Fox it's set to 32MB – CHP Apr 16 '15 at 16:20
  • I tried upping it to 128 and changing the apc.shm_size and it still failed – CHP Apr 16 '15 at 16:29
  • Ooops sorry, shmmax was a wrong lead. I should read more carefuly next time. As it says `mmap failed`, it will be related to mmap. Not sure why would anonymous mmap fail, though. Could you try setting `apc.mmap_file_mask` to either `/dev/zero` or something like `/tmp/apc_mmap.XXXXXX` (the directory has to be writable by php)? ref. http://php.net/manual/en/apc.configuration.php – Fox Apr 17 '15 at 13:06

0 Answers0