问题
Call to undefined method after upgrading to PHP 5.4.0 mentions a few APC bug-reports from March 2012.
My concrete question is: Is PHP 5.4.4 (or thereabouts) stable in combination with APC 3.1.10 (released in April, but listed as "beta" rather than "stable")?
We see 5 000 - 9 000 APC file cache hits/sec on our Apache boxes, as a vague indicator of traffic level. This is working fine with PHP 5.3.8 and APC 3.1.9 (using mod_php) -- does anyone have experience with comparable traffic on 5.4.4 and 3.1.10?
回答1:
No. Tried it on a high-traffic site already. Segfaults badly on 3.1.10 about 75% of the time or more due to string corruption. The trunk version (as of 6/27/2012) is somewhat better but still too unstable for us for production.
See: https://bugs.php.net/bug.php?id=62442
回答2:
First : give APC lot of memory.
Check my answer there to know how to configure APC What is causing "Unable to allocate memory for pool" in PHP?
As you said, 5000 to 9000 hits/s is not very reliable information, it depends on what is running. Magento uses 10k files and generate lot of hits for one page view.
Best optimizations are on architecture level. Consider using reverse proxy and application cache for your website.
来源:https://stackoverflow.com/questions/11147549/anyone-successfully-serving-high-traffic-with-php-5-4-4-and-apc-3-1-10