> On 2 Jun 2017, at 11:07 AM, Vishnu Prasad <[email protected]> wrote: > > Iam using modwsgi express to load a python script which is actually a > simplehttpserver listening on Port 8051.
You should not be doing that. You get absolutely zero benefit from doing that and actually could cause problems because a multi process configuration in mod_wsgi-express would cause multiple instances of your web application to be run but they would conflict each other due to trying to use the same port. Why aren't you just running your web application script directly? > The intent of this program is to offload dynamic image sizing and sending > back the content-type as image/jpeg and respond with image. However because I > needed to run make_server command on port 8051,i need to send all my request > with http:localhost:8051/images/img1.jpg > > Now this is single threaded and all is queued irrespective of what process > and thread parameters I configure. Is there any alternative options? You need to rewrite your SimpleHTTPServer application to be a WSGI application. Once you have done that, then you can host with mod_wsgi and make use multi threading and/or multi processing for concurrent handling of requests. If you don't know ho to write a WSGI application, then go look at using the Flask micro framework as it does all the hard work for you. Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
