Hi Pete,

Am 07.10.2010 um 18:51 schrieb Pete Collins:

> Any ideas of the cause?


We use pecl-APC as our PHP opcode cache. On certain load spikes the internal 
locking mechanism from APC blocks all httpd/php processes (every httpd process 
hangs in lockf state). This results in timeouts for nginx which in turn 
displays 502 bad gateway.

I've tried running mozdev.org without APC but this slows down the project by 
20-25% ... so this is not an option. I've evaluated XCache which has the same 
locking problem in a high load environment.

I've made some research and it turns out that most probably the problem is the 
default locking mechanism used by pecl-APC: it uses file locking. On one of our 
testing servers here at strg.at I have experimented with sysv semaphore locking 
on FreeBSD - this unfortunately is not very stable.
Linux_futex and pthread_mutex locks are not supported by the Ports system and 
therefore not available on FreeBSD.

pecl-APC provides also experimental spin locks. I have tested this option and 
it is very stable for now on our testing system (which does not have mozdev.org 
code installed). Today I have enabled spin locks on mozdev.org itself. It is 
now running since 40 minutes without any problems.

Mic

-- 
strg.at gmbh  michael.dos...@strg.at
       huetteldorferstrasse 63-65/2, 1150 wien
       tel +43 (1) 526 56 29  mobile +43 699 1 7777 164

_______________________________________________
Project_owners mailing list
Project_owners@mozdev.org
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to