CodexBloom - Programming Q&A Platform

OCI Functions: Timeout Issues when Invoking Multiple Concurrent Functions

πŸ‘€ Views: 59 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-26
oci functions java-sdk Java

I've tried everything I can think of but After trying multiple solutions online, I still can't figure this out. I tried several approaches but none seem to work. I'm experiencing timeout issues while trying to invoke multiple concurrent OCI Functions using the Java SDK. My current setup involves invoking several functions in parallel to process incoming requests, but I consistently receive a `408 Request Timeout` behavior after about 30 seconds. I have tried increasing the timeout settings in the function configuration, but it doesn't seem to help. Here’s the relevant code that I'm using to invoke the functions concurrently: ```java ExecutorService executor = Executors.newFixedThreadPool(5); List<Future<String>> futures = new ArrayList<>(); for (String functionName : listOfFunctionNames) { futures.add(executor.submit(() -> { return invokeFunction(functionName); })); } for (Future<String> future : futures) { try { String result = future.get(); // This is where I often hit the timeout scenario System.out.println("Function result: " + result); } catch (ExecutionException e) { System.err.println("Function invocation failed: " + e.getCause().getMessage()); } } executor.shutdown(); ``` I’ve also set the function timeout to 60 seconds in the OCI Console, but the invocations still time out at 30 seconds. I verified that the functions themselves are not the bottleneck since they can handle requests quickly when invoked individually. Am I missing something in the configuration? Is there a limitation on the number of concurrent requests that I can make against OCI Functions? Any guidance on how to resolve this scenario would be greatly appreciated. This is part of a larger CLI tool I'm building. How would you solve this? For reference, this is a production desktop app. Could this be a known issue?