komga needs more RAM Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
schimy
Posts: 2
Joined: Sat Jun 26, 2021 3:39 pm

komga needs more RAM

Post by schimy »

Hello,

I'm running dietpi with komga on a Raspi 4 (2GB). by default komga runs with 385MB RAM but I need more

so I edit the komga entry via "dietpi-services" [/etc/systemd/system/komga.service] like this:

Code: Select all

[Service]
User=komga
WorkingDirectory=/mnt/dietpi_userdata/komga
ExecStart=/usr/bin/java -Xmx1024m -jar komga.jar
save and restart the komga-service with an error
│ - Command: systemctl restart komga │
│ - Exit code: 1 │
│ - DietPi version: v7.2.3 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 2 | DISTRO: 5 │
│ - Image creator: DietPi Core Team │
│ - Pre-image: Raspbian Lite │
│ - Error log: │
│ Failed to restart komga.service: Unit komga.service has a bad unit file setting. │
│ See system logs and 'systemctl status komga.service' for details.

Code: Select all

systemctl status komga.service
Warning: The unit file, source configuration file or drop-ins of komga.service changed on disk
. Run 'systemctl daemon-reload' to reload units.
● komga.service - Komga (DietPi)
   Loaded: bad-setting (Reason: Unit komga.service has a bad unit file setting.)
  Drop-In: /etc/systemd/system/komga.service.d
           └─dietpi-services_edit.conf
   Active: active (running) since Sat 2021-06-26 15:02:48 BST; 45s ago
 Main PID: 4490 (java)
    Tasks: 37 (limit: 4440)
   CGroup: /system.slice/komga.service
           └─4490 /usr/bin/java -Xmx383m -jar komga.jar

Jun 26 15:02:48 pinas systemd[1]: Started Komga (DietPi).
Jun 26 15:02:55 pinas java[4490]:  ____  __.
Jun 26 15:02:55 pinas java[4490]: |    |/ _|____   _____    _________
Jun 26 15:02:55 pinas java[4490]: |      < /  _ \ /     \  / ___\__  \
Jun 26 15:02:55 pinas java[4490]: |    |  (  <_> )  Y Y  \/ /_/  > __ \_
Jun 26 15:02:55 pinas java[4490]: |____|__ \____/|__|_|  /\___  (____  /
Jun 26 15:02:55 pinas java[4490]:         \/           \//_____/     \/
Jun 26 15:02:55 pinas java[4490]: Version: 0.69.2
Jun 26 15:03:24 pinas java[4490]: 2021-06-26 15:03:24.814  WARN 4490 --- [           main] o.g.k.i.dataso
urce.DatabaseMigration     : The H2 database file does not exists: /mnt/dietpi_userdata/komga/database.h2
.mv.db, skipping migration
Jun 26 15:03:26 pinas systemd[1]: komga.service: Service has more than one ExecSt
art= setting, which is only allowed for Type=oneshot services. Refusing.

how can I change the service settings without this error?

thx ... schimy
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: komga needs more RAM

Post by Joulinar »

Hi,

pls can you share following

Code: Select all

systemctl cat komga
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3088
Joined: Sat Nov 18, 2017 6:21 pm

Re: komga needs more RAM

Post by MichaIng »

You need to clear the previous start command via override config:

Code: Select all

[Service]
ExecStart=
ExecStart=/usr/bin/java -Xmx1024m -jar komga.jar
Else the added one is interpreted as second command, which is only allowed in combination with specific service types. As the other directives/sections are untouched, you don't need to uncomment them.

We should add this info to the initial template file when the "Edit" option is used :?.
schimy
Posts: 2
Joined: Sat Jun 26, 2021 3:39 pm

Re: komga needs more RAM

Post by schimy »

MichaIng wrote: Sun Jun 27, 2021 12:54 pm You need to clear the previous start command via override config:

Code: Select all

[Service]
ExecStart=
ExecStart=/usr/bin/java -Xmx1024m -jar komga.jar
Else the added one is interpreted as second command, which is only allowed in combination with specific service types. As the other directives/sections are untouched, you don't need to uncomment them.

We should add this info to the initial template file when the "Edit" option is used :?.
THIS WORKS !
thx a lot :D
Post Reply