Find out how to troubleshoot common issues with code-only functions in OCI Functions.
Use this topic to troubleshoot common code-only function creation, update, archive validation, Object Storage access, runtime, and invocation issues.
Archive validation issues
| Problem | Likely cause | Recommended fix |
|---|
| Archive is too large for direct upload | Archive exceeds 25 MB | Use Object Storage if the archive is 250 MB or smaller, or reduce archive size. |
| Archive is too large for Object Storage source | Archive exceeds 250 MB | Reduce archive size. |
| Unsupported archive format | Archive is not ZIP, or is a JAR file for a non-Java runtime | Use a supported archive format. |
| Archive layout does not match runtime | Files are not in the required runtime-specific locations | Use the runtime-specific packaging topic. |
| Archive layout does not match application architecture | Archive contains artifacts for the wrong architecture | Rebuild or repackage for the application architecture. |
Object Storage access issues
| Problem | Likely cause | Recommended fix |
|---|
| Function creation fails when using Object Storage archive | OCI Functions application resource principal cannot read the object | Add a policy that grants read access to the archive object. |
| Object version cannot be found | Incorrect object version selected | Confirm the object version exists and is accessible. |
| Archive object is in another compartment | Policy does not cover the archive compartment | Add the policy in the compartment where the archive object resides. |
Runtime issues
| Problem | Likely cause | Recommended fix |
|---|
| Runtime version cannot be selected | Runtime version is not valid for the selected runtime or is inactive | Select a valid active runtime version. |
| Function does not move to newer runtime | Function is in manual mode | Change runtime update mode if appropriate. |
| Function moved runtime only after update | Expected behavior for function update mode | No action needed unless a specific runtime version is required. |
Deployment model issues
| Problem | Explanation | Recommended fix |
|---|
| Existing image-based function cannot be converted to a code-only function | Changing between code-only and image-based deployment models is unsupported. | Create a new function using the required deployment model. |
| Existing code-only function cannot be converted to an image-based function | Changing between code-only and image-based deployment models is unsupported. | Create a new function using the required deployment model. |