Open lijie123bes opened 4 months ago
[Triage - attendees 1 2 3] @lijie123bes Thanks for creating this issue with full reproduction steps, moving this to the python client repo for further investigation.
@opensearch-project/admin could you please transfer this issue to the https://github.com/opensearch-project/opensearch-py repository?
@lijie123bes Let's narrow this down to a client vs. server problem.
Do you have errors in the server-side log, meaning is the server actually refusing connections because of a circuit breaker or something like this?
Describe the bug
I am encountering a ConnectionRefusedError while running an OpenSearch indexing script. Initially, the script worked without issues, indexing approximately 200 files, each containing around 30,000 documents.
However, now it fails with the following error:
When encountering this error, I restart OpenSearch and resume indexing from the exact file where the process stopped. However, upon resuming, the same error occurs again.
Related component
Clients
To Reproduce
The script reads JSON files from a directory and indexes them into an OpenSearch cluster. It uses the opensearchpy library to interact with OpenSearch and the sentence-transformers library for document embeddings. This is the code:
Troubleshooting Steps Taken:
Increased heap size in jvm.options file to 8GB (the max that I can). Attempted to reduce batch size to mitigate potential HTTP request size issues. Despite these efforts, the script continues to encounter connection issues.
I suspect that the problem may be related to sending large HTTP requests or some configuration issue with the OpenSearch server. However, I'm unsure how to proceed in diagnosing and resolving the issue.
Any insights or suggestions would be greatly appreciated. Thank you!
Expected behavior
namal Connection
Additional Details
Plugins Please list all plugins currently enabled.
Screenshots If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context Add any other context about the problem here.