Timeout set is not working

I have a function that takes a long time to run, about 2-3 minutes. It runs by default. After 30s, the lambda automatically ends and returns an error message {“message”: “Endpoint request timed out”}. I found that the jets document describes modifying the function timeout. I tried to modify the function and the global timeout., Found no effect, still running to 30s, lambda automatically ends, how can i do this?