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

warning: The OPcache buffer is nearly full #2184

Open
adripo opened this issue Mar 21, 2024 · 8 comments · May be fixed by #2185
Open

warning: The OPcache buffer is nearly full #2184

adripo opened this issue Mar 21, 2024 · 8 comments · May be fixed by #2185
Labels

Comments

@adripo
Copy link
Contributor

adripo commented Mar 21, 2024

I am having a warning that indicates that opcache memory is almost full.
I checked and this issue was already raised in some closed issues:
#1926

And I also checked the values used in All-in-one solution to solve similar issues.

This PR was successfully merged and I this it should be applied to the docker version too:
nextcloud/all-in-one#2762

Impacted files:

echo 'opcache.memory_consumption=128'; \

echo 'opcache.memory_consumption=128'; \

I would also apply the related config changes from all-in one:

opcache.interned_strings_buffer=64
opcache.memory_consumption=256
opcache.jit_buffer_size=8M
@adripo adripo linked a pull request Mar 21, 2024 that will close this issue
@tzerber
Copy link
Contributor

tzerber commented Apr 26, 2024

Jumping on this bandwagon. On a relatively busy instance I need to use these values to get rid of the warning. Not a PHP expert at all, but I was increasing them until the error went away, using whatever PHP was complaining about until i get it green. NC version 29, 10 active users, NC used mostly via browser for office work/emails/deck/ and additionally around 100GB traffic between users / day.

opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=64
opcache.max_accelerated_files=12000
opcache.memory_consumption=512
opcache.save_comments=1
opcache.revalidate_freq=60
opcache.jit = 1255
opcache.jit_buffer_size = 256M

@tarbib
Copy link

tarbib commented Apr 27, 2024

Hello @adripo @tzerber
I have the same issue. I actually struggle to locate the file php.ini within the Nextcloud container.
Any pointers?
Thanks !

@tzerber
Copy link
Contributor

tzerber commented Apr 27, 2024

Hello @adripo @tzerber
I have the same issue. I actually struggle to locate the file php.ini within the Nextcloud container.
Any pointers?
Thanks !

Depends if you're using docker or not. Usually phpinfo() can give you hints on ini location

@tarbib
Copy link

tarbib commented Apr 27, 2024

Depends if you're using docker or not. Usually phpinfo() can give you hints on ini location

I use Docker indeed
the image linked to this repo https://hub.docker.com/_/nextcloud/

@tzerber
Copy link
Contributor

tzerber commented Apr 29, 2024

Depends if you're using docker or not. Usually phpinfo() can give you hints on ini location

I use Docker indeed the image linked to this repo https://hub.docker.com/_/nextcloud/

For opcache I use the following mounted local ini in all containers :

volumes:
      - nextcloud:/var/www/html
      - ./opcache-recommed.ini:/usr/local/etc/php/conf.d/opcache-recommended.ini

The actual conf used by the container is this one /usr/local/etc/php-fpm.conf and it loads everything from /usr/local/etc/php/conf.d/*conf too. Both those paths are !! Inside !! the container, not on your host!

@MichaIng
Copy link
Member

@tzerber

opcache.jit_buffer_size = 256M

Try to use opcache.jit_buffer_size = 2M. I never saw a Nextcloud instance which uses more than 1 MiB of this particular sub-buffer. And since it occupies from opcache.memory_consumption, it is likely the only reason why you needed to raise the latter, while otherwise the default 128M would have been sufficient, in combination with opcache.interned_strings_buffer=32 max, often 8 or 16, depending on used apps.

@adripo

This comment was marked as off-topic.

@MichaIng

This comment was marked as off-topic.

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 a pull request may close this issue.

5 participants