question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
vonbvcommented, Jun 24, 2021

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

1reaction
stevejgordoncommented, Jan 6, 2021

Glad to hear that, thanks for confirming @vonbv

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elasticsearch NEST SDK throws System. ...
I am getting this exception from Elasticsearch .net client - NEST v7.10.0. Exception of type 'System.OutOfMemoryException' was thrown.
Read more >
System.OutOfMemoryException - Nest Elasticsearch
OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at Newtonsoft.Json.Utilities.BufferUtils.RentBuffer(IArrayPool ...
Read more >
Elasticsearch.Net.UnexpectedElasticsearchClientException
Elasticsearch.Net.UnexpectedElasticsearchClientException: Exception of type 'System.OutOfMemoryException' was thrown.
Read more >
Exception of type 'System.OutOfMemoryException' was ...
The following error message occurs when execute CopyTo method in .NET application "Attempted to read or write protected memory. This is often an...
Read more >
问答- 腾讯云开发者社区-腾讯云
Exception of type 'System.OutOfMemoryException' was thrown. Elasticsearch.Net.UnexpectedElasticsearchClientException UnexpectedElasticsearchClientException ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found