We are using new server with 24 cores, RAID 5, 64 GB RAM
Have about 70 indices and trying to write data to it using bulk insert(batch size 5k per index)
But sometimes we have timeouts:
Invalid NEST response built from a unsuccessful low level call on POST: /index1/message/_bulk # Audit trail of this API call: - [1] BadResponse: Node: http://server:9200/ Took: 00:01:28.1294390 - [2] MaxTimeoutReached: Took: -736221.10:34:34.9317145 # OriginalException: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
Could you please explain which timeout we reached and can we tune it?
The default request timeout for the client is set to 1 minute and can be changed globally in configuration:
var pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));
var connectionSettings = new ConnectionSettings(pool)
// set the request timeout to 3 minutes
.RequestTimeout(TimeSpan.FromMinutes(3));
Alternatively, you can set a request timeout on a per request basis, so for example, set a longer one on your bulk requests
client.Bulk(b => b
.CreateMany(people)
.RequestConfiguration(r => r
.RequestTimeout(TimeSpan.FromMinutes(2))
)
);
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.