Join the community today
Become a Member

Default Caching ?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by BoostN, Feb 26, 2016.

  1. BoostN

    BoostN Active Member

    134
    27
    28
    Aug 19, 2014
    Ratings:
    +42
    Local Time:
    4:15 PM
    1.13.6
    10.0.34
    What's the default caching ? How to disable it for a upgrade?

    I noticed tonight upgrading my forum I had to open a "incognito" session to get the upgrade script to run.

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,873
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    7:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Zend Opcache caches PHP until you restart PHP-FPM which is probably want o you ran into ?

    Using any forum addon's for caching like Redis or Memcached for Xenforo etc ? If so just restart those services too before doing upgrades from file changes.
     
  3. BoostN

    BoostN Active Member

    134
    27
    28
    Aug 19, 2014
    Ratings:
    +42
    Local Time:
    4:15 PM
    1.13.6
    10.0.34
    I've not configured the centminmod package from defaults. So just a restart of PHP-FPM and then start the upgrade and I should be good? Thanks!
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,873
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    7:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Defaults for Zend Opcache for 1GB VPS
    Code:
    php --ri 'Zend Opcache'
    
    Zend OPcache
    
    Opcode Caching => Disabled
    Optimization => Disabled
    Startup Failed => Opcode Caching is disabled for CLI
    
    Directive => Local Value => Master Value
    opcache.enable => On => On
    opcache.use_cwd => On => On
    opcache.validate_timestamps => On => On
    opcache.inherited_hack => On => On
    opcache.dups_fix => Off => Off
    opcache.revalidate_path => Off => Off
    opcache.log_verbosity_level => 1 => 1
    opcache.memory_consumption => 256 => 256
    opcache.interned_strings_buffer => 8 => 8
    opcache.max_accelerated_files => 16000 => 16000
    opcache.max_wasted_percentage => 5 => 5
    opcache.consistency_checks => 0 => 0
    opcache.force_restart_timeout => 180 => 180
    opcache.revalidate_freq => 180 => 180
    opcache.file_update_protection => 2 => 2
    opcache.preferred_memory_model => no value => no value
    opcache.blacklist_filename => no value => no value
    opcache.max_file_size => 0 => 0
    opcache.protect_memory => 0 => 0
    opcache.save_comments => 1 => 1
    opcache.load_comments => 1 => 1
    opcache.fast_shutdown => 1 => 1
    opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF
    opcache.enable_file_override => On => On
    opcache.enable_cli => Off => Off
    opcache.error_log => no value => no value
    opcache.restrict_api => no value => no value
    set in /etc/centminmod/php.d/zendopcache.ini
    Code:
    php --ini
    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /usr/local/lib/php.ini
    Scan for additional .ini files in: /etc/centminmod/php.d
    Additional .ini files parsed:      /etc/centminmod/php.d/a_customphp.ini,
    /etc/centminmod/php.d/curlcainfo.ini,
    /etc/centminmod/php.d/geoip.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/mongodb.ini,
    /etc/centminmod/php.d/redis.ini,
    /etc/centminmod/php.d/zendopcache.ini
    contents of /etc/centminmod/php.d/zendopcache.ini
    Code:
    zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/opcache.so
    ;opcache.error_log=/var/log/php_opcache_error.log
    opcache.enable=1
    opcache.memory_consumption=256
    opcache.interned_strings_buffer=8
    opcache.max_wasted_percentage=5
    opcache.max_accelerated_files=16000
    ; http://php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq
    ; defaults to zend opcache checking every 180 seconds for PHP file changes
    ; set to zero to check every second if you are doing alot of frequent
    ; php file edits/developer work
    ; opcache.revalidate_freq=0
    opcache.revalidate_freq=180
    opcache.fast_shutdown=1
    opcache.enable_cli=0
    opcache.save_comments=1
    opcache.enable_file_override=1
    opcache.validate_timestamps=1
    ;opcache.huge_code_pages=1
    
    To customise own php ini settings use own custom *.ini file PHP-FPM - CentminMod.com LEMP Nginx web stack for CentOS and reference Zend Opcache ini options PHP: Runtime Configuration - Manual

    Relevant settings for when new PHP file changes are detected by PHP