# NEST Brings down the whole Webserver

**URL:** <https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693>\
**Category:** Elasticsearch\
**Created:** [February 3, 2020, 8:49pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693 "2020-02-03T20:49:03Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 5, 2020, 10:06pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/23 "2020-02-05T22:06:15Z")

</div>

Hi,  
We are running version 7.5.1.  
Did anything I submitted describe what we are doing in detail.  
1-I have shown the mapping  
2-I shown our indexing Code  
3-And the result

What else can I provide for you to see the problem?

It may also be an idea for you to at least use the same kind of object with several properties as opposed to a single one in order for you to properly evaluate this scenario otherwise we will not be getting like for like!!!

What is the point of showing code that works which LOOKS NOTHING LIKE the problem that is being looked at!!!

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 5, 2020, 10:27pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/24 "2020-02-05T22:27:23Z")

</div>

when you are in a position to exchange more than 1 message per week, please let us know so that we can communicate.

In the meantime, if you really want to help Elasticsearch, just bin this library so that people won't get diluted and suffer using it thinking that it is a productivity tool where it is actually a Detrimental tool.

We have never come across a library that HINDERS development as much as NEST does!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 5, 2020, 11:14pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/25 "2020-02-05T23:14:04Z")

</div>

@han1 the suggestion from the information you've provided is that indexing a document with a nested mapping is crashing the application. This cannot be replicated locally or running against Elastic Cloud as @Martijn_Laarman showed, and does not show up in the integration tests either. What Martijn is highlighting is that the information provided is insufficient to understand where the problem is, hence we are asking for more information and a small example that reproduces the problem.

Please also note we've pointed out our [code of conduct](https://www.elastic.co/community/codeofconduct) a few times now, you agreed to abide by this when you created an account. If you are unable to remain civil and courteous and respond constructively to those that are trying to assist you then we will close this thread.

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 12:22am UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/26 "2020-02-06T00:22:58Z")

</div>

We will try and get the hell out of everything Elastic as soon as possible but that will take us some time. If you are INCAPABLE of sorting even a simple issue like this, then don't get hot under the color when someone calls your incompetence out!

If we produced products like this, our clients would laugh at us. You seem to think we should be grateful!

As they say. The best way to know an organisation is to do business with them. We have certainly got to know you!

I have already provided everything possible. What else do you need to know to work out where your product is falling down!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 6, 2020, 12:55am UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/27 "2020-02-06T00:55:44Z")

</div>

The level of information that Martijn provided is indication of what we would need to replicate your issue and then resolve it.

If you aren't able to provide that then it's going to be impossible to help further.

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 1:11am UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/28 "2020-02-06T01:11:39Z")

</div>

This is what he wrote - quote

**So somewhere in between my setup and yours something seems to not go right, any thing that sticks out to you or more that you can share about your setup?**

Now how helpful is that - somewhere in between is basically the wire (internet). What would you like me to provide. The bits on the wire?

What he has provided about his set up- is what I have also provided.  
The indexing works - EVERYTHING works! New documents can be indexed and updated without problem AS LONG AS the nested object is not set.  
BUT, when you set the nested object - Then CRASH.

Can he AT LEAST create the same Nested object with the same number of properties and types as I have indicated in my code so that we can see like for like as opposed to something that has nothing to do with the problem at hand?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 6, 2020, 8:21am UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/29 "2020-02-06T08:21:21Z")

</div>

