I have Ubuntu 18.04 server and Wildfly 18.0.1. Wildfly installed as system service and it works normally - I can start, stop it. It starts on system boot.
But sometimes this service randomly stops with no reason - one time per week, one time per couple of days. I didn't see any dependency on server load.
In logs there is just:
Mar 18 15:28:27 prdmx systemd[1]: wildfly.service: Main process exited, code=exited, status=1/FAILURE
Mar 18 15:28:27 prdmx systemd[1]: wildfly.service: Failed with result 'exit-code'.
wildfly.service is original file with no change:
[Unit]
Description=The WildFly Application Server
After=syslog.target network.target
Before=httpd.service
[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
EnvironmentFile=-/etc/wildfly/wildfly.conf
User=wildfly
LimitNOFILE=102642
PIDFile=/var/run/wildfly/wildfly.pid
ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND
StandardOutput=null
[Install]
WantedBy=multi-user.target
There is absolutely nothing in system logs, nothing in wildfly logs, except two lines I mention above. So I even don't know is it wildfly problem or systemd problem.
What can I do with it? How to get the source of this behaviour - systemd or wildfly? How to debug it all?
(I can set "restart on failure" option for service but it's not good solution)
It's Wildfly issue. More precisely Java app issue. One of the apps take huge amount of memory, and when it become 100% RAM and 100% swap then Ubuntu kernel simply kills this service with no error.