mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-20 15:51:50 +02:00
Make NODE_MEMORY_LIMIT a configurable addon option (default 512 MB)
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/c45f9e34-4233-4929-96c9-50c7db39ac6d
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
## 3.1.0-2 (22-03-2026)
|
||||||
|
- Added configurable `NODE_MEMORY_LIMIT` option (default 512 MB) to control Node.js heap size and prevent OOM kills
|
||||||
|
|
||||||
## 3.1.0 (22-03-2026)
|
## 3.1.0 (22-03-2026)
|
||||||
- Set default Node.js memory limit (512MB) to prevent OOM kills that caused the addon to stop responding
|
- Set default Node.js memory limit (512MB) to prevent OOM kills that caused the addon to stop responding
|
||||||
- Update to latest version from seerr-team/seerr (changelog : https://github.com/seerr-team/seerr/releases)
|
- Update to latest version from seerr-team/seerr (changelog : https://github.com/seerr-team/seerr/releases)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ Use `env_vars` to pass extra environment variables when needed. Seerr configurat
|
|||||||
|
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
|--------|------|---------|-------------|
|
|--------|------|---------|-------------|
|
||||||
|
| `NODE_MEMORY_LIMIT` | int | `512` | Maximum Node.js heap memory in MB. Increase if Seerr crashes with large libraries; decrease on memory-constrained systems. |
|
||||||
| `PGID` | int | `0` | Group ID for file permissions |
|
| `PGID` | int | `0` | Group ID for file permissions |
|
||||||
| `PUID` | int | `0` | User ID for file permissions |
|
| `PUID` | int | `0` | User ID for file permissions |
|
||||||
| `TZ` | str | | Timezone (e.g. `Europe/London`) |
|
| `TZ` | str | | Timezone (e.g. `Europe/London`) |
|
||||||
@@ -33,6 +34,7 @@ Use `env_vars` to pass extra environment variables when needed. Seerr configurat
|
|||||||
### Example
|
### Example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
NODE_MEMORY_LIMIT: 512
|
||||||
env_vars: []
|
env_vars: []
|
||||||
PGID: 0
|
PGID: 0
|
||||||
PUID: 0
|
PUID: 0
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ map:
|
|||||||
- addon_config:rw
|
- addon_config:rw
|
||||||
name: Seerr
|
name: Seerr
|
||||||
options:
|
options:
|
||||||
|
NODE_MEMORY_LIMIT: 512
|
||||||
env_vars: []
|
env_vars: []
|
||||||
PGID: "0"
|
PGID: "0"
|
||||||
PUID: "0"
|
PUID: "0"
|
||||||
@@ -87,10 +88,11 @@ schema:
|
|||||||
env_vars:
|
env_vars:
|
||||||
- name: match(^[A-Za-z0-9_]+$)
|
- name: match(^[A-Za-z0-9_]+$)
|
||||||
value: str?
|
value: str?
|
||||||
|
NODE_MEMORY_LIMIT: int
|
||||||
PGID: int
|
PGID: int
|
||||||
PUID: int
|
PUID: int
|
||||||
TZ: str?
|
TZ: str?
|
||||||
slug: seerr
|
slug: seerr
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/seerr
|
url: https://github.com/alexbelgium/hassio-addons/tree/master/seerr
|
||||||
version: "3.1.0"
|
version: "3.1.0-2"
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ set -e
|
|||||||
|
|
||||||
cd /app || exit 1
|
cd /app || exit 1
|
||||||
|
|
||||||
# Set default Node.js memory limit to prevent OOM kills
|
# Set Node.js memory limit from addon option to prevent OOM kills
|
||||||
# Users can override this via the addon's env_vars option (NODE_OPTIONS)
|
# NODE_MEMORY_LIMIT is exported as env var by 00-global_var.sh from config.yaml
|
||||||
|
MEMORY_LIMIT="${NODE_MEMORY_LIMIT:-512}"
|
||||||
if [[ "${NODE_OPTIONS:-}" != *"max-old-space-size"* ]] && [[ "${NODE_OPTIONS:-}" != *"max_old_space_size"* ]]; then
|
if [[ "${NODE_OPTIONS:-}" != *"max-old-space-size"* ]] && [[ "${NODE_OPTIONS:-}" != *"max_old_space_size"* ]]; then
|
||||||
export NODE_OPTIONS="${NODE_OPTIONS:+${NODE_OPTIONS} }--max-old-space-size=512"
|
export NODE_OPTIONS="${NODE_OPTIONS:+${NODE_OPTIONS} }--max-old-space-size=${MEMORY_LIMIT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bashio::log.info "Starting Seerr..."
|
bashio::log.info "Starting Seerr..."
|
||||||
|
|||||||
Reference in New Issue
Block a user