Operating system and version:
Debian buster docker container
Apache or nginx version:
The issue you are facing:
Lately, maybe for the last month or so, cron jobs have been unstable and often show
Last background job execution ran 3 hours ago. Something seems wrong. on the overview page. What’s very strange is that manually running
php -f /var/www/html/cron.php as the www-data user in the container produces no output at all, and no debug logs (with
occ log:manage --level=debug or with
occ log:manage --level=info.
I also use preview generator which takes a very long time to run sometimes, but I have disabled that for 24 hours or so and even after server restarts I’m still having the same problem.
EDIT: This is in fact caused by preview:pre-generate somehow. See my follow up comment.
Once and a while, after taking down all containers and starting them again, I am able to get a few successful runs. After a while though cron.php stops working again and I start to see the error on the overview page again.
I did see this issue on github but it doesn’t seem to be the same problem I have. I don’t see cron.php running anywhere. It just exits a few seconds after running it with no output.
Is this the first time you’ve seen this error?: Y
Steps to replicate it:
- Have running instance
- Gain shell inside app (fpm) container
php -f /var/www/html/cron.php
- See no output and overview does not show a successful background job run.
- Debug logs show nothing at all related to cron immediately following a manual execution of cron.php (lots of noise from deprecation warnings though related to this discussion )
The output of your Nextcloud log in Admin > Logging:
There really isn’t anything to put here. There are no debug logs from cron, and there is no output from running the job either.
The output of your config.php file in
/path/to/nextcloud (make sure you remove any identifiable information!):
<?php $CONFIG = array ( 'memcache.local' => '\\OC\\Memcache\\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\Movie', 1 => 'OC\\Preview\\PNG', 2 => 'OC\\Preview\\JPEG', 3 => 'OC\\Preview\\GIF', 4 => 'OC\\Preview\\BMP', 5 => 'OC\\Preview\\XBitmap', 6 => 'OC\\Preview\\MP3', 7 => 'OC\\Preview\\TXT', 8 => 'OC\\Preview\\MarkDown', ), 'instanceid' => '<redacted>', 'passwordsalt' => '<redacted>', 'secret' => '<redacted>', 'trusted_domains' => array ( 0 => '<redacted>', ), 'datadirectory' => '/var/www/html/data', 'overwrite.cli.url' => '<redacted>', 'dbtype' => 'pgsql', 'version' => '188.8.131.52', 'dbname' => 'nextcloud', 'dbhost' => 'db', 'dbport' => '', 'dbtableprefix' => '', 'dbuser' => 'nextcloud', 'dbpassword' => '<redacted>', 'installed' => true, 'mail_smtpmode' => 'smtp', 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpsecure' => 'ssl', 'mail_from_address' => 'admin', 'mail_domain' => '<redacted>', 'mail_smtpauth' => 1, 'mail_smtphost' => '<redacted>', 'mail_smtpport' => '<redacted>', 'mail_smtpname' => '<redacted>', 'mail_smtppassword' => '<redacted>', 'maintenance' => false, 'loglevel' => 1, 'theme' => '', 'app_install_overwrite' => array ( 0 => 'spreed', 1 => 'gpxedit', ), 'overwriteprotocol' => 'https', );
The output of your Apache/nginx/system log in
nginx does not log local php calls. FPM does not have any logging either (because it’s executed with php directly, not through the web)