# How to set "timeout" value of cursor in elasticsearch SQL syntax

**URL:** <https://discuss.elastic.co/t/how-to-set-timeout-value-of-cursor-in-elasticsearch-sql-syntax/182542>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [May 24, 2019, 2:47am UTC](https://discuss.elastic.co/t/how-to-set-timeout-value-of-cursor-in-elasticsearch-sql-syntax/182542 "2019-05-24T02:47:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunatic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lunatic/32/55516_2.png) [@lunatic](https://discuss.elastic.co/u/lunatic)\
**Post date:** [May 24, 2019, 2:47am UTC](https://discuss.elastic.co/t/how-to-set-timeout-value-of-cursor-in-elasticsearch-sql-syntax/182542/1 "2019-05-24T02:47:40Z")

</div>

I had a query return large results with SQL syntax, and I use the 'cursor' to fetch results. But I found there is no way to set 'timeout' value therefore my cursor would be expired after some default value.

So how can I set the time of cursor expiration？

---

<div class="post-metadata">

**Author:** ![matriv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matriv/32/43656_2.png) [@matriv](https://discuss.elastic.co/u/matriv)\
**Post date:** [May 31, 2019, 1:15pm UTC](https://discuss.elastic.co/t/how-to-set-timeout-value-of-cursor-in-elasticsearch-sql-syntax/182542/2 "2019-05-31T13:15:40Z")

</div>

You can use the `page_timeout` parameter: [https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html#sql-rest-fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html#sql-rest-fields)

---

<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 28, 2019, 1:15pm UTC](https://discuss.elastic.co/t/how-to-set-timeout-value-of-cursor-in-elasticsearch-sql-syntax/182542/3 "2019-06-28T13:15:41Z")

</div>

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