I'm rather new to Elasticsearch, and have just begun intergrating it with
an existing application.
The existing process runs in the background waiting for messages from a
message queue. In some cases, those messages are processed as either
indexing or percolation requests into ElasticSearch. So far, everything is
working fine in terms of the functionality. We are using the java
TransportClient to connect to ES. The first time we get a message to go to
ElasticSearch, we create that Client, and then re-use that same Client for
all other subsequent messages. The background process essentially runs
forever (although it does get periodically restarted for various reasons),
so the Client sticks around for as long as the process.
A couple of questions:
We noticed that once we initialize the client, we get a HUGE number of
TRACE messages in the application's log (these 2 messages repeat every 5
secs):
2014-12-22 18:01:18 TRACE ChildMemoryCircuitBreaker.addWithoutBreaking() -
[Dr. Lemuel Dorcas] [REQUEST] Adjusted breaker by [16440] bytes, now [16440]
2014-12-22 18:01:18 TRACE ChildMemoryCircuitBreaker.addWithoutBreaking() -
[Dr. Lemuel Dorcas] [REQUEST] Adjusted breaker by [-16440] bytes, now [0]
They just repeat forever. If I restart the entire process, they go away,
until a message triggers the creation of a new Client. I'm presuming that
- there is some way that I can turn off these messages through log4j and
- I can reduce the interval of these message by setting
client.transport.nodes_sampler_interval. Can anyone confirm that this will
indeed work? For the logging part, any hints on whether I need to do this
in log4j or elsewhere would be appreciated, as it's painful setting up the
environment for each experiment (and I spend way too much time hunting and
pecking in log4j configs trying to turn off verbose logging of 3rd-party
apps, just google apache httpclient logging issues to see what I mean!).
But that also leads me to ask the next question, as I have some concerns
that the once created, the Client isn't quietly sitting in the background
waiting to be called upon by the main process, but is either sending or
receiving ping messages (to itself? to the remote ES cluster?).
So now I wonder if keeping the Client alive over a long period of time the
best practice, since it seems to be generating quite a bit of extra traffic
or using CPU cycles for not much benefit? Or should I just close the
client when we're done processing a message and re-open a new Client when
needed for a subsequent message (not all messages will need ES)?
Thanks!
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/598245d1-47e9-4ea6-98ab-0c2790e4c4f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.