![]() |
WSGI Multi processing. - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: WSGI Multi processing. (/thread-26537.html) |
WSGI Multi processing. - simbha - May-05-2020 I am using WSGI module for running a RESTful interface application. Application is running fine. When i use a multiple requests simultaneously , from the Run-Console i see these requests are served sequentially causing too long wait times for the requests. My REST request program(Simulator of 3~5 REST requests) is multi-threaded and i see all the threads are initiated at the same time. I am not sure whether WSGI is doing multi-threading or multiprocessing and need help in steps to find the same. I use Pycharm IDE over windows operating system. Currently i have : from wsgiref.simple_server import make_server def Main(environ, start_response): status = '200 OK' headers = [('Content-Type', 'application/json')] start_response(status, headers) <Application Code> if __name__ == '__main__': with make_server('', 8000, Main) as server: print("Serving on port 8000...\nVisit http://localhost:8000\nTo kill the server Ctrol + C..\n") server.serve_forever() My reference to WSGI documentation mentions a configuration file like "wsgi.ini" and entries like wsgi.processes = <number> . Not sure whether i have to manually create this file and store in a specific directory to initiate a multiprocessing or threading. Appreciate your help. Regards, Simbha RE: WSGI Multi processing. - pyzyx3qwerty - May-05-2020 Please use proper code tags while posting your thread. |