[rabbitmq-discuss] php pecl and max channel reached with php-fpm
Alvaro Videla
videlalvaro at gmail.com
Tue May 27 07:38:43 BST 2014
As MK said, be sure to either close the channels after you don't need them,
or reuse them. For me it seems that you are keeping persistent connections
and then you open one channel per request, but you don't close the channel
at the end, therefore the channels are "leaking", and thus your problem.
Regards,
Alvaro
On Tue, May 27, 2014 at 7:25 AM, Michael Klishin <mklishin at gopivotal.com>wrote:
> On 27 May 2014 at 03:00:50, BeaT Adrian (aditza8 at gmail.com) wrote:
> > > After a while (I guess 65500 requests) a problem occurs halting
> > all writes
> > "Could not create channel. Connection has no open channel slots
> > remaining"
> >
> > From what I have read in the sources is because every tcp connection
> > have an autoincrement channel ID that reaches its max. This happens
> > because every request must use the channel, and is no way to use
> > the same channel ( I could not find a way into the php-amqp channel
> > classs to make it persistent) and scripts cannot communicate
> > ( to use the same instance of the channel as php object).
>
> Every AMQP 0-9-1 connection has 1 or more channels (the max is negotiated
> between client and server, so this can be limited by the broker). If you
> open a lot of channels, you need to close them, or use more than 1
> connection
> (which in turn will use more than 1 TCP connection).
>
> Both channels and especially connections in practice take up some
> resources.
> It is very rare that an app actually needs 1000s or 10s of 1000s of
> channels.
>
> See http://www.rabbitmq.com/tutorials/amqp-concepts.html if you need a
> more
> detailed explanation.
>
> By the way, it is highly recommended that you use
> https://github.com/videlalvaro/php-amqplib
> and not the PECL extension (which is not actively maintained AFAIK).
> --
> MK
>
> Software Engineer, Pivotal/RabbitMQ
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140527/7d667ffa/attachment.html>
More information about the rabbitmq-discuss
mailing list