It is actually very difficult to terminate a single Python request stream in a multi-threaded application. The best you can do is decide to shut down the whole process and restart it. Since this action violates concurrent requests, as a result, you really need to limit yourself to a single configuration with multiple threads.
Even then, support in mod_wsgi 3.X is not ideal for this. There is an inactive timeout for daemon mode, but it actually causes the process to restart in two situations. Firstly, when there are no requests, the process is idle. Secondly, when all request flows are blocked and time out.
mod_wsgi 4.X( ) , . - -, . .
, mod_wsgi, .