Closed meonkeys closed 1 year ago
I destroyed and re-created my Nextcloud app container and the warning went away. I don't have a repro. Maybe it was running for a long time?
This error message popped up again, but the server seems to be working fine. No other symptoms that I can tell.
Will the problem be fixed or is there a solution for this error?
@R7JANV1 are you seeing this warning?
@R7JANV1 are you seeing this warning?
Yes!
Ok. @R7JANV1 , can you add any details about your setup, what you've tried or researched already? Also--side note--for a "me too" comment, consider adding your thumbs up to the original issue description.
The obvious solution (as rawtaz pointed out in #nextcloud on LiberaChat IRC) is to increase the value. But I have questions--I just added them to the description. I'd like to know the root cause. If the root cause is script(s) in a default nextcloud install, perhaps opcache.memory_consumption
should be increased in the Dockerfile
. If the root cause is an installed app, perhaps there is a problem with that app. If the root cause is related to some other resource usage (e.g. how many folders or files I have in my instance, how many apps I have installed), then maybe we can come up with some usage-specific guidance for the opcache.memory_consumption
value.
https://www.saotn.org/optimize-php-opcache-configuration/ might help us figure this out.
I tried opcache_get_status()
. Here's part of that output:
["memory_usage"]=>
array(4) {
["used_memory"]=>
int(123349000)
["free_memory"]=>
int(10865416)
["wasted_memory"]=>
int(3312)
["current_wasted_percentage"]=>
float(0.002467632293701172)
}
The scripts consuming the most memory in my instance are:
/var/www/html/3rdparty/scssphp/scssphp/src/Compiler.php
: 793400/var/www/html/custom_apps/phonetrack/lib/Controller/PageController.php
: 412072/var/www/html/apps/dav/lib/CalDAV/CalDavBackend.php
: 3399601 is probably core nc code, 3 is something I need for calendar, and 2 is for phonetrack. If phonetrack used 10x that, it might be worth disabling. Skimming the rest of the scripts, it looks like memory usage is pretty well spread out, so perhaps the warning is just due to the number of scripts period (as opposed to a particular misbehaving script or app).
I recently migrated my Nextcloud All in One instance from my Ubuntu Server to TrueNAS. There I linked a Nextcloud container and a database container using the built-in Kubernetes Docker function and migrated the data and database of the old instance to the new instance on TrueNAS.
Have you tried changing opcache.memory_consumption
?
On my end I've decided to ignore the warning until I see some other symptom besides the warning itself.
Warning still exists on NC 27.1.1
For me, it's an error - NC 28.0.8.
Interestingly - maybe due to my own ignorance - I don't have a php.ini files in /usr/local/etc but I do have /usr/local/etc/php/php.truenas.ini
, which I believe is the same (although would be excited to be corrected if this is not the case).
My config is:
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=512
opcache.interned_strings_buffer=32
opcache.max_accelerated_files=10000
opcache.revalidate_freq=1
opcache.save_comments=1
The opcache thing used to be a warning but since some time (idk when or why) it has become an error.
I'm getting a warning on the
Security & setup warnings
page (/settings/admin/overview
). First I've seen this one. In the past I've seen warnings about string buffers (mentioned in other issues).Security & setup warnings
It's important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.
There are some warnings regarding your setup.
opcache.memory_consumption
to your PHP configuration with a value higher than128
.Please double check the installation guides ↗, and check for any errors or warnings in the log.
Check the security of your Nextcloud over our security scan ↗.
I'm using:
nextcloud:25.0.5-apache
1dd8f331fb758655eb3b2e6388b7cff26f2a90dc0bec25f8d2af1dbdbf538234
opcache.memory_consumption
is how many megabytes to use in shared memory storage for OPcache. The minimum is 8 and the default is 128.Questions:
opcache.memory_consumption
should be increased. How much? Is there a reasonable upper bound besides just "however much system memory you can spare"? What's the best practice here?