How to setup APC with 1.1?

  • Thread starter Thread starter Deleted member 745
  • Start date Start date
D

Deleted member 745

Guest
Hi,

Do we still have to use the same setup as we did with 1.0?

Code:
  $config['cache']['enabled'] = true;
 
  $config['cache']['frontend'] = 'Core';
 
  $config['cache']['frontendOptions'] = array ( 'caching' => true, 'automatic_serialization' => true, 'lifetime' => 10800, 'cache_id_prefix' => 'ds' );
 
  $config['cache']['backend'] = 'Apc';
 
This is how I run XenFans.com with APC

Screen%20shot%202011-10-28%20at%2010.11.39%20AM.png
 
You mean APC in XF? as I cant find no apc.php file?

UPDATE - it looks as if I need to upgrade my PHP/APC
 
I'm using the latest APC, 3.1.9 (warning: 3.1.8 has a nasty conflict with WordPress). I set up your config file to use 'Apc' as backend cache.

But I have this phenomenon: Since setting up APC, whenever I navigate around the Admin panels, I am constantly forced to login again. Anyone with a solution, an APC setting change, anything?

This is my current setup:

Code:
extension="apc.so"
apc.enabled=1
apc.shm_segments=3
apc.optimization=0
apc.shm_size=256M
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.slam_defense=Off
apc.cache_by_default=1
suhosin.apc_bug_workaround=1

If someone has a better idea, do let me know. I copied this one from someone who said it'd work great in WordPress.

One More Thing: This problem only happens on one of our forums: http://forum.theparacast.com. The others are free of the symptom, yet. The only difference that I can see is the use of the Product-XenFans.com-Popular-Content add-on with our largest forum. Anyone else see that as a potential conflict? Or should I be changing my APC setup any?
 
I'm using the latest APC, 3.1.9 (warning: 3.1.8 has a nasty conflict with WordPress). I set up your config file to use 'Apc' as backend cache.

But I have this phenomenon: Since setting up APC, whenever I navigate around the Admin panels, I am constantly forced to login again. Anyone with a solution, an APC setting change, anything?

This is my current setup:

Code:
extension="apc.so"
apc.enabled=1
apc.shm_segments=3
apc.optimization=0
apc.shm_size=256M
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.slam_defense=Off
apc.cache_by_default=1
suhosin.apc_bug_workaround=1

If someone has a better idea, do let me know. I copied this one from someone who said it'd work great in WordPress.

One More Thing: This problem only happens on one of our forums: http://forum.theparacast.com. The others are free of the symptom, yet. The only difference that I can see is the use of the Product-XenFans.com-Popular-Content add-on with our largest forum. Anyone else see that as a potential conflict? Or should I be changing my APC setup any?
i had the cp relog issue and it was due to the fact that too little memory was allocated to apc. i suspect each of your relogs increases the cache full count by 1.
 
I think 256MB is more than sufficient (default is 32M). And, as I said, it happens in only one of my three forums.
Have you checked and confirmed by browsing to apc.php ? That script can also allow you to browse the cache.

One thing, you are using a different cache prefix for each site?
 
Checked and confirmed what?

I'm not using any custom cache prefixes.
That 256mb is sufficient, ie confirm by using apc.php that you are not running out of memory.

If you are hosting all three sites on the same server with APC and not using a cache prefix you will run into problems.
 
I had pleasant conversations with Deebs, who has tried to be very helpful.

FYI: I got this suggestion from cPanel support if you're running into troubles with an PHP cache utility. Recompile Apache and remove mod_deflate. That is a potential troublemaker.
 
Back
Top Bottom