> [@han1](#):
>
> Can he AT LEAST create the same Nested object with the same number of properties and types as I have indicated in my code so that we can see like for like as opposed to something that has nothing to do with the problem at hand?

That's exactly the reason I asked you earlier if you could share with us a minimal project that helps to reproduce the problem.

> [@dadoonet](#):
>
> Is there a way to share a sample project which reproduces that? Including the mapping you are using?

I'm not a .Net dev so I can't help myself on that. I'm a Java dev and if it was Java code, I'd likely suspect something in the way the Java beans are been executed by the JVM.

So thank you so far for the details you provided. It would be even better and faster if you could share on GitHub or somewhere else the .Net objects you are using (not sure I'm using the right terminology though).

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [February 6, 2020, 9:57am UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/30 "2020-02-06T09:57:12Z")

</div>

@han1 I created the small reproduction for several reasons:

- Your examples are incomplete the mapping you provide does not correlate with the index call that you stated.
- As mentioned we have \>3000 integration test most of which rely on a rich document being indexed with a nested mapping. These tests run on commit against 6 different elasticsearch versions, multiple elasticsearch instances within a version as well as testing Windows and Linux. I am not convinced it has anything to do with the number of properties. But do not rule anything out at the moment.

The goal of starting small was to find the difference between what I know works and your setup.

Full runnable reproduction setup: [https://gist.github.com/Mpdreamz/4693d8cb25e074725d730be3f12d01b2](https://gist.github.com/Mpdreamz/4693d8cb25e074725d730be3f12d01b2)

You've replied numerous times now without answering most of my questions so I'll restate them here and add bunch more:

- What does your `ElasticsearchConfig.GetClient()` look like, where does it deviate from the simple reproduction setup?
- What operating systems do you use?
- What version of the client are you using?
- What version of .NET are you using?
- Where does your .NET code run? Console App? MVC? IIS? Kestrel? Azure Functions?
- Can you share more information about the actual `des` C# class that you are trying to index an instance of?
- Is any part of your C# class using or the invocatation using [dynamic](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/using-type-dynamic) or `ExpandoObject`?
- Does my small reproduction work on your end?
- If your on windows do you see a correlating event in the Event Viewer for the crash?
- Do you also get the crash if you do call
  - `var serialized = client.SourceSerializer.SerializeToString(objectYouWantToIndex);`
  - `var serialized = client.RequestResponseSerializer.SerializeToString(objectYouWantToIndex)`

All of these will help me build out my simple reproduction to one more like your setup, please help me iterate on this.

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 12:44pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/31 "2020-02-06T12:44:03Z")

</div>

I shall try to respond to these - But tell me - Is there any reason you are not using the same type of object that we are using and using something COMPLETELY unrelated to this problem?

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 1:01pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/32 "2020-02-06T13:01:36Z")

</div>

1-What does your ElasticsearchConfig.GetClient() look like, where does it deviate from the simple reproduction setup?

```
return new ElasticClient(_connectionSettings);
 _connectionSettings = new ConnectionSettings(CreateUri(/*9200*/))
                .BasicAuthentication("elastic", Startup.ConfigurationStatic["Elastic:ClusterAddress"])
                .DisableDirectStreaming(true);

```

What operating systems do you use?  
`Windows 10`

What version of .NET are you using?  
`Core 3.1`

What version of the client are you using?  
`7.5.1`

Where does your .NET code run? Console App? MVC? IIS? Kestrel? Azure Functions?  
`MVC Core 3.1`

Can you share more information about the actual des C# class that you are trying to index an instance of?  
`The class is shown in the NEST mapping - A simple POCO with 7 properties as shown!`

Is any part of your C# class using or the invocatation using dynamic or ExpandoObject? -`No.`

Does my small reproduction work on your end?  
`Even if it does it is useless as your repproduction is not a reporduction as we KEEP trying to tell you.`

If your on windows do you see a correlating event in the Event Viewer for the crash?  
` - NO`

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 1:08pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/33 "2020-02-06T13:08:58Z")

</div>

The answer to the serialization is that it also does not help.

Can you elaborate:  
\*\* Your examples are incomplete the mapping you provide does not correlate with the index call that you stated.\*\*

What does not correlate - Have you looked at the stuff we provided?

The questions you are asking seems to be debugging our ability to connect to Elasticsearch and perform operations.

As we have already mentioned - EVERYTHING WORKS EXCEPT when a nested property is involved.  
Our ES connection string, OS, .NET Version, Client Version are all 100% as the system works - EXCEPT when there is a nested property involved.

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [February 6, 2020, 2:39pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/34 "2020-02-06T14:39:05Z")

</div>

The only indexing call with a nested field you've provided on this thread:

```
var doc = new des{prop1=1, prop2=2, nestedFiled=so sn so}
var result = await ElasticSearchConfig.GetClient().IndexAsync(doc, idx => idx.Index($"properties-{dest.Country.ToLower()}"));

```

Which is not valid `C#` nor have you provided the `C#` POCO corresponding to `des` or your mapping. Which forced me to use my own.

> Even if it does it is useless as your repproduction is not a reporduction as we KEEP trying to tell you.

Its indexing a POCO that has a `nested` mapping, happy to use your POCO instead to more closely match your setup.

Can you still let me know the answer to the following questions:

Do you also get the crash if you do call

- `var serialized = client.SourceSerializer.SerializeToString(objectYouWantToIndex);`
- `var serialized = client.RequestResponseSerializer.SerializeToString(objectYouWantToIndex)`

> The questions you are asking seems to be debugging our ability to connect to Elasticsearch and perform operations.

I can assure you this is not the case, my only goal here is to get the the bottom of this.

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [February 6, 2020, 3:06pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/35 "2020-02-06T15:06:17Z")

</div>

I have updated my reproduction by inferring a C# POCO based on your mapping:

> <https://gist.github.com/Mpdreamz/b55fd8aab66400cbc127162d9db1f623>

Even so I am not yet able to reproduce. Will try again in an environment more closely mimicking yours.

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 5:22pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/36 "2020-02-06T17:22:06Z")

