diff --git a/Changelog8.html b/Changelog8.html
index 614797755fb..c576b0a95b1 100644
--- a/Changelog8.html
+++ b/Changelog8.html
@@ -62,6 +62,7 @@
Version 8.3.0
#767 - fix compatibility with standards compliant cometd libraries (thanks lynniemagoo!)
#95 - update faad helper binaries to fix a crash when the decoder call fails (thanks ralphy!)
#777 - When syncing with disconnected player through CLI, random player is synced
+ Prevent a server crash while re-building the fulltext search index with huge collections.
diff --git a/Slim/Plugin/FullTextSearch/Plugin.pm b/Slim/Plugin/FullTextSearch/Plugin.pm
index 121a7de4506..e4c4507bacf 100644
--- a/Slim/Plugin/FullTextSearch/Plugin.pm
+++ b/Slim/Plugin/FullTextSearch/Plugin.pm
@@ -476,6 +476,10 @@ sub _rebuildIndex {
my $dbh = Slim::Schema->dbh;
+ # the "max" db memory settings can lead to OOM crashes when run in the server - use smaller cache temporarily
+ # see https://forums.slimdevices.com/showthread.php?116308 (using a 1M track collection...)
+ $dbh->do("PRAGMA cache_size = 20000") if preferences('server')->get('dbhighmem') && !main::SCANNER;
+
$scanlog->error("Initialize fulltext table");
$dbh->do("DROP TABLE IF EXISTS fulltext;") or $scanlog->error($dbh->errstr);
@@ -549,6 +553,9 @@ sub _rebuildIndex {
Slim::Schema->forceCommit if main::SCANNER;
$scanlog->error("Fulltext index build done!");
+
+ # reset cache sizes to system wide settings
+ Slim::Utils::SQLiteHelper->setCacheSize();
}
sub _createPlaylistItem {