You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exit: **(exit)exitedin: GenServer.call(MyApp.ElasticsearchCluster,:config,5000)**(EXIT)timeoutFile "lib/gen_server.ex", line 836, in GenServer.call/3 File "lib/elasticsearch.ex", line 307, in Elasticsearch.post/4
We get this error randomly in our app while making GET/POST requests to Elasticsearch.
Given the cluster is a GenServer and this call GenServer.call/3 can timeout since a single process can get overloaded under heavy load.
Can we move the :api out of the cluster config and the user can pass the Elasticsearch.API behaviour module to functions like Elasticsearch.get, Elasticsearch.post, etc?
It does seem like cutting out the GenServer.call would be beneficial here. My encryption library Cloak handles this by saving the config to an ETS table and then reading it out of the ETS table in a function, rather than via GenServer. Perhaps this could serve as a pattern to fix the issue?
We get this error randomly in our app while making
GET
/POST
requests to Elasticsearch.Elasticsearch.post/4
callsElasticsearch .Cluster.Config.get(cluster)
hereAnd the cluster config is found via this - https://github.com/danielberkompas/elasticsearch-elixir/blob/master/lib/elasticsearch/cluster/cluster.ex#L172
Given the cluster is a GenServer and this call
GenServer.call/3
can timeout since a single process can get overloaded under heavy load.Can we move the
:api
out of the cluster config and the user can pass theElasticsearch.API
behaviour module to functions likeElasticsearch.get
,Elasticsearch.post
, etc?@danielberkompas Let me know your thoughts.
The text was updated successfully, but these errors were encountered: