Enabling Log Rotation to Reduce Storage Footprint



This document outlines the process in which to enable rolling log rotation to manage memory allocation against growing log files.



Note: The log configuration file should be modified on the HEAD NODE ONLY:

  1. Open the gpudb_logger.conf file in a text-editor :
    $vi /opt/gpudb/core/etc/gpudb_logger.conf
  2. Edit line #54 from: 
    54: log4cplus.rootLogger=INFO, ToConsole
    54: log4cplus.rootLogger=INFO, ToRollingFile
  3. Next, uncomment lines #127 to #135
    127: log4cplus.appender.ToRollingFile=log4cplus::RollingFileAppender
    128: log4cplus.appender.ToRollingFile.File=../logs/gpudb-rolling.log
    129: log4cplus.appender.ToRollingFile.Threshold=TRACE
    130: log4cplus.appender.ToRollingFile.MaxFileSize=200 MB
    131: log4cplus.appender.ToRollingFile.MaxBackupIndex=4
    132: log4cplus.appender.ToRollingFile.Append=true
    133: log4cplus.appender.ToRollingFile.ImmediateFlush=true
    134: log4cplus.appender.ToRollingFile.layout=log4cplus::PatternLayout
    135: log4cplus.appender.ToRollingFile.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S.%q} %-5p (%i,%T,%-18t) %h %F:%L - %m%n
  4. Save the file.
  5. Next, Kinetica services will need to be restarted on ALL nodes. First, stop all services on the Head node: 
    $/opt/gpudb/core/bin/gpudb stop all
    Important: Wait for ALL Head Node services to be fully stopped before continuing
  6. Stop services on all worker nodes:
    $/opt/gpudb/core/bin/gpudb stop all
  7. Start the Host Manager service on all worker nodes:
    $/opt/gpudb/core/bin/gpudb start-host-manager
  8. Start all services on the head node:
    $/opt/gpudb/core/bin/gpudb start all



Should you have any questions or concerns, please visit our Official Documentation and Support Page.


Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


  • 0
    Garrett Orpin

    This does a great job at limiting "gpudb.log" growth. 

    Is there a similar method to limit growth of httpd related logs?

    /opt/gpudb/httpd/logs/ (error_log, access_log, error.log)

Please sign in to leave a comment.