onebeyond/rascal

No channels left to allocate

pico21 opened this issue · 3 comments

pico21 commented

RabbitMQ 3.8.11, Erlang 23.2.3
With Rascal version >=17, I get the error No channels left to allocate after initializing some subscriptions, whereas with version 16.x, this error doesn't occur

Rascal.Broker.create(Rascal.withDefaultConfig(this.config), function (err, broker) {
...
_.each(self.subscriptionNames, function (subscriptionName) {
  ...
  broker.subscribe(subscriptionName, { prefetch: 3 }, function (err, subscription) {
                      if (err) {
                          logger.debug(`[BS] Rascal.Broker.subscribe error: ${err}`)
                          process.exit(1);
                      }
  ...
   }
...
}

Hi @pico21

  • What does your RabbitMQ management console show WRT the channels?
  • What version of Rascal 16 were you using?

It's possible #219 might be related. Can you share how you were specifying the connection parameters, and whether you previously set a value for channelMax?

Based on my comments in #219 I suspect you are using a connection url in the config, and not specifying a channelMax. Prior to v17 rascal ignored the default channelMax in this case. I made the decision from v17 onwards to apply the default values if they were not overiden in the connection url. If this sounds like it might explain the problem, then add a url request parameter channelMax=65535 to restore the previous behaviour. You might also be able to specify channelMax=0 but I'm not 100% sure without testing.

pico21 commented

thank you, it work also with channelMax=0