APC cache uses only 32 MB of memory

Here is my configuration

extension = apc.so apc.enabled = 1 apc.shm_size = 128M apc.shm_segments = 1 apc.gc_ttl = 7200 apc.ttl = 0 apc.num_files_hint = 1024 apc.file_update_protection = 2 apc.max_file_size = 5M apc.stat_ctime = 1 apc.mmap_file_mask=/tmp/apc.XXXXXX apc.filter="-/usr/share/phpMyAdmin/.*" 

APC INFORMATION: APC Version 3.1.3p1 PHP Version 5.3.3 APC Host .._._ (mysite.com) (127.0.0.1) Apache / 2.2.15 Server Software (CentOS) Shared memory 1 segment with 30.0 MB (mmap memory, pthread mutex lock)

Apc.shm_size 128M runtime settings

 [ root@mysite.com ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.tcp_syncookies = 1 kernel.shmmax = 134217728 

What should I do to increase APC memory?

+6
source share
2 answers

Take a look at the manual: http://php.net/manual/en/apc.configuration.php , in addition, pay attention to the difference between size and maximum size.

+8
source

I will repeat the solution here (because it was indicated as a comment of the decision made):

You may need to remove "M" from the apc.shm_size configuration apc.shm_size . It is expected that the number will be in megabytes, and some php versions will not be able to parse the value and return to the default (30 or 32 MB) if the given value is not a number.

+1
source

Source: https://habr.com/ru/post/904584/


All Articles