# Inventory Sync Mutation 504 error code

**URL:** <https://community.shiphero.com/t/inventory-sync-mutation-504-error-code/173>\
**Category:** GraphQL API\
**Created:** [October 10, 2019, 3:05pm UTC](https://community.shiphero.com/t/inventory-sync-mutation-504-error-code/173 "2019-10-10T15:05:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ihnatk](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@ihnatk](https://community.shiphero.com/u/ihnatk)\
**Post date:** [October 10, 2019, 3:05pm UTC](https://community.shiphero.com/t/inventory-sync-mutation-504-error-code/173/1 "2019-10-10T15:05:15Z")

</div>

We were trying to send a file with near 200K SKUs (13MB), but the API returned 504 error:

```
<html><head><title>504 Gateway Time-out</title></head><body bgcolor="white"><center><h1>504 Gateway Time-out</h1>< (truncated...) 

```

The request that we sent:

```
mutation{

```

inventory\_sync(data:{  
url:“[https://dev-twctools.s3-us-west-2.amazonaws.com/shiphero/inventory\_sync/primary/primary\_1570709571.csv](https://dev-twctools.s3-us-west-2.amazonaws.com/shiphero/inventory_sync/primary/primary_1570709571.csv)”,  
warehouse\_id:“V2FyZWhvdXNlOjEwMjQw”  
}){  
request\_id  
complexity  
sync\_id  
}  
}

As I can see, the batch was actually created, but having an error in response is a problem since we can not get the sync process ID for further monitoring.

---

<div class="post-metadata">

**Author:** ![ihnatk](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@ihnatk](https://community.shiphero.com/u/ihnatk)\
**Post date:** [October 14, 2019, 8:53am UTC](https://community.shiphero.com/t/inventory-sync-mutation-504-error-code/173/3 "2019-10-14T08:53:13Z")

</div>

We’ve got another problem for the big file upload. The file that was delivered within the same mutation has near 1.3M rows and 88Mb. However besides the regular 504 error that we got, the sync process is stuck in processing state and haven’t changed since Friday. Please fix this ASAP as we can not deliver other batches.

```
{
        "node": {
          "id": "5da049e3b212a900010b7bb9",
          "url": "https://dev-twctools.s3.us-west-2.amazonaws.com/shiphero/inventory_sync/primary/primary_1570785642.csv",
          "warehouse_id": "V2FyZWhvdXNlOjEwMjQw",
          "customer_account_id": null,
          "total_count": 1391255,
          "status": "processing",
          "error": null,
          "created_at": "2019-10-11T09:22:43+00:00",
          "updated_at": "2019-10-11T10:44:57+00:00"
        }

```

Thanks.

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [October 14, 2019, 12:21pm UTC](https://community.shiphero.com/t/inventory-sync-mutation-504-error-code/173/4 "2019-10-14T12:21:01Z")

</div>

Hi ihnatk!  
Could you please try uploading that file again, issue should be fixed now.  
Thanks!,  
Tom

---

<div class="post-metadata">

**Author:** ![ihnatk](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@ihnatk](https://community.shiphero.com/u/ihnatk)\
**Post date:** [October 14, 2019, 1:47pm UTC](https://community.shiphero.com/t/inventory-sync-mutation-504-error-code/173/5 "2019-10-14T13:47:23Z")

</div>

Hi @tomasw,  
Thanks for your reply. I can not send create a new sync while the old one is not failed or completed. Please see the mutation response:

```
There is a sync already scheduled/being processed for warehouse 10240: {u'status': 2, u'user_id': 21397L, u'account_id': 5518L, u'url': u'https://dev-twctools.s3.us-west-2.amazonaws.com/shiphero/inventory_sync/primary/primary_1570785642.csv', u'total_count': 1391255, u'created_at': datetime.datetime(2019, 10, 11, 9, 22, 43, tzinfo=<UTC>), u'updated_at': datetime.datetime(2019, 10, 11, 10, 44, 57, tzinfo=<UTC>), u'warehouse_id': 10240L, u'error': None, '_id': '5da049e3b212a900010b7bb9'}

```

I believe you’ll need to set error status for the previous one manually in order to let us deliver a new batch.
