From 439a2680fd055f11bedfc73e4ab995f08ec68a73 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sun, 25 Aug 2024 15:09:30 -0700 Subject: [PATCH 1/3] Increase rate limits for data indexing --- src/khoj/routers/api_content.py | 4 ++-- tests/test_client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/khoj/routers/api_content.py b/src/khoj/routers/api_content.py index 72fd34a7..cd342c19 100644 --- a/src/khoj/routers/api_content.py +++ b/src/khoj/routers/api_content.py @@ -92,7 +92,7 @@ async def put_content( incoming_entries_size_limit=10, subscribed_incoming_entries_size_limit=75, total_entries_size_limit=10, - subscribed_total_entries_size_limit=100, + subscribed_total_entries_size_limit=400, ) ), ): @@ -114,7 +114,7 @@ async def patch_content( incoming_entries_size_limit=10, subscribed_incoming_entries_size_limit=75, total_entries_size_limit=10, - subscribed_total_entries_size_limit=100, + subscribed_total_entries_size_limit=400, ) ), ): diff --git a/tests/test_client.py b/tests/test_client.py index 0f09a0c5..73cc1d72 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -500,7 +500,7 @@ def get_sample_files_data(): def get_big_size_sample_files_data(): # a string of approximately 100 MB - big_text = "a" * (100 * 1024 * 1024) + big_text = "a" * (400 * 1024 * 1024) return [ ( "files", From 6eb06e862662292369519ffe54877679578127d3 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sun, 25 Aug 2024 15:26:27 -0700 Subject: [PATCH 2/3] Downgrade rate limit to 200MB --- src/khoj/routers/api_content.py | 4 ++-- tests/test_client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/khoj/routers/api_content.py b/src/khoj/routers/api_content.py index cd342c19..ad9e3b56 100644 --- a/src/khoj/routers/api_content.py +++ b/src/khoj/routers/api_content.py @@ -92,7 +92,7 @@ async def put_content( incoming_entries_size_limit=10, subscribed_incoming_entries_size_limit=75, total_entries_size_limit=10, - subscribed_total_entries_size_limit=400, + subscribed_total_entries_size_limit=200, ) ), ): @@ -114,7 +114,7 @@ async def patch_content( incoming_entries_size_limit=10, subscribed_incoming_entries_size_limit=75, total_entries_size_limit=10, - subscribed_total_entries_size_limit=400, + subscribed_total_entries_size_limit=200, ) ), ): diff --git a/tests/test_client.py b/tests/test_client.py index 73cc1d72..77a98280 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -500,7 +500,7 @@ def get_sample_files_data(): def get_big_size_sample_files_data(): # a string of approximately 100 MB - big_text = "a" * (400 * 1024 * 1024) + big_text = "a" * (200 * 1024 * 1024) return [ ( "files", From 977001b8014a291bf874087793a2a9badf486a28 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sun, 25 Aug 2024 16:14:32 -0700 Subject: [PATCH 3/3] Reduce the test data packet size --- tests/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index 77a98280..0f09a0c5 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -500,7 +500,7 @@ def get_sample_files_data(): def get_big_size_sample_files_data(): # a string of approximately 100 MB - big_text = "a" * (200 * 1024 * 1024) + big_text = "a" * (100 * 1024 * 1024) return [ ( "files",