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

Cache is flushed on every app start #18245

Closed
u12206050 opened this issue Apr 19, 2023 · 0 comments · Fixed by #18238
Closed

Cache is flushed on every app start #18245

u12206050 opened this issue Apr 19, 2023 · 0 comments · Fixed by #18238

Comments

@u12206050
Copy link
Contributor

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(); 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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants