Application restarts mysteriously on Websphere Liberty Profile

1.1k views Asked by At

Our application runs on WLP 16.0.0.2. Off late, we have seen that the application restarts as soon as a code, which uses Apache FOP 2.1, finishes execution. The code is expected to generate a PDF which is successful. We do not see any Memory Dump or any other kind of errors, exceptions in the logs. The same piece of code used to work fine when the application used to run on Tomcat 8. Trying out regular Heap Size and PermGen tunings didn't help.

1

There are 1 answers

3
Andy Guibert On BEST ANSWER

Application restarts can be triggered by 2 things in Liberty:

  1. A configuration change made in the server.xml that triggers an app restart
  2. The <applicationMonitor/> element finds an application change when it polls for an update or when the application monitor MBean receives an update request.

What's probably happening in your case is scenario #2. There is probably something in your application that is writing output to the expanded application directory, and the default application monitor setting (poll for updates every 500ms) is picking up this output as an application change and thus triggers a restart.

So you have two options to fix this:

  1. (Recommended) Change your application to write output somewhere besides the expanded application directory
  2. Disable application monitoring by putting this in your server.xml:
    <applicationMonitor updateTrigger="mbean"/>
    NOTE: Setting application monitoring to mbean will cause droping applications to not start, unless you are running in WDT.