[Debug off] When you turn on the Opcache, please turn off this piece, otherwise it will wait a minute to take effect.

Source: Internet
Author: User
[Debug off] When you turn on the Opcache, please turn off this piece, otherwise it will wait a minute to take effect.

http://www.justwinit.cn/post/8268/

Background: There is a brother with Sftp to the line under the server to change the file, found that bad to make it, so the re-transmission, to later good, I was a look at the browser head, found that there is no problem ah, today I got a piece of it, found that there is really this problem, fine check, is opcache caused by, The default is 60 seconds. So I turned off, before the EA acceleration, now the new version of PHP seems to use this opcache:

; 2s Checking for file updates Note: 0 is always checked not off

; Recommended 60

opcache.revalidate_freq=2

————————————————————————

Debugging first off, and then open the following no problem:

; How often (in seconds) to check file timestamps for changes to the shared; Memory storage allocation. ("1" means validate once per second, but only; once per request. "0" means always validate); 2s Checking for file updates Note: 0 is always checked not off; Recommended 60opcache.revalidate_freq=0

—————————————————————————

The following are the configuration instructions for Opcache:

Copy Code

[opcache]zend_extension = "G:/php/php-5.5.6-win32-vc11-x64/ext/php_opcache.dll"

; Zend Optimizer + switch, code is no longer optimized when off. opcache.enable=1

; Determines if Zend Opcache is enabled for the CLI version of Phpopcache.enable_cli=1

; Zend Optimizer + Shared memory size, how many precompiled PHP code can be stored in total (MB)

; Recommended 128

Opcache.memory_consumption=64

; Zend Optimizer + The total memory of the string in the staging pool. (Unit: MB)

; Recommended 8

Opcache.interned_strings_buffer=4

; Maximum number of cached files between 200 and 100000

; Recommended 4000

opcache.max_accelerated_files=2000

; Memory "Wasted" reaches the percentage corresponding to this value, a restart schedule is initiated. opcache.max_wasted_percentage=5

; Open this command, Zend Optimizer + will automatically append the name of the current working directory to the script key,

; This eliminates key-value naming conflicts between files of the same name. Turning this command on will improve performance,

; However, it can cause damage to existing applications.

Opcache.use_cwd=0

; Turn on file timestamp validation Opcache.validate_timestamps=1

; 2s Checking for file updates Note: 0 is always checked not off

; Recommended 60

opcache.revalidate_freq=2

; Allows or disables the optimization of file searches in include_path; opcache.revalidate_path=0

; Whether to save comments on file/function if Apigen, Doctrine, ZF2, phpunit need file comment

; Recommended 0

Opcache.save_comments=1

; Whether to load comments for file/function; Opcache.load_comments=1

; Turn on quick close, open this when PHP Request shutdown the memory will be increased

; Recommended 1

Opcache.fast_shutdown=1

Allow the optimization of file presence (file_exists, etc.) to be overwritten. ; opcache.enable_file_override=0

; Define how many optimization processes to start; opcache.optimization_level=0xffffffff

; Enabling this hack can temporarily resolve the "can ' t Redeclare class" error.; o Pcache.inherited_hack=1

; Enabling this hack can temporarily resolve the "can ' t Redeclare class" error.; o Pcache.dups_fix=0

; Set non-Cached blacklists

; PHP files beginning with cache_ in the specified directory are not cached. /png/www/example.com/public_html/cache/cache_

; opcache.blacklist_filename=

; The cache of large files is removed through the file size screen. By default, all files are cached.; o Pcache.max_file_size=0

; Check cache checksum once per N requests. The default value of 0 indicates that the check is disabled.

; Due to the calculation of the checksum lossy performance, this directive should be opened tightly in the development of debugging.

; opcache.consistency_checks=0

; How long to wait (in seconds) after the cache has not been accessed to schedule a restart; opcache.force_restart_timeout=180

; The error log file name. Empty indicates the use of standard error output (stderr).; o pcache.error_log=

; Write error messages to the server (Apache etc) log; opcache.log_verbosity_level=1

; The preferred background for memory sharing. Leave blank to let the system choose.; o Pcache.preferred_memory_model=

; Prevent accidental writes during script execution within a share, for internal debugging only.; o Pcache.protect_memory=0

From: http://www.cnblogs.com/HD/p/4554455.html

Intrinsic Association of Opcache.huge_code_pages=1 parameters: http://www.laruence.com/2015/10/02/3069.html

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.