I have developed a flask API which will execute a long-running function via ThreadPoolExecutor as background process. This function consumes considerable amount of memory (up-to