Knowledgebase
Knowledgebase: PaperCut > Debugging
Collecting Application Server Garbage Collection logs
Last modified on 05 November 2012 02:04 PM

The PaperCut Application Server is developed on the Java platform. The Java platform makes use of "Garbage Collection" for it's memory management. In some cases it can be useful to gather statistics from the garbage collection process to gain a better understanding of the performance of the system.

To enable the garbage collection logging:

(These instructions are for Windows, for other operating systems please contact support.)

1. Open the [app-path]\server\bin\win\service.conf file in a text editor.

2. Find the line beginning with wrapper.java.additional.11= and copy and paste the following lines:

        wrapper.java.additional.12=-XX:+PrintGCDetails
        wrapper.java.additional.13=-XX:+PrintGCDateStamps
        wrapper.java.additional.14=-Xloggc:logs/gc-output.log

3. Save the file.

4. Restart the PaperCut Application server service.

5. Enable debug logging in the application server - see here. This is because the debug logging is useful to look at along with garbage collector data).

After the application server is restarted the garbage collection data will be saved to the file:

    [app-path]\server\logs\gc-output.log

IMPORTANT: This log file will not be rotated so will continue to grow while the application server is started. The speed of growth of this file will depend on the activity on the site. It is recommended to monitor this file and ensure that it doesn't consume the system disk space. And once you completed collecting logs remember to disable the garbage collection logging by removing the above lines from service.conf and restarting the application server.

Each time the application server is restarted, the file will be wiped and re-created.

Also, any time your PaperCut server is upgraded, the Garbage Collection logging will be disabled.

Collecting the log data

When requested by support to collect the garbage collector logging, it is important to not restart the application server until a copy of the logs is taken. Restarting the application clears the gc-output.log file and all data collected will be lost.

  1. Zip up and email all files in the following dir and send them to support:
            [app-path]/server/logs/*.*