You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed on multiple RC installs that rocketchat_oembed_cache collection is never cleaned up by the automatic process of RC. The default cache expiration time is 30 days, and this value is not respected.
This collection is used as a cache for generating previews in the messages. It seems to contain full original web pages of the links in the messages, hence it can grow quite big on the old RC setups.
Steps to reproduce:
Dump the database and mark down the size of the file rocketchat_oembed_cache.bson.
Log into database and run db.rocketchat_oembed_cache.find().pretty(). Mark down the time of some entry in the beginning of the output. (The last entry will do too as the output limiter cuts it early anyway.)
Press Clear cache button under Admin -> Settings -> Message -> Embed Cache Expiration Days
After a while you'll get an error message. Don't mind that as the button seems to work regardless.
Run the db.rocketchat_oembed_cache.find().pretty() in the database again and make note of time stamps.
Dump the database again and make note of the new size of the file rocketchat_oembed_cache.bson.
Expected behavior:
There should not be more than 30 days worth of content in the oembed cache when the Admin -> Settings -> Message -> Embed Cache Expiration Days settings has been set to 30 days.
Actual behavior:
The Embed Cache Expiration Days setting is not respected. The database contains preview source data from far longer time period.
The manual operation using the Clear button works, although it outputs an error message e.params is not iterable (cannot read property).
In our case, after the manual clearing of the table using the Clear button, the size of the collection dropped from 4.6 GB to 178 MB.
Server Setup Information:
Version of Rocket.Chat Server: 6.2.1
Operating System: RHEL8
Deployment Method: tar
Number of Running Instances: 10
DB Replicaset Oplog: Yes
NodeJS Version: 14.21.3
MongoDB Version: 5.0
Client Setup Information
Desktop App or Browser Version: Any
Additional context
Looking at the timestamps of the uncleared cache, the cleaning process of oembed cache stopped working a year ago in 2022 April/May.
The text was updated successfully, but these errors were encountered:
Gummikavalier
changed the title
Oembed cache cleaning does not work
Automatic Oembed cache cleaning does not work
Jun 2, 2023
Description:
We noticed on multiple RC installs that
rocketchat_oembed_cache
collection is never cleaned up by the automatic process of RC. The default cache expiration time is 30 days, and this value is not respected.This collection is used as a cache for generating previews in the messages. It seems to contain full original web pages of the links in the messages, hence it can grow quite big on the old RC setups.
Steps to reproduce:
rocketchat_oembed_cache.bson
.db.rocketchat_oembed_cache.find().pretty()
. Mark down the time of some entry in the beginning of the output. (The last entry will do too as the output limiter cuts it early anyway.)Clear
cache button underAdmin -> Settings -> Message -> Embed Cache Expiration Days
db.rocketchat_oembed_cache.find().pretty()
in the database again and make note of time stamps.rocketchat_oembed_cache.bson
.Expected behavior:
There should not be more than 30 days worth of content in the oembed cache when the
Admin -> Settings -> Message -> Embed Cache Expiration Days
settings has been set to 30 days.Actual behavior:
The
Embed Cache Expiration Days
setting is not respected. The database contains preview source data from far longer time period.The manual operation using the
Clear
button works, although it outputs an error messagee.params is not iterable (cannot read property)
.In our case, after the manual clearing of the table using the
Clear
button, the size of the collection dropped from 4.6 GB to 178 MB.Server Setup Information:
Client Setup Information
Additional context
Looking at the timestamps of the uncleared cache, the cleaning process of oembed cache stopped working a year ago in 2022 April/May.
The text was updated successfully, but these errors were encountered: