-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
21.0.3 OC\HintException: Memcache \OC\Memcache\APCu not available #27781
Comments
Hello, I had the same problem. For me the solution was apc.enable_cli = 1 in php.ini !!! |
Same problem: I had to switch memcache to redis instead of APcu Raspbian, nextcloud 21.0.2 --> 21.0.3, PHP 7.3, Nginx In general the update to 21.0.3 went wrong. I had to go for manual install, then, blocked in maintenance mode, then repaired manually and now still strugling with a invalid_hash for core/js/mimetypelist.js. I should have wait for this upgrade : my install is more or less broken. I hope next version will fix these install issues. |
I can confirm after upgrading from 21.0.2 to 21.0.3 the cronjob does not seem to run anymore, without showing an error. |
As a workaround you can use the parameter Example:
Also, adding |
Aha, you provided a more complete solution in this report already. thanks again. This fix solves the issue on my machine and the NC cron job is available again. However, there should be a more general fix provided by the NC devs hopefully. Please note on my machine there was not any upgrade or change to the PHP 7.3.27 installation or the settings provided. This configuration allowed all Nextcloud versions before 21.0.3 running without the a.m. issue. This points at NC 21.0.3 and some PHP code issue, I presume. Your mileage may vary. |
Yes, I also received this error with the update from 21.0.2 to 21.0.3. I haven't changed anything on my system. I have noticed for a long time that the developers no longer have their Nextcloud project under control, errors creep in again and again that somehow nobody notices and as soon as the version is published these errors appear. |
I don't think this is a bug just meed to add apc.enable_cli=1 to /etc/php/8.0/mods-available/apcu.ini |
Thanks @andrewheeler82 and I sadly consent. The admin manual has been changed to reflect this change of design only recently, I presume. This seems to be an intentional change to the PHP coding in NC 22 and obviously was backported to NC 21.0.3 without any notice to the community. Please prove me wrong, but this is my picture after reading the below reports which are one month old.
If this is the case, this apparent negligence and way of change from Nextcloud would be especially hurting to community people like me who were running a stable NC environment for years. |
Actually, the recommendation to set Additionally the notice about appending |
I look through the documentation at regular intervals. Maybe I missed the apc.enable_cli = 1 change. But really now within a smaller release. Activate something like that and the user looks like a dork. |
Also got bit by this one after upgrading from 20.0.2 to 20.0.3. Adding apc.enable_cli=1 to /etc/php/8.0/mods-available/apcu.ini worked for me as well. |
Got the same issue after upgraded to 21.0.3 days ago, just solved by increase apc.shm_size in php setting to 64M from default 32M. By adding apc.enable_cli=1 only not work for me. |
@zaku903 Thank you very much!!! |
Debian 10 with ISPConfig ignore website PHP settings, so require to set CLI in config file. path for 7.3 is: add these two lines |
Thank you, after hours searching why cron wasn't working, everything goes well now ! php 8 - Debian 10 - NC 22 bêta |
not working for me (running on a synology NAS (not docker)). cron stopped working as well.
|
Did you put it in apcu.ini ? For me putting it in php.ini wasn't enough |
No idea where to find apcu.ini The whole setup with Synology sucks - because the php installs are through Synology - hence none of the web "cookbooks" work. |
I've been struggling with this for a few hours and finally found my issue. I had php-apcu installed, but I needed php7.3-apcu installed, obviously replace that with whatever version of php you're using. |
According to #2039 and the linked commit #2040 this issue is solved by using Redis instead of APCu as a memcaching backend. Note: I had to change to PHP 7.4 for this to work, as using PHP 7.3 prior to this didn't work in my case. Edit: APCu does work if you just add |
I suppose the final way to fix the resulting issue will be discussed in #27608 |
Using a Synology DS too and found a possible solution for @snowflakes: |
As @chippey5 said, there are mixed recommendations between the commit and the documentation. I am completely lost as to what to do. Using apc.enable_cli seems potentially unsafe (should it be used only with the instance turned off?) and the documentation says to prefer APCu. I wanted to run an occ command but I guess this is also the reason my nextcloud cron jobs have not run in 4 days (when I updated to the most recent version available). If that's true, it's possible that a lot more users are going to notice issues in the coming weeks. Clarifying the documentation would probably avoid a lot of questions. |
Thanks man, this fixed me as well! |
The issue occured during update from 20.0.12 to 21.0.4 For me, the problem was that I edited the wrong I edited
But I should have edited
In this file, I needed to enable the extensions:
Then the upgrade worked. |
thanks ! for me, it's located here : |
I have
|
You have a typo in the settings key Try to add |
Oh, it's a mistake in that post. :-P Actually I add |
@mzch |
What can I do something else? |
Ok looks good to me. Could you please provide some log snippets? Sounds really strange to me to be honest... |
Cron log is only |
With respect to nextcloud/server#27781 we should add a hint regarding the PHP CLI parameters for APCu like we did in c5fa1b6#diff-48dc187eeb03371b5ad6886b33043bf060884809c1d51a3568c5d29e40e3bf13 and 38a0a33#diff-48dc187eeb03371b5ad6886b33043bf060884809c1d51a3568c5d29e40e3bf13 for the cronjob.
With respect to nextcloud/server#27781 we should add a hint regarding the PHP CLI parameters for APCu like we did in c5fa1b6#diff-48dc187eeb03371b5ad6886b33043bf060884809c1d51a3568c5d29e40e3bf13 and 38a0a33#diff-48dc187eeb03371b5ad6886b33043bf060884809c1d51a3568c5d29e40e3bf13 for the cronjob.
@mzch i did some code research and found that the server/lib/private/Memcache/APCu.php Line 154 in 5645b2a
apcu_check.php with the following content:
<?php
echo "apcu loaded: " . extension_loaded("apcu") . "\n";
echo "ini apc.enabled: " . ini_get("apc.enabled") . "\n";
echo "ini apc.enable_cli: " . ini_get("apc.enable_cli") . "\n";
echo "apc version (need min. 4.0.6): " . phpversion("apc") . "\n";
echo "apcu version (need min. 5.1.0): " . phpversion("apcu") . "\n"; If you then run
The first three line should all be set to Please run this script with your php cli environment and past the output here if you like, cheers :-) |
Hi, I installed another NextCloud instance, then it's running successfully by adding
Perhaps my original instance has something broken. Thanks @R0Wi :) |
where is your php.ini located ? |
Thanks for the help! |
I tried your command, but i still get the error :
Do someone know why? In my /var/www/nextcloud/config/config.php file there is the line "'memcache.local' => '\OC\Memcache\APCu'," And how can i add the My currently version is 22.2.5, but with 22.2.4 i also had this problem. Before this version, i didn't have any errors. |
Do you have this apc.enable_cli=1 added to you apcu.ini file ? Should be located in /etc/php/8.0/mods-available/ or /etc/php/7.4/mods-available/ Its recommended to have that for mem chacing makes nc running better. 'memcache.local' => '\OC\Memcache\APCu', |
@AndyXheli thank you for your quick reply! Is this correct? |
@thepate94227 You're very welcome!
|
@AndyXheli thanks again for your help! Now everything works! 👍 |
You're Welcome! Happy to help |
Helps to actually read. I spent way too much time figuring out that |
For anyone who tried all these fixes but still had it fail, I was able to fix it by installing php-redis . Some other thread seemed to indicate apcu was being phased out, so I tried: sudo apt install php-redis . After that, all worked! |
Hi Everyone, OLD: Also running OCC command example:
I hope it helps someone... |
My best advice: Migrate Nextcloud to the official Docker Image and configure unattended updates. A blessing, not having to manage dependencies anymore.. |
This is helpful! |
thanks a bunch! |
Using also a synology NAS but with PHP8.0. Add a new nextcloud.ini in usr/local/etc/php80/cli/conf.d did NOT work for me, even after a restart. I had to add |
Nextcloud 21.0.3.1 (after upgrade from 21.0.2.1)
Debian 10.10 Buster
Apache 2.4
PHP 7.3.27
After the upgrade on my machine there is a condition not appearing in any NC version before:
No logging entry found. This makes the NC cron job unavailable apparently.
No such issue in any version before 21.0.3. All settings in place.
see also: https://help.nextcloud.com/t/cron-not-running-in-nc-21-0-3/119415/7?u=tp75
The text was updated successfully, but these errors were encountered: