Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
18.9.0
-
None
-
Unknown
-
Description
xwiki.service runs start_xwiki.sh, the generic script of the Jetty distribution. Under systemd this costs, on every start and for the whole life of the service:
- a full extra JVM (java -version) to check the Java version, which the package dependencies already guarantee;
- a shell and a sleep 1 loop kept running beside Jetty to delete a lock file once Java exits: one fork and exec per second, in the service's cgroup;
- ExecStop runs stop_xwiki.sh, which starts up to two more JVMs before falling back to kill and kill -9, all of which systemd does itself (KillSignal, TimeoutStopSec).
Starting java directly from the unit (options in an environment file, directories from StateDirectory=/LogsDirectory=) would remove all of this. It would also allow restricting what the service may execute (NoExecPaths=/ExecPaths=), which is impossible while a shell keeps running sleep.
Attachments
Issue Links
- is related to
-
XINIT-30 Provide tested systemd hardening levels for the XWiki service
-
- Open
-
- relates to
-
XWIKI-23104 Make easier to configure Jetty in the xjetty Debian package
-
- Open
-