Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

set default workers to 2

thiswillbeyourgithubc34b058949cf
diff --git a/docker-compose.yml b/docker-compose.yml
index db3d593..d76a5f6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -16,7 +16,7 @@ services:
# Set value of ./mwmbl/crawler/env_vars.py
- - CRAWLER_WORKERS=10
+ - CRAWLER_WORKERS=2
- CRAWLER_THREADS=20
- CRAWL_DELAY_SECONDS=0.0
diff --git a/mwmbl/crawler/README.md b/mwmbl/crawler/README.md
index b5259e6..e46a43f 100644
--- a/mwmbl/crawler/README.md
+++ b/mwmbl/crawler/README.md
@@ -11,7 +11,7 @@ The crawler can be configured using the following environment variables:
- `MWMBL_CONTACT_INFO` - **Required** Contact information for website administrators (email or website URL). This is included in the user-agent string so website administrators can contact you if there are issues with the crawler. Example: `[email protected]` or `https://your-mwmbl-instance.com`
### Worker Configuration
-- `CRAWLER_WORKERS` (default: 10) - Number of separate operating system processes to spawn for crawling work (uses Python's multiprocessing.Process)
+- `CRAWLER_WORKERS` (default: 2) - Number of separate operating system processes to spawn for crawling work (uses Python's multiprocessing.Process)
- `CRAWL_THREADS` (default: 20) - Number of threads per worker process for concurrent URL crawling (total threads = CRAWLER_WORKERS × CRAWL_THREADS)
**Process Architecture**: The crawler spawns `CRAWLER_WORKERS` processes for crawling work, each using `CRAWL_THREADS` threads for concurrent URL fetching. Additionally, one separate process handles indexing work. For example, with default settings you get 10 crawler processes × 20 threads = 200 total crawling threads, plus 1 indexing process.
diff --git a/mwmbl/crawler/env_vars.py b/mwmbl/crawler/env_vars.py
index b64c5db..f0c0b4f 100644
--- a/mwmbl/crawler/env_vars.py
+++ b/mwmbl/crawler/env_vars.py
@@ -6,7 +6,7 @@ import os
# Crawler worker configuration
-CRAWLER_WORKERS = int(os.environ.get("CRAWLER_WORKERS", "10"))
+CRAWLER_WORKERS = int(os.environ.get("CRAWLER_WORKERS", "2"))
CRAWL_THREADS = int(os.environ.get("CRAWL_THREADS", "20"))
# Rate limiting configuration