lildude / ha-addon-ghostfolio

Home Assistant add-on for Ghostfolio.
8 stars 1 forks source link

WARNING: Ghostfolio crashed, halting add-on #77

Closed Getslow6 closed 1 month ago

Getslow6 commented 2 months ago

Hi!

First of all; thank you for making this docker image into a Home Assistant addon.

I've tried installing the addon and followed the following steps:

  1. Install Postgres from AlexBelgium (I've already got it running as database for Immich)
  2. Start Postgress
  3. Install Ghostfolio
  4. Setup all the configuration for Ghostfolio, which are the default values for the Postgres addon:
    database_user: postgres
    database_pass: homeassistant
    database_port: 5432
    database_host: 192.168.2.10
    database_name: ghostfolio
    env_vars: []
  5. Start Ghostfolio

Then I get the following logging (logging is of a second run, the first run applied some database migration scripts):

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun ghostfolio (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[18:40:50] INFO: Starting NGINX...
[18:40:50] INFO: Starting redis
118:C 16 Sep 2024 18:40:51.053 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
118:C 16 Sep 2024 18:40:51.053 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=118, just started
118:C 16 Sep 2024 18:40:51.053 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
118:M 16 Sep 2024 18:40:51.054 * monotonic clock: POSIX clock_gettime
118:M 16 Sep 2024 18:40:51.057 * Running mode=standalone, port=6379.
118:M 16 Sep 2024 18:40:51.057 # Server initialized
118:M 16 Sep 2024 18:40:51.057 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
118:M 16 Sep 2024 18:40:51.059 * Ready to accept connections
[16:40:52] INFO: Starting Ghostfolio
yarn run v1.22.22
$ npm run database:migrate && npm run database:seed && node main

> ghostfolio@2.107.1 database:migrate
> prisma migrate deploy

Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "ghostfolio", schema "public" at "192.168.2.10:5432"

88 migrations found in prisma/migrations

No pending migrations to apply.

> ghostfolio@2.107.1 database:seed
> prisma db seed

Running seed command `node prisma/seed.js` ...

šŸŒ±  The seed command has been executed.
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
ā”‚  Update available 5.19.0 -> 5.19.1                      ā”‚
ā”‚  Run the following to update                            ā”‚
ā”‚    yarn add --dev prisma@latest                         ā”‚
ā”‚    yarn add @prisma/client@latest                       ā”‚
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [NestFactory] Starting Nest application...
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ApiModule dependencies initialized +223ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ConfigurationModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] CryptocurrencyModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] TransformDataSourceInRequestModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] TransformDataSourceInResponseModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] RedactValuesInResponseModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] BullModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] JwtModule dependencies initialized +18ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] JwtModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +2ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] PerformanceLoggingModule dependencies initialized +3ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] PropertyModule dependencies initialized +95ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] SymbolProfileModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ImpersonationModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] TagModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] MarketDataModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] SitemapModule dependencies initialized +8ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ServeStaticModule dependencies initialized +33ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] BullModule dependencies initialized +2ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] EventEmitterModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] BullModule dependencies initialized +2ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] DataEnhancerModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] PlatformModule dependencies initialized +5ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] TagModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] AuthDeviceModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] LogoModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] AccessModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] SubscriptionModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] QueueModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] CacheModule dependencies initialized +252ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] RedisCacheModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] CacheModule dependencies initialized +25ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] EventsModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] DataProviderModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] ExchangeRateDataModule dependencies initialized +6ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] DataGatheringModule dependencies initialized +16ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] TwitterBotModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:16 PM     LOG [InstanceLoader] HealthModule dependencies initialized +5ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] ExchangeRateModule dependencies initialized +838ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] SymbolModule dependencies initialized +27ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] AssetModule dependencies initialized +12ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] PortfolioSnapshotQueueModule dependencies initialized +105ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] AccountBalanceModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] BenchmarkModule dependencies initialized +73ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] AccountModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] ExportModule dependencies initialized +2ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] InfoModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] UserModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] OrderModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] AdminModule dependencies initialized +1ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] AuthModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] PortfolioModule dependencies initialized +2ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [InstanceLoader] ImportModule dependencies initialized +0ms
[Nest] 320  - 09/16/2024, 4:35:17 PM     LOG [NestFactory] Starting Nest application... +50ms
Killed
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[18:35:19] WARNING: Ghostfolio crashed, halting add-on
[18:35:19] INFO: Ghostfolio stopped, restarting...
s6-rc: info: service legacy-services: stopping
[18:35:19] INFO: Nginx stopped, restarting...
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
118:signal-handler (1726504519) Received SIGTERM scheduling shutdown...
118:M 16 Sep 2024 18:35:19.636 # User requested shutdown...
118:M 16 Sep 2024 18:35:19.636 * Saving the final RDB snapshot before exiting.
118:M 16 Sep 2024 18:35:19.643 * DB saved on disk
118:M 16 Sep 2024 18:35:19.645 # Redis is now ready to exit, bye bye...

Do you know what might go wrong here? Thanks in advance!

System information: Core: 2024.9.1 Supervisor: 2024.09.1 Operating System: 13.1 Frontend: 20240906.0 Hardware: Intel NUC

lildude commented 2 months ago

I think error Command failed with exit code 137 indicates docker ran out of memory. You'll either need to allocate more memory, add swap or stop some other addons to free up memory.

Blogshot commented 1 month ago

I'm also running into this. My server has around 3.5 GB of free memory. Starting Ghostfolio is fine, but as soon as I open the webinterface of Ghostfolio, RAM usage explodes into an OOM error, crashing multiple services on the host.

This is a hard no for me, even though I would've really liked to use Ghostfolio.

Getslow6 commented 1 month ago

I think error Command failed with exit code 137 indicates docker ran out of memory. You'll either need to allocate more memory, add swap or stop some other addons to free up memory.

I think you're right. I think we can close this, as this does not have to do with your addon but with Ghostfolio itself? Still strange that a web application like this requires so much RAM.

Blogshot commented 1 month ago

I have to pull back my report, it seems the issue is Alexa Media player, which is eating up alll the RAM in version 2024.10 of HA. In my case, this might be the underlying issue,not Ghostfolio.