commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (POOL-288) Objects growing out of bound (beyond max limit)
Date Fri, 20 Feb 2015 13:35:12 GMT

    [ https://issues.apache.org/jira/browse/POOL-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14328911#comment-14328911
] 

Phil Steitz commented on POOL-288:
----------------------------------

How do you know the pool is growing beyond the max configured size?  Are you getting values
from getNumActive + getNumIdle beyond the configured max total?

What version of pool are you running?

> Objects growing out of bound (beyond max limit)
> -----------------------------------------------
>
>                 Key: POOL-288
>                 URL: https://issues.apache.org/jira/browse/POOL-288
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Abin
>
> My messaging application is a stand-alone spring boot application. I am maintaining an
apache commons pool of smpp sessions to be kept alive and used when needed. But the pool starts
to grow beyond its max limit. I have explained my application design below. Any help/suggestion
would be greatly appreciated.
> Current Design
> I have an object pool of type ZdSmppSession (Apache Commons Pool), with pool size set
to 40
> Each ZdSmppSession has the following
>     1. A sendMessage method
>     2. A private variable of type com.cloudhopper.smpp.SmppSession
>     3. A PostConstruct method
> The Post Construct method does the following
>     1. initiates a handshake and initialize the private variable     com.cloudhopper.smpp.SmppSession
>     2. schedules an enquire link to be sent every 60 secs
> I have about 120 worker threads which does the following
>     1. Read message from rmq
>     2. Get a ZdSmppSession object from pool
>     3. Calls sendMessage on the object
>     4. Release it back to pool
> So when a ZdSmppSession object is created in the pool it is ready to send messages
> When ZdSmppSession is released back to pool it keeps the connection alive by sending
enquire link every 60 secs. A session object is never destructed. 
> Issue
> The issue I am facing is that the pool grows beyond its maximum limit, even though the
max limit is set to 40.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message