From 7b4838fc9b783cb67bb5c901da286cc6669882ee Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Sun, 31 Jan 2021 02:57:17 -0300 Subject: [PATCH] dont update more than 400 items a time --- lbry/wallet/server/db/elastic_search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/server/db/elastic_search.py b/lbry/wallet/server/db/elastic_search.py index f4920b1d5..979c2eb92 100644 --- a/lbry/wallet/server/db/elastic_search.py +++ b/lbry/wallet/server/db/elastic_search.py @@ -76,7 +76,8 @@ class SearchIndex: to_update.append(doc) await self.delete(to_delete) await self.client.indices.refresh(self.index) - await self.update(to_update) + for bulk in range(0, len(to_update), 400): + await self.update(to_update[bulk:bulk+400]) await self.client.indices.refresh(self.index) async def apply_filters(self, blocked_streams, blocked_channels, filtered_streams, filtered_channels):