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
In a scaling environment where containers are added and started as load increases the cache is cleared on every container start. This has some serious side affects such as all containers having to request the schema from the database again, which is a heavy load especially running every time a new container starts.
eg. 66 containers request schema, 2s later container 67th is started clearing the cache so now 67 containers all request schema again.
Solution:
Initial solution is to remove await flushCaches();here
and optionally move it after migrations take place.
To Reproduce
Deploy on any container service and do some load tests. Notice that as new containers are added there is an increase in database requests.
Directus Version
9.24.0
Hosting Strategy
Self-Hosted (Custom)
The text was updated successfully, but these errors were encountered:
Describe the Bug
In a scaling environment where containers are added and started as load increases the cache is cleared on every container start. This has some serious side affects such as all containers having to request the schema from the database again, which is a heavy load especially running every time a new container starts.
eg. 66 containers request schema, 2s later container 67th is started clearing the cache so now 67 containers all request schema again.
Solution:
Initial solution is to remove
await flushCaches();
hereand optionally move it after migrations take place.
To Reproduce
Deploy on any container service and do some load tests. Notice that as new containers are added there is an increase in database requests.
Directus Version
9.24.0
Hosting Strategy
Self-Hosted (Custom)
The text was updated successfully, but these errors were encountered: