Failed when Bulk Upsert-Update

Is NoNodeAvailable exception always caused by the lack of node? I'm doing bulk upsert request with the size of 5000 and currently still using one node for the server.
Sure, adding the number of the node may be the painkiller for this issue. But is it possible to solve this issue by not adding the number of the node, for example using native script for upsert? I have reduced the bulk size to 1000 but I still got the exception.
The bulk request is executed intensively at one period of time, so it may spike at one time and idle at the other.

Which version of Elasticsearch are you on? What does your Elasticsearch logs say? Are you perhaps seeing extensive GC during this heavy indexing?

I'm on 2.3, you can view my logs here. I'm sorry I can't give you any idea whether I'm seeing that kind of stuffs or not, but I did get OOME back then, and since that I've increased the ES heap size.

OOM would explain why the node was not available. You also seem to have a lot of long GC, so increasing heap might certainly help.

So using native script doesn't help anything and I must upgrade the infrastructure & increase the ES heap size. Thanks for the answer.

Anyway, is there any suggestion from you about my use case other than upgrading the infrastructure? Thanks in advance.