Sunday 21 June 2015

ATG-Endeca indexing reduce logging messages to avoid terminal lock up (Hang/Not responding)

While indexing newly configured application, JBoss terminal hanged. It was not responding at all. The issue was due to high volume of log messages during indexing. Here is solution.........


Explaining the fix for Weblogic , JBoss and IBM WebSphere.

1.   Oracle WebLogic Server

Create a WebLogic filter in $WL_HOME/../user_projects/domains/base-domain-name/config/config.xml.
<log-filter>
  <name>CXFFilter</name>
  <filter-expression>
  ((SUBSYSTEM = org.apache.cxf.interceptor.LoggingOutInterceptor') OR
  (SUBSYSTEM = 'org.apache.cxf.interceptor.LoggingInInterceptor')) AND
  (SEVERITY = 'WARNING')
  </filter-expression>
</log-filter>
In the same file, add configuration to apply the filter. The following example applies the filter to the server log file and to standard output for a server instance named Prod.
<server>
   <name>Prod</name>
   <log>
     <log-file-filter>CXFFilter</log-file-filter>
     <stdout-filter>CXFFilter</stdout-filter>
     <memory-buffer-severity>Debug</memory-buffer-severity>
   </log>
   <listen-port>7103</listen-port>
   <web-server>
     <web-server-log>
       <number-of-files-limited>false</number-of-files-limited>
     </web-server-log>
   </web-server>
   <listen-address></listen-address>
 </server>

 2.   JBoss Enterprise Application Platform

Add the following to jboss-as\server\server-name\conf\jboss-log4j.xml:
<category name="org.apache.cxf.interceptor.LoggingInInterceptor">
  <priority value="WARN"/>
</category>
<category name="org.apache.cxf.interceptor.LoggingOutInterceptor">
  <priority value="WARN"/>
</category>

3.   IBM WebSphere Application Server

Edit the server.xml of the WebSphere application server instance ($WAS_HOME/profiles/AppSrv/config/cells/HostCell/nodes/HostNode/servers/Server/server.xml).
In the traceservice:TraceService tag, add these strings, separated by colons, to the startupTraceSpecification property:
org.apache.cxf.interceptor.LoggingInInterceptor=warning
org.apache.cxf.interceptor.LoggingOutInterceptor=warning
For example
<services xmi:type="traceservice:TraceService"
  xmi:id="TraceService_131/2495363666"
  enable="true" startupTraceSpecification=
  "*=info:org.apache.cxf.interceptor.LoggingInInterceptor=warning:
  org.apache.cxf.interceptor.LoggingOutInterceptor=warning"
  traceOutputType="SPECIFIED_FILE" traceFormat="BASIC">
    <traceLog xmi:id="TraceLog_1312495363666"
      fileName="${SERVER_LOG_ROOT}/trace.log" rolloverSize="20"
      maxNumberOfBackupFiles="5"/>
</services>

Note  : I tried this for JBoss 5.1.0, this is working well. This is very helpful to reduce logging during development (low configuration machine).

2 comments:

  1. can u share jboss standalone configration for jboss 6.4/jboss 7 ?





    ReplyDelete
  2. Legend,

    I tried this for JBoss 5.1.0, this is working well. for jboss6.4/jboss 7 you need to find out the server specific log4j configuration. Then update logging to warning.

    Regards,
    Jagdev

    ReplyDelete