Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The log to opensearch suddenly error 400 when call POST '/_bulk' #10

Open
volethanh opened this issue Nov 8, 2023 · 2 comments
Open
Labels
bug Something isn't working needs-more-info The issue needs more details to be investigated triaged

Comments

@volethanh
Copy link

volethanh commented Nov 8, 2023

Hi @vduseev ,

I'm using this library to write directly log to opensearch. But I've got the issue that when I start the application, it write the log to opensearch normally, but It suddenly got error 400 and then I stucked with the 400, it can't POST to url /_bulk anymore

This is my picture that I've got in local environment and I also get this problem in the Azure App Service

image

Note that: When I run debug, I've just started the app and then I did not do anything even try any APIs

@volethanh volethanh changed the title The logger to opensearch suddenly error 400 The log to opensearch suddenly error 400 when call POST /_bulk Nov 8, 2023
@volethanh volethanh changed the title The log to opensearch suddenly error 400 when call POST /_bulk The log to opensearch suddenly error 400 when call POST '/_bulk' Nov 8, 2023
@vduseev
Copy link
Owner

vduseev commented Nov 27, 2023

Hey @volethanh.

This looks like an issue with the OpenSearch rather than the library. The code in the library does not do anything special to cause the OpenSearch instance to suddenly stop accepting _bulk requests.

You mentioning that you can't send _bulk even using the API of the OpenSearch directly once it errors out only confirms this hypothesis.

I can recommend checking several things:

  1. Health status of OpenSearch when this happens.
  2. Logs of that OpenSearch instance. Maybe it's out of memory? Maybe it's out of available file handlers? Disk full?
  3. Testing your app against a different OpenSearch instance, for example, one that you run locally.

If none of that yields any significant results, then we'd need to figure out the smallest reproducible setup. Can you reproduce this problem using an extremely simple example? If so, I can try to reproduce it on my side using your code.

Otherwise, so far, there is not enough data to figure out what is wrong. But something tells me it's OpenSearch rather than the library.

Hope that helps!

@vduseev vduseev added needs-more-info The issue needs more details to be investigated triaged bug Something isn't working labels Nov 27, 2023
@volethanh
Copy link
Author

Thanks for the reply, now I know why I got this issue. It is because I’ve used the latest opensearch 2.11, when I downgrade to 2.10, it worked as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-more-info The issue needs more details to be investigated triaged
Projects
None yet
Development

No branches or pull requests

2 participants