CodexBloom - Programming Q&A Platform

OCI Container Instance scenarios to Start with 'Resource Limit Exceeded' scenarios

👀 Views: 498 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-08
OCI container-instances Python

I'm trying to debug I've been struggling with this for a few days now and could really use some help. I'm trying to deploy a container instance in Oracle Cloud Infrastructure (OCI) using the SDK for Python, but I keep running into the behavior `Resource limit exceeded` when I attempt to start the instance. I'm using the `oci` library version 2.37.0 and have defined the instance as follows: ```python import oci config = oci.config.from_file() container_instance_client = oci.container_instances.ContainerInstanceClient(config) instance_details = oci.container_instances.models.CreateContainerInstanceDetails( compartment_id='ocid1.compartment.oc1..examplecompartmentid', display_name='my_container_instance', image='my_image', shape='VM.Standard2.1', requested_oci_tenant='my_tenant_id', resource_limits=oci.container_instances.models.ResourceLimits( memory_in_gbs=16, cpu_count=2 ) ) response = container_instance_client.create_container_instance(instance_details) print(response.data) ``` I double-checked my compartment limits, and I have sufficient quota for both memory and CPU resources in the region. However, I still receive the behavior each time I try to run this script. I've also tried reducing the `memory_in_gbs` to 8 and setting `cpu_count` to 1, but I still encounter the same behavior. Is there a hidden limit or configuration I might be missing? Any insights would be greatly appreciated! This is part of a larger service I'm building. I'm working with Python in a Docker container on CentOS. Any suggestions would be helpful. Am I missing something obvious?