Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemory exception on tomcat / Change logging bridge dependency. #6904

Merged
merged 2 commits into from Mar 21, 2023

Conversation

fxprunayre
Copy link
Member

Tomcat (left) and Jetty (right) during indexing phase:

image

A memory leak is observed on Tomcat related to logging.

image

slf4j usage:

~/webapps/geonetwork/WEB-INF/lib$ find . -name "*slf4j*.jar"
./jcl-over-slf4j-1.7.5.jar
./log4j-slf4j18-impl-2.17.2.jar
./slf4j-api-1.7.36.jar
./jclouds-slf4j-2.2.1.jar
./log4j-slf4j-impl-2.17.2.jar

slf4j-api-1.7.36 is used and should not contain memory leak observed on slf4j before 1.7.21 (https://www.slf4j.org/news.html#1.7.21).

We were using log4j-slf4j18-impl which is not the version recommended to use with version 1.7.x.

* log4j-slf4j-impl should be used with SLF4J 1.7.x releases or older.
* As of release 2.19.0 the log4j-slf4j18-impl module targetting the unreleased SLF4J 1.8.x series has been removed.

Changing the dependency version of the bridge looks to fix the memory leak observed on Tomcat.

Thanks to @cmangeat and @juanluisrp for giving ideas.

@fxprunayre fxprunayre added this to the 4.2.4 milestone Mar 15, 2023
@sonarcloud
Copy link

sonarcloud bot commented Mar 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@juanluisrp juanluisrp merged commit 8d3c8be into main Mar 21, 2023
10 checks passed
@juanluisrp juanluisrp added the bug label Mar 21, 2023
@fxprunayre fxprunayre deleted the 424-logging-memoryleak-on-tomcat branch March 21, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants