komga needs more RAM

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:

[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.


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

Hi,

pls can you share following

systemctl cat komga

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

[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 :thinking:.

THIS WORKS !
thx a lot :smiley: