From 78bf8242b38607c114ba1982fde357adbbfc56f5 Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Sat, 20 Feb 2021 08:24:53 +0100 Subject: Add documentation for manual purging of unread items Signed-off-by: Candid Dauth --- README.md | 1 + docs/faq/README.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index a01bdde0c..bb38b8ec1 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ See the [install document](https://github.com/nextcloud/news/blob/master/docs/in * [Feeds are not updated](https://github.com/nextcloud/news/blob/master/docs/faq/README.md#feeds-not-updated) * [Adding feeds that use self-signed certificates](https://github.com/nextcloud/news/blob/master/docs/faq/README.md#adding-feeds-that-use-self-signed-certificates) * [Is There An Subscription URL To Easily Subscribe To Feeds](https://github.com/nextcloud/news/blob/master/docs/faq/README.md#is-there-an-subscription-url-to-easily-subscribe-to-feeds) +* [Database table grows too big](https://github.com/nextcloud/news/blob/master/docs/faq/README.md#database-table-grows-too-big) ## Supported Browsers * Newest Firefox (Desktop, Android, Firefox OS) diff --git a/docs/faq/README.md b/docs/faq/README.md index b0a0c025e..ca366910e 100644 --- a/docs/faq/README.md +++ b/docs/faq/README.md @@ -87,3 +87,21 @@ If you do not have control over the chosen feed, you should [download the certif By appending **?subscribe_to=SOME_URL** to your News app URL, you can launch the News app with a pre-filled URL, e.g.: https://yourdomain.com/nextcloud/index.php/apps/news?subscribe_to=https://github.com/nextcloud/news/releases + +### Database table grows too big + +By default, Nextcloud News purges old news items above a certain threshold each time it fetches new news items. The maximum number of items per feed +that should be kept during the purging can be defined through the “Maximum read count per feed” setting in the admin UI or the `autoPurgeCount` +value in the config. (Note: The “Purge interval” (`autoPurgeMinimumInterval`) setting is ignored and does not have any effect.) + +However, unread or starred items are exempt from the purging. If your users have subscribed to some high-volume feeds where a lot of items remain +unread, this can lead to an oversized news table over time. As a consequence, the database upgrade of the news app can take several hours, during which +Nextcloud cannot be used. + +The command `occ news:updater:after-update [--purge-unread] []` can be used to manually purge old news items across the instance. With +the `--purge-unread` option, unread items are also purged (starred items are still exempt). If `purge-count` is not specifid, the configured +`autoPurgeCount` is used. + +The purge count only applies to the items that are purged. For example, when purging a feed that has 100 unread items, 100 starred read +items and 100 unstarred read items, using a `purge-count` of 50 would keep all unread and starred items and the latest 50 read items. Using +a `purge-count` of 50 along with `--purge-unread` would keep the all starred items plus the latest 50 from the set of unread and read items. -- cgit v1.2.3