Open sjeevan09 opened 2 years ago
Wrong repo, will transfer.
I am sorry but this is not enough to really reproduce the problem. I am not aware of file handle leakage, and code included does not have anything obvious.
One thing I would suggest, however, would be moving this line:
ObjectMapper objectMapper = new XmlMapper();
from within method into static initializer like
final static ObjectMapper objectMapper = new XmlMapper();
I am not sure if that helps in Lambda environment -- it really depends on whether parse
is only called once per JVM setup or so. But if it is called multiple times this makes a HUGE difference: construction of ObjectMapper
is a very heavy operation (or more specifically, first read/write call as much of initialization happens lazily).
Other than that I cannot do much without some form of reproduction of the issue.
Hi,
Describe the bug
I am using jackson-databind in my AWS Lambda developed in Java 8. Along with related jackson libraries ... a screen shot of my pom.xml is attached.
My Lambda works beautifully and parses the XML into java object as expected ... but under heavy load I start getting an exception that points in the direction - is the Jackson Databind library leaking file handles/ descriptors.
I get too many open files.
Version information 2.13.0 Snap of pom.xml below
To Reproduce My code is a AWS Lambda which works in a constrained Linux environment with only 1024 File handles available. The error comes when I request parsing of an XML object into Java object very frequently (load test)
Code snippet attached as a screen shot.
Java stack trace also attached
Could XML Input Factory leak file handles ultimately giving OutOfFileHandles
Snap of my pom.xml
My code ....
thanks Jeevan