Increase thread pool size

498 views
Skip to first unread message

Prem

unread,
Dec 5, 2008, 6:42:22 AM12/5/08
to jPOS Users
Hi,


I want to increase the thread-pool size, it seems in my current
setting it is 100.

I have used the following two configuration method to increase the
thread-pool.

<?xml version="1.0" ?>
<server class="org.jpos.q2.iso.QServer" logger="Q2"
name="cmfil_simulator_10000">
<attr name="port" type="java.lang.Integer">10009</attr>
<channel class="org.jpos.iso.channel.NCCChannel" logger="Q2"
packager="org.jpos.iso.packager.ISO87BPackager">
</channel>
<request-listener class="org.jpos.bsh.BSHRequestListener"
logger="Q2">
<thread-pool name="MyPool" logger="Q2" realm="Q2.system"
max-size="2" initial-size="1" />
<property name="source" value="cfg/cmfil.bsh" />
</request-listener>

</server>

<?xml version="1.0" ?>
<server class="org.jpos.q2.iso.QServer" logger="Q2"
name="cmfil_simulator_10000">
<attr name="port" type="java.lang.Integer">10009</attr>
<channel class="org.jpos.iso.channel.NCCChannel" logger="Q2"
packager="org.jpos.iso.packager.ISO87BPackager">
</channel>
<request-listener class="org.jpos.bsh.BSHRequestListener"
logger="Q2">
<attr name="minSessions" type="java.lang.Integer">1</attr>
<attr name="maxSessions" type="java.lang.Integer">3</attr>
<property name="source" value="cfg/cmfil.bsh" />
</request-listener>

</server>

Please help me to increase the thread-pool size.

Regards,
Prem

David Bergert

unread,
Dec 5, 2008, 8:53:14 AM12/5/08
to jpos-...@googlegroups.com
Add the minSessions and maxSessions attributes to QServer:

<attr name="minSessions" type="java.lang.Integer">100</attr> <!-- Min -->
<attr name="maxSessions" type="java.lang.Integer">1000</attr> <!-- Max -->


Dave Bergert
www.paymentsystemsblog.com

David Bergert

unread,
Dec 5, 2008, 12:01:08 PM12/5/08
to jpos-...@googlegroups.com
in r2688 Alejandro commited the jPOS SysLogListener...

I put together a short screen cast that shows this in action
Please see: http://www.paymentsystemsblog.com/jpos/

Regards,

David Bergert, CISSP, CISA, CPISM/A
www.paymentsystemsblog.com


ashu

unread,
Dec 8, 2008, 9:08:58 AM12/8/08
to jPOS Users
I have tried your suggested configuration file but still get warning
at 100 threads.
Please help

On Dec 5, 6:53 pm, "David Bergert" <dbergert...@gmail.com> wrote:
> Add the minSessions and maxSessions attributes to QServer:
>
> <attr name="minSessions" type="java.lang.Integer">100</attr>  <!-- Min -->
> <attr name="maxSessions" type="java.lang.Integer">1000</attr> <!-- Max -->
>
> Dave Bergertwww.paymentsystemsblog.com
>
> > -----Original Message-----
> > From: jpos-...@googlegroups.com [mailto:jpos-...@googlegroups.com] On
> > Behalf Of Prem
> > Sent: Friday, December 05, 2008 5:42 AM
> > To: jPOS Users
> > Subject: Increasethreadpoolsize
>
> > Hi,
>
> > I want to increase thethread-poolsize, it seems in my current
> > setting it is 100.
>
> > I have used the following two configuration method to increase the
> >thread-pool.
>
> > <?xml version="1.0" ?>
> > <server class="org.jpos.q2.iso.QServer" logger="Q2"
> >   name="cmfil_simulator_10000">
> >  <attr name="port" type="java.lang.Integer">10009</attr>
> > <channel class="org.jpos.iso.channel.NCCChannel"  logger="Q2"
> > packager="org.jpos.iso.packager.ISO87BPackager">
> > </channel>
> >  <request-listener class="org.jpos.bsh.BSHRequestListener"
> > logger="Q2">
> >   <thread-poolname="MyPool" logger="Q2" realm="Q2.system"

David Bergert

unread,
Dec 8, 2008, 9:11:51 AM12/8/08
to jpos-...@googlegroups.com
Can you post both your modified configuration (in case there is an error
with it) and your error/message or "warning" - so we can better understand
your problem and questions.


David Bergert, CISSP, CISA, CPISM/A
www.paymentsystemsblog.com


ashu

unread,
Dec 17, 2008, 12:14:10 AM12/17/08
to jPOS Users
This is error on the console after we tried both above configuration:
<warn>
pool exhausted ServerSocket
[addr=0.0.0.0/0.0.0.0,port=0,localport=10009]
<thread-pool name="ThreadPool-0">
<jobs>119</jobs>
<size>1</size>
<max>100</max>
<active>100</active>
<idle>1</idle>
<pending>0</pending>
</thread-pool>

</warn>

Mark Salter

unread,
Dec 17, 2008, 2:45:47 AM12/17/08
to jpos-...@googlegroups.com
ashu wrote:
> This is error on the console after we tried both above configuration:
> <warn>
> pool exhausted ServerSocket
> [addr=0.0.0.0/0.0.0.0,port=0,localport=10009]
> <thread-pool name="ThreadPool-0">
> <jobs>119</jobs>
> <size>1</size>
> <max>100</max>
> <active>100</active>
> <idle>1</idle>
> <pending>0</pending>
> </thread-pool>
>
> </warn>

Can you post your current server configuration too?

Perhaps also describing how the connection looks over time and any
problem seen by your client (that connects to your server) might help
you work out what you have wrong...

... 100 threads might be too big a number for your solution, so finding
out why they are not being returned to the pool is probably the place to
start. What do you do with the requests that arrive, anything that
could result in a thread never returning?

--
Mark

ashu

unread,
Dec 17, 2008, 4:47:40 AM12/17/08
to jPOS Users
I have tried both these configuration.

<?xml version="1.0" ?>
<server class="org.jpos.q2.iso.QServer" logger="Q2"
name="cmfil_simulator_10000">
<attr name="port" type="java.lang.Integer">10009</attr>
<channel class="org.jpos.iso.channel.NCCChannel" logger="Q2"
packager="org.jpos.iso.packager.ISO87BPackager">
</channel>
<request-listener class="org.jpos.bsh.BSHRequestListener"
logger="Q2">
<thread-pool name="ThreadPool-0" logger="Q2" realm="Q2.system"
max-size="2" initial-size="1" />
<property name="source" value="cfg/cmfil.bsh" />
</request-listener>

</server>
--------------------------------------------------------------------------------------------------
<?xml version="1.0" ?>
<server class="org.jpos.q2.iso.QServer" logger="Q2"
name="cmfil_simulator_10000">
<attr name="port" type="java.lang.Integer">10009</attr>
<channel class="org.jpos.iso.channel.NCCChannel" logger="Q2"
packager="org.jpos.iso.packager.ISO87BPackager">
</channel>
<request-listener class="org.jpos.bsh.BSHRequestListener"
logger="Q2">
<attr name="minSessions" type="java.lang.Integer">1</attr>
<attr name="maxSessions" type="java.lang.Integer">3</attr>
<property name="source" value="cfg/cmfil.bsh" />
</request-listener>

</server>
--------------------------------------------------------------------------------------------
In .bsh file ,i modify the incoming message and last thing i do is
source.send(message).
Do the need to do something after source.send(message);

Alejandro Revilla

unread,
Dec 17, 2008, 9:27:42 AM12/17/08
to jpos-...@googlegroups.com
You are configuring weird things inside the request-listener, for example, the <thread-pool ... will be ignored.

The minSessions and maxSessions have to be configured at the server level, not the request-listener level.

Mark Salter

unread,
Dec 17, 2008, 3:36:43 PM12/17/08
to jpos-...@googlegroups.com
Alejandro Revilla wrote:
> You are configuring weird things inside the request-listener, for
> example, the <thread-pool ... will be ignored.

Good spot Alejandro. Position and placement are everything!

--
Mark

Reply all
Reply to author
Forward
0 new messages