is currently working on a multi-computer manager. The web server made with flask performs tasks for administrative requests and returns the results to the front-end page (can wait).
for ease of processing, web servers such as nginx are not used.
for convenience, the same administrative command sends a command from the front end to the back end for each host. (when it comes to the display of processing results, you don"t want to use other modes.)
backend processing means that ssh logs in to other hosts to execute commands (it takes a long time, but does not consume the resources of the host where flask resides)
now I"m going to issue commands to about 50 machines. Now, every time I issue a command, flask will only open 6 processes or threads to process 6 requests, and wait a few dozen minutes to process the rest of the request.
whether you are using the default multithreaded mode or changing to multiprocess mode, specifying a number of processes of 32, 64, or more, only six processes are processing six requests, and the subsequent requests will not be processed until the processing is complete (it will take a long time).
I hope that after the front end sends 50 requests to the backend, the backend can open 50 processes or threads to process. In this way, we don"t have to wait so long, but I don"t know how to deal with it.
traces back to the flask internal process setting value processors is assigned to an object"s max_children property, which is not found to be used in the code.