Immutable solution version
OCI OCE API returning 503 ServiceUnavailable while listing instances via SDK
Complete solution
Covers this Oracle OCI Generative AI problem: OCI OCE API returning 503 ServiceUnavailable while listing instances via SDK. The 503 from the OCE API while listing instances via the SDK was resolved by skipping OCE processing when excluded: at the top of `__load_paas_oce`, return [] early when the exclude flags contain oce_instance or oce.
The problem
Issue oracle/oci-python-sdk#854 (closed, 7 comments): Description: We are running an OCI inventory script using the Oracle Python SDK to list all services across compartments and regions. During execution, we consistently receive a 503 ServiceUnavailable error when calling the OCE (Oracle Content and Experience) API. Error Details: Service: Oracle Content and Experience Cloud Operation: listoceinstances Status Code: 503 Error Code: ServiceUnavailable Endpoint: mount the host path https at container path //cp.oce.eu-amsterdam-1.ocp.oraclecloud.com/20190912/oceInstances (also observed in me-dubai-1) Sample Error Message: ServiceUnavailable (503) operationname: listoce_instances mes
What fixed it
The 503 from the OCE API while listing instances via the SDK was resolved by skipping OCE processing when excluded: at the top of __load_paas_oce, return [] early when the exclude flags contain oceinstance or oce. Also wrap the per-compartment `oci.pagination.listcallgetallresults(oceclient.listoceinstances, compartment_id=...)` call in try/except and return [] on failure, so one bad compartment does not kill the whole listing.
Evidence
In gh:oracle/oci-python-sdk#854 (Oracle OCI Generative AI), the issue reported was: Issue oracle/oci-python-sdk#854 (closed, 7 comments): Description: We are running an OCI inventory script using the Oracle Python SDK to list all services across compartments and regions. During execution, we consistently receive a 503 ServiceUnavailable error when calling the OCE (Oracle Content and Experience) API. Error Details: Service: Oracle Content and Experience Cloud Operation: listoceinstances Status Code: 503 Error Code: ServiceUnavailable Endpoint: mount the host path https at container path //cp.oce.eu-amsterdam-1.ocp.oraclecloud.com/20190912/oceInstances (also observed in me-dubai-1) Sample Error Message: ServiceUnavailable (503) operationname: listoceinstances mes The verified resolution from the thread: The 503 from the OCE API while listing instances via the SDK was resolved by skipping OCE processing when excluded: at the top of `loadpaasoce`, return [] early when the exclude flags contain oceinstance or oce. Also wrap the per-compartment oci.pagination.list_call_get_all_results(oce_client.list_oce_instances, compartment_id=...) call in try/except and return [] on failure, so one bad compartment does not kill the whole listing. Source: mount the host path https at container path //github.com/oracle/oci-python-sdk/issues/854
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_P34SKd5pBAKIFLVXkrjgow" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">OCI OCE API returning 503 ServiceUnavailable while listing instances via SDK <span>— Vectle</span></a>