# Could not rollup bandwidth usage - database is locked

**URL:** <https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530>\
**Category:** troubleshooting\
**Tags:** database\
**Created:** [September 7, 2019, 12:12pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530 "2019-09-07T12:12:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![golyalpha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/golyalpha/32/1139_2.png) [@golyalpha](https://forum.storj.io/u/golyalpha)\
**Post date:** [September 7, 2019, 12:12pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/1 "2019-09-07T12:12:38Z")

</div>

I just did an integrity check on the info.db through sqlite3 (while I had my node temporarily offline), and it went ok, but after starting up the node, I see this error:

```auto
2019-09-07T12:10:06.914Z ERROR bandwidth Could not rollup bandwidth usage {"error": "bandwidthdb error: database is locked", "errorVerbose": "bandwidthdb error: database is locked\n\tstorj.io/storj/storagenode/storagenodedb.(*bandwidthDB).Rollup:212\n\tstorj.io/storj/storagenode/bandwidth.(*Service).Rollup:51\n\tstorj.io/storj/internal/sync2.(*Cycle).Run:87\n\tstorj.io/storj/storagenode/bandwidth.(*Service).Run:43\n\tstorj.io/storj/storagenode.(*Peer).Run.func9:417\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}

```

What’s going on here?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 7, 2019, 12:16pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/2 "2019-09-07T12:16:11Z")

</div>

Hello @golyalpha,  
Welcome to the forum!

Try to restart the node:

```auto
docker restart -t 300 storagenode

```

Make sure that you updated it to the latest version though

---

<div class="post-metadata">

**Author:** ![golyalpha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/golyalpha/32/1139_2.png) [@golyalpha](https://forum.storj.io/u/golyalpha)\
**Post date:** [September 7, 2019, 12:18pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/3 "2019-09-07T12:18:42Z")

</div>

I’m using Watchtower to keep the node up-to-date (currently 0.20.1), so the version is fine. And I’ve already restarted the node when I’ve run the integrity check on the DB (had a similar error, hence why I ran it in the first place).

Edit: Just restarted the node though. Same error, and even the former error is showing (during “archiving orders”)

---

<div class="post-metadata">

**Author:** ![golyalpha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/golyalpha/32/1139_2.png) [@golyalpha](https://forum.storj.io/u/golyalpha)\
**Post date:** [September 7, 2019, 12:22pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/4 "2019-09-07T12:22:02Z")

</div>

Also, I’m getting a few “untrusted peer” errors.

```auto
2019-09-07T12:20:30.692Z ERROR server gRPC unary error response {"error": "rpc error: code = PermissionDenied desc = untrusted peer 1QzDKGHDeyuRxbvZhcwHU3syxTYtU1jHy5duAKuPxja3XC8ttk"}

```

Not sure if that refers somehow to my node (node id is different), or if that’s some unofficial satellite running in the wild being refused by my node.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 7, 2019, 12:23pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/5 "2019-09-07T12:23:17Z")

</div>

> [@golyalpha](#):
>
> rpc error: code = PermissionDenied desc = untrusted peer

> [@Error Codes: What they mean and Severity Level \[READ FIRST\]](https://forum.storj.io/t/error-codes-what-they-mean-and-severity-level-read-first/518/24):
>
> With the latest update getting node info is restricted to only trusted nodes. When someone else tries to retrieve this information, you’ll see this in your log.

---

<div class="post-metadata">

**Author:** ![golyalpha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/golyalpha/32/1139_2.png) [@golyalpha](https://forum.storj.io/u/golyalpha)\
**Post date:** [September 7, 2019, 12:24pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/6 "2019-09-07T12:24:28Z")

</div>

Thank you for that, what about the DB-related errors?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 7, 2019, 12:28pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/7 "2019-09-07T12:28:58Z")

</div>

I don’t have a solution other then just wait when it will be resolved itself.  
How long do you see this error, is the node running or restarting?

---

<div class="post-metadata">

**Author:** ![golyalpha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/golyalpha/32/1139_2.png) [@golyalpha](https://forum.storj.io/u/golyalpha)\
**Post date:** [September 7, 2019, 12:33pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/8 "2019-09-07T12:33:16Z")

</div>

The node seems to be running mostly alright. There are download requests being received and served and the occasional context cancellation. I was also meaning to ask if there’s a way to store the DB somewhere other than alongside the data (on a faster but smaller storage medium, for example), since it’s now almost 1GB, and I can only image how slow the lookups are on the harddrive that way.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 7, 2019, 12:34pm UTC](https://forum.storj.io/t/could-not-rollup-bandwidth-usage-database-is-locked/1530/9 "2019-09-07T12:34:43Z")

</div>

> [@golyalpha](#):
>
> somewhere other than alongside the data

Such setups are possible, but not supported. Please, avoid them.
