Create timeout exception

Enonic version: 7.4
OS: Ubuntu

I’m getting this exception when trying to create a node in our DB. This node can be large (I’m saving an entire content’s tree for speeding purposes).

I’m running it in a task, on a clustered environment (so I don’t know in which cluster it’s running, nor if it’s in only one).

The funny thing is that the object is created in the DB with the same ID as in the exception.

18:43:59.986 ERROR c.e.x.r.i.e.executor.StoreExecutor - Failed to store document with id [f28740cf-72b4-4519-809a-7586f2b0415c] in index [search-database-repo] branch master
org.elasticsearch.ElasticsearchTimeoutException: Timeout waiting for task.
 	at com.enonic.xp.repo.impl.elasticsearch.executor.StoreExecutor.execute(
 	at com.enonic.xp.repo.impl.node.StoreNodeCommand.execute(
	at com.enonic.xp.repo.impl.node.CreateNodeCommand.execute(
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.doCreate(
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.create(
	at com.enonic.xp.lib.node.CreateNodeHandler.execute(
	at com.enonic.xp.context.ContextImpl.callWith(
  at com.enonic.xp.lib.node.NodeHandler.execute(
  at com.enonic.xp.lib.node.NodeHandler.create(
  at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$143655$3478A$node.L:1#create(helsedirektoratet:/lib/xp/node.js:120)

Do you have any idea of what is going on?
Although the object seems to be created correctly, I’m worried about the exceptions.

Does it happen every run and depend on node size?
Could you share example of node and maybe the code, please?

You don’t receive an acknowledgement from Elasticsearch in certain time (timeout) because it is rather big - don’t save lots of documents in one request.
Elasticsearch still tries to store your document in the background - this is why you can find the document.

@maaubt did you figure out this one?

No, I haven’t figured that one yet.
I can’t provide an example of a node example for this because it may contain sensitive information, but I know that some of these can be large (230Kb for one in datatoolbox node exports).

I inserted a few logs and it seems to come after calling nodeLib.create. The whole procedure is running inside a task that creates a bunch of nodes one-by-one (it prepares the data then creates a single node). Thankfully, as @rymsha said, I usually find the node in the DB, but I’m not sure they are created every time (I don’t know if the creation actually fails after one of the exceptions).