Signal-android: Signal uses too much data on storage / can't clear data with signal

Created on 30 May 2016  Â·  53Comments  Â·  Source: signalapp/Signal-Android

I have:


Bug description

Signal uses too much data on storage.

Steps to reproduce

  • Send videos pictures whatever with a fresh install.
  • delete all chats. for group chats handle like this: clean completly from inside the group.
  • data wont drop on install size.
    e.g. with 2 group chats (1st: 4user; 2nd: 10 user), Signal consumes 187MB in Total!
  • i checked for empty signal download folders "movies" and "pictures"
  • 3-4 days ago i cleared (clear data) a total empty signal (same 2 groups) with storage use of 1,38GB! these days later: im back on 187MB.

Actual result: maybe the group chats need that much storage??? i dont hope so!

Expected result: When i delete all like my describtion above, signal should drop on install size. (correct me if im wrong, but 150MB for 2 emtpy group chats is too much)

Screenshots

d4bee971-3f6f-4cf0-86ab-3e3803ed2d0f

Device info

Device: S3 LTE (Intl.)
Android version: 5.1.1
Signal version: 3.16.0

Link to debug log

https://gist.github.com/01a0bdc4fa5671bb4e4635e586d04264

help wanted

Most helpful comment

It seems that if you share a file this also is placed in the app_captures directory. After trying I found 2 ways to leave (large) files in that directory.

  1. Take a picture, or share a file but don't send it. Leave it as concept. Restart the phone. After the restart the concept is gone however the file remains in app_captures.
  2. Try to share a large file that exceeds the accept limits for attachments. You get a message in the conversation that the message is too large however the file appears in the app_captures directory and remains there.

I think the first option is not very likely to happen however the second one is.
Don't know a proper solution, perhaps check the filesize prior to placing it in the capures directory or maybe that directory can be cleared at startup?

All 53 comments

I can confirm this issue under Android 5+. Signal occupied over 1,5 GB app data although the Data (Text of conversation + Images + Videos + Audio) were really around 400MB in total (confirmed by exporting text and all media!!!).
Deleting every Signal conversation dropped the App Data to 1,1GB as expected. So there are 1,1 GB "shadow data" that Signal itself does not free again. Only solution is to delete the AppData from the Application Manager in Android.

I have also an Android 4.4 phone where the exact same data are present and there Signal only takes up around 400MB!.

i can confirm this (around 220MB) also for Android 6.0.1

Can you also confirm that Android 4.4 is not affected?

I have the same problem on my Nexus 5 with Android 6 running and on a Motorola Moto G 2nd Gen. Are there some more informations about the problem?

It would be nice to have a functionality to clear/remove messages in conversations which are old than X. I don't wont to delete all my messages.

@floriangosse

It would be nice to have a functionality to clear/remove messages in conversations which are old than X. I don't wont to delete all my messages.

You can already trim conversations and remove old messages. You can trim conversations in the following way:
Go to settings -> conversations and media -> _trim messages_: activate and set treshold

I don't know the exact naming because my signal runs in German. There it is:
Einstellungen -> Unterhaltung und Medieninhalte -> _Unterhaltung kürzen_: aktivieren und Limit einstellen

Thanks @patzi. I didn't see it.

@floriangosse @patzi Unfortunately deleting all messages wont help at all! Thats what this bug is about!
I can delete all conversations and there is still 1 GB of data allocated. Signal allocates storage without needing it, this is a severe bug, because it eats up internal storage and the only way to resolve is to delete all app data, but then you need to reregister signal.

I can also confirm this. Depending on how many pictures, media, etc. get send either in group oder single user conversations the data folder gets clogged up quite fast. After just a couple of weeks of moderate usage with just 3 users Signal has become the single largest app on my phone by far. Its currently about 1.2 GB and growing...

As mentioned, the trimming option in the settings doesnt work. Messages get cut, but the overall size remains unchanged.

This happens on Android 4.4 as well as Android 2.3. In both cases specifically the app_captures folder under data/org.thoughtcrime.securesms/ is full with lots of .blob files segmented at 165.39 MB each. This alone amounts for about 1 GB of the 1,2 GB size.

The same problem/behaviour occurs on the other end at the 3 users as well. Their Signal also grows horrendously big.

Please fix this if possible, cause for long term media conversations it doesnt seem very promising in this state.

