Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix memory leak and inconsistent behavior in memory caches #14314

Closed
Closed
180 changes: 180 additions & 0 deletions .config/docker_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,186 @@ id: 'aidx'
# deliverJobMaxAttempts: 12
# inboxJobMaxAttempts: 8

caches:
localUserById:
memory:
# Lifetime of cached ID->local user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of ID->local user lookups cached in memory. Default: 10000
capacity: 10000

userById:
memory:
# Lifetime of cached ID->user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of ID->user lookups cached in memory. Default: 15000
capacity: 15000

userByToken:
memory:
# Lifetime of cached token->user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of token->user lookups cached in memory. Default: 10000
capacity: 10000

userByUri:
memory:
# Lifetime of cached URI->user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of URI->user lookups cached in memory. Default: 10000
capacity: 10000

userProfile:
redis:
# Lifetime of cached user profiles in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user profiles in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user profiles cached in memory. Default: 10000
capacity: 10000

userKeyPair:
redis:
# Lifetime of cached user keypairs in redis. Default: 86400000 (1 day)
lifetime: 86400000
memory:
# Lifetime of cached user keypairs in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of user keypairs cached in memory. Default: 10000
capacity: 10000

roles:
memory:
# Lifetime of cached roles in memory. Default: 3600000 (1 hour)
lifetime: 3600000

userRoles:
memory:
# Lifetime of cached user roles in memory. Default: 3600000 (1 hour)
lifetime: 3600000
# Maximum number of user roles cached in memory. Default: 10000
capacity: 10000

userMutes:
redis:
# Lifetime of cached user mutes in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user mutes in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user mutes cached in memory. Default: 1000
capacity: 1000

userBlocks:
redis:
# Lifetime of cached user blocks in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user blocks in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user blocks cached in memory. Default: 1000
capacity: 1000

userFollowings:
redis:
# Lifetime of cached user followings in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user followings in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user followings cached in memory. Default: 1000
capacity: 1000

userChannels:
redis:
# Lifetime of cached user channel followings in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user channel followings in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user channel followings cached in memory. Default: 1000
capacity: 1000

publicKeys:
memory:
# Lifetime of cached public keys in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of public keys cached in memory. Default: 15000
capacity: 15000

emojis:
memory:
# Lifetime of cached emojis in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of emojis cached in memory. Default: 5000
capacity: 5000

localEmojis:
redis:
# Lifetime of cached local emojis in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached local emojis in memory. Default: 180000 (3 minutes)
lifetime: 180000

instance:
redis:
# Lifetime of cached federated instances in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached federated instances in memory. Default: 180000 (3 minute)
lifetime: 180000
# Maximum number of federated instances cached in memory. Default: 5000
capacity: 5000

swSubscription:
redis:
# Lifetime of cached service worker subscriptions in redis. Default: 3600000 (1 hour)
lifetime: 3600000
memory:
# Lifetime of cached service worker subscriptions in memory. Default: 180000 (3 minute)
lifetime: 180000
# Maximum number of service worker subscriptions cached in memory. Default: 1000
capacity: 1000

listMembership:
redis:
# Lifetime of cached list memberships in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached list memberships in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of list memberships cached in memory. Default: 1000
capacity: 1000

clientApp:
memory:
# Lifetime of client apps in memory. Default: 604800000 (1 week)
lifetime: 604800000
# Maximum number of client apps cached in memory. Default: 1000
capacity: 1000

avatarDecorations:
memory:
# Lifetime of cached avatar decorations in memory. Default: 1800000 (30 minutes)
lifetime: 1800000

relays:
memory:
# Lifetime of cached relays in memory. Default: 600000 (10 minutes)
lifetime: 600000

suspendedHosts:
memory:
# Lifetime of cached suspended hosts in memory. Default: 3600000 (1 hour)
lifetime: 3600000

nodeInfo:
memory:
# Lifetime of cached node info in memory. Default: 600000 (10 minutes)
lifetime: 600000

# IP address family used for outgoing request (ipv4, ipv6 or dual)
#outgoingAddressFamily: ipv4

Expand Down
181 changes: 181 additions & 0 deletions .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,187 @@ id: 'aidx'
#deliverJobMaxAttempts: 12
#inboxJobMaxAttempts: 8

caches:
localUserById:
memory:
# Lifetime of cached ID->local user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of ID->local user lookups cached in memory. Default: 10000
capacity: 10000

userById:
memory:
# Lifetime of cached ID->user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of ID->user lookups cached in memory. Default: 15000
capacity: 15000

userByToken:
memory:
# Lifetime of cached token->user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of token->user lookups cached in memory. Default: 10000
capacity: 10000

userByUri:
memory:
# Lifetime of cached URI->user lookups in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of URI->user lookups cached in memory. Default: 10000
capacity: 10000

userProfile:
redis:
# Lifetime of cached user profiles in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user profiles in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user profiles cached in memory. Default: 10000
capacity: 10000

userKeyPair:
redis:
# Lifetime of cached user keypairs in redis. Default: 86400000 (1 day)
lifetime: 86400000
memory:
# Lifetime of cached user keypairs in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of user keypairs cached in memory. Default: 10000
capacity: 10000

roles:
memory:
# Lifetime of cached roles in memory. Default: 3600000 (1 hour)
lifetime: 3600000

userRoles:
memory:
# Lifetime of cached user roles in memory. Default: 3600000 (1 hour)
lifetime: 3600000
# Maximum number of user roles cached in memory. Default: 10000
capacity: 10000

userMutes:
redis:
# Lifetime of cached user mutes in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user mutes in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user mutes cached in memory. Default: 1000
capacity: 1000

userBlocks:
redis:
# Lifetime of cached user blocks in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user blocks in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user blocks cached in memory. Default: 1000
capacity: 1000

userFollowings:
redis:
# Lifetime of cached user followings in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user followings in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user followings cached in memory. Default: 1000
capacity: 1000

userChannels:
redis:
# Lifetime of cached user channel followings in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached user channel followings in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of user channel followings cached in memory. Default: 1000
capacity: 1000

publicKeys:
memory:
# Lifetime of cached public keys in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of public keys cached in memory. Default: 15000
capacity: 15000

emojis:
memory:
# Lifetime of cached emojis in memory. Default: 43200000 (12 hours)
lifetime: 43200000
# Maximum number of emojis cached in memory. Default: 5000
capacity: 5000

localEmojis:
redis:
# Lifetime of cached local emojis in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached local emojis in memory. Default: 180000 (3 minutes)
lifetime: 180000

instance:
redis:
# Lifetime of cached federated instances in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached federated instances in memory. Default: 180000 (3 minute)
lifetime: 180000
# Maximum number of federated instances cached in memory. Default: 5000
capacity: 5000

swSubscription:
redis:
# Lifetime of cached service worker subscriptions in redis. Default: 3600000 (1 hour)
lifetime: 3600000
memory:
# Lifetime of cached service worker subscriptions in memory. Default: 180000 (3 minute)
lifetime: 180000
# Maximum number of service worker subscriptions cached in memory. Default: 1000
capacity: 1000

listMembership:
redis:
# Lifetime of cached list memberships in redis. Default: 1800000 (30 minutes)
lifetime: 1800000
memory:
# Lifetime of cached list memberships in memory. Default: 60000 (1 minute)
lifetime: 60000
# Maximum number of list memberships cached in memory. Default: 1000
capacity: 1000

clientApp:
memory:
# Lifetime of client apps in memory. Default: 604800000 (1 week)
lifetime: 604800000
# Maximum number of client apps cached in memory. Default: 1000
capacity: 1000

avatarDecorations:
memory:
# Lifetime of cached avatar decorations in memory. Default: 1800000 (30 minutes)
lifetime: 1800000

relays:
memory:
# Lifetime of cached relays in memory. Default: 600000 (10 minutes)
lifetime: 600000

suspendedHosts:
memory:
# Lifetime of cached suspended hosts in memory. Default: 3600000 (1 hour)
lifetime: 3600000

nodeInfo:
memory:
# Lifetime of cached node info in memory. Default: 600000 (10 minutes)
lifetime: 600000


# Local address used for outgoing requests
#outgoingAddress: 127.0.0.1

Expand Down
Loading
Loading