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

Restart causes excessive CPU consumption #300

Closed
1 task done
CactusCollider opened this issue Aug 29, 2024 · 8 comments
Closed
1 task done

Restart causes excessive CPU consumption #300

CactusCollider opened this issue Aug 29, 2024 · 8 comments

Comments

@CactusCollider
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

See also #286. Initiating a restart through Sonarr causes excessive CPU usage due to a second sonar process also trying to start and bind to the same address. Observed through top inside the container a second sonarr process starts. It appears this second process tries to run migrations and bind to the address but crashes and gets restarted, causing the excessive cpu consumption. Restarting the pod results in a container with only one sonarr service running.

Expected Behavior

Sonarr restarts and only one service is active.

Steps To Reproduce

On settings > General page:

  1. Modify the URL base setting to something else (ex change from "/" to "/foo")
  2. Save settings
  3. When prompted select "I'll restart later"
  4. Revert URL Base setting to original setting (ex change from "/foo" to "/f")
  5. Save settings
  6. When prompted select "Restart Now"

Environment

K3s on fedora coreos.

CPU architecture

x86-64

Docker creation

apiVersion: apps/v1
kind: Deployment
metadata:
  name: sonarr
  namespace: default
  labels:
    app.kubernetes.io/name: sonarr
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: sonarr
  template:
    metadata:
      labels:
        app.kubernetes.io/name: sonarr
    spec:
      containers:
        - name: sonarr
          image: "quay.io/linuxserver.io/sonarr:4.0.9"
          imagePullPolicy: Always
          env:
            - name: PUID
              value: "1001"
            - name: PGID
              value: "1001"
            - name: TZ
              value: "America/Chicago"
          ports:
            - name: http
              containerPort: 8989
              protocol: TCP
          volumeMounts:
            - name: sonarr-config
              mountPath: /config
              subPath: sonarr
            - name: data
              mountPath: /data

      volumes:
        - name: sonarr-config
          persistentVolumeClaim:
            claimName: config-data
        - name: data
          persistentVolumeClaim:
            claimName: media-data
---
apiVersion: v1
kind: Service
metadata:
  name: sonarr
  namespace: default
  labels:
    app.kubernetes.io/name: sonarr
spec:
  type: ClusterIP
  ports:
    - port: 8989
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/name: sonarr

Container logs

# top

Tasks:  13 total,   2 running,  11 sleeping,   0 stopped,   0 zombie
%Cpu(s): 17.6 us,  2.6 sy,  0.0 ni, 77.4 id,  0.8 wa,  0.9 hi,  0.3 si,  0.4 st 
MiB Mem :   3887.1 total,    399.6 free,   2221.4 used,   1643.5 buff/cache     
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   1665.7 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                     
  10230 abc       20   0 2581460  64624  45528 R  22.7   1.6   0:00.68 Sonarr                                                      
  10021 abc       20   0 2609488 170652  78276 S   0.7   4.3   0:05.67 Sonarr                                                      
     15 root      20   0     216      0      0 S   0.0   0.0   0:00.00 s6-supervise                                                
     37 root      20   0     216      0      0 S   0.0   0.0   0:00.00 s6-supervise                                                
      1 root      20   0     436      0      0 S   0.0   0.0   0:00.04 s6-svscan                                                   
     39 root      20   0     216      0      0 S   0.0   0.0   0:00.00 s6-supervise                                                
     40 root      20   0     228      0      0 S   0.0   0.0   0:00.26 s6-supervise                                                
     48 root      20   0     208      0      0 S   0.0   0.0   0:00.00 s6-ipcserverd                                               
     17 root      20   0     204      0      0 S   0.0   0.0   0:00.00 s6-linux-init-s                                             
     38 root      20   0     216      0      0 S   0.0   0.0   0:00.00 s6-supervise                                                
    145 root      20   0    1620    768    768 S   0.0   0.0   0:00.00 busybox                                                     
  10004 root      20   0    3648   2836   1044 R   0.0   0.1   0:00.02 top                                                         
    215 root      20   0    2636   2200   1560 S   0.0   0.1   0:00.00 bash    

Logs prior to replicating issue on fresh container:

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Sonarr: https://sonarr.tv/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1001
User GID:    1001
───────────────────────────────────────
Linuxserver.io version: 4.0.9.2244-ls252
Build-date: 2024-08-26T01:48:27+00:00
───────────────────────────────────────
    
[custom-init] No custom files found, skipping...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0708776s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0768053s 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrating 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Beginning Transaction 
[Info] add_monitored_seasons_filter: Starting migration of Main DB to 210 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0124173s 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: INSERT INTO "VersionInfo" ("Version", "AppliedOn", "Description") VALUES (210, '2024-08-29T20:08:51', 'add_monitored_seasons_filter') 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Committing Transaction 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.054062s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.014732s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0176133s 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrating 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Beginning Transaction 
[Info] add_monitored_seasons_filter: Starting migration of Log DB to 210 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: INSERT INTO "VersionInfo" ("Version", "AppliedOn", "Description") VALUES (210, '2024-08-29T20:08:51', 'add_monitored_seasons_filter') 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Committing Transaction 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0239846s 
[Info] Microsoft.Hosting.Lifetime: Now listening on: http://[::]:8989 
[Info] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down. 
[Info] Microsoft.Hosting.Lifetime: Hosting environment: Production 
[Info] Microsoft.Hosting.Lifetime: Content root path: /app/sonarr/bin 
[Info] ManagedHttpDispatcher: IPv4 is available: True, IPv6 will be disabled 
[ls.io-init] done.

Logs on same container after proceadure:

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Sonarr: https://sonarr.tv/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1001
User GID:    1001
───────────────────────────────────────
Linuxserver.io version: 4.0.9.2244-ls252
Build-date: 2024-08-26T01:48:27+00:00
───────────────────────────────────────
    
