Hi,
I have PHP-FPM setup as static, after a while when browsing a lot of photo’s Nextcloud stops loading the previews.
Opening a file / picture will make it load an amount of pictures from the preview cache, but then stops again. This behaviour seems to be related to Redis. As soon as I restart the service the file list / previews are being loaded correctly.
Anyone got a clue?
Im running on:
Centos 7
Nginx, PHP-FPM, Mariadb, Redis.
8 GB RAM
6 Core
The Redis error log:
17456:M 16 Jan 12:59:14.040 * 10 changes in 300 seconds. Saving…
17456:M 16 Jan 12:59:14.040 * Background saving started by pid 17641
17641:C 16 Jan 12:59:14.042 * DB saved on disk
17641:C 16 Jan 12:59:14.042 * RDB: 0 MB of memory used by copy-on-write
17456:M 16 Jan 12:59:14.140 * Background saving terminated with success
17456:M 16 Jan 13:04:15.006 * 10 changes in 300 seconds. Saving…
17456:M 16 Jan 13:04:15.006 * Background saving started by pid 17838
17838:C 16 Jan 13:04:15.008 * DB saved on disk
17838:C 16 Jan 13:04:15.009 * RDB: 0 MB of memory used by copy-on-write
17456:M 16 Jan 13:04:15.107 * Background saving terminated with success
PHP-FPM error log:
[16-Jan-2018 11:02:20] NOTICE: fpm is running, pid 10020
[16-Jan-2018 11:02:20] NOTICE: ready to handle connections
[16-Jan-2018 11:02:20] NOTICE: systemd monitor interval set to 10000ms
Snip from Nextcloud log:
{“reqId”:“GBjKbSjOGOuf5Du2IEog”,“level”:4,“time”:“2018-01-16T11:47:04+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“userx”,“app”:“webdav”,“method”:“MKCOL”,“url”:"/remote.php/webdav/xxx/xxx/xxx/",“message”:“Exception: {“Exception”:“Sabre\\DAV\\Exception\\Conflict”,“Message”:“Parent node does not exist”,“Code”:0,“Trace”:”#0 \/xxx\/xxx\/xxx\/xxx\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(590): Sabre\\DAV\\Server->createCollection(‘xxx\/xxx\/xxx’, Object(Sabre\\DAV\\MkCol))\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpMkcol(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/xxx\/xxx\/xxx\/xxx\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/xxx\/xxx\/xxx\/xxx\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit(‘method:MKCOL’, Array)\n#4 \/xxx\/xxx\/xxx\/xxx\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/xxx\/xxx\/xxx\/xxx\/apps\/dav\/appinfo\/v1\/webdav.php(76): Sabre\\DAV\\Server->exec()\n#6 \/xxx\/xxx\/xxx\/xxx\/remote.php(162): require_once(’\/xxx\/xxx\/xxx\/o…’)\n#7 {main}",“File”:"\/xxx\/xxx\/xxx\/xxx\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php",“Line”:1167}",“userAgent”:“Mozilla/5.0 (Android) ownCloud-android/2.0.0”,“version”:“12.0.4.3”}
{“reqId”:“r9HQkSZnBoBcOUwfuJoI”,“level”:3,“time”:“2018-01-16T12:52:46+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“userx”,“app”:“PHP”,“method”:“GET”,“url”:"/index.php/apps/files/api/v1/thumbnail/256/256/Photos/2014/12/2014-12-11%2023.44.44.mov",“message”:“unlink(/tmp/oc_tmp_COYwqt): No such file or directory at /xxx/xxx/xxx/xxx/lib/private/Preview/Movie.php#111”,“userAgent”:“Mozilla/5.0 (Android) ownCloud-android/2.0.0”,“version”:“12.0.4.3”}
{“reqId”:“jkpIqoyqAA4IPyDUMIAy”,“level”:3,“time”:“2018-01-16T12:52:47+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“userx”,“app”:“PHP”,“method”:“GET”,“url”:"/index.php/apps/files/api/v1/thumbnail/256/256/Photos/2014/12/2014-12-11%2023.45.01.mov",“message”:“unlink(/tmp/oc_tmp_C3fizW): No such file or directory at /xxx/xxx/xxx/xxx/lib/private/Preview/Movie.php#111”,“userAgent”:“Mozilla/5.0 (Android) ownCloud-android/2.0.0”,“version”:“12.0.4.3”}
{“reqId”:“45zH5Fa5cBSppfQZ48yi”,“level”:3,“time”:“2018-01-16T12:54:41+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“userx”,“app”:“PHP”,“method”:“GET”,“url”:"/index.php/apps/files/api/v1/thumbnail/256/256/Photos/2014/12/2014-12-19%2022.21.44.mov",“message”:“unlink(/tmp/oc_tmp_9D8E0A): No such file or directory at /xxx/xxx/xxx/xxx/lib/private/Preview/Movie.php#111”,“userAgent”:“Mozilla/5.0 (Android) ownCloud-android/2.0.0”,“version”:“12.0.4.3”}
Worth to mention, I have set previews to 512x512 in config using:
‘enable_previews’ => true,
‘enabledPreviewProviders’ => array(
‘OC\Preview\PNG’,
‘OC\Preview\JPEG’,
‘OC\Preview\GIF’,
‘OC\Preview\BMP’,
‘OC\Preview\XBitmap’,
‘OC\Preview\MP3’,
‘OC\Preview\TXT’,
‘OC\Preview\MarkDown’,
‘OC\Preview\Movie’
),
‘preview_max_x’ => 512,
‘preview_max_y’ => 512,
‘preview_max_scale_factor’ => 1,
‘filesystem_check_changes’ => 1,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis.sock’,
‘port’ => 0,
),