memory leak possible in log4j-core #2255
Replies: 5 comments 13 replies
-
Can you provide your Log4j Core configuration? There is roughly one |
Beta Was this translation helpful? Give feedback.
-
Thank you @ppkarwasz for the reply.
Let me know if you need more information. |
Beta Was this translation helpful? Give feedback.
-
Hi @ppkarwasz This hashmap, named MAP, contains many key-value pairs, I have expanded a couple of them here: Based on the attached MAT analysis of core dump image, I have following query-> Please let me know. |
Beta Was this translation helpful? Give feedback.
-
These seem to be entries for 131072 instances of If you use a component builder and do not call the Can you show us your |
Beta Was this translation helpful? Give feedback.
-
Hi @ppkarwasz ,
But I don't see the change in performance of our server process. The server process receives OOM It looks like the same object accumulates in the HashMap Can these be removed from the map when the AL thread is finished using it? Every httprequest thread is generating a new log output stream for each instance. Can you guide me further? Thanks |
Beta Was this translation helpful? Give feedback.
-
Description
[A clear and concise description of what the bug is.]
Memory leak possible in log4j-core. We are getting memory leak (OOM)- java core in
We are running our process which uses Log4j 2.20 on Windows and Linux crashes with OutOfMemory error after about a week or in 2-3 days. The other process which uses log4j running on Windows and Linux has been running for months with no issues.
Error: Dump Event "systhrow" (00040000) Detail "java/lang/OutOfMemoryError" "Java heap space" received
Configuration
Version: [Log4j version] 2.20.0
Operating system: [OS and version] Windows 2019, Linux RHEL 8.8
JDK: [JDK distribution and version] JDK 8.0.8.10 and JDK 8.0.8.15
Logs
Reproduction
[An isolated test reproducing the test.
JUnit tests similar to the ones in the code base are extremely appreciated.]
Beta Was this translation helpful? Give feedback.
All reactions