Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable opcache.validate_timestamps #835

Merged
merged 1 commit into from
Jan 15, 2021
Merged

Conversation

mnapoli
Copy link
Member

@mnapoli mnapoli commented Jan 15, 2021

This change disables a non-standard optimization that was applied automatically by Bref. The main reason it was applied was that the code source is read-only on Lambda.

However, that is not 100% true: code written to /tmp is read/write (for example when using /tmp as a cache directory, or for a compiled container, etc.). The opcache.validate_timestamps=0 would cause bugs very hard to debug.

Additionally, switching to opcache.validate_timestamps=1 will allow code in development to be reloaded when changed without having to restart containers.

This could cause a very small performance regression, but I consider that less important than fixing an actual bug.

Users are welcome to re-enable that option in php.ini:

opcache.validate_timestamps=0

This change disables a non-standard optimization that was applied automatically by Bref. The main reason it was applied was that the code source is read-only on Lambda.

However, that is not 100% true: code written to `/tmp` is read/write (for example when using `/tmp` as a cache directory, or for a compiled container, etc.). The `opcache.validate_timestamps=0` would cause bugs very hard to debug.

Additionally, switching to `opcache.validate_timestamps=1` will allow code in development to be reloaded when changed without having to restart containers.

This could cause a very small performance regression, but I consider that less important than fixing an actual bug.

Users are welcome to re-enable that option in `php.ini`:

```
opcache.validate_timestamps=0
```
@mnapoli mnapoli added the bug label Jan 15, 2021
@mnapoli mnapoli merged commit 5780c23 into master Jan 15, 2021
@mnapoli mnapoli deleted the disable-opcache-optimization branch January 15, 2021 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant