Hi Carl,
Maybe you’ve seen that the ClientSession class implements the Closeable interface, so it’s generally advisable to use a try-with-resources statement when creating new instances.
If that doesn’t help, you could tweak your registry settings, as e.g. suggested in [1].
Best, Christian
[1] https://confluence.atlassian.com/confkb/no-buffer-space-available-maximum-co...
On Wed, May 4, 2022 at 4:04 PM Bondeson, Carl Carl.Bondeson@ct.gov wrote:
We are seeing the following exception if we run under very
heavy multi-thread conditions.
ERROR] 2022-05-04 08:49:41.345 [Thread-3012] - General Throwable occurred message: No buffer space available (maximum connections reached?): connect
Caused by this
*// create BaseX session on singleton server *mapperSession = new ClientSession(BaseXDictionary.*BASEX_HOST*, basexdict.baseXPort, basexdict .baseXUser, basexdict.baseXPass);
We are using XSLT and invoking Java methods to handle the things not easily managed in XSLT. Should we be closing sessions in Java classes or is this supposed to be handled by the JVM?
This is running under Windows Server 2016 , deployed using JBoss 7.3.9, with 16 GB ram, and 4 cores.
Thanks
Carl R Bondeson
IT Analyst 3
Department of Public Health
Operation & Support Services
Information Technology
Phone: 860-509-7434
Carl.Bondeson@ct.gov