Azure Container App Running RabbitMQ keeps creating new replicas

Wycliffe Mohapi 0 Reputation points
2024-03-12T10:01:47.75+00:00

We have a configuration where we have an azure container app

The container app is running Rabbit MQ image rabbitmq:3.12.2-management-alpine
We are trying to replace rabbit MQ running in a linux vm because of skills issue

We have TCP health probes that connect to second port 15672

Number of CPU cores 2

Memory size (Gi) 4Gi

our scaling is set to
Min / max replicas 1 - 1

The container app keeps creating new replicas and this sometimes brings down the rabbit mq with the error RabbitMQ - vhost '/' is down

How can we prevent the creation of new replicas and stabilize the setup?

Below is the setup

{

"revisionSuffix": null,

"containers": [

{

  "image": "docker.io/rabbitmq:3.12.2-management-alpine",

  "name": "horizon-shared-ca-rabbitmq",

  "env": [

    {

      "name": "RABBITMQ_NODENAME",

      "value": "****************"

    }

  ],

  "resources": {

    "cpu": 2.0,

    "memory": "4Gi"

  },

  "probes": [

    {

      "type": "Liveness",

      "failureThreshold": 30,

      "initialDelaySeconds": 60,

      "periodSeconds": 240,

      "successThreshold": 1,

      "tcpSocket": {

        "port": 15672

      },

      "timeoutSeconds": 60

    },

    {

      "type": "Readiness",

      "failureThreshold": 30,

      "initialDelaySeconds": 60,

      "periodSeconds": 240,

      "successThreshold": 1,

      "tcpSocket": {

        "port": 15672

      },

      "timeoutSeconds": 60

    },

    {

      "type": "Startup",

      "failureThreshold": 30,

      "initialDelaySeconds": 60,

      "periodSeconds": 240,

      "successThreshold": 1,

      "tcpSocket": {

        "port": 15672

      },

      "timeoutSeconds": 60

    }

  ],

  "volumeMounts": [

    {

      "volumeName": "shared-rabbitmq-fs",

      "mountPath": "/var/lib/rabbitmq/mnesia"

    }

  ]

}

],

"scale": {

"minReplicas": 1,

"maxReplicas": 1,

"rules": null

},

"volumes": [

{

  "name": "shared-rabbitmq-fs",

  "storageType": "AzureFile",

  "storageName": "shared-rabbitmq-fs"

}

]

}

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
346 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Udit Narayana 0 Reputation points
    2024-07-10T06:43:36.65+00:00

    Hi, We were also trying this and we had kind of a similar situation. In our case, we utilised another vhost alongside the default '/' vhost because the ques and exchanges were returning a not found page. To overcome this we tried passing a default vhost name using the rabbitmq environmental variable "RABBITMQ_DEFAULT_VHOST" to set the default vhost. We are also facing an issue with persistence when the replica restarts a new folder and files are created and the older data is just left out and we are looking out for a fix. Hope this helps you a bit