Open nickvergessen opened 5 months ago
Should also build a check into the server code, that it logs an warning (> 5/10 seconds) or error (> 60 seconds) when a setupcheck is taking too long
@nickvergessen Note that there is already a log line for this purpose: $this->logger->debug('Running check '.get_class($setupCheckObject));
So with debug log level you can look at the timestamp of these lines in the log and see which one is taking long.
So with debug log level you can look at the timestamp of these lines in the log and see which one is taking long.
I can't really enable debug on production :D
So with debug log level you can look at the timestamp of these lines in the log and see which one is taking long.
I can't really enable debug on production :D
You can on a single occ run with env var NC_loglevel=0
yeah, anyway error logging very long running setupchecks sounds still good :) Sample: https://github.com/nextcloud/server/blob/131f481a67766d9bc5629948cc0abe1424308f00/lib/private/InitialStateService.php#L91-L101
https://github.com/nextcloud/logreader/pull/1179 should speed things up a bunch
On our instance the setup check did almost not finish. I added
var_dump(time() . $setupCheck->getService());
in the SetupCheckManager to find out it's actually the log reader taking all the time. Our nextcloud.log.1 and nextcloud.log files are ~101MB both and the SetupCheck takes almost 20 minutes:1.159 seconds = 19 minutes and 19 seconds...
This is not really acceptable.
I think we should skip the setupcheck when the file is bigger then 5 MB or something (home server level size), or we need to change it to simply
grep | wc -l
, but looping over the file in PHP and json decoding each line does not scale.