Page tree

The <Proactivenet_Install_Location>\pw\apache\logs\ contains log files which are not rolling automatically. This can cause performance issues on the host on which ProactiveNet is installed.

To avoid this problem, you need to configure automatic rolling of logs on the ProactiveNet host. If you are operating in an HA environment, you need to make the configuration changes on both the primary server and the secondary server.

To configure automatic rolling of logs

  1. Stop the Apache server by running the pw p e httpd command. 
  2. Delete all the existing log files available in the following directory:
    • (Windows)<Proactivenet_Install_Location>\pw\apache\logs\
    • (Linux)<Proactivenet_Install_Location>/pw/apache/logs/
  3. Take a backup of the httpd-proxy.conf file located at:
    • (Windows) <Proactivenet_Install_Location>\pw\apache\conf\extra\
    • (Linux) <Proactivenet_Install_Location>/pw/apache/conf/extra/

    Note

    Ensure that you place the backed up file in a folder outside the ProactiveNet installation directory.

  4. Edit the httpd-proxy.conf file, make the following changes, and save the file:
    1. Locate and comment the first line as follows:

      #CustomLog logs/ajp.log combined

    2. For each of the log files under <Proactivenet_Install_Location>\pw\apache\logs\ (for which you want to configure automatic rolling), add the following line at the top of the httpd-proxy.conf file: 

      • (Windows) CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\<logFileName> 10M" combined

      • (Linux) CustomLog "|<Proactivenet_Install_Location>/pw/apache/bin/rotatelogs -n 10 logs/<logFileName> 10M" combined

      In the preceding line, the following definitions apply:

      • <Proactivenet_Install_Location> refers to the directory location where you have installed ProactiveNet.
      • -n parameter indicates the number of files you want to keep before rolling over logs. In this case, the number of files is set to 10.
        For example, with -n 3, three logs will be created, Log1, Log2, and Log3, and the next time, Log1 will be overwritten with the new log details. 
      • <logFileName> indicates the name of the log file for which you want to configure automatic rolling. For example, error_log.
      • 10M indicates the maximum file size (in MB) after which a new file must be created. In this case, the maximum file size is set to 10 MB. 
        For example, when log file 1 reaches the limit of 10 MB, a new log file 2 is created.
      Example of lines to be added for different log files

      CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\ajp.log 10M" combined

      CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\deflate.log 10M" combined

      CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\ssl_request_log 10M" combined

      CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\error_log 10M" combined

      CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\error.log 10M" combined

      CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\install.log 10M" combined

  5. Start the Apache server by running the pw p s httpd command. 

4 Comments

  1. note your current example has some funky quotes and the slashes needed to be the other way, and didnt need the proactivenet install location


    CustomLog "|bin/rotatelogs.exe -n 10 logs/ajp.log 10M" combined

    CustomLog "|bin/rotatelogs.exe -n 10 logs/deflate.log 10M" combined

    CustomLog "|bin/rotatelogs.exe -n 10 logs/ssl_request_log 10M" combined

    CustomLog "|bin/rotatelogs.exe -n 10 logs/error_log 10M" combined

    CustomLog "|bin/rotatelogs.exe -n 10 logs/error.log 10M" combined

    CustomLog "|bin/rotatelogs.exe -n 10 logs/install.log 10M" combined

    1. Hello! Thank you for your comment.

      The current example is for the Windows OS. Checking about the location.

  2. CustomLog "|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\ssl_request_log 10M" combined

    CustomLog *This quote is not normal* “|<Proactivenet_Install_Location>\pw\apache\bin\rotatelogs.exe -n 10 logs\error_log 10M" combined

    https://practicaltypography.com/straight-and-curly-quotes.htm

    having the quotes as copy and pasted did not work and gave errors on a Windows server




    1. Thanks for pointing the quotes. Not sure why they were curly. This is corrected now. 

      Regarding the location: In some environments, we found that it was necessary to provide the location, therefore the reference.