unit-state.db grows apparently without bound

Bug #1893222 reported by Junien F
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PostgreSQL Charm
New
Undecided
Unassigned

Bug Description

Hi,

Ubuntu 20.04, charm version 206.

After running for a while, unit-state.db grows quite big - mine was 50MB when I noticed. This is all in the "reactive.state_watch" key. It was basically a 50MB dict.

This is leading to longer and longer hook duration, from :

2020-07-23 01:49:59 unit-postgresql-2: uniter (run update-status hook), waited 0s, held 4m0s

to

2020-08-12 14:22:08 unit-postgresql-2: uniter (run update-status hook), waited 0s, held 23m34s

(full report at https://pastebin.canonical.com/p/gXwk5cwSwH/)

23 minutes to run update-status just doesn't work.

I had to clean up reactive.state_watch to get hooks back to a sane duration :
$ cd /var/lib/juju/agents/unit-postgresql-*/charm
$ sudo sqlite3 .unit-state.db
sqlite> UPDATE kv SET data='{"iteration": 0, "changes": [], "pending": []}' WHERE key='reactive.state_watch';
sqlite> VACUUM;

Thanks

Revision history for this message
Stuart Bishop (stub) wrote :

This is all charms.reactive internals. Is it a charms.reactive issue?

Changed in postgresql-charm:
status: New → Incomplete
Revision history for this message
Stuart Bishop (stub) wrote :

(leaving as NEW to avoid losing the bug)

Changed in postgresql-charm:
status: Incomplete → New
Revision history for this message
Junien F (axino) wrote :

So far I've only seen this with the postgresql charm, so I'm not sure.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.