You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by trivedi_ravi13 <tr...@yahoo.co.in> on 2012/11/28 21:11:49 UTC
Does Qpid messaging API create a new thread for every new
connection?
I have observed that a new thread is being created every time a new
connection to the qpid broker is opened. I am using messaging APIs. Is there
any way to restrict or stop it from creating new threads? Let's say when we
have large number of connections?
e.g
connection connection ("127.0.0.1:5672");
connection.open();
Thanks in Advance,
Ravi
--
View this message in context: http://qpid.2158936.n2.nabble.com/Does-Qpid-messaging-API-create-a-new-thread-for-every-new-connection-tp7585394.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Does Qpid messaging API create a new thread for every new
connection?
Posted by trivedi_ravi13 <tr...@yahoo.co.in>.
Sorry, I was testing it on 0.6 version and bug seems to fixed in 0.7,
we tried on 0.10 version and setting the environment variable
QPID_MAX_IOTHREADS worked for us.
Thank you for your help..!! :)
--
View this message in context: http://qpid.2158936.n2.nabble.com/Does-Qpid-messaging-API-create-a-new-thread-for-every-new-connection-tp7585394p7585461.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Does Qpid messaging API create a new thread for every new connection?
Posted by Gordon Sim <gs...@redhat.com>.
On 11/29/2012 11:57 AM, trivedi_ravi13 wrote:
>
> Thank you, I Tried as you suggested, setting the environment variable
> had no change in number of threads getting created when I look at the total
> number of threads in /proc/<PID>/status file.
>
> I am creating 6 different connection objects and trying to open
> connection on 6 different qpid brokers.
>
> My Processor has 2 cores only. One interesting Issue I found on JIRA
> concerning the same problem.
> * QPID-1879 : The client library uses a new thread for every connection *
>
> This issue is set to resolved state but looking at the second comment
> from " Andrew Stitcher " It seems that it has been reverted back because of
> instability I think.
>
> * " Andrew Stitcher added a comment - 08/Dec/09 19:53
> This fix was reverted, due to some unforeseen interactions "*
>
> Could you please have a look at it and help me out..
What version are you using? Unless it is very old there should be a pool
in place. Run pstack against the client process and we can see what the
various threads are.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Does Qpid messaging API create a new thread for every new
connection?
Posted by trivedi_ravi13 <tr...@yahoo.co.in>.
Thank you, I Tried as you suggested, setting the environment variable
had no change in number of threads getting created when I look at the total
number of threads in /proc/<PID>/status file.
I am creating 6 different connection objects and trying to open
connection on 6 different qpid brokers.
My Processor has 2 cores only. One interesting Issue I found on JIRA
concerning the same problem.
* QPID-1879 : The client library uses a new thread for every connection *
This issue is set to resolved state but looking at the second comment
from " Andrew Stitcher " It seems that it has been reverted back because of
instability I think.
* " Andrew Stitcher added a comment - 08/Dec/09 19:53
This fix was reverted, due to some unforeseen interactions "*
Could you please have a look at it and help me out..
Thanks,
Ravi
--
View this message in context: http://qpid.2158936.n2.nabble.com/Does-Qpid-messaging-API-create-a-new-thread-for-every-new-connection-tp7585394p7585443.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Does Qpid messaging API create a new thread for every new connection?
Posted by Gordon Sim <gs...@redhat.com>.
On 11/28/2012 08:11 PM, trivedi_ravi13 wrote:
>
> I have observed that a new thread is being created every time a new
> connection to the qpid broker is opened. I am using messaging APIs. Is there
> any way to restrict or stop it from creating new threads? Let's say when we
> have large number of connections?
>
> e.g
> connection connection ("127.0.0.1:5672");
> connection.open();
>
> Thanks in Advance,
There is a thread pool that grows with connections up to a configurable
maximum size (I believe the default is the number of cpus). The
configuration option through which you change the maximum value is
max-iothread or QPID_MAX_IOTHREADS as an environment variable.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org