I have the same issue. Signal is using 310 MB and is still growing. Android 4.4.2.

I think this issue may be harder to reproduce now. Until August photos in group conversations have been sent in full resolution, see https://github.com/WhisperSystems/Signal-Android/issues/5461
This is "fixed" now (in quotes because the picture quality is a real pain now, but thats another issue).
I have not fully tested, but I guess the storage problem may be a little bit less clear to reproduce now, since it's not easily possible now to send a picture with more than 200kB due to pictures getting compressed so heavily!

Failed to reproduce this with a one-on-one chat in an API 23 emulator. I did the following:

  • send a message with a GIF attached
  • go back to the inbox
  • delete thread

The attachment was correctly deleted and Signal's storage usage went back to where it was before.
Anything else I need to do to trigger this?

(Sorry. Missclicked)
I think this is an old issue and can be closed maybe? People should report for the newest version.
In my case its working now fine.

This is definetely not over. Signal uses a lot mb on the phone. And it wont just go away. I just saved all the pictures in my chats to sd card and then deleted all the chats. At apps it shows 589mb data on device for signal. After reset and app update its still the same allthough there is no simgle chat or picture or whatever in signal. This is on a sony m4 aqua. The only way I got it away on my own phone. a sony z2 is by deleting data in the phones app settings screen. But then the app completely resetted and, I got a new security code and all my friends had to accept that again. This makes the app unusable on phones with less phone memory.

@kaneelschep is your device rooted, and could you have a look where the space is going?

No and no.
How to look where it is going?

On 1/29/17, Trolldemorted notifications@github.com wrote:

@kaneelschep is your device rooted, and could you have a look where the
space is going?

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/WhisperSystems/Signal-Android/issues/5515#issuecomment-275943056

I do not believe there is an easy way without having root privileges, but maybe someone knows a way around.

Does anyone who has this problem have a rooted android, can could give us some hints where the memory goes?

root@kenzo:/ # du -sh /data/data/org.thoughtcrime.securesms/*
4.0K    /data/data/org.thoughtcrime.securesms/app_captures
134M    /data/data/org.thoughtcrime.securesms/app_parts
4.0K    /data/data/org.thoughtcrime.securesms/app_textures
56K     /data/data/org.thoughtcrime.securesms/app_webview
219M    /data/data/org.thoughtcrime.securesms/cache
92K     /data/data/org.thoughtcrime.securesms/code_cache
2.0M    /data/data/org.thoughtcrime.securesms/databases
20M     /data/data/org.thoughtcrime.securesms/files
0       /data/data/org.thoughtcrime.securesms/lib
20K     /data/data/org.thoughtcrime.securesms/shared_prefs

This is from my phone, i am not sure which sizes would be normal though. According to my android's app settings, signal consumes 157MB "data" and 219MB "cache".

Save all the pictures from the chats, and see how much mb it is. Then if you want. Remove them from the chats and see if the data dissapears from setting/apps/signal....

I think using 360mb is allready a lot ;-) whatsapp would never have that. And i never ever in years deleted any chats in whatsapp.

Does that require me manually going through all chats?

360MB isn't that much if you receive many media attachments, i think. If no one with this problem can enlighten us where the space is going, we cannot do much about it.

Maybe there are workarounds like moving signal to the sdcard, and mounting the sdcard on your pc? Or does adb pull work on non-rooted devices for every folder? Or can you use run-as?

You can save all images from a chat at the same time.
So not picture by picture. Doesnt take that much time.
In a chat click on right top 3balls. All images. Save.
They will be saved in pictures folder.

Signal cant be moved to sdcard.

Op 31 jan. 2017 09:39 schreef "Trolldemorted" notifications@github.com:

Does that require me manually going through all chats?

360MB isn't that much if you receive many media attachments, i think. If no
one with this problem can enlighten us where the space is going, we cannot
do much about it.

Maybe there are workarounds like moving signal to the sdcard, and mounting
the sdcard on your pc? Or does adb pull work on non-rooted devices for
every folder? Or can you use run-as
http://stackoverflow.com/questions/2078710/android-adb-access-to-application-databases-without-root
?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WhisperSystems/Signal-Android/issues/5515#issuecomment-276305249,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYPjgSiq-ieZcLKRuVKf3neXXY5aVMTjks5rXvMvgaJpZM4IqAMV
.

From last time till now after clearing all fotos from chats. and clearing data in settings. So one month. Signal went from100mb to 1,5 gb. This is totally useless for people with small internal storage phones. And is clearly a serious problem for usability of signal. is is that hard to be possible to move to sdcard?

I am running android 6.0 on my LG G4 and I have a 32GB sd card installed and I can move some apps but there is no option to move signal. Is there a way to have signal only save data to the micro sd card and not internal storage?

I have a Moto G and after a few months, signal uses now about 1 GB. I haven't found any possibility to extract pictures and videos and to reduce the size.

Signal seems to be usesless on phones without SD card slots.

After signal updates about 2months ago In android 6 the problem is gone.
Overal memory usage stays much lower around 300mb. Clear data still results
in loss of security codes though. In Android 5 it never got resolved for
me. But in the meantime sony updated the sony m4 to android6. So that
solves the problem for me.

Op 20 mei 2017 19:48 schreef "andiii-98" notifications@github.com:

I have a Moto G and after a few months, signal uses now about 1 GB.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WhisperSystems/Signal-Android/issues/5515#issuecomment-302888250,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYPjgdzvMQAfcwkWDPCe_ab8_dRwHFw7ks5r7ydYgaJpZM4IqAMV
.

Problem persists for Android 6 (HTC One M8) and 4.4.2 (Samsung S4 Mini).

The first is rooted, shall I sent a usage overview?

I would like to help you identify this bug, because I am still affected by it. Please let me know how I can help you.

My system: Android 4.4.4 - CyanogenMod 11, HTC Sensation

Signal 4.6.1 currently uses 625 MB of memory. According to the settings this is split like this:
App: 40,59 MB
USB storage app: 0 MB
Data: 584 MB
SD card: 20 KB
Cache: 48 KB

du -s /data/data/org.thoughtcrime.securesms/*
8   /data/data/org.thoughtcrime.securesms/app_captures
1180792 /data/data/org.thoughtcrime.securesms/app_parts
8   /data/data/org.thoughtcrime.securesms/app_tmp
96  /data/data/org.thoughtcrime.securesms/app_webview
64  /data/data/org.thoughtcrime.securesms/cache
2616    /data/data/org.thoughtcrime.securesms/code_cache
11200   /data/data/org.thoughtcrime.securesms/databases
1080    /data/data/org.thoughtcrime.securesms/files
0   /data/data/org.thoughtcrime.securesms/lib
40  /data/data/org.thoughtcrime.securesms/shared_prefs

So to me it looks like I have too many / too big attachments but this never happened to me with WhatsApp in years of permanent usage. Signal is in use for maybe half a year now, according to my last post.

As a long-time Signal user, this is becoming critical, as my device's internal storage is running out of space. Even though I trim all conversations and set disappearing messages to 1 week, storage usage keeps growing. Signal is now using 3.09 GB of "data", and the only option seems to be to uninstall and reinstall the app, but that's a major PITA as it will reset all sessions and freak out or confuse the people I routinely talk to.

If I can't move Signal to the SD card, and there's no way to actually get rid of data that's no longer visible in the app, what else can I do?

Signal version: 4.6.1
Android version: 6.0.1

Nothing. It just becomes unusable.

Op 19 jun. 2017 19:08 schreef "i7u" notifications@github.com:

As a long-time Signal user, this is becoming critical, as my device's
internal storage is running out of space. Even though I trim all
conversations and set disappearing messages to 1 month by default, storage
usage keeps growing. Signal is now using 3.09 GB of "data", and the only
option seems to be to uninstall and reinstall the app, but that's a major
PITA as it will reset all sessions and freak out or confuse the people I
routinely talk to.

If I can't move Signal to the SD card, and there's no way to actually get
rid of data that's no longer visible in the app, what else can I do?

Signal version: 4.6.1
Android version: 6.0.1

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WhisperSystems/Signal-Android/issues/5515#issuecomment-309504561,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYPjgfBghh1IzGBVRtJ60904rnvWXk4Sks5sFqr0gaJpZM4IqAMV
.

@i7u if you could find out where all the space is going i would be great.

I'm kinda embarrassed to say I don't know how to do that. I installed a terminal emulator app on my phone (Termux) but I can't ls anything under /data - I get permission denied. With the built-in file manager, I can only see one folder under Device Storage > Android > data > org.thoughtcrime.sms - it's called "files" and allegedly has "0 items".

Could you point me to instructions to list the contents of the right folder?

@i7u

but I can't ls anything under /data - I get permission denied.

yep, you need root

Some stackoverflow answers and the adb doc suggest that adb run-as can be used to access an app's storage.

However, the app needs to be debuggable - i don't know whether the official playstore build is, nor if you can switch to the beta version.

I'm afraid I can't experiment with rooting my phone to collect this information. I only have one phone, and I need it for work. More than happy to collect the info as long as it doesn't jeopardize the functionality of the phone.

for the sake of completeness

bullhead:/ $ run-as org.thoughtcrime.securesms
run-as: Package 'org.thoughtcrime.securesms' is not debuggable

No not rooted.

Op 22 jun. 2017 23:13 schreef "p4nci" notifications@github.com:

for the sake of completeness

bullhead:/ $ run-as org.thoughtcrime.securesms
run-as: Package 'org.thoughtcrime.securesms' is not debuggable

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WhisperSystems/Signal-Android/issues/5515#issuecomment-310503946,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYPjgdrXS_hhV-W2L0WJQwGsAEFq2gOFks5sGtjbgaJpZM4IqAMV
.

damn.

are the beta builds debuggable?

@Trolldemorted
nope, tested with a beta v4.7.1

I have tracked down the data and it all leads to the app_parts folder. There are hundreds of small files named "partXYZ.mms" with a size varying from a few kB up to 50 MB. Does anyone know what those files contain and if they are really needed?

@ForGorNorPor yep, AFAIK partXYZ.mms files are encrypted attachments (pictures, videos, ...).
For me deleting attachments in Signal works as expected e.g. corresponding partXYZ.mms file under app_parts is deleted as well.

tested with Signal v4.6.1 and v4.7.4

My Signal installation consumed more than 1 GB. Deleting attachments etc. seems to work well however I was only able to reduce the size to approx. 1GB. Checking the disk usage revealed:
root@klte:/ # du -h /data/data/org.thoughtcrime.securesms/*
875M /data/data/org.thoughtcrime.securesms/app_captures
141M /data/data/org.thoughtcrime.securesms/app_parts
4.0K /data/data/org.thoughtcrime.securesms/app_textures
4.0K /data/data/org.thoughtcrime.securesms/app_tmp
4.0K /data/data/org.thoughtcrime.securesms/app_webview/paks
64K /data/data/org.thoughtcrime.securesms/app_webview
76K /data/data/org.thoughtcrime.securesms/cache/image_manager_disk_cache
80K /data/data/org.thoughtcrime.securesms/cache
52K /data/data/org.thoughtcrime.securesms/code_cache
1.9M /data/data/org.thoughtcrime.securesms/databases
4.0K /data/data/org.thoughtcrime.securesms/files/sessions
332K /data/data/org.thoughtcrime.securesms/files/prekeys
28K /data/data/org.thoughtcrime.securesms/files/signed_prekeys
72K /data/data/org.thoughtcrime.securesms/files/sessions-v2
500K /data/data/org.thoughtcrime.securesms/files
0B /data/data/org.thoughtcrime.securesms/lib
24K /data/data/org.thoughtcrime.securesms/shared_prefs

So most space seems to be allocated in app_captures. Checking that directory showed:
root@klte:/data/data/org.thoughtcrime.securesms/app_captures # ls -l
-rw------- u0_a210 u0_a210 2946276 2015-11-20 21:47 1448052436315.jpg
-rw------- u0_a210 u0_a210 216667204 2016-02-25 22:32 1456435939816.jpg
-rw------- u0_a210 u0_a210 216667204 2016-02-25 22:32 1456435954745.jpg
-rw------- u0_a210 u0_a210 216667204 2016-02-25 22:32 1456435966189.jpg
-rw------- u0_a210 u0_a210 23791124 2016-08-28 08:39 1472366370604.blob
-rw------- u0_a210 u0_a210 5327268 2016-11-07 13:19 1478521163927.blob
-rw------- u0_a210 u0_a210 5327268 2016-11-07 13:20 1478521204109.blob
-rw------- u0_a210 u0_a210 4804820 2016-11-19 16:04 1479567855890.blob
-rw------- u0_a210 u0_a210 5332 2016-11-29 22:42 1480455759791.blob
-rw------- u0_a210 u0_a210 56302164 2017-01-17 19:49 1484678975591.blob
-rw------- u0_a210 u0_a210 56302164 2017-01-17 19:50 1484679012797.blob
-rw------- u0_a210 u0_a210 56302164 2017-01-17 19:50 1484679042624.blob
-rw------- u0_a210 u0_a210 56302164 2017-01-17 19:52 1484679172310.blob
-rw------- u0_a210 u0_a210 190756 2017-03-24 17:55 1490374547235.blob
-rw------- u0_a210 u0_a210 190756 2017-03-24 17:56 1490374562292.blob

What does the app_captures directory contains? Some files are pretty old. Is it safe to remove (some of) those files?
ps. Running signal version 4.6.1

@ForGorNorPor can you check whether deleting an attachment decreases the file count in that directory?

@bme13 could you open some of the jpegs and have a look?

@Trolldemorted they don't appear to be jpg files. Tried to determine the file type using the file command and that just says data file. Also the .blob files are data files according to the file command.

Just had some more time for testing. It seems that the app_captures temporally stores the images / sound recordings (captures :-) ) e.g. when I take a picture I see a new file in the app_captures directory. Then after I send that picture the file is removed from the app_captures directory and shows up in the app_parts directory. So now my assumption is that this occasionally goes wrong and the capture file remains. I will try to reproduce that.

@Trolldemorted sure, but how exactly do I remove media from my chats? :) I know that I can save them in the context menu and I found an option to globally trim all chats, but I would rather only pick some particular media files to delete and keep all text. Is this possible?

@ForGorNorPor By long pressing on the media in the chat, a menu appears that allows you to delete that specific media item.
See #6111 for a pending request to multi-select and delete media.

Ok, that's a bit cumbersome, I hope that this fix will be applied some day.
But good news is, that I indeed managed to get rid of 150 MB by deleting some videos and pictures of my chats. I guess that the encryption bloats those attachments up in size, compared to WhatsApp where I did not encounter this issue ever.
If the handling of attachments would be improved, I'd consider this issue fixed from my point of view. Thanks for your help.

It seems that if you share a file this also is placed in the app_captures directory. After trying I found 2 ways to leave (large) files in that directory.

  1. Take a picture, or share a file but don't send it. Leave it as concept. Restart the phone. After the restart the concept is gone however the file remains in app_captures.
  2. Try to share a large file that exceeds the accept limits for attachments. You get a message in the conversation that the message is too large however the file appears in the app_captures directory and remains there.

I think the first option is not very likely to happen however the second one is.
Don't know a proper solution, perhaps check the filesize prior to placing it in the capures directory or maybe that directory can be cleared at startup?

I noticed my Signal app was taking up over 1gb of space today, and after searching and finding this issue, I tested the results from my phone. It is a Samsung Galaxy S6 running Android 7, with Signal 4.10.12.

Size before cleanup: 1.16 GB

  • Turned on Message trimming (Delete old messages)
  • Set Conversation length limit to 5 (default: 500)
  • Clicked Trim all conversations now
  • Process started at 0600, ended at 0601

    • Deleting old messages... shows 100 total

    • Progress bar took longer to start then run

  • Turned off Message trimming (Delete old messages)

Size after cleanup: 128 MB

There are some similar issues open on the iOS repo as well so it may not be specific to a mobile OS. Does Signal have a Patron or anything where we can support to get these things fixed?

On iOS 11 (iPhone 6S) , I'm seeing signal use 1.71 GB with all messages deleted. I also notice that the performance (opening, typing, and sending messages) degrades greatly when the app gets so high into space usage.

Sony z2 android 6. Just deleted all pictures from the 10 still existing
conversations. And signal is 1.34 gb..

Op 22 okt. 2017 20:59 schreef "Jesse Kunze" notifications@github.com:

On iOS 11 (iPhone 6S) , I'm seeing signal use 1.71 GB with all messages
deleted. I also notice that the performance (opening, typing, and sending
messages) degrades greatly when the app gets so high into space usage.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WhisperSystems/Signal-Android/issues/5515#issuecomment-338500637,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYPjgRez8S3bL-i705HeLTBVAKXnTkh4ks5su5CsgaJpZM4IqAMV
.

Perhaps an other cause for the application size is #6909

GitHub Issue Cleanup:
See #7598 for more information.

Was this page helpful?
0 / 5 - 0 ratings