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(server): out of memory when unstacking assets #7332

Merged
merged 1 commit into from Feb 22, 2024

Conversation

michelheusschen
Copy link
Contributor

After unstacking 1000 assets the server ran out of memory. The assetRepository.getByIds includes the { stack: { assets: true } } relation by default, which means it will retrieve all assets included in the stack again. Basically trying to load 1000 * 1000 = 1 million assets in memory. Fixed by only loading the needed relation.

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4faf458
Status: ✅  Deploy successful!
Preview URL: https://76c76ad3.immich.pages.dev
Branch Preview URL: https://fix-server-oom-unstacking.immich.pages.dev

View logs

@jrasm91 jrasm91 merged commit e3cccba into main Feb 22, 2024
26 checks passed
@jrasm91 jrasm91 deleted the fix/server-oom-unstacking branch February 22, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants