# Elastic SQL in CANVAS FAILED

**URL:** <https://discuss.elastic.co/t/elastic-sql-in-canvas-failed/224024>\
**Category:** Kibana\
**Created:** [March 18, 2020, 4:48am UTC](https://discuss.elastic.co/t/elastic-sql-in-canvas-failed/224024 "2020-03-18T04:48:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![umay\_fb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umay_fb/32/60582_2.png) [@umay\_fb](https://discuss.elastic.co/u/umay_fb)\
**Post date:** [March 18, 2020, 4:48am UTC](https://discuss.elastic.co/t/elastic-sql-in-canvas-failed/224024/1 "2020-03-18T04:48:38Z")

</div>

I try to create a canvas b using elastic SQL. but i always get failed when do query. i using this query

> SELECT layanan,count(awbNumber) AS total\_awb FROM "indexname" WHERE layanan is not null GROUP by layanan ORDER BY count(awbNumber) DESC LIMIT 10

and get this error

> ''''  
> {  
> "error": {  
> "root\_cause": [  
> {  
> "type": "query\_phase\_execution\_exception",  
> "reason": "Time exceeded"  
> }  
> ],  
> "type": "search\_phase\_execution\_exception",  
> "reason": "all shards failed",  
> "phase": "query",  
> "grouped": true,  
> "failed\_shards": [  
> {  
> "shard": 0,  
> "index": "indexname",  
> "node": "LOC9qAEPQQ-7pK8x0zTblw",  
> "reason": {  
> "type": "query\_phase\_execution\_exception",  
> "reason": "Time exceeded"  
> }  
> }  
> ]  
> },  
> "status": 500  
> }  
> '''

what must i do to solve this problem?

---

<div class="post-metadata">

**Author:** ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)\
**Post date:** [March 18, 2020, 5:04pm UTC](https://discuss.elastic.co/t/elastic-sql-in-canvas-failed/224024/2 "2020-03-18T17:04:15Z")

</div>

Hi @umay_fb,

This is possibly happening due to a large of amount of data going through and it is timing out. Do you have a smaller dataset with a different index to try and see if it fails the same?

You can increase the timeout, see [https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-fields.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-fields.html)

Also are you using ES or AWS ES? We only support ES.

Thanks!  
Liza

---

<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:** [April 15, 2020, 5:04pm UTC](https://discuss.elastic.co/t/elastic-sql-in-canvas-failed/224024/3 "2020-04-15T17:04:22Z")

</div>

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