# Is Rest API update method for article is not thread save ?

**URL:** <https://forum.shopware.com/t/is-rest-api-update-method-for-article-is-not-thread-save/67115>\
**Category:** International (English Only)\
**Tags:** programming\
**Created:** [22. Mai 2020 um 07:37 UTC](https://forum.shopware.com/t/is-rest-api-update-method-for-article-is-not-thread-save/67115 "2020-05-22T07:37:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![komoito](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@komoito](https://forum.shopware.com/u/komoito)\
**Post date:** [22. Mai 2020 um 07:37 UTC](https://forum.shopware.com/t/is-rest-api-update-method-for-article-is-not-thread-save/67115/1 "2020-05-22T07:37:32Z")

</div>

Hi&nbsp;

I have problem with shopware 5 rest api update method. When I use rest api and i try to update product i got integrity constraint violation error but error only occurs only when i do update in parallel manner.&nbsp;

> Integrity constraint violation: 1062 Duplicate entry ‚20874-1349‘ for key 'articleID

When I do update in normal way , in one thread error not occurs. Do you have idea what can cause the error?&nbsp;  
Here are&nbsp;similar link&nbsp;issues:  
[https://forum.shopware.com/discussion/53517/sql-error-bei-produkt-api](https://forum.shopware.com/discussion/53517/sql-error-bei-produkt-api)

[https://forum.shopware.com/discussion/15949/rest-api-duplicate-entry-for-primary](https://forum.shopware.com/discussion/15949/rest-api-duplicate-entry-for-primary)

It looks like the problem is not with duplicated data. It could be because of the access the same resource&nbsp;inside flush method&nbsp;in the same time.&nbsp;I am not sure how i can fix that ?&nbsp;
