You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the YAMLProcessor is closed, it is still leaving a reference to a StreamDecoder instance open. (See UnicodeReader::init()) While Spring’s YamlProcessor closes the underlying input stream, the StreamDecoder (and thus the reference to the YAML and all its loaded references) remain open until the YAML reference is eventually GC’d.
The issue comes in when these references are promoted from new to the old generation. The references are then only collected on a FGC. In the interim, the application can have many open handles (we counted 900+ on a production system that only had 2 FGC cycles)
Attached is a snapshot after the YAMLProcessor closes the stream.
It looks like we'll have to avoid the Yaml.load(InputStream) method altogether, using a loadFromReader call with a custom UnicodeReader handle which we're able to close afterwards...
This is arguably a bug in that Yaml class itself. However, if we can work around so easily, let's try to do that.
Erik Salter opened SPR-13173 and commented
When the YAMLProcessor is closed, it is still leaving a reference to a StreamDecoder instance open. (See UnicodeReader::init()) While Spring’s YamlProcessor closes the underlying input stream, the StreamDecoder (and thus the reference to the YAML and all its loaded references) remain open until the YAML reference is eventually GC’d.
The issue comes in when these references are promoted from new to the old generation. The references are then only collected on a FGC. In the interim, the application can have many open handles (we counted 900+ on a production system that only had 2 FGC cycles)
Attached is a snapshot after the YAMLProcessor closes the stream.
Affects: 4.1.3
Reference URL: #17093
Attachments:
Issue Links:
Referenced from: commits 26acb48, 3d131c9
The text was updated successfully, but these errors were encountered: