mirror of
https://github.com/immich-app/immich.git
synced 2026-07-16 05:34:30 +03:00
Out of memory when scanning libraries with >1M assets #2238
Closed
opened 2026-02-05 05:50:09 +03:00 by OVERLORD
·
53 comments
No Branch/Tag Specified
main
chore/translations
renovate/typescript-projects
fix/29853-thumbnail-decode-size
custom-app-logo
fix/server-heif-security-limit
fix/live-photo-library-task-joining
renovate/machine-learning
chore/security-txt-ghsa
renovate/mobile
refactor/auto-trash-sync
fix/failed-sync-blocks-resume
renovate/pigeon-27.x
fix/slideshow-motion
renovate/typescript-7.x
renovate/eslint-plugin-unicorn-71.x
fix/ws-reconnect-battery
renovate/node
chore/pump-flutter
feat/ml-hwaccel-testing
chore/face-cluster-abstraction
feat/workflow-logs
fix/moved-files-not-backed-up
renovate/java-25.x
renovate/@immichui
renovate/node-24.x
renovate/terragrunt-1.x
renovate/opentofu-1.x
renovate/cloudflare-4.x
renovate/java-21.x
renovate/prom-prometheus
fix/ios-extension
feat/server-chunked-uploads
feat/native-core
feat/upload-action
fix-29727
feat/download-tag-action
feat/share-action
refactor/action-secondary-handler
feat/edit-button-action
feat/delete-action
feat/album-actions
chore/deprecate-ios-14
fix/android-cr3-save
fix/library-map-live-bounds-updates
fix/mobile-add-to-album-error
feat/browser-profile-action
feat/cast-slideshow-action
chore/update-maplibre-0.26.2
feat/locked-folder-action
fix/unauthorized-memory-creation
feat/workflow-exif-filter
renovate/eslint-plugin-unicorn-70.x
fix/android-locked-folder-delete
fix/library-map-loading-flash
feat/context-actions
renovate/grafana-monorepo
fix/mobile-scroll-velocity-placeholders
renovate/sharp
refactor/action-class
feat/memories-view
refactor/asset-action-filter
feat/undo-archive
feat/archive-action
feat/stack-action
feat/more-favorite-action
feat/restore-action
refactor/feedback-repository
refactor/asset-service-update
refactor/owned-iterator
fix/birthday-picker-locale-order
fix/viewer-double-close-anim
feat/mobile-hls-player
refactor/stack-actions
renovate/permission_handler-12.x
fix/kebab-action-color
feat/workflow-asset-tags
fix/viewer-long-image-aspect
fix/ios-memory-widget-local-date
fix/timeline-drag-select-stops
fix/ios-ethernet-unmetered
fix/featured-photo-thumbnail-cache
feat/yucca-integration
fix/album-timeline-date-ordering
chore/cancel-native-op-on-lifecycle
chore/album-remove-assets
feat/partner-table-permissions
fix/ocr-after-edit
fix/re-enable-pruning
refactor/delete-restore-actions
apk-build-deployment
renovate/pypi-pydantic-settings-vulnerability
edit-photo-stacking
fix/mise-lockfile
fix/android-local-album-date
feat/web-hls-hover
chore/pump-drift
refactor/android-background-worker
refactor/store-cleanup
fix/hash-mismatch
debug/throttle-timeline
refactor/app-metadata
refactor/advanced-settings
refactor/current-user
fix/dedupe-integrity-missing-paths
chore/albums-select
feat/album-assets-event
fix/fdroid-meta
refactor/per-asset-backup-flag
fix/av1-threads
fix/pass-secrets
fix/download-progress-stuck
fix/negative-backup-remainder
feat/map-asset-number
feat/custom-date-range
renovate/pep621-lock-file-maintenance-machine-learning
refactor/session-repository
test-bump-prerelease
fix/handle-unlinking-motion-photos
refactor/cached-key-value-repo
fix/date-range-formatting
fix/map-unresponsive
fix/mobile-album-action-msg
refactor/search-v3/pr-1
chore/v7.23.0-openapi-generator
asset-add-to-album-trigger
refactor/face-editor-decoupling
feat/zoom-aware-face-editing
refactor/adaptive-image-dimensions
fix-face-editor-video-preview
fix-stack-face-tag-selection
fix/face-boxes-edit-panel
workflow-webhook-step
feat/hero_view_transitions
fix/map-sidepanel-queries
feat/dart-openapi-generator
claude/share-quality-5d7Gn
drag-drop-ghost-target
refactor/workflow-page
refactor/mobile-upload
fix-scroll-flicker-2
test/2.7.5-new-sign
update-mise-lock-file
feat/kysely-0.29
feature/load-previews
release-candidate-flow-1
fix/mobile-22522-sqlite-2067
fix/job-lock
release-candidate-flow-3
release-candidate-flow-2
show-in-timeline-toggle
fix/mise-windows
fix/mobile-album-sync-stale-cache
plan-local-image-display
fix/remote-thumbnail-fallback
bugfix/live-photo-stuck
chore/riverpod-update
album-order-per-user
fix/web-timeline-dom-node-retention
chore/svelte-enable-state-referenced-locally
feat/favorite-albums
feat/patch-release-from-branch
fix/oauth-linking
feat/timeline_scroll_buffer
panorama-face-overlay
push-txxyuusptoru
push-zpwsovysllvn
chore/queue-endpoint-migration
fix/remove-from-album
chore/thumbnail-histogram
fix/video-thumbnail-bindthis-regression
fix/scrubber-drag-edge-cases
fix/timeline_layout_row_height
refactor-cancellable-task
uhthomas/fix-mobile-use-timer
uhthomas/fix-mobile-video-controls-key
uhthomas/chore-mobile-search-declarative
owner-role-album-user
feat/livephoto-editing
favorite-albums
uhthomas/fix-mobile-isolate-auth
fix/library-watcher-excludes
chore/library-e2e-to-medium
push-ynllunsvrpxy
fix/dont-delete-offline-library-files
push-zvwwxmvkrspv
push-kywsnvvkwzts
push-xxnxokokzrou
push-voozlrlkxsnu
view-in-timeline-transition
push-uymvmlknxpmx
push-qslzsplnusoz
fix/mobile-video-stall
uhthomas/draft-mobile-image-cache-cancel
push-yquostpqnkxp
feat/vitest-4
claude/offload-icloud-hashing-bI3GZ
midzelis/wip
uhthomas/fix-server-fsync-all
feat/mobile-widget-shared-client
push-lnyuzsutzkqq
push-vqqqxxvkunru
push-wvnmqoswptww
push-nwxlpmyzkyrl
fix/map-webgl-error
fix/mobile-player-fit
feat/panorama-tiles
csp-policy
push-rsywxvptwxuv
refactor/restores-file-interceptor
postgres-socketio
claude/auto-screenshot-web-changes-Y7efI
visual-review/pr-26535
push-lvyturrtwkrq
feat/library-offline-count
fix/mobile-video-aspect-ratio
uhthomas/fix-mobile-search-results
uhthomas/feat-sort-smart-search
uhthomas/chore-mobile-maplibre
uhthomas/mobile-fix-asset-details-album-pop
feat/crawl-wrapper
push-skvzqoozqkpl
feat/edit-filters
feat/pg-queue
refactor/asset-upload
better-project-structure
uhthomas/mobile-feat-asset-viewer-details
fix/ml-rocm-build
feat/asset-file-apis
feature/bottom-buttons-order
sqlite_thumbs
fix-keep-correct-ios-shared-album-asset
push-vpxwmwwxwnvw
fix-migration-width-height
shared-deep-link-handler
feat/thumbnail-native-clients
feat/platform-clients
fix/foreground-cloud-sync
filter-by-person
refactor/sidebar
fix/merged-edited-assets
feat/create-job-with-dto
feat/ios-fastlane-match
match-signing
fix-update-time-update-timeline
feat/modal-routes
feature/mobile-view-asset-owner
feat/system-settings
feature/show-activity-count
feat/location-favorites
feature/rearrange-buttons-2
fix/download-storage-template
chore/originals-in-asset-files
ben/tree-a11y
new-search-filter-ui
refactor/expectSelectedReadonly
refactor/mobile-grdb
feat/mobile-native-local-sync
refactor/timeline_ops
fix/scrubber_end
refactor/virtualsegment
refactor/rename_daymonth_groups
fix-remote-sync-clean-up
debug/cf-chunked-uploads
feat/search-filter-album/web
feat/session-permissions
feat/mobile-dynamic-thumbnails
refactor/extract_photostream
refactor/rename_load_api
refactor/timeline2
refactor/timeline3
feat-no-thumbhash-cache
feat/mobile-hdr-images
feat/beta-background-upload
fix/beta-timeline-memories-setting
fix/failed-uploads-not-removed
feat/groups
drift-map-page
feat/add-to-album-action
track-livephotos
feat/maintenance-worker
refactor/server-side-dedupe
feat/integrity-checks
dev/recognition-eval
lighter_buckets_test
perf/postgres-queue
tmp/demo-snapshot-preview
fix/server-migration-file-extension
rknn-toolkit-lite2
feature/Add-rocm-support-for-machine-learning
chore/async-hash-file
feat/shared-link-view-count
feat/graphql
no-video-player
fix/server-qsv-output-format
chore/server-geodata-tweaks
mobile/native-video-player-no-hero
feat/local-tileserver
feat/ml-armnn-conversion
chore/handle-output_dims
feat/capacitor-mobile-app-poc
feat/server-nvenc-hw-decoding
web/automation-ui
object-storage
ml/tflite
feat/ml-export-cli
v3.0.3
v3.0.2
v3.0.1
v3.0.0
v3.0.0-rc.4
v3.0.0-rc.3
v3.0.0-rc.2
v3.0.0-rc.1
v3.0.0-rc.0
v2.7.5
v2.7.4
v2.7.3
v2.7.2
v2.7.1
v2.7.0
v2.6.3
v2.6.2
v2.6.1
v2.6.0
v2.5.6
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.1
v2.5.0
v2.4.1
v2.4.0
v2.3.1
v2.3.0
v2.2.3
v2.2.2
v2.2.1
v2.2.0
v2.1.0
v2.0.1
v2.0.0
v1.144.1
v1.144.0
v1.143.1
v1.143.0
v1.142.1
v1.142.0
v1.141.1
v1.141.0
v1.140.1
v1.140.0
v1.139.4
v1.139.3
v1.139.2
v1.139.1
v1.139.0
v1.138.1
v1.138.0
v1.137.3
v1.137.2
v1.137.1
v1.137.0
v1.136.0
v1.135.3
v1.135.2
v1.135.1
v1.135.0
v1.134.0
v1.133.1
v1.133.0
v1.132.3
v1.132.2
v1.132.1
v1.132.0
v1.131.3
v1.131.2
v1.131.1
v1.131.0
v1.130.3
v1.130.2
v1.130.1
v1.130.0
v1.129.0
v1.128.0
v1.127.0
v1.126.1
v1.126.0
v1.125.7
v1.125.6
v1.125.5
v1.125.4
v1.125.3
v1.125.2
v1.125.1
v1.125.0
v1.124.2
v1.124.1
v1.124.0
v1.123.0
v1.122.3
v1.122.2
v1.122.1
v1.122.0
v1.121.0
v1.120.2
v1.120.1
v1.120.0
v1.119.1
v1.119.0
v1.118.2
v1.118.1
v1.118.0
v1.117.0
v1.116.2
v1.116.1
v1.116.0
v1.115.0
v1.114.0
v1.113.1
v1.113.0
v1.112.1
v1.112.0
v1.111.0
v1.110.0
v1.109.2
v1.109.1
v1.109.0
v1.108.0
v1.107.2
v1.107.1
v1.107.0
v1.106.4
v1.106.3
v1.106.2
v1.106.1
v1.106.0
v1.105.1
v1.105.0
v1.104.0
v1.103.1
v1.103.0
v1.102.3
v1.102.2
v1.102.1
v1.102.0
v1.101.0
v1.100.0
v1.99.0
v1.98.2
v1.98.1
v1.98.0
v1.97.0
v1.96.0
v1.95.1
v1.95.0
v1.94.1
v1.94.0
v1.93.3
v1.93.2
v1.93.1
v1.93.0
v1.92.1
v1.92.0
v1.91.4
v1.91.3
v1.91.2
v1.91.1
v1.91.0
v1.90.2
v1.90.1
v1.90.0
v1.89.0
v1.88.2
v1.88.1
v1.88.0
v1.87.0
v1.86.0
v1.85.0
v1.84.0
v1.83.0
v1.82.1
v1.82.0
v1.81.1
v1.81.0
v1.80.0
v1.79.1
v1.79.0
v1.78.1
v1.78.0
v1.77.0
v1.76.1
v1.76.0
v1.75.2
v1.75.1
v1.75.0
v1.74.0
v1.73.0
v1.72.2
v1.72.1
v1.72.0
v1.71.0
v1.70.0
v1.69.0
v1.68.0
v1.67.2
v1.67.1
v1.67.0
v1.66.1
v1.66.0
v1.65.0
v1.64.0
v1.63.2
v1.63.1
v1.63.0
v1.62.1
v1.62.0
v1.61.0
v1.60.0
v1.59.1
v1.59.0
v1.58.0
v1.57.1
v1.57.0
v1.56.2
v1.56.1
v1.56.0
v1.55.1
v1.55.0
v1.54.1
v1.54.0
v1.53.0
v1.52.1
v1.52.0
v1.51.2
v1.51.1
v1.51.0
v1.50.1
v1.50.0
v1.49.0
v1.48.1
v1.48.0
v1.47.3
v1.47.2
v1.47.1
v1.47.0
v1.46.1
v1.46.0
v1.45.0
v1.44.0
v1.43.1
v1.43.0
v1.42.0_65-dev
v1.41.1_64-dev
v1.41.0_64-dev
v1.40.1_63-dev
v1.40.0_63-dev
v1.39.0_61-dev
v1.38.2_60-dev
v1.38.1_60-dev
v1.38.0_60-dev
v1.37.0_58-dev
v1.36.2_56-dev
v1.36.1_55-dev
v1.36.0_55-dev
v1.35.0_54-dev
v1.34.0_53-dev
v1.33.1_52-dev
v1.33.0_52-dev
v1.32.1_51-dev
v1.32.0_50-dev
v1.31.1_49-dev
v1.31.0_49-dev
v1.30.2_48-dev
v1.30.0_46-dev
v1.29.6_45-dev
v1.29.6_44-dev
v1.29.5_44-dev
v1.29.4_44-dev
v1.29.3_43-dev
v1.29.2_43-dev
v1.29.1_43-dev
v1.29.0_42-dev
v1.28.4_41-dev
v1.28.4_42-dev
v1.28.3_41-dev
v1.28.2_40-dev
v1.28.1_39-dev
v1.28.0_38-dev
v1.27.0_37-dev
v1.26.0_36-dev
v1.25.0_35-dev
v1.24.0_34-dev
v1.23.0_33-dev
v1.22.0_32-dev
v1.21.1_31-dev
v1.21.0_31-dev
v1.20.3_30-dev
v1.20.2_30-dev
v1.20.1_30-dev
v1.20.0_30-dev
v1.19.1_29-dev
v1.19.0_29-dev
v1.18.0_27-dev
v1.17.0_25-dev
v1.16.0_23-dev
v1.15.1_21-dev
v1.15.0_21-dev
v1.14.0_21-dev
v1.13.0_20-dev
v1.12.0_18-dev
v1.11.0_17-dev
v1.10.0_15-dev
v1.9.1_14-dev
v1.9.0_13-dev
v1.8.0_12-dev
v1.7.0_11-dev
v1.6.0_10-dev
v1.5.1+9-dev
v1.5.0+8-dev
v1.4.0+7-dev
v1.4.0+6-dev
v1.4.0-dev
v1.3.0-dev
v1.3.1-dev
v0.6-dev
v0.5-dev
v0.4-dev
v0.3-dev
v0.2-dev
first-android-release
Labels
Clear labels
accessibility
changelog:enhancement
changelog:security
changelog:skip
changelog:translation
cli
date-time
dependencies
documentation
external-library
format
good first issue
mobile-beta
mobile-beta
mobile-beta
needs-answer
nice to have
pull-request
sharing
tech-debt
📱mobile
🖥️web
🗄️server
🧠machine-learning
Mirrored from GitHub Pull Request
No Label
external-library
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: immich-app/immich#2238
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pltaylor on GitHub (Feb 23, 2024).
The bug
I have added an external library of my photos in the UI and then run a 'Scan New Library Files' command. It runs for a couple minutes, as verified in the jobs menu, and then stops. The logs show the following
[PRODUCTION]
<--- Last few GCs --->
[395:0x4d186320000] 155265 ms: Scavenge 4015.8 (4137.3) -> 4012.8 (4137.3) MB, 15.72 / 0.00 ms (average mu = 0.490, current mu = 0.542) allocation failure;
[395:0x4d186320000] 155298 ms: Scavenge 4016.5 (4137.3) -> 4013.4 (4137.3) MB, 14.14 / 0.00 ms (average mu = 0.490, current mu = 0.542) allocation failure;
[395:0x4d186320000] 155337 ms: Scavenge 4017.2 (4137.3) -> 4014.0 (4145.3) MB, 17.19 / 0.00 ms (average mu = 0.490, current mu = 0.542) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a8c86 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich_microservices]
10: 0x1503a16 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
11: 0x150ffea99ef6
The OS that Immich Server is running on
Docker on unraid
Version of Immich Server
v1.95.1
Version of Immich Mobile App
N/A
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response
@alextran1502 commented on GitHub (Feb 23, 2024):
How much RAM do you have on this machine?
@pltaylor commented on GitHub (Feb 23, 2024):
32 GB total on the machine. It is sharing with several other docker containers, but doesn't look constrained at all. The import I'm trying to do is a lot of photos.
@pltaylor commented on GitHub (Feb 23, 2024):
When I import from a much smaller sub-folder it looks like it is importing.
@alextran1502 commented on GitHub (Feb 24, 2024):
cc @etnoy. Do we have any operation that kind of loads everything into the memory?
@etnoy commented on GitHub (Feb 24, 2024):
How many files are there in the import paths?
Yes, we do crawl and save the list of paths to be imported into an array, but maybe we need to see if this can be optimized somehow.
What if you decrease the library job concurrency to 1?
@etnoy commented on GitHub (Feb 24, 2024):
If you run with debug logging enabled, can you post what the logs say about the library scan?
@acbaldwi commented on GitHub (Mar 4, 2024):
Just to chime in here I see similar results with a large amount of photos to be imported. approximately 1.3m items 1.2m are phtoos. The server in my case has 96gb of ram, I have a second immich unraid instance on another server that was able to parse all of the photos, this 96gb server seems to only be able to se 1/2 of the available photos.
I set concurrancy of library tasks to 1 as you suggetsed and debug on logs, Below are my logs hopefully it can help both of us.
`[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [CommunicationRepository] Initialized websocket server
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [SystemConfigService] LogLevel=debug (set via system config)
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering thumbnailGeneration with a concurrency of 5
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering metadataExtraction with a concurrency of 5
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering videoConversion with a concurrency of 1
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering faceDetection with a concurrency of 2
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering facialRecognition with a concurrency of 1
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering smartSearch with a concurrency of 2
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering backgroundTask with a concurrency of 5
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering storageTemplateMigration with a concurrency of 1
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering migration with a concurrency of 5
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering search with a concurrency of 5
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering sidecar with a concurrency of 5
[Nest] 11380 - 03/03/2024, 3:43:50 PM DEBUG [JobService] Registering library with a concurrency of 1
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [MetadataRepository] Initializing metadata repository
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [MetadataService] Initialized local reverse geocoder
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [NestFactory] Starting Nest application...
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] ConfigHostModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] DiscoveryModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] ScheduleModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] ConfigModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] InfraModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] DomainModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [InstanceLoader] MicroservicesModule dependencies initialized
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [NestApplication] Nest application successfully started
[Nest] 11380 - 03/03/2024, 3:43:50 PM LOG [ImmichMicroservice] Immich Microservices is listening on http://[::1]:3002 [v1.97.0] [PRODUCTION]
[Nest] 11380 - 03/03/2024, 3:44:27 PM DEBUG [LibraryService] Found 681410 asset(s) when crawling import paths /import
[Nest] 11380 - 03/03/2024, 3:44:54 PM DEBUG [LibraryService] Marking 0 assets as offline
<--- Last few GCs --->
[11380:0x2024a320000] 96142 ms: Mark-Compact 4016.2 (4134.4) -> 4000.5 (4134.7) MB, 1133.66 / 0.00 ms (average mu = 0.138, current mu = 0.061) allocation failure; scavenge might not succeed
[11380:0x2024a320000] 97393 ms: Mark-Compact 4018.5 (4136.8) -> 4002.2 (4136.5) MB, 1177.41 / 0.00 ms (average mu = 0.099, current mu = 0.059) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10dca94 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [immich_microservices]
7: 0x10f3984 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [immich_microservices]
8: 0x10f419c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
9: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
10: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
11: 0x10a8c86 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich_microservices]
12: 0x1503a16 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
13: 0x150b20699ef6
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [CommunicationRepository] Initialized websocket server
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [SystemConfigService] LogLevel=debug (set via system config)
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering thumbnailGeneration with a concurrency of 5
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering metadataExtraction with a concurrency of 5
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering videoConversion with a concurrency of 1
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering faceDetection with a concurrency of 2
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering facialRecognition with a concurrency of 1
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering smartSearch with a concurrency of 2
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering backgroundTask with a concurrency of 5
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering storageTemplateMigration with a concurrency of 1
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering migration with a concurrency of 5
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering search with a concurrency of 5
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering sidecar with a concurrency of 5
[Nest] 11398 - 03/03/2024, 3:45:31 PM DEBUG [JobService] Registering library with a concurrency of 1
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [MetadataRepository] Initializing metadata repository
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [MetadataService] Initialized local reverse geocoder
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [NestFactory] Starting Nest application...
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] ConfigHostModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] DiscoveryModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] ScheduleModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] ConfigModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] InfraModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] DomainModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [InstanceLoader] MicroservicesModule dependencies initialized
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [NestApplication] Nest application successfully started
[Nest] 11398 - 03/03/2024, 3:45:31 PM LOG [ImmichMicroservice] Immich Microservices is listening on http://[::1]:3002 [v1.97.0] [PRODUCTION]
`
@etnoy commented on GitHub (Mar 4, 2024):
I know I have a huge photo collection, but you're stomping all over it. 1.3M is amazing and I think we have to go to the drawing board a bit to get collections that large imported.
@acbaldwi commented on GitHub (Mar 4, 2024):
lol wife was a photographer before she semi retired, that being said server #2 which is annoying ly my backup server was able to parse all of them easy peasy. it has 128gb of ram if that makes any difference.
@etnoy commented on GitHub (Mar 4, 2024):
It's a great data point for us. 1.3M assets can be imported with 128G but not 96G. We haven't tested anything close to that.
Good news is that it seems the crawling step is what actually eats the memory. This is due to us crawling the entire thing at once and storing it in a list. What this means is if we optimize that step some more the subsequent steps (actual import) should work nicely.
@etnoy commented on GitHub (Mar 4, 2024):
A possible optimization is to reduce the path length of the external assets. The volume mount in docker, make sure the path Immich sees is as short as possible. As in, instead of mounting the photos to /this/very/long/path, try a single letter character such as /a.
@acbaldwi commented on GitHub (Mar 5, 2024):
Thansk for the suggestion
Just to continue on this thread what I did on the server that worked other than ram was to import photos with the subfolders individually, on the non working unit (the one with the java heap memory issue) i had said just import the entire photos structure as one main folder (ex /import).
Whats ive done is to go back and wipe that installation completely and start fresh and told it to do the subfolders within her photo share so /import/2007 , import/2008 etc etc etc. well see if it giets all the photos this time on 96gb of ram.
@etnoy commented on GitHub (Mar 7, 2024):
Do you have the option to try the latest git version of Immich and see if it makes any difference for you? We've done memory and performance optimizations in the affected part of the code.
@pltaylor commented on GitHub (Mar 7, 2024):
Is there a docker image built of the latest master branch?
@pltaylor commented on GitHub (Mar 7, 2024):
For insight on my side it turns out that I originally unleashed Immich on a folder that contained 2 copies of my photos library by accident, which caused the initial bug report :)
@etnoy commented on GitHub (Mar 7, 2024):
A new release is on the way soon, you can also just wait
@etnoy commented on GitHub (Mar 8, 2024):
I'd love to hear how the 1.98 release works for you. How much memory does it use on rescan? Can you perhaps try scaling the memory available to see how much less we need?
@pltaylor commented on GitHub (Mar 8, 2024):
v1.98.0
Tried to Re-Scan library... got the following logs
[03/07/24 17:45:11] INFO Started server process [306]
[03/07/24 17:45:11] INFO Waiting for application startup.
[03/07/24 17:45:11] INFO Created in-memory cache with unloading after 300s
of inactivity.
[03/07/24 17:45:11] INFO Initialized request thread pool with 32 threads.
[03/07/24 17:45:11] INFO Application startup complete.
[Nest] 189 - 03/07/2024, 5:49:35 PM LOG [CommunicationRepository] Websocket Connect: Mr3JheDUV8HtsLdPAAAB
[Nest] 238 - 03/07/2024, 5:52:41 PM ERROR [JobService] Unable to run job handler (library/library-refresh): Error: timeout exceeded when trying to connect
[Nest] 238 - 03/07/2024, 5:52:41 PM ERROR [JobService] Error: timeout exceeded when trying to connect
at Timeout._onTimeout (/app/immich/server/node_modules/pg-pool/index.js:205:27)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
[Nest] 238 - 03/07/2024, 5:52:41 PM ERROR [JobService] Object:
{
"id": "19bcc9f3-45f8-46e0-99fc-6c2d68932f1b",
"refreshModifiedFiles": true,
"refreshAllFiles": false
}
@etnoy commented on GitHub (Mar 8, 2024):
That's odd...sounds like it times out trying to connect to postgres. Is the rest of Immich functioning?
@pltaylor commented on GitHub (Mar 8, 2024):
Hmm... maybe not.... p.s. there is space left on the drives.
[Nest] 189 - 03/07/2024, 5:58:11 PM ERROR [QueryFailedError: could not resize shared memory segment "/PostgreSQL.3968589532" to 33554432 bytes: No space left on device
at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SelectQueryBuilder.loadRawResults (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2192:25)
at async SelectQueryBuilder.executeEntitiesAndRawResults (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2040:26)
at async SelectQueryBuilder.getRawAndEntities (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:684:29)
at async SelectQueryBuilder.getMany (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:750:25)
at async AssetService.getTimeBucket (/app/immich/server/dist/domain/asset/asset.service.js:174:24)] Failed to get time bucket
[Nest] 189 - 03/07/2024, 5:58:11 PM ERROR [QueryFailedError: could not resize shared memory segment "/PostgreSQL.3968589532" to 33554432 bytes: No space left on device
at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SelectQueryBuilder.loadRawResults (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2192:25)
at async SelectQueryBuilder.executeEntitiesAndRawResults (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2040:26)
at async SelectQueryBuilder.getRawAndEntities (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:684:29)
at async SelectQueryBuilder.getMany (/app/immich/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js:750:25)
at async AssetService.getTimeBucket (/app/immich/server/dist/domain/asset/asset.service.js:174:24)] QueryFailedError: could not resize shared memory segment "/PostgreSQL.3968589532" to 33554432 bytes: No space left on device
@etnoy commented on GitHub (Mar 8, 2024):
Do you have inode space?
df -i
@etnoy commented on GitHub (Mar 8, 2024):
https://stackoverflow.com/questions/56751565/pq-could-not-resize-shared-memory-segment-no-space-left-on-device
@pltaylor commented on GitHub (Mar 8, 2024):
Ok, adjusted memory for postgres... different error... still v1.98
<--- Last few GCs --->
[328:0x43b7a320000] 174866 ms: Mark-Compact 4013.8 (4129.7) -> 4001.2 (4138.0) MB, 2952.27 / 0.00 ms (average mu = 0.540, current mu = 0.123) allocation failure; scavenge might not succeed
[328:0x43b7a320000] 179974 ms: Mark-Compact 4019.3 (4139.2) -> 4012.2 (4145.7) MB, 5017.95 / 0.00 ms (average mu = 0.296, current mu = 0.018) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a8c86 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich_microservices]
10: 0x1503a16 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
11: 0x14e5dfa99ef6
@etnoy commented on GitHub (Mar 8, 2024):
If you enable debug logging and show the log before the stack trace I can understand where it crashed. Is this during library scan?
@pltaylor commented on GitHub (Mar 8, 2024):
w/ debug logs.
[Nest] 571 - 03/08/2024, 8:12:23 AM DEBUG [LibraryService] Found 1148871 asset(s) when crawling import paths /photos/2020,/photos/2019,/photos/2018,/photos
<--- Last few GCs --->
[571:0x32782320000] 29292873 ms: Mark-Compact (reduce) 4046.9 (4143.2) -> 4046.1 (4144.0) MB, 5268.84 / 0.00 ms (average mu = 0.170, current mu = 0.012) allocation failure; scavenge might not succeed
[571:0x32782320000] 29297903 ms: Mark-Compact (reduce) 4047.2 (4144.0) -> 4046.7 (4144.7) MB, 5023.72 / 0.00 ms (average mu = 0.091, current mu = 0.001) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a8c86 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich_microservices]
10: 0x1503a16 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
11: 0x146ecfe99ef6
@etnoy commented on GitHub (Mar 9, 2024):
Next attempt in #7759
@joobei commented on GitHub (Mar 9, 2024):
I am experiencing the same in a raspberry pi with 4GB of memory. and a library size of 20k When the thumbnail generation service starts, free memory starts slowly but steadily decreasing. If I pause the thumbnail generation service, memory allocation does not become freed.
@mertalev commented on GitHub (Mar 9, 2024):
@joobei That's not related to this issue. Image processing can lead to memory fragmentation over time, but the issue here is specific to external library scanning.
@mertalev commented on GitHub (Mar 10, 2024):
@pltaylor @acbaldwi Can you try after changing the microservices image to this:
ghcr.io/immich-app/immich-server:pr-7759? I want to be sure it's actually fixed.@joobei commented on GitHub (Mar 10, 2024):
Well, my issue also occurs during external library scanning but sure.
@pltaylor commented on GitHub (Mar 11, 2024):
Using the PR docker image.....
[03/11/24 02:06:31] INFO Application startup complete.
[Nest] 212 - 03/11/2024, 2:08:21 AM DEBUG [LibraryService] Found 1148872 asset(s) when crawling import paths /photos
<--- Last few GCs --->
[212:0x3fb16320000] 207391 ms: Mark-Compact (reduce) 4043.8 (4143.7) -> 4043.4 (4143.5) MB, 5272.74 / 0.00 ms (average mu = 0.074, current mu = 0.001) allocation failure; scavenge might not succeed
[212:0x3fb16320000] 212685 ms: Mark-Compact (reduce) 4044.5 (4143.5) -> 4044.1 (4144.2) MB, 5284.02 / 0.00 ms (average mu = 0.038, current mu = 0.002) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a7d56 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [immich_microservices]
10: 0x1099984 v8::internal::FactoryBasev8::internal::Factory::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [immich_microservices]
11: 0x109c166 v8::internal::FactoryBasev8::internal::Factory::NewRawOneByteString(int, v8::internal::AllocationType) [immich_microservices]
12: 0x1559f1e v8::internal::IncrementalStringBuilder::IncrementalStringBuilder(v8::internal::Isolate*) [immich_microservices]
13: 0x121f6fd v8::internal::JsonStringify(v8::internal::Isolate*, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object) [immich_microservices]
14: 0xf5c5b2 v8::internal::Builtin_JsonStringify(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
15: 0x193cdf6 [immich_microservices]
[Nest] 318 - 03/11/2024, 2:10:00 AM LOG [CommunicationRepository] Initialized websocket server
[Nest] 318 - 03/11/2024, 2:10:00 AM LOG [SystemConfigService] LogLevel=debug (set via system config)
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering thumbnailGeneration with a concurrency of 5
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering metadataExtraction with a concurrency of 5
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering videoConversion with a concurrency of 1
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering faceDetection with a concurrency of 2
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering facialRecognition with a concurrency of 1
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering smartSearch with a concurrency of 2
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering backgroundTask with a concurrency of 5
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering storageTemplateMigration with a concurrency of 1
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering migration with a concurrency of 5
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering search with a concurrency of 5
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering sidecar with a concurrency of 5
[Nest] 318 - 03/11/2024, 2:10:00 AM DEBUG [JobService] Registering library with a concurrency of 5
[Nest] 318 - 03/11/2024, 2:10:00 AM LOG [MetadataRepository] Initializing metadata repository
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [MetadataService] Initialized local reverse geocoder
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [NestFactory] Starting Nest application...
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] ScheduleModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] ConfigModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] InfraModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] DomainModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [InstanceLoader] MicroservicesModule dependencies initialized
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [NestApplication] Nest application successfully started
[Nest] 318 - 03/11/2024, 2:10:45 AM LOG [ImmichMicroservice] Immich Microservices is listening on http://[::1]:3002 [v1.98.1] [PRODUCTION]
[Nest] 318 - 03/11/2024, 2:10:51 AM DEBUG [LibraryService] Found 1148872 asset(s) when crawling import paths /photos
<--- Last few GCs --->
[318:0x38e68320000] 120384 ms: Mark-Compact 4018.8 (4133.0) -> 4011.7 (4142.5) MB, 3057.20 / 0.00 ms (average mu = 0.332, current mu = 0.043) allocation failure; scavenge might not succeed
[318:0x38e68320000] 125671 ms: Mark-Compact 4029.8 (4144.0) -> 4022.7 (4154.0) MB, 4812.50 / 0.00 ms (average mu = 0.198, current mu = 0.090) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a8c86 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich_microservices]
10: 0x1503a16 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
11: 0x14d10a899ef6
[Nest] 336 - 03/11/2024, 2:12:07 AM LOG [CommunicationRepository] Initialized websocket server
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [SystemConfigService] LogLevel=debug (set via system config)
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering thumbnailGeneration with a concurrency of 5
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering metadataExtraction with a concurrency of 5
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering videoConversion with a concurrency of 1
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering faceDetection with a concurrency of 2
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering facialRecognition with a concurrency of 1
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering smartSearch with a concurrency of 2
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering backgroundTask with a concurrency of 5
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering storageTemplateMigration with a concurrency of 1
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering migration with a concurrency of 5
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering search with a concurrency of 5
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering sidecar with a concurrency of 5
[Nest] 336 - 03/11/2024, 2:12:08 AM DEBUG [JobService] Registering library with a concurrency of 5
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [MetadataRepository] Initializing metadata repository
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [MetadataService] Initialized local reverse geocoder
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [NestFactory] Starting Nest application...
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] ScheduleModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] ConfigModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] BullModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] InfraModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] DomainModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [InstanceLoader] MicroservicesModule dependencies initialized
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [NestApplication] Nest application successfully started
[Nest] 336 - 03/11/2024, 2:12:08 AM LOG [ImmichMicroservice] Immich Microservices is listening on http://[::1]:3002 [v1.98.1] [PRODUCTION]
@mertalev commented on GitHub (Mar 11, 2024):
Oh wow, it's still not working? There are a few ways we can reduce memory usage even more, but before that I think we should make a branch with more debug logs so we have better insight into where and how the heap is getting filled up.
What we know is that the crawl completes successfully, that it crashes somewhere between the creation of a set and the paginated queries, and that the allocation error (as of the pr) is related to JSON serialization.
@pltaylor commented on GitHub (Mar 11, 2024):
Correct, still fails. I'll be glad to run any updates to the PR you want to make.
@etnoy commented on GitHub (Mar 13, 2024):
Can you try changing your microservices image from
to
and try again? This should print lots of debug logs
You need to do
(it might need a few minutes to build the docker images)
@pltaylor commented on GitHub (Mar 13, 2024):
Ok, so I rebuilt my Immich install using the recommended docker compose method on my unraid server. I modified the microservices image to the above one. And tried to import my library. It failed, recycled the microservices instance, and then closed my log window (unraid is helpful like that). When I open it back up again I am just left with the tail end of the log here.
<--- Last few GCs --->
[7:0x25f08320000] 427526 ms: Scavenge 4019.4 (4125.7) -> 4018.8 (4133.7) MB, 15.00 / 0.00 ms (average mu = 0.667, current mu = 0.554) allocation failure;
[7:0x25f08320000] 427592 ms: Scavenge 4026.3 (4133.7) -> 4024.5 (4133.7) MB, 21.24 / 0.00 ms (average mu = 0.667, current mu = 0.554) allocation failure;
[7:0x25f08320000] 429962 ms: Scavenge 4027.8 (4133.7) -> 4026.5 (4153.4) MB, 2341.78 / 0.00 ms (average mu = 0.667, current mu = 0.554) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a81ca v8::internal::Factory::AllocateRawWithAllocationSite(v8::internal::Handlev8::internal::Map, v8::internal::AllocationType, v8::internal::Handlev8::internal::AllocationSite) [immich_microservices]
10: 0x10b5b77 v8::internal::Factory::NewJSArrayWithUnverifiedElements(v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::FixedArrayBase, int, v8::internal::AllocationType) [immich_microservices]
11: 0x10b5da5 v8::internal::Factory::NewJSArrayWithElements(v8::internal::Handlev8::internal::FixedArrayBase, v8::internal::ElementsKind, int, v8::internal::AllocationType) [immich_microservices]
12: 0x13169e7 v8::internal::FastGetOwnValuesOrEntries(v8::internal::Isolate*, v8::internal::Handlev8::internal::JSReceiver, bool, v8::internal::Handlev8::internal::FixedArray) [immich_microservices]
13: 0x1316ca7 v8::internal::GetOwnValuesOrEntries(v8::internal::Isolate, v8::internal::Handlev8::internal::JSReceiver, v8::internal::PropertyFilter, bool, bool) [immich_microservices]
14: 0x150dba7 v8::internal::Runtime_ObjectEntries(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
15: 0x14c72c6d9ef6
[Nest] 7 - 03/13/2024, 10:20:53 AM DEBUG [JobService] Registering migration with a concurrency of 5
do you know where I can find a longer log file?
@pltaylor commented on GitHub (Mar 13, 2024):
Ok, I ran just that docker logs file for the microservices container (should of thought of that earlier and got the full log
[Nest] 7 - 03/13/2024, 10:28:10 AM LOG [NestApplication] Nest application successfully started
[Nest] 7 - 03/13/2024, 10:28:10 AM LOG [ImmichMicroservice] Immich Microservices is listening on http://[::1]:3002 [v1.98.2] [PRODUCTION]
[Nest] 7 - 03/13/2024, 10:32:44 AM DEBUG [LibraryService] Found 1148832 asset(s) when crawling import paths ./photos
[Nest] 7 - 03/13/2024, 10:32:44 AM DEBUG [LibraryService] Pagination complete
[Nest] 7 - 03/13/2024, 10:32:44 AM DEBUG [LibraryService] Checked offline paths
[Nest] 7 - 03/13/2024, 10:32:44 AM DEBUG [LibraryService] About to start scan
<--- Last few GCs --->
[7:0x4b86e320000] 330803 ms: Scavenge 4027.7 (4135.2) -> 4027.4 (4139.2) MB, 12.50 / 0.00 ms (average mu = 0.692, current mu = 0.582) allocation failure;
[7:0x4b86e320000] 330835 ms: Scavenge 4031.0 (4139.2) -> 4030.1 (4139.2) MB, 14.67 / 0.00 ms (average mu = 0.692, current mu = 0.582) allocation failure;
[7:0x4b86e320000] 330865 ms: Scavenge 4031.9 (4139.2) -> 4031.2 (4147.2) MB, 21.07 / 0.00 ms (average mu = 0.692, current mu = 0.582) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a8c86 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich_microservices]
10: 0x1503a16 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
11: 0x1539f9359ef6
[Nest] 7 - 03/13/2024, 10:33:49 AM LOG [CommunicationRepository] Initialized websocket server
[Nest] 7 - 03/13/2024, 10:33:49 AM LOG [SystemConfigService] LogLevel=debug (set via system config)
[Nest] 7 - 03/13/2024, 10:33:49 AM DEBUG [JobService] Registering thumbnailGeneration with a concurrency of 5
[Nest] 7 - 03/13/2024, 10:33:49 AM DEBUG [JobService] Registering metadataExtraction with a concurrency of 5
[Nest] 7 - 03/13/2024, 10:33:49 AM DEBUG [JobService] Registering videoConversion with a concurrency of 1
@etnoy commented on GitHub (Mar 13, 2024):
Thanks, that is very helpful. I think I found the issue
@etnoy commented on GitHub (Mar 13, 2024):
OK, try to pull the latest version. I've added more logging and a possible fix.
@pltaylor commented on GitHub (Mar 13, 2024):
The docker compose update happened really quickly, so I'm not 100% it got the change. Here is the logs for your fun.
[Nest] 7 - 03/13/2024, 3:02:24 PM LOG [ImmichMicroservice] Immich Microservices is listening on http://[::1]:3002 [v1.98.2] [PRODUCTION]
[Nest] 7 - 03/13/2024, 3:08:48 PM DEBUG [LibraryService] Found 1148832 asset(s) when crawling import paths ./photos
[Nest] 7 - 03/13/2024, 3:08:48 PM DEBUG [LibraryService] Pagination complete
[Nest] 7 - 03/13/2024, 3:08:48 PM DEBUG [LibraryService] Checked offline paths
[Nest] 7 - 03/13/2024, 3:08:48 PM DEBUG [LibraryService] About to start scan
<--- Last few GCs --->
[7:0x4433e320000] 441513 ms: Scavenge 4014.1 (4127.9) -> 4010.1 (4127.9) MB, 27.75 / 0.00 ms (average mu = 0.519, current mu = 0.056) allocation failure;
[7:0x4433e320000] 441609 ms: Scavenge 4014.6 (4127.9) -> 4012.3 (4136.7) MB, 67.21 / 0.00 ms (average mu = 0.519, current mu = 0.056) allocation failure;
[7:0x4433e320000] 443960 ms: Mark-Compact 4026.9 (4138.4) -> 4017.4 (4146.7) MB, 2279.36 / 0.00 ms (average mu = 0.407, current mu = 0.116) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xca5580 node::Abort() [immich_microservices]
2: 0xb781f9 [immich_microservices]
3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
5: 0x10dc505 [immich_microservices]
6: 0x10f4388 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
7: 0x10ca4a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
8: 0x10cb635 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich_microservices]
9: 0x10a8c86 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich_microservices]
10: 0x1503a16 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
11: 0x1487eda59ef6
[Nest] 7 - 03/13/2024, 3:09:54 PM LOG [CommunicationRepository] Initialized websocket server
@etnoy commented on GitHub (Mar 13, 2024):
It should take a little time to do the pull, can you try again?
@pltaylor commented on GitHub (Mar 13, 2024):
do you know what the microservices container id should be?
@etnoy commented on GitHub (Mar 13, 2024):
The latest seems to be sha256:cfad2066cd92f4d716ff56124e276d604fd2c927c6a719f8ca90eae890e41e62
about one hour ago, so this is the right one
https://github.com/immich-app/immich/pkgs/container/immich-server/190492608?tag=pr-7914
@pltaylor commented on GitHub (Mar 13, 2024):
Progress:

