elasticsearch-net: Elasticsearch.Net.UnexpectedElasticsearchClientException: Exception of type 'System.OutOfMemoryException' was thrown.

NEST/Elasticsearch.Net version: 6.1

Elasticsearch version: 6.1

Steps to reproduce:

I can’t reproduce it manually!

From time to time we get this exception:

Elasticsearch.Net.UnexpectedElasticsearchClientException: Exception of type ‘System.OutOfMemoryException’ was thrown. —> System.OutOfMemoryException: Exception of type ‘System.OutOfMemoryException’ was thrown. at Nest.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings) at Nest.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) at Nest.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at Nest.DictionaryResponseJsonConverterHelpers.ReadServerErrorFirst(JsonReader reader, Error& error, Nullable1& statusCode) at Nest.ResolvableDictionaryResponseJsonConverter3.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Nest.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Nest.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Nest.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Nest.Json.JsonSerializer.Deserialize[T](JsonReader reader) at Nest.InternalSerializer.<DeserializeAsync>d__201.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Elasticsearch.Net.ResponseBuilder.<SetBodyAsync>d__51.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Elasticsearch.Net.ResponseBuilder.<ToResponseAsync>d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Elasticsearch.Net.HttpConnection.<RequestAsync>d__141.MoveNext() in C:\Users\russ\source\elasticsearch-net-master\src\Elasticsearch.Net\Connection\HttpConnection.cs:line 259 — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Elasticsearch.Net.RequestPipeline.<CallElasticsearchAsync>d__741.MoveNext() in C:\Users\russ\source\elasticsearch-net-master\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 478 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Elasticsearch.Net.Transport1.<RequestAsync>d__151.MoveNext() in C:\Users\russ\source\elasticsearch-net-master\src\Elasticsearch.Net\Transport\Transport.cs:line 120 --- End of inner exception stack trace --- at Elasticsearch.Net.Transport1.<RequestAsync>d__151.MoveNext() in C:\Users\russ\source\elasticsearch-net-master\src\Elasticsearch.Net\Transport\Transport.cs:line 138 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nest.ElasticClient.<Nest-IHighLevelToLowLevelDispatcher-DispatchAsync>d__2734.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nest.IndicesPointingToAliasExtensions.<GetIndicesPointingToAliasAsync>d__1.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Rm.Backend.Rpm.JobPerformanceRepository.ElasticHelper.<GetIndexesByAlias>d__7.MoveNext() in C:\Development — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (11 by maintainers)

Most upvoted comments

I thought I replied to you already, sorry about that. It did! Thanks @stevejgordon

Glad to hear that, thanks for confirming @vonbv

@stevejgordon thanks for the quick response! Good job on finding the issue and fixing it. And thank you for pointing out which issue was that.