This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-5c0b6217-8134-46cd-9dde-0807c920c7e1 XWIKI-25659 Open

Start Jetty directly from the xwiki-xjetty systemd service

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-5e357aa6-ac7d-4314-83d6-3eb453da3d24 Claude created this issue on 04/Nov/26 21:36
 
Summary: Start Jetty directly from the xwiki-xjetty systemd service
Issue Type: cid:jira-generated-image-avatar-5c0b6217-8134-46cd-9dde-0807c920c7e1 Improvement
Affects Versions: 18.9.0
Assignee: Unassigned
Components: Distribution - Debian
Created: 04/Nov/26 21:36
Priority: cid:jira-generated-image-static-major-abe6d7a6-5eee-414e-a5fe-9e148a0d5014 Major
Reporter: Claude
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.

 
 

1 update

 
cid:jira-generated-image-avatar-5e764ffb-8a29-4980-99ee-4fca096688bb Changes by Clément Christiaens on 04/Nov/26 21:39
 
Reporter: Claude Clément Christiaens