[
https://issues.apache.org/jira/browse/LOG4J2-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352547#comment-17352547
]
Volkan Yazici commented on LOG4J2-3092:
---------------------------------------
[~xmh51], I have just pushed a fix to {{release-2.x}}, it should be visible in
the next 2.5.0-SNAPSHOT artifact accessible in [the public snapshot
repository|https://repository.apache.org/content/groups/public/org/apache/logging/log4j/log4j-layout-template-json/2.15.0-SNAPSHOT/].
Would you mind verifying the fix and closing the ticket, please? (I will port
this to {{master}} after your check.)
> JSON Template Layout JsonWriter formattableBuffer Memory leak
> -------------------------------------------------------------
>
> Key: LOG4J2-3092
> URL: https://issues.apache.org/jira/browse/LOG4J2-3092
> Project: Log4j 2
> Issue Type: Bug
> Components: JsonTemplateLayout
> Affects Versions: 2.14.0, 2.14.1
> Reporter: xmh51
> Assignee: Volkan Yazici
> Priority: Major
> Fix For: 2.15.0
>
> Attachments: image-2021-05-19-14-35-29-165.png,
> image-2021-05-19-14-35-55-788.png
>
>
> h1. JSON Template Layout
> 1 use recycler is queue or threadLocal
> 2 JsonWriter formattableBuffer receive big string
> 3 the StringBuilder inner char array expansion and length never getting
> smaller
>
> E.g.:
>
> {code:java}
> public Object test() {
> StringBuilder sb=new StringBuilder();
> for(int i=0;i<10;i++){
> for(int j=0;j<10;j++){
> sb.append(UUID.randomUUID());
> }
> log.info(""+sb+sb);
> }
> return "success";
> }
> {code}
>
>
> !image-2021-05-19-14-35-29-165.png!
> !image-2021-05-19-14-35-55-788.png!
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)