-
Bug
-
Resolution: Fixed
-
Low
-
7.12.2, 7.13.7
-
1
-
Severity 3 - Minor
-
1
-
Issue Summary
The default Java 11 Garbage Collection Logging Settings has the wrong syntax for filecount and filesize.
Steps to Reproduce
- Install Confluence and pay attention to the files below that has the Java 11 Garbage Collection Logging Settings:
- setenv.sh
CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log::filecount=5,filesize=2M ${CATALINA_OPTS}"
- setenv.bat
set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log"::filecount=5,filesize=2M %CATALINA_OPTS%
- service.bat
-Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\"::filecount=5,filesize=2M
- setenv.sh
- Start Confluence with the respective methods above after modifying the filecount or filesize value(s)
Expected Results
The number of files and maximum size of each file should respect the new value that was modified.
Actual Results
The number of files and maximum size of each file is not respecting the new value that was modified.
Workaround
This is because there's a syntax error in the setting. Removing a colon(:) in the line by modifying them as below will resolve the issue:
-
- setenv.sh
CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log:filecount=5,filesize=2M ${CATALINA_OPTS}"
- setenv.bat
set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":filecount=5,filesize=2M %CATALINA_OPTS%
- service.bat
-Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\":filecount=5,filesize=2M
The examples here only focuses on getting the filecount and filesize to work
- setenv.sh
Information
Please note that if you're modifying this value while using Java 11, please refer to the related issue CONFSERVER-61415 to comment out the Java 8 GC Logging line
Post Confluence 8.0
Confluence 8.0 stopped supporting Java 8, which means the -Xloggc should be removed.
When there is only -Xlog left in the configuration, both Java 11 and Java 17 should pick up the GC Logging setting above, and here's the recommended flag:
-
- setenv.sh
CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}"
- setenv.bat
set CATALINA_OPTS=-Xlog:gc*:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":tags,time,uptime,level:filecount=5,filesize=2M %CATALINA_OPTS%
- In Windows Service:
verify the installation directory is correct before applying
-Xlog:gc*:file="C:\Program Files\Atlassian\Confluence\logs\gc-%t.log":tags,time,uptime,level:filecount=5,filesize=2M
- setenv.sh
- is related to
-
CONFSERVER-61415 Java 11 Garbage Collection Logging Settings Are Not Correctly Applied on Confluence Start
-
- Closed
-
-
CONFSERVER-79961 As an admin, I want date timestamps in Garbage Collection Logging to be enabled by default
- Closed
[CONFSERVER-79959] The default Java 11 Garbage Collection Logging Settings has the wrong syntax for filecount and filesize
Remote Link | Original: This issue links to "Page (Confluence)" [ 704879 ] |
Labels | Original: blocking-8.0 blocking-8.0-beta conf-dc-phoenix fireball | New: blocking-8.0 blocking-8.0-beta conf-dc-phoenix fireball phoenix-conf-dc |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Waiting for Release [ 12075 ] | New: Closed [ 6 ] |
Description |
Original:
h3. Issue Summary
The default Java 11 Garbage Collection Logging Settings has the wrong syntax for {{*filecount*}} and {{*filesize*}}. h3. Steps to Reproduce # Install Confluence and pay attention to the files below that has the Java 11 Garbage Collection Logging Settings: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log::filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log"::filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\"::filecount=5,filesize=2M {code} # Start Confluence with the respective methods above after modifying the {{*filecount*}} or {{*filesize*}} value(s) h3. Expected Results The _number of files_ and _maximum size of each file_ should respect the new value that was modified. h3. Actual Results The _number of files_ and _maximum size of each file_ *is not* respecting the new value that was modified. h3. Workaround This is because there's a syntax error in the setting. Removing a colon({{*:*}}) in the line by modifying them as below will resolve the issue: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log:filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\":filecount=5,filesize=2M {code} (i) The examples here only focuses on getting the {{filecount}} and {{filesize}} to work h3. Information Please note that if you're modifying this value while using Java 11, please refer to the related issue h3. Post Confluence 8.0 Confluence 8.0 [stopped supporting Java 8|https://confluence.atlassian.com/doc/end-of-support-announcements-for-confluence-210239673.html], which means the {{*-Xloggc*}} should be removed. When there is only {{*-Xlog*}} left in the configuration, both Java 11 and Java 17 should pick up the GC Logging setting above, and here's the recommended flag: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc*:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":tags,time,uptime,level:filecount=5,filesize=2M %CATALINA_OPTS% {code} #* In Windows Service: {code:title=verify the installation directory is correct} -Xlog:gc*:file="C:\Program Files\Atlassian\Confluence\logs\gc-%t.log":tags,time,uptime,level:filecount=5,filesize=2M {code} |
New:
h3. Issue Summary
The default Java 11 Garbage Collection Logging Settings has the wrong syntax for {{*filecount*}} and {{*filesize*}}. h3. Steps to Reproduce # Install Confluence and pay attention to the files below that has the Java 11 Garbage Collection Logging Settings: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log::filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log"::filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\"::filecount=5,filesize=2M {code} # Start Confluence with the respective methods above after modifying the {{*filecount*}} or {{*filesize*}} value(s) h3. Expected Results The _number of files_ and _maximum size of each file_ should respect the new value that was modified. h3. Actual Results The _number of files_ and _maximum size of each file_ *is not* respecting the new value that was modified. h3. Workaround This is because there's a syntax error in the setting. Removing a colon({{*:*}}) in the line by modifying them as below will resolve the issue: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log:filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\":filecount=5,filesize=2M {code} (i) The examples here only focuses on getting the {{filecount}} and {{filesize}} to work h3. Information Please note that if you're modifying this value while using Java 11, please refer to the related issue h3. Post Confluence 8.0 Confluence 8.0 [stopped supporting Java 8|https://confluence.atlassian.com/doc/end-of-support-announcements-for-confluence-210239673.html], which means the {{*-Xloggc*}} should be removed. When there is only {{*-Xlog*}} left in the configuration, both Java 11 and Java 17 should pick up the GC Logging setting above, and here's the recommended flag: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc*:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":tags,time,uptime,level:filecount=5,filesize=2M %CATALINA_OPTS% {code} #* In Windows Service: {code:title=verify the installation directory is correct before applying} -Xlog:gc*:file="C:\Program Files\Atlassian\Confluence\logs\gc-%t.log":tags,time,uptime,level:filecount=5,filesize=2M {code} |
Description |
Original:
h3. Issue Summary
The default Java 11 Garbage Collection Logging Settings has the wrong syntax for {{*filecount*}} and {{*filesize*}}. h3. Steps to Reproduce # Install Confluence and pay attention to the files below that has the Java 11 Garbage Collection Logging Settings: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log::filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log"::filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\"::filecount=5,filesize=2M {code} # Start Confluence with the respective methods above after modifying the {{*filecount*}} or {{*filesize*}} value(s) h3. Expected Results The _number of files_ and _maximum size of each file_ should respect the new value that was modified. h3. Actual Results The _number of files_ and _maximum size of each file_ *is not* respecting the new value that was modified. h3. Workaround This is because there's a syntax error in the setting. Removing a colon({{*:*}}) in the line by modifying them as below will resolve the issue: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log:filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\":filecount=5,filesize=2M {code} h3. Information Please note that if you're modifying this value while using Java 11, please refer to the related issue h3. Post Confluence 8.0 Confluence 8.0 [stopped supporting Java 8|https://confluence.atlassian.com/doc/end-of-support-announcements-for-confluence-210239673.html], which means the {{*-Xloggc*}} should be removed. When there is only {{*-Xlog*}} left in the configuration, both Java 11 and Java 17 should pick up the GC Logging setting above |
New:
h3. Issue Summary
The default Java 11 Garbage Collection Logging Settings has the wrong syntax for {{*filecount*}} and {{*filesize*}}. h3. Steps to Reproduce # Install Confluence and pay attention to the files below that has the Java 11 Garbage Collection Logging Settings: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log::filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log"::filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\"::filecount=5,filesize=2M {code} # Start Confluence with the respective methods above after modifying the {{*filecount*}} or {{*filesize*}} value(s) h3. Expected Results The _number of files_ and _maximum size of each file_ should respect the new value that was modified. h3. Actual Results The _number of files_ and _maximum size of each file_ *is not* respecting the new value that was modified. h3. Workaround This is because there's a syntax error in the setting. Removing a colon({{*:*}}) in the line by modifying them as below will resolve the issue: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log:filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc+age=debug:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":filecount=5,filesize=2M %CATALINA_OPTS% {code} #* {{service.bat}} {code} -Xlog:gc+age=debug:file=\"%CATALINA_HOME%\logs\gc-%%t.log\":filecount=5,filesize=2M {code} (i) The examples here only focuses on getting the {{filecount}} and {{filesize}} to work h3. Information Please note that if you're modifying this value while using Java 11, please refer to the related issue h3. Post Confluence 8.0 Confluence 8.0 [stopped supporting Java 8|https://confluence.atlassian.com/doc/end-of-support-announcements-for-confluence-210239673.html], which means the {{*-Xloggc*}} should be removed. When there is only {{*-Xlog*}} left in the configuration, both Java 11 and Java 17 should pick up the GC Logging setting above, and here's the recommended flag: #* {{setenv.sh}} {code} CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}" {code} #* {{setenv.bat}} {code} set CATALINA_OPTS=-Xlog:gc*:file="%atlassian_logsdir%\gc-%atlassian_timestamp%.log":tags,time,uptime,level:filecount=5,filesize=2M %CATALINA_OPTS% {code} #* In Windows Service: {code:title=verify the installation directory is correct} -Xlog:gc*:file="C:\Program Files\Atlassian\Confluence\logs\gc-%t.log":tags,time,uptime,level:filecount=5,filesize=2M {code} |
Status | Original: Awaiting Merge [ 10064 ] | New: Waiting for Release [ 12075 ] |
QA Demo Status | Original: Not Done [ 14330 ] | New: Done [ 14331 ] |
QA Kickoff Status | Original: Not Needed [ 14236 ] | New: Done [ 14235 ] |
Testing Notes |
New:
Tested Confluence Distribution with the fixed GC logging and confirmed it looks as desired.
{noformat} [2022-11-09T08:42:36.265+0000][0.008s][info][gc,heap] Heap region size: 1M [2022-11-09T08:42:36.297+0000][0.031s][info][gc ] Using G1 [2022-11-09T08:42:36.297+0000][0.031s][info][gc,heap,coops] Heap address: 0x00000000c0000000, size: 1024 MB, Compressed Oops mode: 32-bit [2022-11-09T08:42:37.968+0000][1.700s][info][gc,start ] GC(0) Pause Young (Normal) (G1 Evacuation Pause) [2022-11-09T08:42:37.968+0000][1.700s][info][gc,task ] GC(0) Using 2 workers of 2 for evacuation [2022-11-09T08:42:38.000+0000][1.733s][info][gc,phases ] GC(0) Pre Evacuate Collection Set: 0.0ms [2022-11-09T08:42:38.000+0000][1.734s][info][gc,phases ] GC(0) Evacuate Collection Set: 32.0ms [2022-11-09T08:42:38.000+0000][1.734s][info][gc,phases ] GC(0) Post Evacuate Collection Set: 0.7ms [2022-11-09T08:42:38.000+0000][1.734s][info][gc,phases ] GC(0) Other: 0.4ms [2022-11-09T08:42:38.000+0000][1.734s][info][gc,heap ] GC(0) Eden regions: 51->0(44) [2022-11-09T08:42:38.000+0000][1.734s][info][gc,heap ] GC(0) Survivor regions: 0->7(7) [2022-11-09T08:42:38.000+0000][1.734s][info][gc,heap ] GC(0) Old regions: 0->3 [2022-11-09T08:42:38.000+0000][1.734s][info][gc,heap ] GC(0) Humongous regions: 1->1 [2022-11-09T08:42:38.000+0000][1.734s][info][gc,metaspace ] GC(0) Metaspace: 18030K->18030K(1067008K) [2022-11-09T08:42:38.000+0000][1.734s][info][gc ] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 52M->10M(1024M) 33.911ms [2022-11-09T08:42:38.000+0000][1.734s][info][gc,cpu ] GC(0) User=0.06s Sys=0.00s Real=0.03s [2022-11-09T08:42:38.506+0000][2.238s][info][gc,start ] GC(1) Pause Young (Normal) (G1 Evacuation Pause) [2022-11-09T08:42:38.506+0000][2.238s][info][gc,task ] GC(1) Using 2 workers of 2 for evacuation [2022-11-09T08:42:38.522+0000][2.258s][info][gc,phases ] GC(1) Pre Evacuate Collection Set: 0.0ms [2022-11-09T08:42:38.522+0000][2.258s][info][gc,phases ] GC(1) Evacuate Collection Set: 19.1ms [2022-11-09T08:42:38.522+0000][2.258s][info][gc,phases ] GC(1) Post Evacuate Collection Set: 0.4ms [2022-11-09T08:42:38.522+0000][2.258s][info][gc,phases ] GC(1) Other: 0.1ms [2022-11-09T08:42:38.522+0000][2.258s][info][gc,heap ] GC(1) Eden regions: 44->0(44) [2022-11-09T08:42:38.522+0000][2.258s][info][gc,heap ] GC(1) Survivor regions: 7->7(7) [2022-11-09T08:42:38.522+0000][2.258s][info][gc,heap ] GC(1) Old regions: 3->15 [2022-11-09T08:42:38.522+0000][2.258s][info][gc,heap ] GC(1) Humongous regions: 10->5 [2022-11-09T08:42:38.522+0000][2.258s][info][gc,metaspace ] GC(1) Metaspace: 18760K->18760K(1067008K) {noformat} |
|
Status | Original: In Review [ 10051 ] | New: Awaiting Merge [ 10064 ] |
Remote Link |
New:
This issue links to "Confluence Bundled Libraries › Synchrony Proxy › issue-80- |
Fix Version/s | New: 8.0.0 [ 101718 ] | |
QA Kickoff Status | Original: Not Done [ 14234 ] | New: Not Needed [ 14236 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10051 ] |
Remote Link | New: This issue links to "Page (Confluence)" [ 704879 ] |