# How to restart the failed reflection automatically

**URL:** <https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342>\
**Category:** Uncategorized\
**Created:** [April 7, 2020, 10:30am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342 "2020-04-07T10:30:36Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabh99](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@saurabh99](https://community.dremio.com/u/saurabh99)\
**Post date:** [April 7, 2020, 10:30am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/1 "2020-04-07T10:30:36Z")

</div>

Hi, Can anyone help me on this and also I want to see which reflection is failing again and again and its count.

---

<div class="post-metadata">

**Author:** ![dacopan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dacopan/32/4289_2.png) [@dacopan](https://community.dremio.com/u/dacopan)\
**Post date:** [April 7, 2020, 2:14pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/2 "2020-04-07T14:14:09Z")

</div>

Dremio actually not do this automatically, you can develop a custom code using Dremio API to make it.  
For example we develop a DAGs using apache airflow, to refresh reflection, and check availability, and notify errors

---

<div class="post-metadata">

**Author:** ![saurabh99](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@saurabh99](https://community.dremio.com/u/saurabh99)\
**Post date:** [April 7, 2020, 2:16pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/3 "2020-04-07T14:16:50Z")

</div>

Thank you for the information, Do you have any code with you so that i can take a reference from it

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [April 7, 2020, 9:20pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/4 "2020-04-07T21:20:02Z")

</div>

@saurabh99

On community edition we give up after 3 times. In Enterprise edition you can customize. I would also be interested in finding out why it failed 3 times. Was the source down? did it run out of memory?and fix the underlying cause

Also the default refresh is every hour. So if you do not want it every hour, you should decrease the frequency so we do not use up the 3 attempts too soon

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![saurabh99](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@saurabh99](https://community.dremio.com/u/saurabh99)\
**Post date:** [April 8, 2020, 7:55am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/5 "2020-04-08T07:55:31Z")

</div>

When i go on reflection settings i did not found any option of schedule.

---

<div class="post-metadata">

**Author:** ![saurabh99](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@saurabh99](https://community.dremio.com/u/saurabh99)\
**Post date:** [April 8, 2020, 8:56am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/6 "2020-04-08T08:56:23Z")

</div>

Hi i find this option on my physical data not on reflection , every time my reflection fail i have to go and manually try to run that, can we set them automatically up …

![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/f/f34268109eb0710f5d8f1421a8308329d6e80cd3.png)

---

<div class="post-metadata">

**Author:** ![dacopan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dacopan/32/4289_2.png) [@dacopan](https://community.dremio.com/u/dacopan)\
**Post date:** [April 8, 2020, 2:55pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/7 "2020-04-08T14:55:57Z")

</div>

VDS not have schedule option, because VDS are always automatically refreshes when parents PDS or VDS are updated.  
As @balaji.ramaswamy said only in enterprise edition you can increase the 3 times retry for fail reflection.

But the important ting here is why your reflection fail?  
For example in my case dremio are not connect to production database, it’s connect to alternate database  
the source are down because are down 3h all days (backup-restore contingence database)  
so I program a dag with airflow to run refresh VDS after restore is complete, then check reflection availability each hour, and notify if some are wrong

---

<div class="post-metadata">

**Author:** ![LucGth](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@LucGth](https://community.dremio.com/u/LucGth)\
**Post date:** [September 28, 2020, 11:35pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/8 "2020-09-28T23:35:50Z")

</div>

> [@balaji.ramaswamy](#):
>
> Also the default refresh is every hour. So if you do not want it every hour, you should decrease the frequency so we do not use up the 3 attempts too soon

Hi balaji, i can do this? thank you

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 1, 2020, 3:14am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/9 "2020-10-01T03:14:37Z")

</div>

@LucGth

layout.refresh.max.attempts

---

<div class="post-metadata">

**Author:** ![sszelenko](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/sszelenko/32/2799_2.png) [@sszelenko](https://community.dremio.com/u/sszelenko)\
**Post date:** [January 8, 2021, 2:46pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/10 "2021-01-08T14:46:57Z")

</div>

hi, where where should i put / change this parameter? thanks.

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 9, 2021, 8:36am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/11 "2021-01-09T08:36:03Z")

</div>

@sszelenko

Click on admin-support key-enter the above key in the support key box-click show-it should 3 in it,

Increase to the number you want

Thanks  
Bali

---

<div class="post-metadata">

**Author:** ![martinocando](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@martinocando](https://community.dremio.com/u/martinocando)\
**Post date:** [January 15, 2021, 7:02pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/12 "2021-01-15T19:02:31Z")

</div>

Hello.  
Would you be able to share or point me to some place that I can search for how to do this custom code using Dremio API to refresh failed reflections?

Thanks

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 16, 2021, 6:30am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/13 "2021-01-16T06:30:44Z")

</div>

@martinocando

[http://docs.dremio.com/rest-api/catalog/post-catalog-id-refresh.html](http://docs.dremio.com/rest-api/catalog/post-catalog-id-refresh.html)

---

<div class="post-metadata">

**Author:** ![martinocando](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@martinocando](https://community.dremio.com/u/martinocando)\
**Post date:** [January 16, 2021, 1:13pm UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/14 "2021-01-16T13:13:37Z")

</div>

Brilliant. Thanks for the information!

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 18, 2021, 3:24am UTC](https://community.dremio.com/t/how-to-restart-the-failed-reflection-automatically/5342/15 "2021-01-18T03:24:38Z")

</div>

Welcome @martinocando
