Managing Logs in Oracle WebLogic Server by Ahmed Aboulnaga

Posted: May 3, 2015 in WebLogic
Tags: , , , , , ,

 

clip_image002Oracle WebLogic Server has quite a number of log files that are generated which naturally tend to grow over time. Without any type of log rotation, archiving, or purging set up, your file system can be filled up rather quickly and eventually pose stability issues to your application environment. Listen from someone who has seen it all–if your file system is full, your application will likely hang and in-flight transactions impacted.

Fortunately, setting up your environment to prevent this scenario is extremely simple. One consideration is to move all the logs to a completely separate and independent mount point outside your WebLogic domain. But this in itself still does not protect against application failures.

In this article, we describe a few basic things you can do to manage your logs. Given the comprehensive nature of Oracle WebLogic Server, there are a number of log files you need to monitor and control, highlighted in the following table.

Unfortunately, the WebLogic Server log rotation affects only the .log files but not the standard .out files, which is generated when you use Node Manager to start up and shut down the managed servers or if you start them up as a background process (e.g., using nohup). You must implement a custom solution for the system .out files and there are many resources available online that describe various approaches. We present one such option.

There are numerous log files in Oracle WebLogic Server and ideally you would want to ensure that the number of rotated log files is controlled. For example, you may have already taken the steps to rotate the log files as they grow to a certain size. This is a great first step, but you also should control how many of those rotated files you wish to retain, otherwise your file system will likely get filled up over time if they are not manually deleted. Fortunately, the WebLogic Server Administration Console provides us the means to easily do so as well.

Based on the configuration described in this article, each log type requires 300 MB of disk space, as we are rotating the logs after they reach 10 MB in size and keeping a maximum 30 files before removing them. All instructions are applicable to both Oracle WebLogic Server 11g and 12c.

Managed Server Logs

Entries generated by a Java application are generally logged in the .log files. The WebLogic Server administrator should not trust that the application appropriately controls and logs entries resourcefully. Thus, it is recommended to control these files by enabling log rotation (either by time, by size, or both) and to limit the number of retained log files. This will prevent runaway processes from endless logging to your file system and control growth.

1. Log in to the WebLogic Server Administration Console.

2. Navigate to “Server > [managed server] > Logging > General”.

3. Set the following values: Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s