magento / magento-cloud

Magento Cloud
Open Software License 3.0
207 stars 237 forks source link

Default Opcache settings are too opinionated. #521

Open aepod opened 3 years ago

aepod commented 3 years ago

Opcache validate toggled off causes a lot of issues, in lower environments.

While this setting is fine in cloud servers where files don't change local developers do need to be able to see the changes.

;
; Setup opcache configuration
;
opcache.validate_timestamps = 0
opcache.blacklist_filename="${MAGENTO_CLOUD_APP_DIR}/op-exclude.txt"
opcache.max_accelerated_files=16229
opcache.consistency_checks=0

This was introduced in: 8cfcb8f#diff-243dae866e7173c76f8b91864096c15ffcb3aec3699da130eb0b7ef2566fdce3

This is also problematic because of the opcache.validate_timestamps = 0 opcache.consistency_checks=0

This basically makes it stop checking files for changes, and local development environments end up having to be restarted to see the changes. If this is required in Magento Cloud, and it does make sense to have it there, I would suggest not enforcing it here, but perhaps moving it to a performance settings file (php.performance.ini) that gets included in the cloud environments.

The issues with op-exclude.txt is handled in another ticket: https://github.com/magento/magento-cloud/issues/520