# Scroll Id is too long - Java Api

**URL:** <https://discuss.elastic.co/t/scroll-id-is-too-long-java-api/24665>\
**Category:** Elasticsearch\
**Created:** [June 30, 2015, 9:16pm UTC](https://discuss.elastic.co/t/scroll-id-is-too-long-java-api/24665 "2015-06-30T21:16:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marian\_Valero](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Marian\_Valero](https://discuss.elastic.co/u/Marian_Valero)\
**Post date:** [June 30, 2015, 9:16pm UTC](https://discuss.elastic.co/t/scroll-id-is-too-long-java-api/24665/1 "2015-06-30T21:16:52Z")

</div>

I am using a search with scroll with the Java API, when I come to call the scroll for the following data through javascript, this returns me the following error: Failed to load resource: net :: ERR\_EMPTY\_RESPONSE, I have been reviewing my code and it is because the scroll id is too long, what I can do in this case?

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [July 1, 2015, 11:06am UTC](https://discuss.elastic.co/t/scroll-id-is-too-long-java-api/24665/2 "2015-07-01T11:06:20Z")

</div>

scroll id is too long... sounds to me that the number of shards are huge too? how many shards that you have?

---

<div class="post-metadata">

**Author:** ![Marian\_Valero](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Marian\_Valero](https://discuss.elastic.co/u/Marian_Valero)\
**Post date:** [July 1, 2015, 4:02pm UTC](https://discuss.elastic.co/t/scroll-id-is-too-long-java-api/24665/3 "2015-07-01T16:02:26Z")

</div>

I have 2,042 shards and 78 index, around 166.9GB is the size of my data

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [July 2, 2015, 1:46pm UTC](https://discuss.elastic.co/t/scroll-id-is-too-long-java-api/24665/4 "2015-07-02T13:46:38Z")

</div>

jepp, longer shards will produce long scroll id...iirc, the scroll id actually contain some information where the scroll position in the shards. either you reduce the shard count or you find a way to store the scroll id somewhere, perhaps in your application server.

hth

---

<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:** [July 6, 2017, 12:03am UTC](https://discuss.elastic.co/t/scroll-id-is-too-long-java-api/24665/5 "2017-07-06T00:03:57Z")

</div>