</div>

We seem to keep having to ask something several times before we get a response. Here goes AGAIN. your statement - quote:

**Your examples are incomplete the mapping you provide does not correlate with the index call that you stated.**

Again: Can you elaborate on this.  
Again: Can you be more specific as to what is not correlating to see if we are missing something

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [February 6, 2020, 5:49pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/37 "2020-02-06T17:49:56Z")

</div>

I've touched on what I was missing 2 replies ago and even went as far as to try to fill in the gaps in the following reply.

I have no interest exploring this further if your hell bend on just seeming to be looking for canning fodder in my replies. This is turning incredibly unproductive.

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 6:23pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/38 "2020-02-06T18:23:35Z")

</div>

You mean the statement you made had absolutely no basis. Thought so.

Look. Your questions are so irrelevant that it is obvious why we are not getting anywhere.  
Is there anyone more senior you can put on this so that we can sort this out before the next Millennium!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 6, 2020, 7:15pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/39 "2020-02-06T19:15:05Z")

</div>

That's sad that you didn't want to help by answering the question we asked.  
I believe we can not help more here until you answer and help us to help you.

---

<div class="post-metadata">

**Author:** ![han1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/han1/32/20141_2.png) [@han1](https://discuss.elastic.co/u/han1)\
**Post date:** [February 6, 2020, 7:26pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/40 "2020-02-06T19:26:20Z")

</div>

Are you KIDDING? Do you see the thread? or are you just making things up!  
The fact of the matter is that there is NO SENSE OF RESPONSIBILITY, DIGNITY OR INTEGRITY in this company and the quicker we are rid of it the better.

Thank goodness for those who are locked into it that the main part (Lucene) is written by someone else otherwise god knows what RUBBISH would be coming out if NEST is an example of your competence.

**TALK IS CHEAP. ACTION IS WHAT COUNTS!**

And there is nothing from you.

You guys think there is no Justice in this world so anything goes - take their money when it suits and let them hang when it does not. And you are actually right 99.9999999999..... of the time. But when Justice raises its glorious head just once in a lifetime then....

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 6, 2020, 7:55pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/41 "2020-02-06T19:55:45Z")

</div>

I am closing this thread.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 6, 2020, 7:55pm UTC](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693/42 "2020-02-06T19:55:49Z")

</div>

Closed on February 6, 2020, 7:55pm UTC



[Previous page](https://discuss.elastic.co/t/nest-brings-down-the-whole-webserver/217693.md?page=1)
