# Prometheus error

**URL:** <https://forums.percona.com/t/prometheus-error/11668>\
**Category:** PMM 2.x\
**Created:** [August 5, 2021, 1:25pm UTC](https://forums.percona.com/t/prometheus-error/11668 "2021-08-05T13:25:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [August 5, 2021, 1:26pm UTC](https://forums.percona.com/t/prometheus-error/11668/1 "2021-08-05T13:26:00Z")

</div>

Hello,  
Sometimes I got “Database is locked” and “context deadline exceeded” errors and all my alarms were triggered. How can I solve this?

It is PMM 2.9

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/9/9f3c6fda70f34402e5cf1bbd625b4954d7a980ec.png)

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/c/c57ab89166b761ea5792f9c6f8b9c98abe579d9a.png)

---

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [September 20, 2021, 7:22am UTC](https://forums.percona.com/t/prometheus-error/11668/2 "2021-09-20T07:22:46Z")

</div>

Hello,

Anybody have an idea?

---

<div class="post-metadata">

**Author:** ![nurlan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nurlan/32/1523_2.png) [@nurlan](https://forums.percona.com/u/nurlan)\
**Post date:** [September 20, 2021, 1:24pm UTC](https://forums.percona.com/t/prometheus-error/11668/3 "2021-09-20T13:24:08Z")

</div>

Hi @Cihan_Tunali could you add more context, please?  
What have you done and how did you add alerts?  
As far as I remember we didn’t support alerts in PMM 2.9.

---

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [September 20, 2021, 1:37pm UTC](https://forums.percona.com/t/prometheus-error/11668/4 "2021-09-20T13:37:44Z")

</div>

> [@nurlan](#):
>
> e you done and how did you add alerts?

Hello Nurlan,  
I am using grafana alerts and all alarm definitions are working well. But sometimes I got above errors from prometheus. Any idea?

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [September 20, 2021, 6:30pm UTC](https://forums.percona.com/t/prometheus-error/11668/5 "2021-09-20T18:30:51Z")

</div>

Well the “context deadline exceeded” is a timeout error message which I mostly see when there is no answer in the timeout period so depending on your system load it’s possible the query that the alert is running took longer than the timeout (dont’t recall if it’s 30 of 60 seconds). and assuming the second message is related to the first it could simply be too much contention on the datasource (prometheus db)… Are there a lot of users on this PMM instance or are the users doing big range data display?

---

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [September 27, 2021, 6:46am UTC](https://forums.percona.com/t/prometheus-error/11668/6 "2021-09-27T06:46:34Z")

</div>

Thank you @steve.hoffman for your comment. I think you are right. I was using grafana with 5sn refresh period. I changed it to 30sn then my problems are gone. Not much users are using it and I am using it to show last 6 hours.

Anyway,I think i need to upgrade PMM to latest to check all my existing problem again. Thanks!
