OCI Functions: Timeout Error When Calling from Oracle Cloud Infrastructure API Gateway
I'm currently facing a timeout error when trying to call my OCI Function from an Oracle Cloud Infrastructure API Gateway... I deployed a simple function using the OCI Functions Java SDK, which processes incoming JSON data and returns a response. However, when I set up the API Gateway to trigger this function, it times out after 30 seconds with the error message: `504 Gateway Timeout`. Here is a snippet of the OCI Function that I deployed: ```java import com.oracle.bmc.functions.model.Function; import com.oracle.bmc.functions.model.InvokeFunctionDetails; public class MyFunction { public String handleRequest(String input) { try { // Simulate processing time Thread.sleep(20000); // 20 seconds return "Processed: " + input; } catch (InterruptedException e) { return "Error: " + e.getMessage(); } } } ``` I configured the API Gateway to call this function, but it seems that the execution time exceeds the default timeout setting of the API Gateway. I've tried increasing the timeout settings in the API Gateway configuration, but it seems not to have any effect. Here is how I configured the timeout: ```json { "route": { "timeout": { "duration": "60s" } } } ``` I also verified that the function itself works perfectly when invoked directly from the OCI Console. Am I missing something in the API Gateway setup, or is there a specific configuration I need to consider for handling longer execution times? Any insight or suggestions would be greatly appreciated! This issue appeared after updating to Java 3.9. What's the correct way to implement this? This is happening in both development and production on Ubuntu 20.04. What would be the recommended way to handle this?