[custom-init] No custom files found, skipping...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0708776s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0768053s 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrating 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Beginning Transaction 
[Info] add_monitored_seasons_filter: Starting migration of Main DB to 210 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0124173s 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: INSERT INTO "VersionInfo" ("Version", "AppliedOn", "Description") VALUES (210, '2024-08-29T20:08:51', 'add_monitored_seasons_filter') 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Committing Transaction 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.054062s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.014732s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0176133s 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrating 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Beginning Transaction 
[Info] add_monitored_seasons_filter: Starting migration of Log DB to 210 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: INSERT INTO "VersionInfo" ("Version", "AppliedOn", "Description") VALUES (210, '2024-08-29T20:08:51', 'add_monitored_seasons_filter') 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Committing Transaction 
[Info] FluentMigrator.Runner.MigrationRunner: 210: add_monitored_seasons_filter migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0239846s 
[Info] Microsoft.Hosting.Lifetime: Now listening on: http://[::]:8989 
[Info] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down. 
[Info] Microsoft.Hosting.Lifetime: Hosting environment: Production 
[Info] Microsoft.Hosting.Lifetime: Content root path: /app/sonarr/bin 
[Info] ManagedHttpDispatcher: IPv4 is available: True, IPv6 will be disabled 
[ls.io-init] done.
[Info] LifecycleService: Restart requested. 
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0668558s 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0718033s 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0564585s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0611705s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.009863s 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0128531s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0134514s 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0177761s 
[Info] Microsoft.Hosting.Lifetime: Now listening on: http://[::]:8989 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down. 
[Info] Microsoft.Hosting.Lifetime: Hosting environment: Production 
[Info] Microsoft.Hosting.Lifetime: Content root path: /app/sonarr/bin 
[Info] ManagedHttpDispatcher: IPv4 is available: True, IPv6 will be disabled 
[Info] LifecycleService: Restart requested. 
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0785495s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0862419s 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0629584s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0685928s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0159779s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0195773s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0090278s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0120522s 
[Info] Microsoft.Hosting.Lifetime: Now listening on: http://[::]:8989 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down. 
[Info] Microsoft.Hosting.Lifetime: Hosting environment: Production 
[Info] Microsoft.Hosting.Lifetime: Content root path: /app/sonarr/bin 
[Info] ManagedHttpDispatcher: IPv4 is available: True, IPv6 will be disabled 
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0701162s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0761442s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0137767s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0175802s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0643406s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0695467s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0097526s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0134483s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.056047s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0608891s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0133848s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0163411s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0546777s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0595527s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0193136s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0218456s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0578137s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0627008s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0198464s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0239148s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0571169s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0624185s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0130704s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0160975s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0552528s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0595599s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0109077s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0133244s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0608789s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0656618s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0100715s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0122803s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0551885s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0603751s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0202036s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0228347s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0544033s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0592957s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0126769s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0165175s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.9.2244 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] SingleInstancePolicy: 1 instance(s) of Sonarr are running 
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.056978s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0646132s 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 *** 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrating 
[Info] FluentMigrator.Runner.MigrationRunner: PerformDBOperation  
[Info] NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor: Performing DB Operation 
[Info] DatabaseEngineVersionCheck: SQLite 3.45.3 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0132198s 
[Info] FluentMigrator.Runner.MigrationRunner: DatabaseEngineVersionCheck migrated 
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0159924s 


[Fatal] ConsoleApp: Failed to bind to address http://[::]:8989: address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions 
Press enter to exit...

Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Aug 29, 2024

We don't recommend restarting apps inside the container. If you need to restart, you should restart the container.

We have no control over how the apps try to restart themselves. It is often not compatible with our supervisor, S6, as you see in the logs.

@CactusCollider
Copy link
Author

Agreed, restarting from within a container is a bad idea.

I feel like from an end user perspective is where it may not be clear to a user why they need to initiate a restart using some other method when they get a "helpful" popup indicating they can just hit a button. As a seasoned user I literally thought "Oh this generally doesn't work very well but maybe linux server io has a way to handle it." I paid no attention to it until i noticed the high CPU utilization. In retrospect the settings requiring a restart probably never were applied.

@aptalca
Copy link
Member

aptalca commented Aug 29, 2024

If you have a good solution, we're all ears.

It would likely require upstream collaboration and changes for each app.

@CactusCollider
Copy link
Author

The issue is that Sonarr is creating it's own process and terminating the original one. When s6 sees that sonarr has terminated its default behavior is to restart the service.

The lowest impact option would be to include a finish s6 script that halts the container. Restart would then be handled by the end users container manger. Given that this is the main process of the container I don't think it's inappropriate to also halt the container. Is an s6 finish script for svc-sonarr something that fits both functionally and experience wise with linux server io?

@aptalca
Copy link
Member

aptalca commented Aug 30, 2024

Our containers are designed to be running until stopped. S6 is there to restart the service if there is failure.

With the behavior you describe, the user would click on restart in the gui and the container would stop, which is odd behavior in itself. You can't assume the users will set the container to restart=always.

@Roxedus
Copy link
Member

Roxedus commented Aug 30, 2024

Sonarr is removing the ability to restart in a container.
Sonarr/Sonarr#7136

@Roxedus Roxedus closed this as completed Aug 30, 2024
@CactusCollider
Copy link
Author

Our containers are designed to be running until stopped. S6 is there to restart the service if there is failure.

With the behavior you describe, the user would click on restart in the gui and the container would stop, which is odd behavior in itself. You can't assume the users will set the container to restart=always.

Totally understand, thanks for your help and input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants