OCI Functions Timeout guide with Heavy Load - How to Optimize Performance?
I'm working on a project and hit a roadblock. I'm wondering if anyone has experience with I'm building a feature where Does anyone know how to I'm deploying a batch processing application using Oracle Cloud Infrastructure (OCI) Functions, and I'm working with a timeout scenario when I try to handle larger payloads... My function is timing out after the default 60 seconds, which is insufficient for processing heavy data. I've tried to increase the timeout setting in the function configuration using the OCI CLI as follows: ```bash oci fn function update --function-id <function_id> --timeout 120 ``` Despite this change, the function still times out, leading me to believe that either my approach or my configuration might be incorrect. I've also checked the logs and I see the following behavior message: `Function execution timed out after 60 seconds.` This suggests that the new timeout value isn't being applied, or that thereโs some bottleneck within the function itself that I havenโt identified yet. Here's a simplified version of my function code that processes a large batch of data: ```python import json def handler(ctx, data: str = None): data = json.loads(data) # Simulating heavy processing total = 0 for number in data['numbers']: total += number return {'total': total} ``` I've confirmed that the function is invoked with a valid payload of around 10,000 numbers. Also, Iโm using the OCI Functions JavaScript runtime version 1.0.0. To further debug, I tested the function with a smaller payload of 1,000 numbers, and it executed successfully within the timeout limit. Additionally, I tried deploying the function with the maximum timeout limit of 900 seconds, but the question continues. What could be the potential reasons for this timeout, and are there any best practices or optimization techniques I should consider to handle such heavy loads effectively? This is happening in both development and production on Debian. This issue appeared after updating to Python 3.11. Any advice would be much appreciated. This issue appeared after updating to Python 3.9. I'm using Python 3.10 in this project.