Our Web runs on the Jetty server in production. In one of the scenarios, we had an outage in the production, which was fixed. The outage did happen 2-3 times.
Now, after some time we observed jetty server has created war logs that have consumed 47g disk space and this has happened only on one of the VMs. We are not doing this in our code. Please note we have 2 war files that are deployed. Attaching a screenshot, hopefully, can help.
Any input or suggestion - on why would jetty create war logs files that are not needed or not wanted by the application occupying so much of the space will be a great help ! Thanks you in advance
Attaching the handler code for war file:
private HandlerCollection getWebAppHandlers() throws SQLException, NamingException{
// Setting service war
WebAppContext serviceWebapp = new WebAppContext();
serviceWebapp.setWar(API_WAR_FILE_PATH);
serviceWebapp.setContextPath(API_CONTEXT_PATH);
//setting the war and context path for the UI layer: oaxui
WebAppContext uiWebapp = new WebAppContext();
uiWebapp.setWar(UI_WAR_FILE_PATH);
uiWebapp.setContextPath(UI_CONTEXT_PATH);
uiWebapp.setAllowNullPathInfo(true);
uiWebapp.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
//set error page handler for the UI context
uiWebapp.setErrorHandler(new CustomErrorHandler());
//handling the multiple war files using HandlerCollection.
HandlerCollection handlerCollection = new HandlerCollection();
handlerCollection.setHandlers(new Handler[]{serviceWebapp, uiWebapp});
return handlerCollection;
}