Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

can´t disable opcache via Nitro CLI #298

Closed
aloco opened this issue Mar 17, 2021 · 3 comments
Closed

can´t disable opcache via Nitro CLI #298

aloco opened this issue Mar 17, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@aloco
Copy link

aloco commented Mar 17, 2021

Description

Hi,

we experienced some issues with opcache configuration. We enabled opcache via nitro iniset and opcache_enable. We experienced issues with PHP files which were not invalidated and therefore wanted to disable opcache. After going through the configuration steps, opcache is still enabled. It seems like the container env vars are not updating correctly since PHP_OPCACHE_ENABLE is still set to 1 after disabling via the nitro CLI

  1. display_errors
  2. max_execution_time
  3. max_input_vars
  4. max_input_time
  5. max_file_upload
  6. memory_limit
  7. opcache_enable
  8. opcache_revalidate_freq
  9. post_max_size
  10. upload_max_file_size
Enter your selection: 7
Should we enable OPCache [false]? false
Apply changes now [Y/n]? Y

Steps to reproduce

  1. enable opcache via nitro iniset
  2. disable opcache via nitro iniset
  3. PHP_OPCACHE_ENABLE in container env is still 1

Additional info

macOS 11.2
Docker Desktop 3.2.1

Nitro CLI: 2.0.5
Nitro gRPC: 2.0.5
Docker API: 1.41 (1.12 min)
Docker CLI: 1.41

@aloco aloco added the bug Something isn't working label Mar 17, 2021
@aloco aloco changed the title can´t disable opcache via nitro CLI can´t disable opcache via Nitro CLI Mar 17, 2021
@jasonmccallister
Copy link
Member

I can confirm this and will get started on a fix for the next release.

@jasonmccallister jasonmccallister self-assigned this Mar 17, 2021
@aloco
Copy link
Author

aloco commented Mar 17, 2021

Thanks a lot!!

Can you also confirm that PHP files in opcache are not invalidating? Do you need more information on this?

@jasonmccallister
Copy link
Member

I have not checked the invalidation yet, but the docker container is not recreated when the setting is changed. To work around this now you can perform the following steps:

  1. Update the setting to disable opcache (should update the nitro.yaml)
  2. Manually remove the container (using Docker Desktop or docker container rm -f <yoursite.nitro>)
  3. Run nitro apply to recreate the container

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants