question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

exposure.db takes up huge amounts of space

See original GitHub issue

After less than a week of exposure tracking (and less than 1000 collected IDs total), my phone is now unusable because microG used up all of the free space on the internal storage. By far the biggest part of this is /data/data/com.google.android.gms/databases/exposure.db, which takes 952M.

I am not sure what microG is doing there, but 1MB per ID seems like a huge amount of storage for a short string, some timestamps and signal strength, which should all easily fit in 1KB. I will probably have to disable exposure tracking because if there is no way to compress this a bit.

The entire storage partition on my phone has 5GB (out of 8GB total internal storage), so a single app consuming 1GB is way over the top… even Signal, which is notorious for how much space it needs, is at ~600MB.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:42 (7 by maintainers)

github_iconTop GitHub Comments

11reactions
mar-v-incommented, Oct 14, 2020

I just uploaded a new build to https://microg.org/dl/core-en.apk which now includes the commits 1deeb45834c89bca10c2578a64b543ac240a83f4 and 0eb75ba363be06ae2519953dc8edf0647c98a731 which hopefully solve issues with large database files needing even more storage to be cleaned up and thus fail to do so. The database migration still needs a few MB of available storage, but afterwards you should end up with less than 10MB database size 😃

7reactions
mar-v-incommented, Sep 30, 2020

Current git already contains a fix for this problem, which seems to mostly affect “slower” devices and probably also only the German CWA.

The problem seems to be caused by CWA stopping and restarting risk calculation after 1 minute which may be too short on some devices, Google has a rate limit to make sure there are not too many risk calculation requests per day, but microG currently does not enforce this rate limit, assuming devs would have taken care of not doing to many requests already. CWA devs announced to increase the timeout to 3 minutes in v1.4.0 (due next week) and to further look into this issue for v1.5.0.

You can try a version built from git master from here: https://microg.org/dl/core-en.apk Note that if your database is already very large, it may take a few minutes after installation to start collecting ids as it has to clean up the database. On a test device Fairphone 2 this took about 7-10 minutes for a ~5GB database file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

exposure.db takes up huge amounts of space #1190 - GitHub
db , which takes 952M. I am not sure what microG is doing there, but 1MB per ID seems like a huge amount...
Read more >
My database is taking up lots of space on disk, but contains ...
Certain tables appear to be very large on disk, but contain relatively few records with very little actual data therein when analyzed via...
Read more >
How to identify the top disk space consuming tables by file?
Try on a smaller database first, it can take a while to crack all IAM's for all objects.
Read more >
What Noises Cause Hearing Loss? | NCEH - CDC
Noise above 70 dB over a prolonged period of time may start to damage your hearing. Loud noise above 120 dB can cause...
Read more >
Occupational Noise Exposure - Overview
Overview · Know Your Workplace Noise Levels! · Standards · Health Effects · Exposure & Controls · Hearing Conservation Program · Hearing Loss...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found