-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Media files in url_cache/
and url_cache_thumbnails/
hang around for too long
#10863
Comments
Some observations:
|
3 and 5 seem to be the expected behaviour: synapse/synapse/rest/media/v1/preview_url_resource.py Lines 526 to 531 in b932590
and when inspecting the |
The current code in #10814 applies it to all URL previews, not just oEmbed, but this is kind of a lie since (currently) non-oEmbed ones always get an expiry time of 1 hour. From the above it looks like we don't expire things when that time passes, but we actually expire things that expired 2 days ago. I think what this actually means is that a URL preview result will last at most 3 days (after #10814 is merged). Hopefully that sounds reasonable? |
#10924 ought to fix point 4 in the list above ( |
Which leaves 1 and 2:
The best explanation I can come up with for these is that sometimes URL preview requests get stuck downloading the URL and outlive the 2 day cache expiry. Then:
We saw an example of this when restarting matrix.org on 2021-09-22:
The 2nd line is twisted aborting the fetch of the URL to be previewed. However, URL preview requests shouldn't take this long, since there is supposed to be a 60 second timeout when fetching URLs. |
This has been reported previously in #8302, closing this issue. |
Description
Spotted by @richvdh:
Media files in
url_cache/
andurl_cache_thumbnails/
are hanging around for a few days, which is far longer than expectedVersion information
The text was updated successfully, but these errors were encountered: