Session issue
Wednesday, 4 May 2022 · 3 messages
BC
Bondeson, Carl4 May 2022 16:03 #
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 at ct.gov<mailto:Carl.Bondeson at ct.gov>
[cid:image001.jpg at 01D85F9D.FCF29490][cid:image002.png at 01D85F9D.FCF29490]
CG
Christian Grün4 May 2022 16:15 #
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-connections-reached-due-to-ephemeral-port-exhaustion-956142091.html
Quoted text · Carl · 56 lines
On Wed, May 4, 2022 at 4:04 PM Bondeson, Carl <Carl.Bondeson at 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 at ct.gov > > > > >
BC
Bondeson, Carl4 May 2022 16:26 #
Thanks. We had already implemented the registry fix. We will look to implement use try with resources.
Carl R Bondeson
IT Analyst 3
Department of Public Health
Operation & Support Services
Information Technology
Phone: 860-509-7434
Carl.Bondeson at ct.gov<mailto:Carl.Bondeson at ct.gov>
[cid:image001.jpg at 01D85FA1.5AA4C1F0][cid:image002.png at 01D85FA1.5AA4C1F0]
Quoted text · Christian Grün · 30 lines
From: Christian Grün <christian.gruen at gmail.com> Sent: Wednesday, May 4, 2022 10:15 AM To: Bondeson, Carl <Carl.Bondeson at ct.gov> Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] Session issue EXTERNAL EMAIL: This email originated from outside of the organization. Do not click any links or open any attachments unless you trust the sender and know the content is safe. 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-connections-reached-due-to-ephemeral-port-exhaustion-956142091.html<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fconfluence.atlassian.com%2Fconfkb%2Fno-buffer-space-available-maximum-connections-reached-due-to-ephemeral-port-exhaustion-956142091.html&data=05%7C01%7CCarl.Bondeson%40ct.gov%7Cf1c58efb00104c9b570608da2dd886c6%7C118b7cfaa3dd48b9b02631ff69bb738b%7C0%7C0%7C637872705242770080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XrzrBNM%2FKlDH%2F4UDfcaIWq0gm84DHYBhv%2Fnrd%2FJHYNI%3D&reserved=0> On Wed, May 4, 2022 at 4:04 PM Bondeson, Carl <Carl.Bondeson at ct.gov<mailto:Carl.Bondeson at 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 at ct.gov<mailto:Carl.Bondeson at ct.gov> [cid:image001.jpg at 01D85FA1.5AA4C1F0][cid:image002.png at 01D85FA1.5AA4C1F0]
Written for BaseX 9.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery