httptoolkit / httptoolkit-server

The backend of HTTP Toolkit
https://httptoolkit.com
GNU Affero General Public License v3.0
433 stars 96 forks source link

HttpToolkit generating and not cleaning outputs #43

Closed simonharvan closed 2 years ago

simonharvan commented 2 years ago

Hello,

I've been using HttpToolkit for couple of months now and my diskspace started to shrink. I found out, there are blobs, that are not cleaned, even though I am pretty sure I cannot see any archive of requests.

I am not sure if this helps, but here is where I found them.

2,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/59
2,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/66
4,7G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/57
6,6G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/6f
1,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/9b
1,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/0b
5,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/60
1,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/5f
1,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/a3
1,2G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/e2
6,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/fc
2,3G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/fb
3,4G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/74
7,8G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/4c
3,5G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/4d
2,6G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/07
2,2G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/38
7,6G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/6e
2,9G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/36
3,9G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/5d
2,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/5e
1,9G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/01
1,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/06
5,4G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/6c
2,7G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/52
5,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/64
1,3G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/a0
1,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/b8
1,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/d2
1,8G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/b7
1,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/c3
1,1G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/c4
2,0G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/2c
5,5G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/70
8,8G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/4f
2,2G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2/71
TOTAL
137G    ~/Library/Application Support/httptoolkit/IndexedDB/https_app.httptoolkit.tech_0.indexeddb.blob/2

Thanks :)

pimterry commented 2 years ago

Oh, thanks for reporting this! No idea where that's coming from, that's really interesting.

Have you deleted these already? If not, could you please run HTTP Toolkit, open the developer tools (View -> Toggle developer tools), go to the Application tab and share a screenshot of:

That should let us confirm exactly what's being stored here. I suspect there's an issue where caches aren't being cleared, I'll see what I can dig up in terms of potential causes there.

simonharvan commented 2 years ago

Unfortunately, I already did, but I can take a look into it later after using it for longer period of time.

pimterry commented 2 years ago

Ok, no worries, that's fine then. I can see on my machine that there's a lot in my cache that isn't being evicted as it should be, which I think is the cause here. I was just looking to confirm that that's what's going wrong in your case too. I'll look into this and update here once I've sorted that out.

pimterry commented 2 years ago

Dug into this today, and I'm fairly sure I've now fixed this! I found the leftover caches on my device, and on the latest release they were cleaned out automatically.

To clear out this data, you'll need to run HTTP Toolkit once (which will update in the background, within 30 seconds or so) and then close it and launch it again. On that second startup, all caches will be cleared correctly (and old data will be cleared out again on every startup in future).

I'll close this as done for now, but let me know if you're still facing issues with this after the latest update.