@etnoy commented on GitHub (Mar 13, 2024):
That's awesome!
Thanks for being patient with us.
We'll try to get the fixed code in the next release.
Can you clear the queue and try different levels of memory allocation? This latest version should use significantly less memory for the initial queuing. How low can we go?
@pltaylor commented on GitHub (Mar 13, 2024):
right now I have a box stock compose file, well, I added the folder that had the pictures as a volume, and I pointed the microservices to the PR branch release.
@etnoy commented on GitHub (Mar 13, 2024):
Are you using the release or PR version of the microservices container?
@pltaylor commented on GitHub (Mar 13, 2024):
Yes, I edited my original comment to include that. I was trying to say that I haven't made any changes on the memory allocation front as of now.
@etnoy commented on GitHub (Mar 20, 2024):
Would you be willing to try how #7934 works in your case? I'm experimenting with doing all scans 1000 assets at a time, never loading the full list.
@pltaylor commented on GitHub (Mar 20, 2024):
I’m out of the country till this weekend, I’ll be glad to try it when I get
back.
On Wed, Mar 20, 2024 at 7:32 AM Jonathan Jogenfors @.***>
wrote:
@pltaylor commented on GitHub (Mar 26, 2024):
Testing now with a 'force full re-scan', overall seems like a multi-threading improvement.. i.e. the batches are smaller and then kicking off smaller batches sooner. But I did see this...
[Nest] 7 - 03/25/2024, 9:10:38 PM ERROR [JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: write EPIPE
[Nest] 7 - 03/25/2024, 9:10:38 PM ERROR [JobService] Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: write EPIPE
at /usr/src/app/dist/repositories/machine-learning.repository.js:19:19
at async MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:18:21)
at async PersonService.handleDetectFaces (/usr/src/app/dist/domain/person/person.service.js:257:23)
at async /usr/src/app/dist/domain/job/job.service.js:141:36
at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7 - 03/25/2024, 9:10:38 PM ERROR [JobService] Object:
{
"id": "2b5194f5-7b6e-4227-870f-d2232c620ae0",
"source": "upload"
}
@afrojewelz commented on GitHub (Oct 24, 2024):
my scenario is: deploy on docker stack seprately in the same machine which has 128GB DDR4 memory, except redis is on my k3s since it's not have to persistant,it's can be spin up/down at will as long as ip does not change.
from portainer statics,max memory utilize is like 21G more or so,but STILL AFTER I SET NODE_OPITION ENVIRONMENT '--max-old-space-size=18432' when i tried to open a album over 5200 images and videos, does this mean i can't have so many files in one folder? yes the library is external.
btw ,the memory is way more free than occupied at least on my instance, actually if more is not enough ,can admin just give it more or actually the fragmentation is to dense that all that many memory hole can fit for new demands to allocate?
here are the crashlog.
Error: timeout exceeded when trying to connect
[Nest] 17 - 10/24/2024, 8:30:55 PM ERROR [Api:GlobalExceptionFilter~zpqmyrap] Unknown error: Error: timeout exceeded when trying to connect
<--- Last few GCs --->
[17:0x30bfc320000] 863250 ms: Mark-Compact 18147.4 (18477.0) -> 18134.4 (18480.0) MB, 4889.47 / 0.00 ms (average mu = 0.106, current mu = 0.007) allocation failure; scavenge might not succeed
[17:0x30bfc320000] 872235 ms: Mark-Compact 18150.3 (18480.0) -> 18137.4 (18482.7) MB, 8950.40 / 0.00 ms (average mu = 0.042, current mu = 0.004) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xb8ced1 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [immich-api]
2: 0xf06460 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich-api]
3: 0xf06747 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich-api]
4: 0x11182e5 [immich-api]
5: 0x1130168 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich-api]
6: 0x1106281 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich-api]
7: 0x1107415 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [immich-api]
8: 0x10e4a66 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [immich-api]
9: 0x1540896 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [immich-api]
10: 0x7d44432d9ef6
@mertalev commented on GitHub (Oct 24, 2024):
Using that much RAM is very unexpected, especially for only a few thousand assets. Could you make a separate issue for this?
@afrojewelz commented on GitHub (Dec 8, 2024):