Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

APC setup
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

@nabuhonodozor:: I am not using Apache, I am using litespeedtech.com for my web server. (It is like Nginx)

Nils: keep reading wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

One of those posted for further reference items. I’m in the process of converting to the LiteSpeed web server. One of the problems we were having was with constant APC restart. The 10 second self flushing cache… big surprise

Set the max idle time for lsphp5 (PHP) from 10 seconds to -1

@Brent

Are you running lsphp5/lsapi or FastCGI ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

I am running lsphp5/lsapi

I will try your advice! Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

@Brent

Have you run into this situation with LiteSpeed and APC?

I’m in the following Catch-22.

We enabled the APC cache and got it to play with LiteSpeed.

Enabled caching in local.xml and ran Magento, checking with apc.php to make sure everything was ticking over and caching.

Then tried to run an external Magento script from the command line which immediately threw the following:
Fatal error: Uncaught exception ‘Zend_Cache_Exception’ with message ‘can’t get apc memory size’ in /home/chietcom/public_html/lib/Zend

Enabled APC for Command Line scripts with the following apc.enable_cli = 1

Now attempting to run php scripts from the command line gives us a segmentation fault. My hosting provider will of cource recommend apc.enable_cli = 0 which will then bring back the Zend_Cache_Exception leaving me where I have the choice of error message and no way to run external php scripts for Magento either way.

Just having the script tell Magento to avoid APC caching CLI scripts would be a plus at this point…

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

We got our question answered on the above php CLI problem.

cPanel jailshell was limiting resources so strictly that it killed php’s ability to function.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

When I enabled caching in local.xml caching would reset itself every 1-2 hours and was very fragmented.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

One more thing, my max idle was blank, so I made it -1

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

I noticed the reset and fragmentation as well. Hmm. Will have to check out your suggestion in a day or two.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

@Brent

Just tossed the apc cache entries out of local.xml and notice the following:

User Cache information (no cached variables, no hits, no requests) shows no activity in this section. With this change, fragmentation goes down dramatically. This goes along with the User Cache Entries view that would show entries being made, but never any hits on the contents thereof. I think that entries would be made in the User Cache and immediately deleted, causing a massive fragmentation problem.

File Cache information shows an increased hit rate with time and increased number of php files cached with time. This is to be expected.

Next to be seen, if the cache doesn’t reset every two hours.  Fingers crossed.

Another item, Cached Files = Misses which wasn’t matching up with the apc cache enabled. It acted like some files took two or three retries to cache up before.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

Another Weirdness from LiteSpeed/lsphp5 world. System and local memory_limits are set to 768M and verified in phpinfo().

Running the dreaded DataFlow Export runs in 512M on Apache/FastCGI in 8-9 minutes on 1.4.1.1 for 9800+ product.

Running the dreaded DataFlow Export runs in 768M on LiteSpeed/lsphp5 for a while and then dies with the following message indicating there’s some sort of weird 128M memory limit being exceeded.

Fatal errorOut of memory (allocated 134479872) (tried to allocate 4096 bytesin /home/x/public_html/app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Table.php on line 62

Fatal error
Out of memory (allocated 134742016) (tried to allocate 24 bytesin /home/x/public_html/lib/Zend/Db/Select.php on line 924

Fatal error
Out of memory (allocated 133431296) (tried to allocate 5541 bytesin /home/x/public_html/lib/Zend/Db/Statement/Pdo.php on line 228

Fatal error
Out of memory (allocated 133169152) (tried to allocate 24 bytesin /home/x/public_html/lib/Zend/Db/Select.php on line 924
 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Have you posted that to the Litespeed forum? They are very helpful

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

I am on to my next project

Lightspeed -> APC

I noticed a couple of things, I started getting fragmentation immediately when Magento cache was off (I used local.xml to use APC)

When I turned on Magento cache my APC fragmentation goes away, so there seems to be some sort of conflict between the two.

 
Magento Community Magento Community
Magento Community
Magento Community
 
vesvello
Sr. Member
 
Total Posts:  97
Joined:  2007-12-01
 

I installed APC and its enabled (i put apc.php in magento folder and I can see the graphic) but I thinks its not working, becasue the only file is cached is apc.php (647 kb used of cache).

Anyone can explain how make it work with magento?

thanks in advance

I have apache (CENTOS 5.7) and magento 1.5.0

 
Magento Community Magento Community
Magento Community
Magento Community
 
isumi
Jr. Member
 
Total Posts:  21
Joined:  2010-09-13
 

everyone who has problems with too early refreshing cache, here i found an possible answer.
http://www.fabrizio-branca.de/magento-zend-frameworks-twolevels-cache-backend-mess.html

Please write if it helped.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rajfazzio
Jr. Member
 
Total Posts:  8
Joined:  2011-07-11
 
vesvello - 10 November 2011 10:55 AM

I installed APC and its enabled (i put apc.php in magento folder and I can see the graphic) but I thinks its not working, becasue the only file is cached is apc.php (647 kb used of cache).

Anyone can explain how make it work with magento?

thanks in advance

I have apache (CENTOS 5.7) and magento 1.5.0

i have the same issue. did you ever figure out why?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top