# MetricHistoryManager Error

**URL:** <https://forum.inductiveautomation.com/t/metrichistorymanager-error/14978>\
**Category:** Ignition\
**Created:** [August 4, 2017, 12:23am UTC](https://forum.inductiveautomation.com/t/metrichistorymanager-error/14978 "2017-08-04T00:23:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [August 4, 2017, 12:23am UTC](https://forum.inductiveautomation.com/t/metrichistorymanager-error/14978/1 "2017-08-04T00:23:58Z")

</div>

I’m getting heaps of errors (about 1 per minute) in the Gatweay saying “MetricHistoryManager - Could not write metric value to database:database disk image is malformed” as shown below!

I’m not sure where to start to fix this.  
If you have any ideas please let me know.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f04b80852634ce33cf6e6edfb5d09d4acc96c146.png)

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 4, 2017, 2:10pm UTC](https://forum.inductiveautomation.com/t/metrichistorymanager-error/14978/2 "2017-08-04T14:10:12Z")

</div>

Try this: stop the gateway, delete data/metricsdb/metrics.idb and start the gateway. That will create a new metrics database from scratch.

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [August 7, 2017, 1:38am UTC](https://forum.inductiveautomation.com/t/metrichistorymanager-error/14978/3 "2017-08-07T01:38:26Z")

</div>

Thanks mgross, I’ll give it a go the next chance I get and let you know.

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [August 11, 2017, 5:44am UTC](https://forum.inductiveautomation.com/t/metrichistorymanager-error/14978/4 "2017-08-11T05:44:01Z")

</div>

Looks like it did the trick. Thanks
