microsoft / azure-container-apps

Roadmap and issues for Azure Container Apps
MIT License
372 stars 29 forks source link

"ScaledObject doesn't have correct triggers specification" error in logs #1307

Closed samgre closed 1 week ago

samgre commented 1 month ago

This issue is a

Issue description

"ScaledObject doesn't have correct triggers specification" message appears in a Container App system log every 15 minutes. We do not want this specific container app to be scaled, so we've specified min and max replicas to 1. In the future the container app will be scalable, but not right now.

Documentation states that the default values for min and max replicas are 0 and 10, respectively.

How to disable scaling through configuration so that there is always single replica running and no aforementioned errors are found in logs?

Steps to reproduce

  1. Deploy container app with min replicas = 1 and max replicas = 1, with or without a HTTP scaling rule
  2. Look at the logs for ScaledObject messages

Expected behavior

There would be a single replica running at all times, and no ScaledObject messages in system logs.

Actual behavior

There are messages about incorrect triggers specification.

Screenshots

Screenshot 2024-10-04 at 15 01 36 Screenshot 2024-10-04 at 15 01 44

Additional context

Azure Portal, container app system logs, query:

  ContainerAppSystemLogs_CL
  | where ContainerAppName_s == 'NAME'
  | project TimeGenerated, Log_s
  | order by TimeGenerated desc
v-vish commented 1 month ago

@samgre I have reproduced the issue with both minimum replicas set to 1 and maximum replicas set to 1 in the EAST US region. However, I couldn’t find any references to scaled object messages in the logs. Please see the below screenshot for referenceImage

Could you confirm the region in which your deployment is located?

samgre commented 1 month ago

Our deployment is in West Europe region.

v-vish commented 1 month ago

@samgre I have replicated the same setup in the West Europe region but did not find any scaled object messages in the logs. Could you please try again and let me know the status? If the issue persists, kindly share your environment and application details by emailing acasupport at microsoft.com, referencing this issue in your message.

samgre commented 1 month ago

Thanks @v-vish, we'll be in touch through Azure Portal's Help + Troubleshooting and refer the ticket to you at acasupport at ...

v-vish commented 1 month ago

@samgre sure...Thank you!!!

victorhazbun commented 3 weeks ago

This fix worked for me:

  1. Visit your container app overview page.
  2. Go to "revisions and replicas".
  3. Click on "create and deploy new revision"
  4. Click on the container image name.
  5. Increment "Container resource allocation", in my case 2 CPU cores and 4 Gi ram.
  6. Click "Create" button.
microsoft-github-policy-service[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.