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

Issue with cron.php missing APCu module #439

Closed
nathanael-h opened this issue Sep 10, 2021 · 6 comments
Closed

Issue with cron.php missing APCu module #439

nathanael-h opened this issue Sep 10, 2021 · 6 comments

Comments

@nathanael-h
Copy link
Contributor

The bug

I upgrade to the 22.1.1~ynh1 stable version, and I received emails with this error:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

Context

  • Hardware: VM in Proxmox VE, on dedicated machine.
  • YunoHost version:
yunohost: 
  repo: stable
  version: 4.2.8.3
yunohost-admin: 
  repo: stable
  version: 4.2.5
moulinette: 
  repo: stable
  version: 4.2.4
ssowat: 
  repo: stable
  version: 4.2.4
  • I have access to my server: *Through SSH & through the webadmin *
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: Mmmh
    • If yes, please explain: I have this nextcloud instance for many years, maybe 5 or 6, updated with Yunohost, installed some extension needed more stuff (eg: imagemagick ), but not very strange mods...
  • Using, or trying to install package version/branch: stable

Steps to reproduce

SSH, run as root :
sudo -u nextcloud /usr/bin/php7.3 -f /var/www/nextcloud/cron.php
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

For your information here is what I have in nextcloud's cron:

~$ sudo crontab -l -u nextcloud
# */15  *  *  *  * nextcloud /usr/bin/php7.3 -f /var/www/nextcloud/cron.php
# */10  *  *  *  * nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate

*/15  *  *  *  * /usr/bin/php7.3 -f /var/www/nextcloud/cron.php
# */10  *  *  *  * /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate

Expected behavior

Cron running well 😉

It works if I add --define apc.enable_cli=1 in the command. I found this in this commit : 51c5b71
It removed extra lines in cron.

Logs:

https://paste.yunohost.org/raw/qekoyequpu

@zamentur
Copy link
Contributor

Could you do :

cat /etc/cron.d/nextcloud

--define apc.enable_cli=1 seems added in this file since your upgrade (i read your upgrade log).

@nathanael-h
Copy link
Contributor Author

Yep :

~$ cat /etc/cron.d/nextcloud
*/15  *  *  *  * nextcloud /usr/bin/php7.3 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php

Should I clean this with crontab -e -u nextcloud ⬇️ ?

~$ sudo crontab -l -u nextcloud
 */15  *  *  *  * /usr/bin/php7.3 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php
# */10  *  *  *  * nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate

For your information:

~$ sudo cat /var/spool/cron/crontabs/nextcloud
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.Crz5MY/crontab installed on Fri Sep 10 21:38:48 2021)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
 */15  *  *  *  * /usr/bin/php7.3 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php
# */10  *  *  *  * nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate

@zamentur
Copy link
Contributor

On other instances i have:

$ crontab -l -u nextcloud
no crontab for nextcloud

Are you sure you didn't add this cron in crontab yourself ?

@nathanael-h
Copy link
Contributor Author

nathanael-h commented Sep 12, 2021 via email

@shukon
Copy link

shukon commented Sep 25, 2021

For what it's worth: nextcloud/server#27781

@tituspijean
Copy link
Member

Duplicate of #434

@tituspijean tituspijean marked this as a duplicate of #434 Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants