Gene Steinberg

Well-Known Member
May 26, 2007
163
3
168
Riddle Me This: APC installation is fine, installed under PHP Pecl in WHM, but it doesn't seem as if the APC cache can run more than 15-30 minutes before it restarts. No, Apache isn't restarting when this happens.

Also, when using forum software, such as vBulletin 4.x, or XenForo 1.1 (from two of the original vBulletin developers), I constantly have to login in when using the admin panels.

Basically using latest RELEASE branch of cPanel, APC 3.1.9, PHP 5.3.8.

Settings in APC are as follows:

Runtime Settings
apc.cache_by_default 1
apc.canonicalize 1
apc.coredump_unmap 0
apc.enable_cli 0
apc.enabled 1
apc.file_md5 0
apc.file_update_protection 2
apc.filters
apc.gc_ttl 3600
apc.include_once_override 0
apc.lazy_classes 0
apc.lazy_functions 0
apc.max_file_size 1M
apc.mmap_file_mask
apc.num_files_hint 1024
apc.preload_path
apc.report_autofilter 0
apc.rfc1867 0
apc.rfc1867_freq 0
apc.rfc1867_name APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_
apc.rfc1867_ttl 3600
apc.serializer default
apc.shm_segments 1
apc.shm_size 128M
apc.slam_defense 1
apc.stat 1
apc.stat_ctime 0
apc.ttl 7200
apc.use_request_time 1
apc.user_entries_hint 4096
apc.user_ttl 7200
apc.write_lock 1

I welcome advise on what to change.

Peace,
Gene
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
For vBulletin, try setting this to 0 to see if that helps based on some online discussions of that setting possibly causing issues with vB:

Code:
apc.slam_defense 0
Next, are you using mod_deflate or anything along those lines that might be impacting caching mechanisms such as APC?

Code:
/usr/local/apache/bin/apachectl -M | grep -i deflate
 

Gene Steinberg

Well-Known Member
May 26, 2007
163
3
168
For vBulletin, try setting this to 0 to see if that helps based on some online discussions of that setting possibly causing issues with vB:

Code:
apc.slam_defense 0
Next, are you using mod_deflate or anything along those lines that might be impacting caching mechanisms such as APC?

Code:
/usr/local/apache/bin/apachectl -M | grep -i deflate
Yes, mod_deflate is there. Assuming it's not needed (is it?) for WordPress, Mambo and the forum systems, I'll rebuild Apache without it. I'm taking a chance here, I guess, so let me know fast if it needs to return.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Given the discussions on how vbSEO specifically has an issue with mod_deflate when also using APC, I would say if you are using that vB module that you will need to disable mod_deflate on the server. You could always test it first if you've been using cPanel > Optimize Website on that account by disabling anything you've configured for mod_deflate (cPanel > Optimize Website is what stems from using mod_deflate) to see the results. If it no longer has the issue, then mod_deflate was the culprit.
 

Gene Steinberg

Well-Known Member
May 26, 2007
163
3
168
I ran EasyApache. I had APC installed via WHM. It killed APC, so I now have to rebuild all over again. I am going back to eAccelerator, unless you wish to help me fix this.

Peace,
Gene
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
You could try out xCache, which is also available via EasyApache nowadays if eAccelerator doesn't work well enough and you do not wish to continue using APC.

As for trying to help you fix this issue, I thought I had been trying to assist in it thus far. If this broke the APC installation, this is something you would need to be aware will occur and have /scripts/posteasyapache scripts setup to reset anything required for APC to function. It will occur whenever you run EasyApache regardless and is part of administering a machine. Please let me know if you have questions on what I've noted.

Here is a discussion on using posteasyapache script hooks:

http://docs.cpanel.net/twiki/bin/view/AllDocumentation/ScriptHooks
 

Gene Steinberg

Well-Known Member
May 26, 2007
163
3
168
Your xCache setup is defective. It doesn't include the key settings to make it work properly. Until you add those to php.ini, as you do with eAccelerator, I won't use it.
 

Gene Steinberg

Well-Known Member
May 26, 2007
163
3
168
One more thing:

Does mod_deflate replace or enhance the functions of zip and zlib?

Stupid question, but do I need all three with PHP 5.3.8? Seems we have some duplication here.

Peace,
Gene
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
zip and zlib are PHP modules rather than an Apache module:

PHP: Introduction - Manual
PHP: Introduction - Manual

zlib is for gzip rather than zip, so it doesn't duplicate the functionality of zip. Neither of these work exactly like mod_deflate due to mod_deflate being at the Apache rather than PHP level:

mod_deflate - Apache HTTP Server

mod_deflate can interfere with existing OPCode caching options for PHP, which is why that was suggested to be disabled. zip and zlib should not interfere with that caching.
 

Gene Steinberg

Well-Known Member
May 26, 2007
163
3
168
OK, so if I want to use compression with a PHP forum or blog, zlib and gzip do it? I don't need mod_deflate? Please clarify.

Peace,
Gene
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator

Gene Steinberg

Well-Known Member
May 26, 2007
163
3
168
OK it's history.

Meantime, I'll consider xCache if and when you folks fix the installer so it installs a basic set of settings in php.ini, just as you do with eAccelerator.