![]() |
experiences with APC and php-4.4 / php-5.1 ?
Hi there,
2 weeks ago I upgraded my production environment from php-4.3.11 to 4.4.2, both running APC and through fastcgi. Since then I'm having problems with my php-install, sometimes the php-processes just stall and nothing works anymore, sometimes I get core-files which essentially means that php was/is crashing. Since I removed APC from the mix its running fine and without problems beside the higher server-load. Does anyone have any experiences with running a similar setup? As I could run at least some parts on php-5.1 ... would it help to have a php-5.1 running with APC, is it stable on this setup? Thanks, thomas |
Thomas, I do not have much experience with PHP 4.X as I have moved everything to the 5.1.X branch so my feedback regarding APC will reflect that angle. It's been a long while since I touched PHP 4.X.
APC 3.0.10, latest release is rock solid, there are clients using LiteSpeed + PHP 5.1.X with APC 3.0.X with about 10 million page views per day and there has not been a single core-dump or error logged as result of APC for months. Of course, this is with an PHP 5.1.X optimized code base. However, there is one caveat. If you are using APC with something like vBulletin 3.5.4, you might encounter 1 or 2 scripts that give fatal errors under APC and none without APC. There appears to be unresolved bug in APC's PHP object handling code when the code is written based on PHP 4 standards. vBulletin 3.5.4 uses mostly PHP 4 based object conventions so for these type of rather bloated programs that strive to have the highest PHP version compatibility, you might run into legacy problems with APC where the most recent efforts have gotten into PHP 5 compat. Once I get to reproduce the problem again I intend to file a bug report the APC devels. Basically, if you develope and run your own programs, APC's stability and performance combination cannot be beat and you can always work around bugs. If you run 3rd party bloated programs, then you need to test it out and make sure everything works. That's the best advice I have regarding this issue. Because of the level and quality development that has gone into APC in the last year, LiteSpeed will likely standardize on APC, as part of it's add-on install option, in the very near future. |
Hi xing,
thanks a lot for your information. I'm going to try it with php-5.1 then, as most of the apps I'm running are pretty much my own code. The other legacy stuff can run on php-4.4 unaccelerated ;). Thanks to lsws which gives me the option to run any vhost or directory on any external app I want or need :). |
Attempting to run Litespeed + PHP 5.1.4 + APC 3.1.10 resulted in 503 errors and "connection reset" errors for the socket in the log. Odd.
|
Quote:
Let us know if you find out the cause. |
Please download and try the latest PHP LSAPI code.
|
Hmm, is that user running lsapi at all or does this mean that lsapi is more stable for using it with apc?
|
I think he should be using lsapi, one bug has just been fixed in LSAPI library. It should not matter which API is used, APC stability wise.
|
I am running LSAPI for PHP 2.1 (recompiled today) and followed the instructions in the wiki. Odd, that.
|
xorlev, does the lsapi php binary dump errors in the logs when you execute it manually?
1) Stop litespeed. 2) /lswsinstall/fcgi-bin/lsphp -i [or name of your php binary with lsapi compiled and APC installed/configure in .../conf/php.ini] Running the above command with -i or -v should get you basic info, confirm that APC is installed, and no error should be thrown to the logs. Are you getting the 503s immediately for every php script execution on litespeed startup? Do the errors go away when you disable APC in php.ini? Please give paste us the APC config/loading portion within your php.ini. Also note when the php backened spawns processes to handel php requests, if APC is enabled with SHM (default), then you can check SHM allocation via "ipcs". There will be an entriy listed corresponding to every new php worker. |
| All times are GMT -7. The time now is 08:53 PM. |