0

I'm running 5.3.9-1~dotdeb.3, with APC 3.1.9. APC cache gets totally fragmented after a 2hours of running. Isn't the apc.user_ttl = 0 supposed to keep the files cached until APC is restarted - and prevent this much fragmentation? What am I doing wrong?

apc.enabled = 1 apc.shm_segments = 1 apc.shm_size = 320M apc.cache_by_default=1 apc.stat = 0 apc.user_ttl = 0 apc.num_files_hint = 1024 apc.mmap_file_mask = /tmp/apc.XXXXXX apc.enable_cli = 0 

Here is a screenshot:

enter image description here

1
  • I've managed to bring down the fragmentation to 10% by setting pm.max_requests to a higher value (from 50 to 250). Although this does crash php processes more often (http 502, recv() upstream errors). Commented Feb 15, 2012 at 2:11

1 Answer 1

0

Did you raised the kernel shmmax parameter to server 320M for shared memory as well? By default it's around 8MB.

Put the following into /etc/sysctl.conf:

kernel.shmmax = 335544320 

and execute

sysctl -p 

as root.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.