LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > PHP > experiences with APC and php-4.4 / php-5.1 ?

Reply
 
Thread Tools Display Modes
  #11  
Old 05-15-2006, 10:02 PM
Xorlev Xorlev is offline
Senior Member
 
Join Date: Nov 2005
Posts: 58
APC is indeed installed and is shown correctly in the php -i output.

Yes, immediately on load of a PHP script, and commenting out the extension (and rebooting LSWS) solves the problem.

extension_dir = "/opt/lsws/lsphp_install/lib/php/extensions/no-debug-non-zts-20050922/"
extension="apc.so"

Originally I had APC as SHM, but deciding to try it differently I enabled MMAP to no avail.

My thought here is a communication problem between PHP and Litespeed.

LSAPI PHP config:
Code:
Name	phpLsapi
Address	uds://tmp/lshttpd/lsphp.sock
Max Connections	20
Environment	PHP_LSAPI_MAX_REQUESTS=500
Initial Request Timeout (secs)	60
Retry Timeout (secs)	0
Persistent Connection	N/A
Connection Keepalive Timeout	N/A
Response Bufferring	No
Auto Start	Yes
Command	$SERVER_ROOT/fcgi-bin/lsphp
Back Log	100
Instances	20
Run On Start Up	N/A
Max Idle Time	N/A
Priority	0
Memory Soft Limit (bytes)	80M
Memory Hard Limit (bytes)	100M
Process Soft Limit	200
Process Hard Limit	200
Reply With Quote
  #12  
Old 05-16-2006, 12:15 AM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
xorlev, now you have now pegged my interest in this most unusuall problem with APC + PHP5.1 + LiteSpeed. We have confirmed clients running the exact same config on Centos 4.3, Ubuntu Breezy, and Mac OS X 10.4, there appears to be an anonmaly unique to your setup.

I would like to replicate the exact conditions and reproduce this problem.

Please email the following to xing@litespeedtech.com.

1) Your OS and version.

2) /lswsinstall/conf/httpd_config.xml

3) /yourvhost/conf/vhconf.xml

4) /lswsinstall/conf/php.ini (or your active php.ini if not in this location)

5) You php 5.1.4 config string ./configure... etc

6) Your APC 3.0.10 config string ../configure ...etc

7) Any other info that might be relevant.

I want to leave nothing to chance when replicating your system. Hopefully I can reproduce this error and resolve it once and for all.
Reply With Quote
  #13  
Old 05-16-2006, 04:47 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
We have found that older Linux distros, the max allowed size of SHM segments are limited and will cause 503 errors. Best way to test is to leave the apc.shm_size line alone or set it to a value of "4" (4MB) and increase it as you go and as the need arises.

Our wiki has been updated to reflect this problem on some systems.

http://www.litespeedtech.com/community/wiki/
Reply With Quote
  #14  
Old 05-21-2006, 04:49 AM
Xorlev Xorlev is offline
Senior Member
 
Join Date: Nov 2005
Posts: 58
After extensive debugging, we've also found that the MMCache session module (--with-mm) causes 503 errors on PHP 5.1.4 w/ APC 3.0.10. The MMCache module version 1.3.1, but I'm not sure if it's the version, or the technology, but my best guess would be the latter.
Reply With Quote
  #15  
Old 05-21-2006, 11:09 AM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
Wiki has been re-updated to note that APC is a replacement for all other opcode caching modules and cannot coexist with any of them. If you use one, you need to remove/disable all others.

The problem is that unlike other extensions, APC hooks into the php compiler itself at a low level via hooks provided by PHP API and I'm sure the developers of the opcode caching mech didn't design their products to re-code already encoded/compiled php code when products are chained together.
Reply With Quote
  #16  
Old 05-21-2006, 06:31 PM
Xorlev Xorlev is offline
Senior Member
 
Join Date: Nov 2005
Posts: 58
When I enabled it I was thinking memcache, not Turck MMCache. Ah, accidental oversights.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:54 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.