Robert, Chuck, Rob,

I have received six emails from you today.  Rather than replying to each one 
individually, I'll try to cover most of them here.  However, several of you 
have asked questions that I don't know how to answer.  You are all a level or 
two over my head.  But I'm learning.

I just sent a code fragment where I retrieve a list of countries from the DB, 
so won't repeat this here.  However, I did find that I was mistaken in saying 
that Glassfish won't accept a minimum pool size less than 8.  I don't know what 
happened before, but today I was able to set both the minimum and maximum to 1. 
 Immediately after doing this, the message copied below started appearing 
repeatedly in the server.log and my website stopped working---the DB evidently 
became inaccessible.  However, Glassfish was still running, and as soon as I 
set the maximum pool size back to 1000, these messages stopped coming and the 
website started working again.

I have no idea what all this means, but I think that the message copied below 
was generated each time some web crawler was submitting a query.  These come 
quite frequently.

By the way, I don't know how they do this, but the web crawlers somehow figured 
out that I submit queries to the web service using Get requests, with 
parameters for "country", "state", "city", "year", and are creating bogus 
queries by randomly filling these in, usually with values that don't make any 
sense, like "country=England", "state=England", "city=Scotland", and 
"year=2087".  These queries won't return any results, but they do initiate a DB 
connection.  These are happening many times every day.

Dan
-------------------------------------------------------------------------------

[2025-08-16T16:54:23.735+0000] [glassfish 4.1] [WARNING] 
[poolmgr.get_connection_failure] 
[javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors] [tid: 
_ThreadID=30 _ThreadName=http-listener-1(4)] [timeMillis: 1755363263735] 
[levelValue: 900] [[
  RAR5117 : Failed to obtain/create connection from connection pool [ 
HolidaysConnectionPool ]. Reason : 
com.sun.appserv.connectors.internal.api.PoolingException: In-use connections 
equal max-pool-size and expired max-wait-time. Cannot allocate more 
connections.]]

[2025-08-16T16:54:23.735+0000] [glassfish 4.1] [WARNING] [jdbc.exc_get_conn] 
[javax.enterprise.resource.resourceadapter.com.sun.gjc.spi] [tid: _ThreadID=30 
_ThreadName=http-listener-1(4)] [timeMillis: 1755363263735] [levelValue: 900] [[
  RAR5114 : Error allocating connection : [Error in allocating a connection. 
Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot 
allocate more connections.]]]

[2025-08-16T16:54:23.735+0000] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=30 
_ThreadName=Thread-8] [timeMillis: 1755363263735] [levelValue: 800] [[
  [Ljava.lang.StackTraceElement;@2545fa37]]

----------------------------------------------------------------------------------

From: Chuck Caldarale <n82...@gmail.com>
Sent: Saturday, August 16, 2025 1:11 PM
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: [EXTERNAL EMAIL] How to access a REST service

> On 2025 Aug 16, at 11:20, Daniel Schwartz 
> <d...@danielgschwartz.com<mailto:d...@danielgschwartz.com>> wrote: > > You 
> might be using a different version of Glassfish. I have 4.1 (which I realize 
> is old). It won't let you set the minimum pool size to less than
NkdkJdXPPEBannerStart
Be Careful With This Message
From (Chuck Caldarale 
<n82...@gmail.com>)<https://godaddy1.cloud-protect.net/email-details/?k=k1&payload=53616c7465645f5fb68816cf49614cda4f16318311f3923530b283fd298b84fc1b98ffd5d5149175a07de6c4ae167e0908052df4454a6d44816c8ad875812516f324216fbba463bd871fa91f47849f28b81ae03e65c3472afe5c68ef717c37340d928a0302a57cf97746ddfa09d92e48cbdeac324ac458fd1ff6e370b30266a351c879bd633dc9fb5e34bcf576711fbe7d23ccee7dba4790e5713a1b088e971f402af170d22ece0573f0bb5becac2bc684e5f49b7ebb8e40a40a47cb159fcf1837845728f86d7802889b923c952434ac6b7205465dbf12e84413d1bb8dd40dc6d942611c97110071a2423164f3043223>
Learn 
More<https://godaddy1.cloud-protect.net/email-details/?k=k1&payload=53616c7465645f5fb68816cf49614cda4f16318311f3923530b283fd298b84fc1b98ffd5d5149175a07de6c4ae167e0908052df4454a6d44816c8ad875812516f324216fbba463bd871fa91f47849f28b81ae03e65c3472afe5c68ef717c37340d928a0302a57cf97746ddfa09d92e48cbdeac324ac458fd1ff6e370b30266a351c879bd633dc9fb5e34bcf576711fbe7d23ccee7dba4790e5713a1b088e971f402af170d22ece0573f0bb5becac2bc684e5f49b7ebb8e40a40a47cb159fcf1837845728f86d7802889b923c952434ac6b7205465dbf12e84413d1bb8dd40dc6d942611c97110071a2423164f3043223>
Potential Impersonation
The sender's identity could not be verified and someone may be impersonating 
the sender. Take caution when interacting with this message.

NkdkJdXPPEBannerEnd



> On 2025 Aug 16, at 11:20, Daniel Schwartz 
> <d...@danielgschwartz.com<mailto:d...@danielgschwartz.com>> wrote:

>

> You might be using a different version of Glassfish.  I have 4.1 (which I 
> realize is old).  It won't let you set the minimum pool size to less than 8.





Did you actually set the minimum (steady-pool-size) or did you just try 
changing max-pool-size to 1? You cannot lower the maximum below the value of 
steady-pool-size.





> If you try to do this, it reports an error and won't let you proceed.  The 
> simple test I ran shows that it is creating 8 physical connections for each 
> logical connection.





Again, your conclusion is incorrect. The pool is creating 8 connections because 
that’s what the minimum is set to. Testing with a delay in your web service 
code between the connection acquisition and close calls - as Robert T already 
did - will show the pool size not growing beyond 8 until there are more than 8 
concurrent requests being processed.





> This is clearly stated by the monitoring report, and you can’t disagree with 
> that.





The report only shows that 8 connections have been created; there is no 
indication in the report of anything else.





> I have considered upgrading to a newer version of Glassfish, but this would 
> be another project that I'm not prepared to undertake right now.





But you apparently are prepared to handle all the security risks of running a 
11-year old server exposed to the internet. Bad tradeoff.



  - Chuck





---------------------------------------------------------------------

To unsubscribe, e-mail: 
users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org>

For additional commands, e-mail: 
users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org>


Reply via email to