|
|

05-08-2006, 02:21 AM
|
|
Senior Member
|
|
Join Date: Nov 2004
Posts: 288
|
|
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
|

05-08-2006, 02:34 AM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
|
|
|
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.
|

05-08-2006, 03:00 AM
|
|
Senior Member
|
|
Join Date: Nov 2004
Posts: 288
|
|
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 .
|

05-14-2006, 05:24 PM
|
|
Senior Member
|
|
Join Date: Nov 2005
Posts: 58
|
|
|
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.
|

05-14-2006, 09:17 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
|
|
Quote:
|
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.
|
Strange indeed. It's humming along just fine on CentoS 4.3 Linux using the compile setup detailed in the wiki.
Let us know if you find out the cause.
|

05-15-2006, 03:00 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
Please download and try the latest PHP LSAPI code.
|

05-15-2006, 03:01 PM
|
|
Senior Member
|
|
Join Date: Nov 2004
Posts: 288
|
|
|
Hmm, is that user running lsapi at all or does this mean that lsapi is more stable for using it with apc?
|

05-15-2006, 03:18 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
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.
|

05-15-2006, 06:18 PM
|
|
Senior Member
|
|
Join Date: Nov 2005
Posts: 58
|
|
|
I am running LSAPI for PHP 2.1 (recompiled today) and followed the instructions in the wiki. Odd, that.
|

05-15-2006, 09:46 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
|
|
|
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:48 PM.
|
|