-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
EnrichClient times out when using execute_policy #2622
Comments
Hey @davehouser1, sorry that this is giving you trouble.
The parameters are documented in the Elasticsearch docs, which is linked from the client docs. For
I believe the difference is that in Python you're setting
I think this is because the timeout was not high enough, meaning that the connections were discarded for not working? I'm not sure here, honestly, and would welcome a script that reproduces this, as we're considering disabling timeouts in future versions of the client. |
Thanks for the response @pquentin.
I checked out the link. The link only details one parameter
I set Kind of unrelated problem, see this post elastic/elasticsearch#70554. There does not seem to be a good way to check status of a enrichment task using Do you know a way around this using the AsyncElasticsearch? I found a way to use |
The other parameters work for every single API, so they're not documented for every page. They're documented there: https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html. Regarding the Elasticsearch class, most parameters are defined in https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/connecting.html and https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/config.html. Yes, having the docs in two places is annoying, and a short description should be added in the reference docs too. Is there anything specific you're missing?
Correct me if I'm wrong, but there seems to be some confusion between AsyncElasticsearch (which is a way to use Python's asyncio module with the Python client) and async APIs in Elasticsearch (which only relates to the Elasticsearch server, independently of the client). Calling async Elasticsearch APIs can be done with both Can you please show me your requests code? I can help you translating to the equivalent using the client, be it AsyncElasticsearch or Elasticsearch. |
Closing I haven’t heard back from you. I will reopen if there are additional questions. Thank you! |
I am trying to use
EnrichClient
to sendexecute_policy
.I am seeing
urlib3
timeout errors when trying to do this for some of my policies.Here is my code base
Here is what I am seeing on the output
I tried setting the
request_timeout
in Elasticsearch() instance, but that causes a different problem where I see nothing but the following when sending requestsI tried reading the documentation for the EnrichClient and Elasticsearch classes, however its not clear to me what a lot of these parameters really do. I tried reading the source code but I didn't see many comments for what the parameters actually do.
Am I doing something wrong here? Why is this failing?
I forgot to mention. I do not see this behavior when using curl, requests library, or the dev console. The response is an async task number, which I can check status on.
The text was updated successfully, but these errors were encountered: