# VersionConflictEngineException error in elastic search while running in multi thread environment

**URL:** <https://discuss.elastic.co/t/versionconflictengineexception-error-in-elastic-search-while-running-in-multi-thread-environment/130693>\
**Category:** Elasticsearch\
**Created:** [May 5, 2018, 2:08am UTC](https://discuss.elastic.co/t/versionconflictengineexception-error-in-elastic-search-while-running-in-multi-thread-environment/130693 "2018-05-05T02:08:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajibsoft](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajibsoft/32/30857_2.png) [@rajibsoft](https://discuss.elastic.co/u/rajibsoft)\
**Post date:** [May 5, 2018, 2:08am UTC](https://discuss.elastic.co/t/versionconflictengineexception-error-in-elastic-search-while-running-in-multi-thread-environment/130693/1 "2018-05-05T02:08:29Z")

</div>

We are getting the below error from elastic search while my application is running in a multi threaded environment and number of threads are almost 25:

2018-05-01 17:56:57,802 ERROR [com.sicap.targetme.svc.utils.SimpleDelayQueueChannel] (STC-Consumer-Threadpool-62715 2018-05-01 17:56:56.652 MSISDN: 966503236382, CAMPAIGN: VoLTE\_LIVE, PROFILE: VoLTE\_LIVE) Failures occurs while inserted data in ElaticSearch : failure in bulk execution: [3]: index [stc], type [campaign], id [324\_966567885550], message [[stc][[stc][3]] VersionConflictEngineException[[campaign][324\_966567885550]: version conflict, current [6], provided [5]]]

What could be the issue. My running elastic search version is 2.3.2

Regards, Rajib

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [May 5, 2018, 4:25am UTC](https://discuss.elastic.co/t/versionconflictengineexception-error-in-elastic-search-while-running-in-multi-thread-environment/130693/2 "2018-05-05T04:25:38Z")

</div>

Rajib,

The log message your reporting isn't something from Elasticsearch. Since it mentions `version conflict`, though, I'll hypothesize that your application is attempting to update the same document multiple times around the same time, creating a race condition. Since you mention running multi-threaded, it seems that much more likely.  
Have a look at some relevant parts of The Definitive Guide [1]

[1] [https://www.elastic.co/guide/en/elasticsearch/guide/current/version-control.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/version-control.html)

Regards,  
Glen

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 2, 2018, 4:25am UTC](https://discuss.elastic.co/t/versionconflictengineexception-error-in-elastic-search-while-running-in-multi-thread-environment/130693/3 "2018-06-02T04:25:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
