Nextcloud version (eg, 18.0.2): 18.0.8
Operating system and version (eg, Ubuntu 20.04): Debian 9
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.25
PHP version (eg, 7.1): 7.3 FPM
The issue you are facing:
In the last 3 day, the OC_filecache have grown uncontrollably.
My nextcloud instance have always (4Y) been running on a small HDD, and the /var/lib/mysql mount never outgrow a gigabit. 3 day ago i received a notification from netdata telling me that my disk was > 95%, i checked and though it might be normal. I added 5GB through LVM and watched.
in the next hours a couple hundred MB were writed to it, and in a day 2 new GB of data was there
It’s been 2 day now and i’m once again >90% with 7gb of storage
for information, yesterday ~ 4pm :
root@nxcld:/var/lib/mysql/nextcloud# du -sx * | sort -n | tail -5
8196 oc_ocsms_smsdatas.ibd
12292 oc_audioplayer_albums.ibd
102404 oc_news_items.ibd
397324 oc_file_locks.ibd
2629700 oc_filecache.ibd
and today 11 am:
root@nxcld:/var/lib/mysql/nextcloud# du -sx * | sort -n | tail -5
8196 oc_ocsms_smsdatas.ibd
12292 oc_audioplayer_albums.ibd
102404 oc_news_items.ibd
720908 oc_file_locks.ibd
4694132 oc_filecache.ibd
i don’t have any error in log, and i upgrade after seeing the issue 3 day ago just to be sure (minor 18 upgrade)
i am a single user, with only cifs external share
the only recent change i did was to disable Atime on my nas
I don’t aprear to have duplicate in the db:
MariaDB [nextcloud]> SELECT * FROM oc_filecache where ( path not like Concat('%/',name) ) AND path <> name
-> ;
+--------+---------+------+----------------------------------+--------+-------+----------+----------+---------------+------------+---------------+-----------+------------------+---------------+-------------+----------+
| fileid | storage | path | path_hash | parent | name | mimetype | mimepart | size | mtime | storage_mtime | encrypted | unencrypted_size | etag | permissions | checksum |
+--------+---------+------+----------------------------------+--------+-------+----------+----------+---------------+------------+---------------+-----------+------------------+---------------+-------------+----------+
| 214187 | 8 | | d41d8cd98f00b204e9800998ecf8427e | -1 | Films | 2 | 1 | 5254745590163 | 1560743536 | 1548500266 | 0 | 0 | 5d070e707d275 | 17 | |
| 214188 | 9 | | d41d8cd98f00b204e9800998ecf8427e | -1 | jeux | 2 | 1 | 1018794001926 | 1548590573 | 1548500269 | 0 | 0 | 5c4d9deda0add | 17 | |
+--------+---------+------+----------------------------------+--------+-------+----------+----------+---------------+------------+---------------+-----------+------------------+---------------+-------------+----------+
2 rows in set (1 min 58.947 sec)
there is no cleanup to do
user@nxcld:/var/www/nextcloud$ sudo -u www-data php ./occ files:cleanup
0 orphaned file cache entries deleted
my nextcloud specific service/timer
# /etc/systemd/system/nextcloudnewsupdater.service [35/5286]
[Unit]
After=default.target
Description=Nextcloud News Updater
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/nextcloud-news-updater -c /etc/nextcloud/news/updater.ini
[Install]
WantedBy=default.target
# /etc/systemd/system/nextcloudcron.service
[Unit]
Description=Nextcloud cron.php job
[Service]
User=www-data
ExecStart=/usr/bin/php -f /var/www/nextcloud/cron.php
[Install]
WantedBy=basic.target
# /etc/systemd/system/nextcloudcron.timer
[Unit]
Description=Run Nextcloud cron.php every 5 minutes
[Timer]
OnBootSec=5min
OnUnitActiveSec=5min
Unit=nextcloudcron.service
[Install]
WantedBy=timers.target
# /etc/systemd/system/nextcloudpreview.timer
[Unit]
Description=Run Nextcloud preview generator every night
[Timer]
OnCalendar=*-*-* 02:00:00
Unit=nextcloudpreview.service
[Install]
WantedBy=timers.target
i have honestly no idea what to do…
Is this the first time you’ve seen this error? (Y/N): Y
The output of your Nextcloud log in Admin > Logging:
### THIS WAS WHEN I TRIED TO DO php ./occ log:tail
Declaration of Symfony\Component\Console\Style\OutputStyle::write($messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) must be compatible with Symfony\Component\Console\Output\OutputInterface::write($messages, $newline = false, $options = 0) at /var/www/nextcloud/apps/bookmarks/vendor/symfony/console/Style/OutputStyle.php#24
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'TRUNCATED',
'passwordsalt' => 'TRUNCATED',
'secret' => 'TRUNCATED',
'trusted_domains' =>
array (
0 => 'nextcloud.TRUNCATED.com',
),
'trusted_proxies' =>
array (
0 => 'TRUNCATED',
1 => 'TRUNCATED',
),
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED',
1 => 'HTTP_FORWARDED_FOR',
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '18.0.8.2',
'overwrite.cli.url' => 'http://nextcloud-pp.TRUNCATED.com',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud_user',
'dbpassword' => 'TRUNCATED',
'installed' => true,
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'mail_smtpmode' => 'sendmail',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'nextcloud',
'mail_domain' => 'TRUNCATED.com',
'twofactor_enforced' => 'false',
'twofactor_enforced_groups' =>
array (
0 => 'admin',
),
'twofactor_enforced_excluded_groups' =>
array (
),
'trashbin_retention_obligation' => 'auto, 15',
'maintenance' => false,
'theme' => '',
'loglevel' => 0,
'app_install_overwrite' =>
array (
0 => 'apporder',
),
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\PNG',
1 => 'OC\\Preview\\JPEG',
2 => 'OC\\Preview\\GIF',
3 => 'OC\\Preview\\HEIC',
4 => 'OC\\Preview\\BMP',
5 => 'OC\\Preview\\XBitmap',
6 => 'OC\\Preview\\MP3',
7 => 'OC\\Preview\\TXT',
8 => 'OC\\Preview\\MarkDown',
9 => 'OC\\Preview\\PDF',
10 => 'OC\\Preview\\SVG',
11 => 'OC\\Preview\\Movie',
),
'updater.secret' => 'TRUNCATED',
);
The output of your Apache/nginx/system log in /var/log/____
:
Nothing in here aside 302 from haproxy and davx5 request