14 Jul How to activate rotating logs in CentraSite ActiveSOA 8.x
One of our customers has a Software AG CentraSite ActiveSOA 8.0.4 installation which ran into disk shortage after a while. Although the CentraSite database may consume a lot of diskspace after a while, this wasn’t the major cause. The database files were not too big so we started digging using a tool called Scanner (http://scanner.en.softonic.com/) to see which folders or files were consuming all the diskspace. We found out the folder CentraSiteapachelogs was consuming a lot of diskspace with an access.log file larger than 2Gb, making it almost impossible to open it with any text editor.
CentraSite ActiveSOA comes with a system tools called the System Management Hub (SMH) to perform system configurations like stopping and starting the CentraSite XML database, taking backups, configuring log purging and so on. Both CentraSite and the SMH are running on an Apache Tomcat and Apache HTTP server. By default the apache http server has access logs configured but all the log information is written to only one access.log file, resulting in exhausted disk space after a while.
The best way to solve this issue is by using rotatelogs.exe. This file can be found on any Apache HTTP server installation and makes it possible to rotate log files based on time or size. The configuration of the Apache HTTP server can be found in the file called httpd.conf which can be found in the [CentraSite installation folder]/CentraSite/apache/conf/ folder. To make use of a daily rotating access log you have to edit the httpd.conf file as follows:
replace CustomLog logs/access.log common with CustomLog “| [CentraSite Installation Folder]/CentraSite/apache/bin/rotatelogs.exe [CentraSite Installation Folder]/CentraSite/apache/logs/access.%Y_%m_%d.log 86400” common
The same configuration is also applicable for the error.log file. After changing the configuration you have to restart the Apache http server. More detailed information about rotatelogs and its different options can be found on http://httpd.apache.org/docs/2.0/programs/rotatelogs.html
This solution is also applicable for CentraSite ActiveSOA 8.2.
Author: Dimitri Van Kerckhoven