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

Zend OPcache "opcache.validate_timestamps" value for Production Forum?

Discussion in 'Server Configuration and Hosting' started by RoldanLT, May 23, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    What is the recommended value for this config: opcache.validate_timestamps ?
    For a Live Forum, when I use value of 0, should I reload php or clear cache every time I modified core files?
    Like adding new addons, updating addons or upgrading XenForo core.
  2. BamaStangGuy

    BamaStangGuy Well-Known Member

    I just leave it at 60. Revalidating every 1 minute isn't going to cause any issues and lets me not have to worry about restarting nginx or clearing cache when I change a template due to them being cached as php files.
  3. RoldanLT

    RoldanLT Well-Known Member

    I only know 0 and 1 as possible value for opcache.validate_timestamps.
  4. BamaStangGuy

    BamaStangGuy Well-Known Member

    Sorry, I was referring to this:

    Which offers a compromise of validating the files every so often.
    RoldanLT likes this.
  5. RoldanLT

    RoldanLT Well-Known Member

    I just read this:

    opcache.validate_timestamps - When this is enabled, PHP will check the file timestamp per your opcache.revalidate_freq value.

    When it’s disabled, opcache.revaliate_freq is ignored and PHP files are NEVER checked for updated code. So, if you modify your code, the changes won’t actually run until you restart or reload PHP (you force a reload with kill -SIGUSR2).

    Yes, this is a pain in the ass, but you should use it. Why? While you’re updating or deplying code, new code files can get mixed with old ones— the results are unknown. It’s unsafe as hell.

Share This Page