Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25659

Start Jetty directly from the xwiki-xjetty systemd service

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 18.9.0
    • Distribution - Debian
    • 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

          Activity

            People

              Unassigned Unassigned
              ciaens Clément Christiaens
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: