How to terminate a request?

I have created APIs using Sanic. Now there are a few requests which take less time to execute and get the response. But on the other hand, there are a few requests which take minutes to get the response.

Now, is it possible to keep a time limit on each request? if a request takes more than 30 seconds, terminate the particular request.

Thanks in Advance.

This might be what you’re looking for:

Response timeout