Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

elasticsearch create TransportConnection timeout

I am creating a Elasticsearch Connection with Java API. I am using TransportConnection and I need to set the timeout for the connection.

I haven't configured any property and the connect takes three minutes to give me a timeout.

Anybody know if any property exists to set the value of timeout?

Thaks.

like image 532
josegom Avatar asked May 12 '26 16:05

josegom


1 Answers

Settings settings = ImmutableSettings.settingsBuilder()
            .put("cluster.name", cluster_name).put("client.transport.ping_timeout", "30s").build();

    TransportClient transport = new TransportClient(settings);

See also the following from ES documentation page:

Fault Detection

like image 61
Zouzias Avatar answered May 15 '26 07:05

Zouzias