# Warning about logging to db?

**URL:** <https://forum.pioreactor.com/t/warning-about-logging-to-db/1096>\
**Category:** Feedback and suggestions\
**Created:** [March 23, 2026, 2:25pm UTC](https://forum.pioreactor.com/t/warning-about-logging-to-db/1096 "2026-03-23T14:25:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![noahsprent](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/noahsprent/32/383_2.png) [@noahsprent](https://forum.pioreactor.com/u/noahsprent)\
**Post date:** [March 23, 2026, 2:25pm UTC](https://forum.pioreactor.com/t/warning-about-logging-to-db/1096/1 "2026-03-23T14:25:54Z")

</div>

This is my own dumb error but might be helpful to stop other people from making the same mistake with a watcher that says when huge numbers of logs are being written. I have a job that watches i2c and writes values to mqtt for jobs which then read these and convert to e.g. pH, DO. I didn’t realise that the topic I wrote to meant they all got automatically written to the sqlite db. So not only was my db about 5gb of random logs but also the db was getting slammed and probably the sd card as well. Not sure if there’s a way to warn people when writes to db are above a certain rate or something?

---

<div class="post-metadata">

**Author:** ![noahsprent](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/noahsprent/32/383_2.png) [@noahsprent](https://forum.pioreactor.com/u/noahsprent)\
**Post date:** [March 23, 2026, 2:26pm UTC](https://forum.pioreactor.com/t/warning-about-logging-to-db/1096/2 "2026-03-23T14:26:42Z")

</div>

![image](https://forum.pioreactor.com/uploads/default/original/1X/dec7a9a0228dd9cbabe3427e924cb7c241d40a74.png)  
🤦‍♂️

---

<div class="post-metadata">

**Author:** ![CamDavidsonPilon](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/camdavidsonpilon/32/3_2.png) [@CamDavidsonPilon](https://forum.pioreactor.com/u/CamDavidsonPilon)\
**Post date:** [March 23, 2026, 2:29pm UTC](https://forum.pioreactor.com/t/warning-about-logging-to-db/1096/3 "2026-03-23T14:29:56Z")

</div>

> [@noahsprent](#):
>
> Not sure if there’s a way to warn people when writes to db are above a certain rate or something?

That’s a pretty reasonable addition, yea. We already compute the `inserts_in_last_60s` for another reason - seems simple to extend that for this use case too.

---

<div class="post-metadata">

**Author:** ![noahsprent](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/noahsprent/32/383_2.png) [@noahsprent](https://forum.pioreactor.com/u/noahsprent)\
**Post date:** [March 23, 2026, 2:31pm UTC](https://forum.pioreactor.com/t/warning-about-logging-to-db/1096/4 "2026-03-23T14:31:28Z")

</div>

Yea I imagine that inserts\_in\_last\_60s might be what stopped me from running the db backup command that alerted me to the problem in the first place (a good reminder to always think why it’s necessary before just blindly running --force)
