The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

APC 3.1.9 Cache Frequently Restarts!

Discussion in 'General Discussion' started by Gene Steinberg, Nov 29, 2011.

  1. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    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
     
    #1 Gene Steinberg, Nov 29, 2011
    Last edited: Nov 29, 2011
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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
     
  3. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  5. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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
     
  7. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  8. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  10. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  12. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
Loading...

Share This Page