From 29ca716ad864c488ba0fddb8957e380faf121715 Mon Sep 17 00:00:00 2001 From: Alan Grainger <16197738+alangrainger@users.noreply.github.com> Date: Tue, 26 May 2026 11:29:57 +0800 Subject: [PATCH] Lower default concurrency --- README.md | 2 +- app/config.json | 2 +- app/src/render.ts | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 24c6339..3efd8f7 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ Alternatively, you can [pass the configuration inline](docs/inline-configuration | `downloadOriginalPhoto` | `bool` | Set to `false` if you only want people to be able to download the 'preview' quality photo, rather than your original photo. | | `downloadedFilename` | `int` | The filename of the downloaded image.
`0` for the original filename if available, falling back to the Immich asset ID
`1` for the Immich asset ID number
`2` for a shortened version of the asset ID: `img_` plus the first 8 characters of the asset ID | | `allowDownloadAll` | `int` | Allow visitors to download all files as a zip, including the selective-download flow in multi-select mode.
`0` disable downloads
`1` follow Immich setting per share ([example](https://github.com/user-attachments/assets/79ea8c08-71ce-42ab-b025-10aec384938a))
`2` always allowed | -| `downloadFromImmichConcurrencyLimit` | `int` | Maximum number of assets IPP will fetch from your Immich server in parallel when building a "download all" zip. Defaults to `20`. Lower this if your Immich server is slow or you see download timeouts on large albums; raise it for faster downloads if your server can handle the load. | +| `downloadFromImmichConcurrencyLimit` | `int` | Maximum number of assets IPP will fetch from your Immich server in parallel when building a "download all" zip. Defaults to `8`. Lower this if your Immich server is slow or you see download timeouts on large albums; raise it for faster downloads if your server can handle the load. | | `allowSlugLinks` | `bool` | Enable/disable the custom URL links. | | `showHomePage` | `bool` | Set to `false` to remove the IPP shield page at `/` and at `/share` | | `gallery` | `object` | Gallery-page options, see the [Gallery options](#gallery-options) section below. | diff --git a/app/config.json b/app/config.json index 79175c5..3f0dcce 100644 --- a/app/config.json +++ b/app/config.json @@ -7,7 +7,7 @@ "downloadOriginalPhoto": true, "downloadedFilename": 0, "allowDownloadAll": 0, - "downloadFromImmichConcurrencyLimit": 20, + "downloadFromImmichConcurrencyLimit": 8, "allowSlugLinks": true, "showHomePage": true, "showMetadata": { diff --git a/app/src/render.ts b/app/src/render.ts index c5c2b5d..71fd7ec 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -209,11 +209,10 @@ class Render { } /** - * Stream the given assets back as a zip file. Caller is responsible for - * checking that every asset belongs to the share (security boundary). + * Stream the given assets back as a zip file. * * Assets are fetched from Immich with a bounded concurrency (configurable via - * `ipp.downloadFromImmichConcurrencyLimit`, default 20) rather than all at once. + * `ipp.downloadFromImmichConcurrencyLimit`, default 8) rather than all at once. * Fetching every asset in parallel overwhelms the Immich server on large albums * and causes the client download to time out before the first bytes are sent. * @@ -228,7 +227,7 @@ class Render { */ async downloadAssets (res: Response, share: SharedLink, assets: Asset[]) { const downloadOriginalAsset = getConfigOption('ipp.downloadOriginalPhoto', true) - const concurrency = Math.max(1, getConfigOption('ipp.downloadFromImmichConcurrencyLimit', 20) as number) + const concurrency = Math.max(1, getConfigOption('ipp.downloadFromImmichConcurrencyLimit', 8) as number) res.setHeader('Content-Type', 'application/zip') let filename = (sanitize(this.title(share)) || 'photos') + '.zip' filename = encodeURI(filename)