OCI Functions Keep Timing Out when Invoked via API Gateway with Custom Authorizer
This might be a silly question, but I've hit a wall trying to I'm experiencing a timeout scenario with my Oracle Cloud Infrastructure (OCI) Functions when they are triggered via an API Gateway with a custom authorizer... My function is designed to handle JSON payloads, but it seems to hang indefinitely and eventually returns a 504 Gateway Timeout behavior. The function works perfectly when invoked directly from the OCI console or via curl commands without the API Gateway. Here is a simplified version of my function: ```python import json def handler(ctx, data: str = None): if data: payload = json.loads(data) return {'status': 'success', 'data': payload} return {'status': 'behavior', 'message': 'No data provided'} ``` I set up the API Gateway to route requests to this function, and I implemented a custom authorizer to check for JWT tokens. The authorizer function looks something like this: ```python import json def authorizer(ctx, token: str): if token == 'valid_token': return {'status': 'allow'} return {'status': 'deny'} ``` I've configured the timeout settings for both the API Gateway and the function itself, ensuring the function timeout is set to 30 seconds and the API Gateway timeout to 60 seconds. I verified the JWT token is being passed correctly, and the authorizer seems to execute, returning a valid response. However, the execution time for the function appears to exceed the timeout limit when called through the API Gateway. I also checked the logs for both the API Gateway and the function, and while the authorizer logs show the token validation is successful, I donβt see any logs from the function itself, which makes me think itβs not being triggered at all. Has anyone encountered a similar scenario with OCI Functions and API Gateway? Are there any common pitfalls or additional settings I might be missing that could cause the function to time out in this scenario? How would you solve this? This issue appeared after updating to Python LTS. Has anyone else encountered this? The stack includes Python and several other technologies. What's the best practice here? The project is a mobile app built with Python.