How to Prevent the ‘WLS_DIAGNOSTICSxxxxxx.DAT’ file from Growing Too Large
The Archive component of the WebLogic Diagnostic Framework (WLDF) captures and persists all data events, log records, and metrics collected by WLDF from server instances and applications running on them. You can configure WLDF to archive diagnostic data to a file store or a Java Database Connectivity (JDBC) data source. If you choose to archive diagnostic data to a file store, this file would stored in <DOMAIN_NAME>/servers/<SERVER_NAME>/data/store/diagnostics.
Under some conditions, these archived files may grow bigger and bigger and can not be removed automatically if you have not done special configuration. e.g., if JDBC connection profiling is enabled, etc.
There are several ways to prevent the diagnostic archive files from growing too large:
1. For weblogic 10.0 and above, you can configure retirement features to periodically delete old diagnostic data from the archives.
For example, you can configure data of a specified age should be retired, or that the oldest data saved should be retired when your diagnostic file reaches a specified size.
2. For WebLogic 9.2.* and 10.*, if you want to permanently switch off the diagnostics data collecting, you can use the following arguments in your server startup script:
-Dcom.bea.wlw.netui.disableInstrumentation=true
-D_Offline_FileDataArchive=true
-Dweblogic.connector.ConnectionPoolProfilingEnabled=false
Steps to permanently switch off the diagnostics data collecting
Shutdown your WebLogic server.
Clear the <SERVER`>/data/store/diagnostics directories.
Apply the startup parameter, e.g, in setDomainEnv.sh, modify JAVA_OPTIONS:
JAVA_OPTIONS=”${JAVA_OPTIONS} -D_Offline_FileDataArchive=true -Dcom.bea.wlw.netui.disableInstrumentation=true -Dweblogic.connector.ConnectionPoolProfilingEnabled=false” export JAVA_OPTIONS
Restart your WebLogic server.