• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to setup APC with 1.1?

#1
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';
 
F

Floris

Guest
#5
APC comes with apc.php, put that file inside your public_html/ and load it from the browser.
 

Gene Steinberg

Well-known member
#7
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?
 

dieketzer

Well-known member
#8
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.
 

Deebs

Well-known member
#10
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?
 

Deebs

Well-known member
#12
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.
 

Deebs

Well-known member
#18
To be able to really debug this I would like access to apc.php including the login. (You are using APC for the backend?)
 

Gene Steinberg

Well-known member
#20
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.