Features: 1) Adjust Elasticsearch timeout settings and retry configuration for improved connection handling.
Fixes: 1) Reduce `_BaseDoc.chunk_size` to prevent potential memory issues. Extra: 1) Disable Elasticsearch parallel indexing to enhance stability.
This commit is contained in:
parent
1dae1a6be5
commit
76954ac24c
2 changed files with 4 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ from core.models import Brand, Category, Product
|
|||
|
||||
|
||||
class _BaseDoc(ActiveOnlyMixin, Document):
|
||||
chunk_size = 300
|
||||
chunk_size = 200
|
||||
|
||||
name = fields.TextField(
|
||||
attr="name",
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ ELASTICSEARCH_DSL = {
|
|||
"basic_auth": ("elastic", getenv("ELASTIC_PASSWORD")), # noqa: F405
|
||||
"verify_certs": False,
|
||||
"ssl_show_warn": False,
|
||||
"timeout": 30,
|
||||
"max_retries": 3,
|
||||
"timeout": 10,
|
||||
"max_retries": 2,
|
||||
"retry_on_timeout": True,
|
||||
},
|
||||
}
|
||||
|
||||
ELASTICSEARCH_DSL_AUTOSYNC = True
|
||||
ELASTICSEARCH_DSL_PARALLEL = True
|
||||
ELASTICSEARCH_DSL_PARALLEL = False
|
||||
ELASTICSEARCH_DSL_SIGNAL_PROCESSOR = "evibes.signal_processors.SelectiveSignalProcessor"
|
||||
|
|
|
|||
Loading…
Reference in a new issue