Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 (i'm not allowed to post it directly, yet.): http://i.stack.imgur.com/m3tX3.png

share|improve this question
    
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). –  bureq Feb 15 '12 at 2:11

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.